From owner-svn-src-all@freebsd.org Sun Jun 25 01:41:09 2017 Return-Path: Delivered-To: svn-src-all@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 66BE7DA9ECF; Sun, 25 Jun 2017 01:41:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 396367F312; Sun, 25 Jun 2017 01:41:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5P1f8UJ032155; Sun, 25 Jun 2017 01:41:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5P1f80Q032152; Sun, 25 Jun 2017 01:41:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706250141.v5P1f80Q032152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 25 Jun 2017 01:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320324 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 01:41:09 -0000 Author: glebius Date: Sun Jun 25 01:41:07 2017 New Revision: 320324 URL: https://svnweb.freebsd.org/changeset/base/320324 Log: Provide sbsetopt() that handles socket buffer related socket options. It distinguishes between data flow sockets and listening sockets, and in case of the latter doesn't change resource limits, since listening sockets don't hold any buffers, they only carry values to be inherited by their children. Modified: head/sys/kern/uipc_sockbuf.c head/sys/kern/uipc_socket.c head/sys/sys/sockbuf.h Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Sat Jun 24 20:09:23 2017 (r320323) +++ head/sys/kern/uipc_sockbuf.c Sun Jun 25 01:41:07 2017 (r320324) @@ -451,14 +451,78 @@ sbreserve_locked(struct sockbuf *sb, u_long cc, struct } int -sbreserve(struct sockbuf *sb, u_long cc, struct socket *so, - struct thread *td) +sbsetopt(struct socket *so, int cmd, u_long cc) { + struct sockbuf *sb; + short *flags; + u_int *hiwat, *lowat; int error; - SOCKBUF_LOCK(sb); - error = sbreserve_locked(sb, cc, so, td); - SOCKBUF_UNLOCK(sb); + SOCK_LOCK(so); + if (SOLISTENING(so)) { + switch (cmd) { + case SO_SNDLOWAT: + case SO_SNDBUF: + lowat = &so->sol_sbsnd_lowat; + hiwat = &so->sol_sbsnd_hiwat; + flags = &so->sol_sbsnd_flags; + break; + case SO_RCVLOWAT: + case SO_RCVBUF: + lowat = &so->sol_sbrcv_lowat; + hiwat = &so->sol_sbrcv_hiwat; + flags = &so->sol_sbrcv_flags; + break; + } + } else { + switch (cmd) { + case SO_SNDLOWAT: + case SO_SNDBUF: + sb = &so->so_snd; + break; + case SO_RCVLOWAT: + case SO_RCVBUF: + sb = &so->so_rcv; + break; + } + flags = &sb->sb_flags; + hiwat = &sb->sb_hiwat; + lowat = &sb->sb_lowat; + SOCKBUF_LOCK(sb); + } + + error = 0; + switch (cmd) { + case SO_SNDBUF: + case SO_RCVBUF: + if (SOLISTENING(so)) { + if (cc > sb_max_adj) { + error = ENOBUFS; + break; + } + *hiwat = cc; + if (*lowat > *hiwat) + *lowat = *hiwat; + } else { + if (!sbreserve_locked(sb, cc, so, curthread)) + error = ENOBUFS; + } + if (error == 0) + *flags &= ~SB_AUTOSIZE; + break; + case SO_SNDLOWAT: + case SO_RCVLOWAT: + /* + * Make sure the low-water is never greater than the + * high-water. + */ + *lowat = (cc > *hiwat) ? *hiwat : cc; + break; + } + + if (!SOLISTENING(so)) + SOCKBUF_UNLOCK(sb); + SOCK_UNLOCK(so); return (error); } Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sat Jun 24 20:09:23 2017 (r320323) +++ head/sys/kern/uipc_socket.c Sun Jun 25 01:41:07 2017 (r320324) @@ -461,12 +461,6 @@ sodealloc(struct socket *so) so->so_vnet->vnet_sockcnt--; #endif mtx_unlock(&so_global_mtx); - if (so->so_rcv.sb_hiwat) - (void)chgsbsize(so->so_cred->cr_uidinfo, - &so->so_rcv.sb_hiwat, 0, RLIM_INFINITY); - if (so->so_snd.sb_hiwat) - (void)chgsbsize(so->so_cred->cr_uidinfo, - &so->so_snd.sb_hiwat, 0, RLIM_INFINITY); #ifdef MAC mac_socket_destroy(so); #endif @@ -478,6 +472,12 @@ sodealloc(struct socket *so) if (so->sol_accept_filter != NULL) accept_filt_setopt(so, NULL); } else { + if (so->so_rcv.sb_hiwat) + (void)chgsbsize(so->so_cred->cr_uidinfo, + &so->so_rcv.sb_hiwat, 0, RLIM_INFINITY); + if (so->so_snd.sb_hiwat) + (void)chgsbsize(so->so_cred->cr_uidinfo, + &so->so_snd.sb_hiwat, 0, RLIM_INFINITY); sx_destroy(&so->so_snd.sb_sx); sx_destroy(&so->so_rcv.sb_sx); SOCKBUF_LOCK_DESTROY(&so->so_snd); @@ -2834,38 +2834,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) goto bad; } - switch (sopt->sopt_name) { - case SO_SNDBUF: - case SO_RCVBUF: - if (sbreserve(sopt->sopt_name == SO_SNDBUF ? - &so->so_snd : &so->so_rcv, (u_long)optval, - so, curthread) == 0) { - error = ENOBUFS; - goto bad; - } - (sopt->sopt_name == SO_SNDBUF ? &so->so_snd : - &so->so_rcv)->sb_flags &= ~SB_AUTOSIZE; - break; - - /* - * Make sure the low-water is never greater than the - * high-water. - */ - case SO_SNDLOWAT: - SOCKBUF_LOCK(&so->so_snd); - so->so_snd.sb_lowat = - (optval > so->so_snd.sb_hiwat) ? - so->so_snd.sb_hiwat : optval; - SOCKBUF_UNLOCK(&so->so_snd); - break; - case SO_RCVLOWAT: - SOCKBUF_LOCK(&so->so_rcv); - so->so_rcv.sb_lowat = - (optval > so->so_rcv.sb_hiwat) ? - so->so_rcv.sb_hiwat : optval; - SOCKBUF_UNLOCK(&so->so_rcv); - break; - } + error = sbsetopt(so, sopt->sopt_name, optval); break; case SO_SNDTIMEO: Modified: head/sys/sys/sockbuf.h ============================================================================== --- head/sys/sys/sockbuf.h Sat Jun 24 20:09:23 2017 (r320323) +++ head/sys/sys/sockbuf.h Sun Jun 25 01:41:07 2017 (r320324) @@ -167,8 +167,7 @@ void sbflush_locked(struct sockbuf *sb); void sbrelease(struct sockbuf *sb, struct socket *so); void sbrelease_internal(struct sockbuf *sb, struct socket *so); void sbrelease_locked(struct sockbuf *sb, struct socket *so); -int sbreserve(struct sockbuf *sb, u_long cc, struct socket *so, - struct thread *td); +int sbsetopt(struct socket *so, int cmd, u_long cc); int sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so, struct thread *td); struct mbuf * From owner-svn-src-all@freebsd.org Sun Jun 25 05:46:04 2017 Return-Path: Delivered-To: svn-src-all@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 B2773D8A133; Sun, 25 Jun 2017 05:46:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8044E84C40; Sun, 25 Jun 2017 05:46:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5P5k3nU031976; Sun, 25 Jun 2017 05:46:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5P5k3CR031975; Sun, 25 Jun 2017 05:46:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706250546.v5P5k3CR031975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 25 Jun 2017 05:46:03 +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: r320325 - stable/10/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 05:46:04 -0000 Author: delphij Date: Sun Jun 25 05:46:03 2017 New Revision: 320325 URL: https://svnweb.freebsd.org/changeset/base/320325 Log: MFC r320216: Fix use-after-free introduced in r300388. In r300388, endnetconfig() was called on nc_handle which would release the associated netconfig structure, which means tmpnconf->nc_netid would be a use-after-free. Solve this by doing endnetconfig() in return paths instead. Reported by: jemalloc via kevlo Reviewed by: cem, ngie (earlier version) Modified: stable/10/lib/libc/rpc/rpcb_clnt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/10/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 01:41:07 2017 (r320324) +++ stable/10/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 05:46:03 2017 (r320325) @@ -499,14 +499,15 @@ try_nconf: hostname = IN6_LOCALHOST_STRING; } } - endnetconfig(nc_handle); if (tmpnconf == NULL) { + endnetconfig(nc_handle); rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; mutex_unlock(&loopnconf_lock); return (NULL); } loopnconf = getnetconfigent(tmpnconf->nc_netid); /* loopnconf is never freed */ + endnetconfig(nc_handle); } mutex_unlock(&loopnconf_lock); client = getclnthandle(hostname, loopnconf, NULL); From owner-svn-src-all@freebsd.org Sun Jun 25 06:55:44 2017 Return-Path: Delivered-To: svn-src-all@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 673B5D8B08B; Sun, 25 Jun 2017 06:55:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 28E0116F0; Sun, 25 Jun 2017 06:55:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5P6thF3060060; Sun, 25 Jun 2017 06:55:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5P6thTV060059; Sun, 25 Jun 2017 06:55:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706250655.v5P6thTV060059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 25 Jun 2017 06:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r320326 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 06:55:44 -0000 Author: delphij Date: Sun Jun 25 06:55:42 2017 New Revision: 320326 URL: https://svnweb.freebsd.org/changeset/base/320326 Log: MFC r320216: Fix use-after-free introduced in r300388. In r300388, endnetconfig() was called on nc_handle which would release the associated netconfig structure, which means tmpnconf->nc_netid would be a use-after-free. Solve this by doing endnetconfig() in return paths instead. Reported by: jemalloc via kevlo Reviewed by: cem, ngie (earlier version) Modified: stable/9/lib/libc/rpc/rpcb_clnt.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/9/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 05:46:03 2017 (r320325) +++ stable/9/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 06:55:42 2017 (r320326) @@ -508,14 +508,15 @@ try_nconf: hostname = IN6_LOCALHOST_STRING; } } - endnetconfig(nc_handle); if (tmpnconf == NULL) { + endnetconfig(nc_handle); rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; mutex_unlock(&loopnconf_lock); return (NULL); } loopnconf = getnetconfigent(tmpnconf->nc_netid); /* loopnconf is never freed */ + endnetconfig(nc_handle); } mutex_unlock(&loopnconf_lock); client = getclnthandle(hostname, loopnconf, NULL); From owner-svn-src-all@freebsd.org Sun Jun 25 07:49:16 2017 Return-Path: Delivered-To: svn-src-all@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 73F4AD8BAFA; Sun, 25 Jun 2017 07:49:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 529062B59; Sun, 25 Jun 2017 07:49:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v5P7nENB044747 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Jun 2017 00:49:14 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v5P7nEct044746; Sun, 25 Jun 2017 00:49:14 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 25 Jun 2017 00:49:14 -0700 From: Gleb Smirnoff To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Subject: Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rpc... Message-ID: <20170625074914.GU50023@FreeBSD.org> References: <201706082130.v58LUY0j095589@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 07:49:16 -0000 Conrad, this should be fixed by r320324. Sorry for inconvenience. On Fri, Jun 23, 2017 at 09:48:24PM -0700, Conrad Meyer wrote: C> Hi Gleb, C> C> We suspect this revision has broken setsockopt(SO_SNDBUF), etc., on C> listen sockets, as used by e.g. nginx. C> C> Example backtrace: http://imgur.com/a/fj5JQ C> C> The proposed mechanism is the destroyed snd/rcv sockbufs (and C> associated locks) as part of solisten_proto(). C> C> Best, C> Conrad C> C> C> C> On Thu, Jun 8, 2017 at 2:30 PM, Gleb Smirnoff wrote: C> > Author: glebius C> > Date: Thu Jun 8 21:30:34 2017 C> > New Revision: 319722 C> > URL: https://svnweb.freebsd.org/changeset/base/319722 C> > C> > Log: C> > Listening sockets improvements. C> > C> > o Separate fields of struct socket that belong to listening from C> > fields that belong to normal dataflow, and unionize them. This C> > shrinks the structure a bit. C> > - Take out selinfo's from the socket buffers into the socket. The C> > first reason is to support braindamaged scenario when a socket is C> > added to kevent(2) and then listen(2) is cast on it. The second C> > reason is that there is future plan to make socket buffers pluggable, C> > so that for a dataflow socket a socket buffer can be changed, and C> > in this case we also want to keep same selinfos through the lifetime C> > of a socket. C> > - Remove struct struct so_accf. Since now listening stuff no longer C> > affects struct socket size, just move its fields into listening part C> > of the union. C> > - Provide sol_upcall field and enforce that so_upcall_set() may be called C> > only on a dataflow socket, which has buffers, and for listening sockets C> > provide solisten_upcall_set(). C> > C> > o Remove ACCEPT_LOCK() global. C> > - Add a mutex to socket, to be used instead of socket buffer lock to lock C> > fields of struct socket that don't belong to a socket buffer. C> > - Allow to acquire two socket locks, but the first one must belong to a C> > listening socket. C> > - Make soref()/sorele() to use atomic(9). This allows in some situations C> > to do soref() without owning socket lock. There is place for improvement C> > here, it is possible to make sorele() also to lock optionally. C> > - Most protocols aren't touched by this change, except UNIX local sockets. C> > See below for more information. C> > C> > o Reduce copy-and-paste in kernel modules that accept connections from C> > listening sockets: provide function solisten_dequeue(), and use it in C> > the following modules: ctl(4), iscsi(4), ng_btsocket(4), ng_ksocket(4), C> > infiniband, rpc. C> > C> > o UNIX local sockets. C> > - Removal of ACCEPT_LOCK() global uncovered several races in the UNIX C> > local sockets. Most races exist around spawning a new socket, when we C> > are connecting to a local listening socket. To cover them, we need to C> > hold locks on both PCBs when spawning a third one. This means holding C> > them across sonewconn(). This creates a LOR between pcb locks and C> > unp_list_lock. C> > - To fix the new LOR, abandon the global unp_list_lock in favor of global C> > unp_link_lock. Indeed, separating these two locks didn't provide us any C> > extra parralelism in the UNIX sockets. C> > - Now call into uipc_attach() may happen with unp_link_lock hold if, we C> > are accepting, or without unp_link_lock in case if we are just creating C> > a socket. C> > - Another problem in UNIX sockets is that uipc_close() basicly did nothing C> > for a listening socket. The vnode remained opened for connections. This C> > is fixed by removing vnode in uipc_close(). Maybe the right way would be C> > to do it for all sockets (not only listening), simply move the vnode C> > teardown from uipc_detach() to uipc_close()? C> > C> > Sponsored by: Netflix C> > Differential Revision: https://reviews.freebsd.org/D9770 C> > C> > Modified: C> > head/sys/cam/ctl/ctl_ha.c C> > head/sys/dev/iscsi/icl_soft_proxy.c C> > head/sys/kern/sys_socket.c C> > head/sys/kern/uipc_accf.c C> > head/sys/kern/uipc_debug.c C> > head/sys/kern/uipc_sockbuf.c C> > head/sys/kern/uipc_socket.c C> > head/sys/kern/uipc_syscalls.c C> > head/sys/kern/uipc_usrreq.c C> > head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c C> > head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c C> > head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c C> > head/sys/netgraph/ng_ksocket.c C> > head/sys/netinet/sctp_input.c C> > head/sys/netinet/sctp_syscalls.c C> > head/sys/netinet/sctp_sysctl.c C> > head/sys/netinet/sctp_usrreq.c C> > head/sys/netinet/tcp_subr.c C> > head/sys/netinet/tcp_syncache.c C> > head/sys/netinet/tcp_timewait.c C> > head/sys/ofed/drivers/infiniband/core/iwcm.c C> > head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c C> > head/sys/rpc/svc_vc.c C> > head/sys/sys/sockbuf.h C> > head/sys/sys/socket.h C> > head/sys/sys/socketvar.h C> > head/usr.bin/netstat/inet.c -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Sun Jun 25 09:01:32 2017 Return-Path: Delivered-To: svn-src-all@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 99211D8CEB0; Sun, 25 Jun 2017 09:01:32 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 78898646E0; Sun, 25 Jun 2017 09:01:31 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v5P8f7rK046971 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 25 Jun 2017 08:41:09 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v5P8f68l011452 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Jun 2017 11:41:06 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v5P8f6wW011451; Sun, 25 Jun 2017 11:41:06 +0300 (MSK) (envelope-from dchagin) Date: Sun, 25 Jun 2017 11:41:06 +0300 From: Chagin Dmitry To: Mahdi Mokhtari Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320265 - head/sys/compat/linprocfs Message-ID: <20170625084106.GA11387@mordor.heemeyer.club> References: <201706231036.v5NAaSU8061376@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706231036.v5NAaSU8061376@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 09:01:32 -0000 On Fri, Jun 23, 2017 at 10:36:27AM +0000, Mahdi Mokhtari wrote: > Author: mmokhi (ports committer) > Date: Fri Jun 23 10:36:27 2017 > New Revision: 320265 > URL: https://svnweb.freebsd.org/changeset/base/320265 > > Log: hi, /proc/cpuinfo incomplete, at least CPU flags. u /proc/cpuinfo implementation: root@mordor:~ # chroot /compat/lg64 /bin/bash mordor / # uname -a Linux mordor.heemeyer.club 2.6.32 FreeBSD 12.0-CURRENT #38 r320302+5c976b6476(lemul)-dirty: Sat Ju x86_64 Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz GenuineIntel GNU/Linux mordor / # cat /proc/cpuinfo | grep flags flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow mordor / # on virtualboxed Ubuntu-17.04: dchagin@ubumor:~$ uname -a Linux ubumor 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux dchagin@ubumor:~$ dchagin@ubumor:~$ cat /proc/cpuinfo | grep flags flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes rdrand hypervisor lahf_lm abm FreeBSD from the same hardware: dchagin@mordor> uname -a ~ FreeBSD mordor.heemeyer.club 12.0-CURRENT FreeBSD 12.0-CURRENT #38 r320302+5c976b6476(lemul)-dirty: Sat Jun 24 08:56:47 MSK 2017 dchagin@mordor.heemeyer.club:/home/dchagin/obj/home/git/head/sys/YOY amd64 dchagin@mordor> ~ dchagin@mordor> dmesg | grep -A 10 CPU: ~ CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz (2394.51-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306c3 Family=0x6 Model=0x3c Stepping=3 Features=0xbfebfbff Features2=0x7fdafbbf AMD Features=0x2c100800 AMD Features2=0x21 Structured Extended Features=0x27ab XSAVE Features=0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 17179869184 (16384 MB) dchagin@mordor> From owner-svn-src-all@freebsd.org Sun Jun 25 11:31:40 2017 Return-Path: Delivered-To: svn-src-all@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 C7B9ED8F64B; Sun, 25 Jun 2017 11:31:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7CD346807D; Sun, 25 Jun 2017 11:31:40 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PBVdcq072917; Sun, 25 Jun 2017 11:31:39 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PBVdws072916; Sun, 25 Jun 2017 11:31:39 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706251131.v5PBVdws072916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 25 Jun 2017 11:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320327 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 11:31:40 -0000 Author: manu Date: Sun Jun 25 11:31:39 2017 New Revision: 320327 URL: https://svnweb.freebsd.org/changeset/base/320327 Log: Remove ALLWINNER kernel config file, all release image for SMP Allwinner board uses GENERIC and it's not updated for newer SoC. Deleted: head/sys/arm/conf/ALLWINNER From owner-svn-src-all@freebsd.org Sun Jun 25 13:22:50 2017 Return-Path: Delivered-To: svn-src-all@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 78403D9178B; Sun, 25 Jun 2017 13:22:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 487876EC8A; Sun, 25 Jun 2017 13:22:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PDMnJg019823; Sun, 25 Jun 2017 13:22:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PDMnmh019822; Sun, 25 Jun 2017 13:22:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706251322.v5PDMnmh019822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 25 Jun 2017 13:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320328 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 13:22:50 -0000 Author: andrew Date: Sun Jun 25 13:22:49 2017 New Revision: 320328 URL: https://svnweb.freebsd.org/changeset/base/320328 Log: Stop calling cpu_dcache_wb_range from PTE_SYNC. We set the shareability attributes in TCR_EL1 on boot. These tell the hardware the pagetables are in cached memory so there is no need to flush the entries from the cache to memory. This has about 4.2% improvement in system time and 2.7% improvement in user time for a buildkernel -j48 on a ThunderX. Keep the old code for now to allow for further comparisons. Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sun Jun 25 11:31:39 2017 (r320327) +++ head/sys/arm64/arm64/pmap.c Sun Jun 25 13:22:49 2017 (r320328) @@ -504,7 +504,11 @@ pmap_l3_valid(pt_entry_t l3) CTASSERT(L1_BLOCK == L2_BLOCK); +#if 0 #define PTE_SYNC(pte) cpu_dcache_wb_range((vm_offset_t)pte, sizeof(*pte)) +#else +#define PTE_SYNC(pte) (void)0 +#endif /* * Checks if the page is dirty. We currently lack proper tracking of this on From owner-svn-src-all@freebsd.org Sun Jun 25 15:21:53 2017 Return-Path: Delivered-To: svn-src-all@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 15158D93C62; Sun, 25 Jun 2017 15:21:53 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D447D73496; Sun, 25 Jun 2017 15:21:52 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PFLpfe071363; Sun, 25 Jun 2017 15:21:51 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PFLpIl071362; Sun, 25 Jun 2017 15:21:51 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201706251521.v5PFLpIl071362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 25 Jun 2017 15:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320329 - head/sys/fs/pseudofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 15:21:53 -0000 Author: dchagin Date: Sun Jun 25 15:21:51 2017 New Revision: 320329 URL: https://svnweb.freebsd.org/changeset/base/320329 Log: PFS_DELEN is the sum of the permanent part of the struct dirent and fixed size for the name buffer PFS_NAMELEN. As r318736 was commited (ino64 project) the size of the permanent part of the struct dirent was changed, so calulate PFS_DELEN properly. Modified: head/sys/fs/pseudofs/pseudofs.h Modified: head/sys/fs/pseudofs/pseudofs.h ============================================================================== --- head/sys/fs/pseudofs/pseudofs.h Sun Jun 25 13:22:49 2017 (r320328) +++ head/sys/fs/pseudofs/pseudofs.h Sun Jun 25 15:21:51 2017 (r320329) @@ -52,7 +52,7 @@ struct vnode; */ #define PFS_NAMELEN 24 #define PFS_FSNAMELEN 16 /* equal to MFSNAMELEN */ -#define PFS_DELEN (8 + PFS_NAMELEN) +#define PFS_DELEN (offsetof(struct dirent, d_name) + PFS_NAMELEN) typedef enum { pfstype_none = 0, From owner-svn-src-all@freebsd.org Sun Jun 25 17:42:28 2017 Return-Path: Delivered-To: svn-src-all@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 BD256D96614; Sun, 25 Jun 2017 17:42:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 86EF377C2C; Sun, 25 Jun 2017 17:42:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PHgR0R030865; Sun, 25 Jun 2017 17:42:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PHgRMf030864; Sun, 25 Jun 2017 17:42:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706251742.v5PHgRMf030864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 25 Jun 2017 17:42:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320330 - stable/11/lib/libc/rpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 17:42:28 -0000 Author: delphij Date: Sun Jun 25 17:42:27 2017 New Revision: 320330 URL: https://svnweb.freebsd.org/changeset/base/320330 Log: MFC r320216: Fix use-after-free introduced in r300388. In r300388, endnetconfig() was called on nc_handle which would release the associated netconfig structure, which means tmpnconf->nc_netid would be a use-after-free. Solve this by doing endnetconfig() in return paths instead. Reported by: jemalloc via kevlo Reviewed by: cem, ngie (earlier version) Approved by: re (kib) Modified: stable/11/lib/libc/rpc/rpcb_clnt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/11/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 15:21:51 2017 (r320329) +++ stable/11/lib/libc/rpc/rpcb_clnt.c Sun Jun 25 17:42:27 2017 (r320330) @@ -499,14 +499,15 @@ try_nconf: hostname = IN6_LOCALHOST_STRING; } } - endnetconfig(nc_handle); if (tmpnconf == NULL) { + endnetconfig(nc_handle); rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; mutex_unlock(&loopnconf_lock); return (NULL); } loopnconf = getnetconfigent(tmpnconf->nc_netid); /* loopnconf is never freed */ + endnetconfig(nc_handle); } mutex_unlock(&loopnconf_lock); client = getclnthandle(hostname, loopnconf, NULL); From owner-svn-src-all@freebsd.org Sun Jun 25 18:01:28 2017 Return-Path: Delivered-To: svn-src-all@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 A9BA8D96A69; Sun, 25 Jun 2017 18:01:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 77F00782AB; Sun, 25 Jun 2017 18:01:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PI1Rx0038162; Sun, 25 Jun 2017 18:01:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PI1Ram038161; Sun, 25 Jun 2017 18:01:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706251801.v5PI1Ram038161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 25 Jun 2017 18:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320331 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 18:01:28 -0000 Author: gjb Date: Sun Jun 25 18:01:27 2017 New Revision: 320331 URL: https://svnweb.freebsd.org/changeset/base/320331 Log: Fix an incorrect revision number. Submitted by: David Marec Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jun 25 17:42:27 2017 (r320330) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jun 25 18:01:27 2017 (r320331) @@ -882,7 +882,7 @@ multiple threads emit a UDP log_in_vain message concurrently. - The TCP stack has been changed to use the estimated RTT instead of timestamps for receive buffer auto resizing. From owner-svn-src-all@freebsd.org Sun Jun 25 18:41:01 2017 Return-Path: Delivered-To: svn-src-all@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 0BB91D9751F; Sun, 25 Jun 2017 18:41:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D031979463; Sun, 25 Jun 2017 18:41:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PIexfn052579; Sun, 25 Jun 2017 18:40:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PIexQ9052578; Sun, 25 Jun 2017 18:40:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706251840.v5PIexQ9052578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jun 2017 18:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320332 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 18:41:01 -0000 Author: kib Date: Sun Jun 25 18:40:59 2017 New Revision: 320332 URL: https://svnweb.freebsd.org/changeset/base/320332 Log: Style. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jun 25 18:01:27 2017 (r320331) +++ head/sys/vm/vm_map.c Sun Jun 25 18:40:59 2017 (r320332) @@ -2712,9 +2712,9 @@ vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset * If VM_MAP_WIRE_HOLESOK was specified, skip this check. */ next_entry: - if (((flags & VM_MAP_WIRE_HOLESOK) == 0) && - (entry->end < end && (entry->next == &map->header || - entry->next->start > entry->end))) { + if ((flags & VM_MAP_WIRE_HOLESOK) == 0 && + entry->end < end && (entry->next == &map->header || + entry->next->start > entry->end)) { end = entry->end; rv = KERN_INVALID_ADDRESS; goto done; From owner-svn-src-all@freebsd.org Sun Jun 25 19:20:14 2017 Return-Path: Delivered-To: svn-src-all@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 0CFC1D9822E; Sun, 25 Jun 2017 19:20:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D09657A8C8; Sun, 25 Jun 2017 19:20:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJKDYI068170; Sun, 25 Jun 2017 19:20:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJKDEZ068169; Sun, 25 Jun 2017 19:20:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706251920.v5PJKDEZ068169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jun 2017 19:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320333 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:20:14 -0000 Author: markj Date: Sun Jun 25 19:20:12 2017 New Revision: 320333 URL: https://svnweb.freebsd.org/changeset/base/320333 Log: Add noop_lseek() to the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Sun Jun 25 18:40:59 2017 (r320332) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Sun Jun 25 19:20:12 2017 (r320333) @@ -261,7 +261,15 @@ iput(struct inode *inode) static inline loff_t no_llseek(struct file *file, loff_t offset, int whence) { - return -ESPIPE; + + return (-ESPIPE); +} + +static inline loff_t +noop_llseek(struct linux_file *file, loff_t offset, int whence) +{ + + return (file->_file->f_offset); } #endif /* _LINUX_FS_H_ */ From owner-svn-src-all@freebsd.org Sun Jun 25 19:22:01 2017 Return-Path: Delivered-To: svn-src-all@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 22812D9839C; Sun, 25 Jun 2017 19:22:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E6E027ABE0; Sun, 25 Jun 2017 19:22:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJM0QF071982; Sun, 25 Jun 2017 19:22:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJM0Gd071981; Sun, 25 Jun 2017 19:22:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706251922.v5PJM0Gd071981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jun 2017 19:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320334 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:22:01 -0000 Author: markj Date: Sun Jun 25 19:21:59 2017 New Revision: 320334 URL: https://svnweb.freebsd.org/changeset/base/320334 Log: Add the thaw_early method to struct dev_pm_ops in the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/device.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Sun Jun 25 19:20:12 2017 (r320333) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Sun Jun 25 19:21:59 2017 (r320334) @@ -69,6 +69,7 @@ struct dev_pm_ops { int (*freeze)(struct device *dev); int (*freeze_late)(struct device *dev); int (*thaw)(struct device *dev); + int (*thaw_early)(struct device *dev); int (*poweroff)(struct device *dev); int (*poweroff_late)(struct device *dev); int (*restore)(struct device *dev); From owner-svn-src-all@freebsd.org Sun Jun 25 19:23:15 2017 Return-Path: Delivered-To: svn-src-all@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 B038AD985D2; Sun, 25 Jun 2017 19:23:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7F0D27AE52; Sun, 25 Jun 2017 19:23:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJNEUf072062; Sun, 25 Jun 2017 19:23:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJNEkR072061; Sun, 25 Jun 2017 19:23:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706251923.v5PJNEkR072061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jun 2017 19:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320335 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:23:15 -0000 Author: markj Date: Sun Jun 25 19:23:14 2017 New Revision: 320335 URL: https://svnweb.freebsd.org/changeset/base/320335 Log: Add a couple of macros to lockdep.h in the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/lockdep.h Sun Jun 25 19:21:59 2017 (r320334) +++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h Sun Jun 25 19:23:14 2017 (r320335) @@ -39,7 +39,12 @@ struct lock_class_key { #define lockdep_set_class_and_name(lock, key, name) +#define lockdep_assert_held(m) \ + sx_assert(&(m)->sx, SA_XLOCKED) + #define lockdep_assert_held_once(m) \ sx_assert(&(m)->sx, SA_XLOCKED | SA_NOTRECURSED) + +#define lockdep_is_held(m) (sx_xholder(&(m)->sx) == curthread) #endif /* _LINUX_LOCKDEP_H_ */ From owner-svn-src-all@freebsd.org Sun Jun 25 19:28:03 2017 Return-Path: Delivered-To: svn-src-all@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 4A50ED98795; Sun, 25 Jun 2017 19:28:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1554C7B01A; Sun, 25 Jun 2017 19:28:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJS24v072351; Sun, 25 Jun 2017 19:28:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJS2JC072350; Sun, 25 Jun 2017 19:28:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706251928.v5PJS2JC072350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jun 2017 19:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320336 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:28:03 -0000 Author: markj Date: Sun Jun 25 19:28:01 2017 New Revision: 320336 URL: https://svnweb.freebsd.org/changeset/base/320336 Log: Add ns_to_ktime() to the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/ktime.h Modified: head/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/ktime.h Sun Jun 25 19:23:14 2017 (r320335) +++ head/sys/compat/linuxkpi/common/include/linux/ktime.h Sun Jun 25 19:28:01 2017 (r320336) @@ -51,6 +51,15 @@ ktime_to_ns(ktime_t kt) return kt.tv64; } +static inline ktime_t +ns_to_ktime(uint64_t nsec) +{ + ktime_t kt; + + kt.tv64 = nsec; + return (kt); +} + static inline int64_t ktime_divns(const ktime_t kt, int64_t div) { From owner-svn-src-all@freebsd.org Sun Jun 25 19:30:22 2017 Return-Path: Delivered-To: svn-src-all@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 3AF6BD988DB; Sun, 25 Jun 2017 19:30:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0B5AD7B278; Sun, 25 Jun 2017 19:30:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJULM5072634; Sun, 25 Jun 2017 19:30:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJULlS072633; Sun, 25 Jun 2017 19:30:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706251930.v5PJULlS072633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Jun 2017 19:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320337 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:30:22 -0000 Author: markj Date: Sun Jun 25 19:30:20 2017 New Revision: 320337 URL: https://svnweb.freebsd.org/changeset/base/320337 Log: Add u64_to_user_ptr() to the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Jun 25 19:28:01 2017 (r320336) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Jun 25 19:30:20 2017 (r320337) @@ -260,6 +260,8 @@ scnprintf(char *buf, size_t size, const char *fmt, ... #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) + static inline unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) { From owner-svn-src-all@freebsd.org Sun Jun 25 19:59:40 2017 Return-Path: Delivered-To: svn-src-all@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 E3CAAD98F14; Sun, 25 Jun 2017 19:59:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B25D17BEDF; Sun, 25 Jun 2017 19:59:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PJxdqx084671; Sun, 25 Jun 2017 19:59:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PJxdTo084670; Sun, 25 Jun 2017 19:59:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706251959.v5PJxdTo084670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jun 2017 19:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320338 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 19:59:41 -0000 Author: kib Date: Sun Jun 25 19:59:39 2017 New Revision: 320338 URL: https://svnweb.freebsd.org/changeset/base/320338 Log: Remove stale part of the comment. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jun 25 19:30:20 2017 (r320337) +++ head/sys/vm/vm_map.c Sun Jun 25 19:59:39 2017 (r320338) @@ -3599,12 +3599,6 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, /* * If we can't accommodate max_ssize in the current mapping, no go. - * However, we need to be aware that subsequent user mappings might - * map into the space we have reserved for stack, and currently this - * space is not protected. - * - * Hopefully we will at least detect this condition when we try to - * grow the stack. */ if ((prev_entry->next != &map->header) && (prev_entry->next->start < addrbos + max_ssize)) From owner-svn-src-all@freebsd.org Sun Jun 25 20:06:06 2017 Return-Path: Delivered-To: svn-src-all@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 8E94AD99136; Sun, 25 Jun 2017 20:06:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5DBBE7C397; Sun, 25 Jun 2017 20:06:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PK65u3088843; Sun, 25 Jun 2017 20:06:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PK65de088842; Sun, 25 Jun 2017 20:06:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706252006.v5PK65de088842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jun 2017 20:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320339 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 20:06:06 -0000 Author: kib Date: Sun Jun 25 20:06:05 2017 New Revision: 320339 URL: https://svnweb.freebsd.org/changeset/base/320339 Log: Correctly handle small MAP_STACK requests. If mmap(2) is called with the MAP_STACK flag and the size which is less or equal to the initial stack mapping size plus guard, calculation of the mapping layout created zero-sized guard. Attempt to create such entry failed in vm_map_insert(), causing the whole mmap(2) call to fail. Fix it by adjusting the initial mapping size to have space for non-empty guard. Reject MAP_STACK requests which are shorter or equal to the configured guard pages size. Reported and tested by: Manfred Antar Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jun 25 19:59:39 2017 (r320338) +++ head/sys/vm/vm_map.c Sun Jun 25 20:06:05 2017 (r320339) @@ -3567,13 +3567,18 @@ out: return (rv); } +static int stack_guard_page = 1; +SYSCTL_INT(_security_bsd, OID_AUTO, stack_guard_page, CTLFLAG_RWTUN, + &stack_guard_page, 0, + "Specifies the number of guard pages for a stack that grows"); + static int vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, vm_size_t growsize, vm_prot_t prot, vm_prot_t max, int cow) { vm_map_entry_t new_entry, prev_entry; vm_offset_t bot, gap_bot, gap_top, top; - vm_size_t init_ssize; + vm_size_t init_ssize, sgp; int orient, rv; /* @@ -3586,12 +3591,16 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, KASSERT(orient != (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP), ("bi-dir stack")); + sgp = (vm_size_t)stack_guard_page * PAGE_SIZE; if (addrbos < vm_map_min(map) || addrbos > vm_map_max(map) || - addrbos + max_ssize < addrbos) + addrbos + max_ssize < addrbos || + sgp >= max_ssize) return (KERN_NO_SPACE); - init_ssize = (max_ssize < growsize) ? max_ssize : growsize; + init_ssize = growsize; + if (max_ssize < init_ssize + sgp) + init_ssize = max_ssize - sgp; /* If addr is already mapped, no go */ if (vm_map_lookup_entry(map, addrbos, &prev_entry)) @@ -3644,11 +3653,6 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, (void)vm_map_delete(map, bot, top); return (rv); } - -static int stack_guard_page = 1; -SYSCTL_INT(_security_bsd, OID_AUTO, stack_guard_page, CTLFLAG_RWTUN, - &stack_guard_page, 0, - "Specifies the number of guard pages for a stack that grows."); /* * Attempts to grow a vm stack entry. Returns KERN_SUCCESS if we From owner-svn-src-all@freebsd.org Sun Jun 25 21:53:10 2017 Return-Path: Delivered-To: svn-src-all@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 416CFD9B1B5; Sun, 25 Jun 2017 21:53:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1B91C7F1B4; Sun, 25 Jun 2017 21:53:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PLr90d035799; Sun, 25 Jun 2017 21:53:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PLr80F035795; Sun, 25 Jun 2017 21:53:08 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201706252153.v5PLr80F035795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 25 Jun 2017 21:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320340 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 21:53:10 -0000 Author: jilles Date: Sun Jun 25 21:53:08 2017 New Revision: 320340 URL: https://svnweb.freebsd.org/changeset/base/320340 Log: sh: Ignore error when cd writes the directory actually switched to. If CDPATH is used non-trivially or the operand is "-", cd writes the directory actually switched to. (We currently do this only in interactive shells, but POSIX requires this in non-interactive shells as well.) As mentioned in Austin group bug #1045, cd shall not return an error while leaving the current directory changed. Therefore, ignore any write error. Added: head/bin/sh/tests/builtins/cd10.0 (contents, props changed) Modified: head/bin/sh/cd.c head/bin/sh/sh.1 head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Sun Jun 25 20:06:05 2017 (r320339) +++ head/bin/sh/cd.c Sun Jun 25 21:53:08 2017 (r320340) @@ -164,8 +164,17 @@ docd(char *dest, int print, int phys) if ((phys || (rc = cdlogical(dest)) < 0) && (rc = cdphysical(dest)) < 0) return (-1); - if (print && iflag && curdir) + if (print && iflag && curdir) { out1fmt("%s\n", curdir); + /* + * Ignore write errors to preserve the invariant that the + * current directory is changed iff the exit status is 0 + * (or 1 if -e was given and the full pathname could not be + * determined). + */ + flushout(out1); + outclearerror(out1); + } return (rc); } Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Jun 25 20:06:05 2017 (r320339) +++ head/bin/sh/sh.1 Sun Jun 25 21:53:08 2017 (r320340) @@ -2018,6 +2018,11 @@ to return exit status 1 if the full pathname of the ne cannot be determined reliably or at all. Normally this is not considered an error, although a warning is printed. +.Pp +If changing the directory fails, the exit status is greater than 1. +If the directory is changed, the exit status is 0, or also 1 if +.Fl e +was given. .It Ic chdir A synonym for the .Ic cd Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun Jun 25 20:06:05 2017 (r320339) +++ head/bin/sh/tests/builtins/Makefile Sun Jun 25 21:53:08 2017 (r320340) @@ -51,6 +51,7 @@ ${PACKAGE}FILES+= cd6.0 ${PACKAGE}FILES+= cd7.0 ${PACKAGE}FILES+= cd8.0 ${PACKAGE}FILES+= cd9.0 cd9.0.stdout +${PACKAGE}FILES+= cd10.0 ${PACKAGE}FILES+= command1.0 ${PACKAGE}FILES+= command2.0 ${PACKAGE}FILES+= command3.0 Added: head/bin/sh/tests/builtins/cd10.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/cd10.0 Sun Jun 25 21:53:08 2017 (r320340) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +# Precondition +(cd /bin) || exit +# Verify write error is ignored. +$SH +m -ic 'CDPATH=/:; cd bin 1 Delivered-To: svn-src-all@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 55D4ED9B7B7; Sun, 25 Jun 2017 22:19:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0FC157FBC7; Sun, 25 Jun 2017 22:19:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PMJ2j6044067; Sun, 25 Jun 2017 22:19:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PMJ2HO044064; Sun, 25 Jun 2017 22:19:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706252219.v5PMJ2HO044064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Jun 2017 22:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320341 - in vendor/elftoolchain/dist: elfdump libelftc test/cxxfilt test/cxxfilt/ts test/cxxfilt/ts/builtin test/cxxfilt/ts/misc test/cxxfilt/ts/qualifiers test/cxxfilt/ts/substitute t... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 22:19:03 -0000 Author: emaste Date: Sun Jun 25 22:19:01 2017 New Revision: 320341 URL: https://svnweb.freebsd.org/changeset/base/320341 Log: Import ELF Tool Chain snapshot at r3561 From http://svn.code.sf.net/p/elftoolchain/code Added: vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/ vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/ vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/ vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/template/ vendor/elftoolchain/dist/test/cxxfilt/ts/template/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/template/tclist vendor/elftoolchain/dist/test/elfcopy/plugin/os.FreeBSD.mk (contents, props changed) Modified: vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/libelftc/_libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/libelftc/libelftc_vstr.c vendor/elftoolchain/dist/test/cxxfilt/tet_scen vendor/elftoolchain/dist/test/cxxfilt/ts/Makefile vendor/elftoolchain/dist/test/cxxfilt/ts/misc/tclist Modified: vendor/elftoolchain/dist/elfdump/elfdump.c ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.c Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/elfdump/elfdump.c Sun Jun 25 22:19:01 2017 (r320341) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3497 2016-10-17 20:57:22Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -2226,8 +2226,8 @@ elf_print_svr4_hash64(struct elfdump *ed, struct secti uint64_t *buf; uint64_t *bucket, *chain; uint64_t nbucket, nchain; - uint64_t *bl, *c, maxl, total; - uint64_t i, j; + uint64_t *bl, *c, j, maxl, total; + size_t i; int elferr, first; char idx[10]; Modified: vendor/elftoolchain/dist/libelftc/_libelftc.h ============================================================================== --- vendor/elftoolchain/dist/libelftc/_libelftc.h Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/libelftc/_libelftc.h Sun Jun 25 22:19:01 2017 (r320341) @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: _libelftc.h 3174 2015-03-27 17:13:41Z emaste $ + * $Id: _libelftc.h 3531 2017-06-05 05:08:43Z kaiwang27 $ */ #ifndef __LIBELFTC_H_ @@ -82,6 +82,8 @@ bool vector_str_init(struct vector_str *_vs); bool vector_str_pop(struct vector_str *_vs); bool vector_str_push(struct vector_str *_vs, const char *_str, size_t _len); +bool vector_str_push_vector(struct vector_str *_dst, + struct vector_str *_org); bool vector_str_push_vector_head(struct vector_str *_dst, struct vector_str *_org); char *vector_str_substr(const struct vector_str *_vs, size_t _begin, Modified: vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c ============================================================================== --- vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Sun Jun 25 22:19:01 2017 (r320341) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2007 Hyogeol Lee + * Copyright (c) 2015-2017 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +37,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 07:04:19Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3560 2017-06-25 00:28:23Z kaiwang27 $"); /** * @file cpp_demangle.c @@ -50,7 +51,7 @@ ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST, TYPE_VEC + TYPE_CST, TYPE_VEC, TYPE_RREF }; struct vector_type_qualifier { @@ -64,29 +65,49 @@ enum read_cmd { READ_TYPE, READ_FUNC, READ_PTRMEM }; +struct read_cmd_item { + enum read_cmd cmd; + void *data; +}; + struct vector_read_cmd { size_t size, capacity; - enum read_cmd *r_container; + struct read_cmd_item *r_container; }; +enum push_qualifier { + PUSH_ALL_QUALIFIER, + PUSH_CV_QUALIFIER, + PUSH_NON_CV_QUALIFIER, +}; + struct cpp_demangle_data { struct vector_str output; /* output string vector */ - struct vector_str output_tmp; struct vector_str subst; /* substitution string vector */ struct vector_str tmpl; struct vector_str class_type; + struct vector_str *cur_output; /* ptr to current output vec */ struct vector_read_cmd cmd; - bool paren; /* parenthesis opened */ - bool pfirst; /* first element of parameter */ bool mem_rst; /* restrict member function */ bool mem_vat; /* volatile member function */ bool mem_cst; /* const member function */ + bool mem_ref; /* lvalue-ref member func */ + bool mem_rref; /* rvalue-ref member func */ + bool is_tmpl; /* template args */ + bool is_functype; /* function type */ + bool ref_qualifier; /* ref qualifier */ + enum type_qualifier ref_qualifier_type; /* ref qualifier type */ + enum push_qualifier push_qualifier; /* which qualifiers to push */ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ - int push_head; }; +struct type_delimit { + bool paren; + bool firstp; +}; + #define CPP_DEMANGLE_TRY_LIMIT 128 #define FLOAT_SPRINTF_TRY_LIMIT 5 #define FLOAT_QUADRUPLE_BYTES 16 @@ -105,6 +126,7 @@ static int cpp_demangle_push_fp(struct cpp_demangle_da char *(*)(const char *, size_t)); static int cpp_demangle_push_str(struct cpp_demangle_data *, const char *, size_t); +static int cpp_demangle_pop_str(struct cpp_demangle_data *); static int cpp_demangle_push_subst(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_push_subst_v(struct cpp_demangle_data *, @@ -137,16 +159,18 @@ static int cpp_demangle_read_number_as_string(struct c 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 *); -static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *); +static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *, + struct vector_type_qualifier *); static int cpp_demangle_read_sname(struct cpp_demangle_data *); static int cpp_demangle_read_subst(struct cpp_demangle_data *); static int cpp_demangle_read_subst_std(struct cpp_demangle_data *); static int cpp_demangle_read_subst_stdtmpl(struct cpp_demangle_data *, - const char *, size_t); + const char *); static int cpp_demangle_read_tmpl_arg(struct cpp_demangle_data *); 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(struct cpp_demangle_data *, + struct type_delimit *); static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); @@ -158,10 +182,12 @@ static char *decode_fp_to_float80(const char *, size_t static char *decode_fp_to_long_double(const char *, size_t); static int hex_to_dec(char); static void vector_read_cmd_dest(struct vector_read_cmd *); -static int vector_read_cmd_find(struct vector_read_cmd *, enum read_cmd); +static struct read_cmd_item *vector_read_cmd_find(struct vector_read_cmd *, + enum read_cmd); static int vector_read_cmd_init(struct vector_read_cmd *); static int vector_read_cmd_pop(struct vector_read_cmd *); -static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd); +static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd, + void *); static void vector_type_qualifier_dest(struct vector_type_qualifier *); static int vector_type_qualifier_init(struct vector_type_qualifier *); static int vector_type_qualifier_push(struct vector_type_qualifier *, @@ -178,9 +204,12 @@ char * cpp_demangle_gnu3(const char *org) { struct cpp_demangle_data ddata; + struct vector_str ret_type; + struct type_delimit td; ssize_t org_len; unsigned int limit; char *rtn; + bool has_ret, more_type; if (org == NULL || (org_len = strlen(org)) < 2) return (NULL); @@ -200,26 +229,75 @@ cpp_demangle_gnu3(const char *org) return (NULL); rtn = NULL; + has_ret = more_type = false; if (!cpp_demangle_read_encoding(&ddata)) goto clean; + /* + * Pop function name from substitution candidate list. + */ + if (*ddata.cur != 0 && ddata.subst.size >= 1) { + if (!vector_str_pop(&ddata.subst)) + goto clean; + } + + td.paren = false; + td.firstp = true; limit = 0; + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata.is_tmpl) { + ddata.is_tmpl = false; + if (!vector_str_init(&ret_type)) + goto clean; + ddata.cur_output = &ret_type; + has_ret = true; + } + while (*ddata.cur != '\0') { /* * Breaking at some gcc info at tail. e.g) @@GLIBCXX_3.4 */ if (*ddata.cur == '@' && *(ddata.cur + 1) == '@') break; - if (!cpp_demangle_read_type(&ddata, 1)) - goto clean; + + if (has_ret) { + /* Read return type */ + if (!cpp_demangle_read_type(&ddata, NULL)) + goto clean; + } else { + /* Read function arg type */ + if (!cpp_demangle_read_type(&ddata, &td)) + goto clean; + } + + if (has_ret) { + /* Push return type to the beginning */ + if (!VEC_PUSH_STR(&ret_type, " ")) + goto clean; + if (!vector_str_push_vector_head(&ddata.output, + &ret_type)) + goto clean; + ddata.cur_output = &ddata.output; + vector_str_dest(&ret_type); + has_ret = false; + more_type = true; + } else if (more_type) + more_type = false; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) goto clean; } + if (more_type) + goto clean; if (ddata.output.size == 0) goto clean; - if (ddata.paren && !VEC_PUSH_STR(&ddata.output, ")")) + if (td.paren && !VEC_PUSH_STR(&ddata.output, ")")) goto clean; if (ddata.mem_vat && !VEC_PUSH_STR(&ddata.output, " volatile")) goto clean; @@ -227,10 +305,17 @@ cpp_demangle_gnu3(const char *org) goto clean; if (ddata.mem_rst && !VEC_PUSH_STR(&ddata.output, " restrict")) goto clean; + if (ddata.mem_ref && !VEC_PUSH_STR(&ddata.output, " &")) + goto clean; + if (ddata.mem_rref && !VEC_PUSH_STR(&ddata.output, " &&")) + goto clean; rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); clean: + if (has_ret) + vector_str_dest(&ret_type); + cpp_demangle_data_dest(&ddata); return (rtn); @@ -247,7 +332,6 @@ cpp_demangle_data_dest(struct cpp_demangle_data *d) vector_str_dest(&d->class_type); vector_str_dest(&d->tmpl); vector_str_dest(&d->subst); - vector_str_dest(&d->output_tmp); vector_str_dest(&d->output); } @@ -260,43 +344,42 @@ cpp_demangle_data_init(struct cpp_demangle_data *d, co if (!vector_str_init(&d->output)) return (0); - if (!vector_str_init(&d->output_tmp)) - goto clean1; if (!vector_str_init(&d->subst)) - goto clean2; + goto clean1; if (!vector_str_init(&d->tmpl)) - goto clean3; + goto clean2; if (!vector_str_init(&d->class_type)) - goto clean4; + goto clean3; if (!vector_read_cmd_init(&d->cmd)) - goto clean5; + goto clean4; assert(d->output.container != NULL); - assert(d->output_tmp.container != NULL); assert(d->subst.container != NULL); assert(d->tmpl.container != NULL); assert(d->class_type.container != NULL); - d->paren = false; - d->pfirst = false; d->mem_rst = false; d->mem_vat = false; d->mem_cst = false; + d->mem_ref = false; + d->mem_rref = false; + d->is_tmpl = false; + d->is_functype = false; + d->ref_qualifier = false; + d->push_qualifier = PUSH_ALL_QUALIFIER; d->func_type = 0; d->cur = cur; + d->cur_output = &d->output; d->last_sname = NULL; - d->push_head = 0; return (1); -clean5: - vector_str_dest(&d->class_type); clean4: - vector_str_dest(&d->tmpl); + vector_str_dest(&d->class_type); clean3: - vector_str_dest(&d->subst); + vector_str_dest(&d->tmpl); clean2: - vector_str_dest(&d->output_tmp); + vector_str_dest(&d->subst); clean1: vector_str_dest(&d->output); @@ -341,13 +424,27 @@ cpp_demangle_push_str(struct cpp_demangle_data *ddata, if (ddata == NULL || str == NULL || len == 0) return (0); - if (ddata->push_head > 0) - return (vector_str_push(&ddata->output_tmp, str, len)); + /* + * is_tmpl is used to check if the type (function arg) is right next + * to template args, and should always be cleared whenever new string + * pushed. + */ + ddata->is_tmpl = false; - return (vector_str_push(&ddata->output, str, len)); + return (vector_str_push(ddata->cur_output, str, len)); } static int +cpp_demangle_pop_str(struct cpp_demangle_data *ddata) +{ + + if (ddata == NULL) + return (0); + + return (vector_str_pop(ddata->cur_output)); +} + +static int cpp_demangle_push_subst(struct cpp_demangle_data *ddata, const char *str, size_t len) { @@ -386,9 +483,11 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d struct vector_type_qualifier *v, const char *type_str) { struct vector_str subst_v; + enum type_qualifier t; size_t idx, e_idx, e_len; - int rtn; char *buf; + int rtn; + bool cv; if (ddata == NULL || v == NULL) return (0); @@ -404,10 +503,14 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d goto clean; } + cv = true; e_idx = 0; while (idx > 0) { switch (v->q_container[idx - 1]) { case TYPE_PTR: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "*")) goto clean; if (type_str != NULL) { @@ -420,6 +523,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_REF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "&")) goto clean; if (type_str != NULL) { @@ -431,7 +537,25 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d } break; + case TYPE_RREF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&&")) + goto clean; + if (type_str != NULL) { + if (!VEC_PUSH_STR(&subst_v, "&&")) + goto clean; + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) + goto clean; + } + break; + case TYPE_CMX: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " complex")) goto clean; if (type_str != NULL) { @@ -444,6 +568,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_IMG: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { @@ -457,6 +584,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_EXT: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -489,11 +619,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_RST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " restrict")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " restrict")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -501,11 +642,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VAT: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " volatile")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " volatile")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -513,11 +665,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_CST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " const")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " const")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -525,6 +688,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VEC: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -614,7 +780,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[]")) @@ -630,7 +796,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat assert(num_len > 0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[")) return (0); @@ -660,7 +826,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat free(exp); return (0); } - if (!cpp_demangle_read_type(ddata, 0)) { + if (!cpp_demangle_read_type(ddata, NULL)) { free(exp); return (0); } @@ -777,11 +943,11 @@ cpp_demangle_read_expression(struct cpp_demangle_data switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('s', 't'): ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('s', 'r'): ddata->cur += 2; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!cpp_demangle_read_uqname(ddata)) return (0); @@ -1058,8 +1224,7 @@ cpp_demangle_read_expression_flat(struct cpp_demangle_ size_t i, p_idx, idx, exp_len; char *exp; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = &ddata->output; p_idx = output->size; @@ -1136,8 +1301,12 @@ static int cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, struct vector_type_qualifier *v) { + struct type_delimit td; + struct read_cmd_item *rc; size_t class_type_size, class_type_len, limit; const char *class_type; + int i; + bool paren, non_cv_qualifier; if (ddata == NULL || *ddata->cur != 'F' || v == NULL) return (0); @@ -1148,12 +1317,43 @@ cpp_demangle_read_function(struct cpp_demangle_data *d *ext_c = 1; ++ddata->cur; } - if (!cpp_demangle_read_type(ddata, 0)) + + /* Return type */ + if (!cpp_demangle_read_type(ddata, NULL)) return (0); + if (*ddata->cur != 'E') { - if (!DEM_PUSH_STR(ddata, "(")) + if (!DEM_PUSH_STR(ddata, " ")) return (0); - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM)) { + + non_cv_qualifier = false; + if (v->size > 0) { + for (i = 0; (size_t) i < v->size; i++) { + if (v->q_container[i] != TYPE_RST && + v->q_container[i] != TYPE_VAT && + v->q_container[i] != TYPE_CST) { + non_cv_qualifier = true; + break; + } + } + } + + paren = false; + rc = vector_read_cmd_find(&ddata->cmd, READ_PTRMEM); + if (non_cv_qualifier || rc != NULL) { + if (!DEM_PUSH_STR(ddata, "(")) + return (0); + paren = true; + } + + /* Push non-cv qualifiers. */ + ddata->push_qualifier = PUSH_NON_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) + return (0); + + if (rc) { + if (non_cv_qualifier && !DEM_PUSH_STR(ddata, " ")) + return (0); if ((class_type_size = ddata->class_type.size) == 0) return (0); class_type = @@ -1167,40 +1367,67 @@ cpp_demangle_read_function(struct cpp_demangle_data *d return (0); if (!DEM_PUSH_STR(ddata, "::*")) return (0); + /* Push pointer-to-member qualifiers. */ + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, rc->data, + NULL)) + return (0); ++ddata->func_type; - } else { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + } + + if (paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + paren = false; } - if (!DEM_PUSH_STR(ddata, ")(")) - return (0); - + td.paren = false; + td.firstp = true; limit = 0; + ddata->is_functype = true; for (;;) { - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, &td)) return (0); if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } - - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM) == 1) { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + ddata->is_functype = false; + if (td.paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + td.paren = false; } - if (!DEM_PUSH_STR(ddata, ")")) + /* Push CV qualifiers. */ + ddata->push_qualifier = PUSH_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) return (0); + + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + + /* Release type qualifier vector. */ + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + + /* Push ref-qualifiers. */ + if (ddata->ref_qualifier) { + switch (ddata->ref_qualifier_type) { + case TYPE_REF: + if (!DEM_PUSH_STR(ddata, " &")) + return (0); + break; + case TYPE_RREF: + if (!DEM_PUSH_STR(ddata, " &&")) + return (0); + break; + default: + return (0); + } + ddata->ref_qualifier = false; + } } ++ddata->cur; @@ -1306,7 +1533,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d goto clean3; if (*ddata->cur++ != '_') goto clean3; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (!DEM_PUSH_STR(ddata, "-in-")) goto clean3; @@ -1328,7 +1555,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'h'): /* virtual function non-virtual override thunk */ @@ -1358,7 +1585,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'J'): /* java class */ @@ -1367,7 +1594,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'S'): /* RTTI name (NTBS) */ @@ -1376,7 +1603,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'T'): /* VTT table */ @@ -1385,7 +1612,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'v'): /* virtual function virtual override thunk */ @@ -1406,7 +1633,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'W'): /* TLS wrapper function */ @@ -1424,30 +1651,74 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d static int cpp_demangle_read_local_name(struct cpp_demangle_data *ddata) { + struct vector_str local_name; + struct type_delimit td; size_t limit; + bool more_type; if (ddata == NULL) return (0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_encoding(ddata)) + + vector_str_init(&local_name); + ddata->cur_output = &local_name; + + if (!cpp_demangle_read_encoding(ddata)) { + vector_str_dest(&local_name); return (0); + } + ddata->cur_output = &ddata->output; + + td.paren = false; + td.firstp = true; + more_type = false; limit = 0; - for (;;) { - if (!cpp_demangle_read_type(ddata, 1)) + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata->is_tmpl) { + ddata->is_tmpl = false; + + /* Read return type */ + if (!cpp_demangle_read_type(ddata, NULL)) { + vector_str_dest(&local_name); return (0); + } + + more_type = true; + } + + /* Now we can push the name after possible return type is handled. */ + if (!vector_str_push_vector(&ddata->output, &local_name)) { + vector_str_dest(&local_name); + return (0); + } + vector_str_dest(&local_name); + + while (*ddata->cur != '\0') { + if (!cpp_demangle_read_type(ddata, &td)) + return (0); + if (more_type) + more_type = false; if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } + if (more_type) + return (0); + if (*(++ddata->cur) == '\0') return (0); - if (ddata->paren == true) { + if (td.paren == true) { if (!DEM_PUSH_STR(ddata, ")")) return (0); - ddata->paren = false; + td.paren = false; } if (*ddata->cur == 's') ++ddata->cur; @@ -1477,7 +1748,7 @@ cpp_demangle_read_name(struct cpp_demangle_data *ddata if (ddata == NULL || *ddata->cur == '\0') return (0); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; + output = ddata->cur_output; subst_str = NULL; @@ -1539,8 +1810,7 @@ cpp_demangle_read_name_flat(struct cpp_demangle_data * size_t i, p_idx, idx, name_len; char *name; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = ddata->cur_output; p_idx = output->size; @@ -1577,8 +1847,7 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (*(++ddata->cur) == '\0') return (0); - while (*ddata->cur == 'r' || *ddata->cur == 'V' || - *ddata->cur == 'K') { + do { switch (*ddata->cur) { case 'r': ddata->mem_rst = true; @@ -1589,11 +1858,19 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data case 'K': ddata->mem_cst = true; break; + case 'R': + ddata->mem_ref = true; + break; + case 'O': + ddata->mem_rref = true; + break; + default: + goto next; } - ++ddata->cur; - } + } while (*(++ddata->cur)); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; +next: + output = ddata->cur_output; if (!vector_str_init(&v)) return (0); @@ -1619,6 +1896,8 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data goto clean; } + if (p_idx == output->size) + goto next_comp; if ((subst_str = vector_str_substr(output, p_idx, output->size - 1, &subst_str_len)) == NULL) goto clean; @@ -1630,10 +1909,12 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (!cpp_demangle_push_subst_v(ddata, &v)) goto clean; + + next_comp: if (*ddata->cur == 'E') break; - else if (*ddata->cur != 'I' && - *ddata->cur != 'C' && *ddata->cur != 'D') { + else if (*ddata->cur != 'I' && *ddata->cur != 'C' && + *ddata->cur != 'D' && p_idx != output->size) { if (!DEM_PUSH_STR(ddata, "::")) goto clean; if (!VEC_PUSH_STR(&v, "::")) @@ -1776,7 +2057,8 @@ cpp_demangle_read_offset_number(struct cpp_demangle_da } static int -cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata) +cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata, + struct vector_type_qualifier *v) { size_t class_type_len, i, idx, p_idx; int p_func_type, rtn; @@ -1786,7 +2068,7 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl return (0); p_idx = ddata->output.size; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if ((class_type = vector_str_substr(&ddata->output, p_idx, @@ -1799,14 +2081,14 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl if (!vector_str_pop(&ddata->output)) goto clean1; - if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM)) + if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM, v)) goto clean1; if (!vector_str_push(&ddata->class_type, class_type, class_type_len)) goto clean2; p_func_type = ddata->func_type; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (p_func_type == ddata->func_type) { @@ -1828,6 +2110,10 @@ clean2: clean1: free(class_type); + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + return (rtn); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 25 22:19:35 2017 Return-Path: Delivered-To: svn-src-all@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 876A9D9B805; Sun, 25 Jun 2017 22:19:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3CAE87FCE6; Sun, 25 Jun 2017 22:19:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PMJYhl044129; Sun, 25 Jun 2017 22:19:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PMJYD6044128; Sun, 25 Jun 2017 22:19:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706252219.v5PMJYD6044128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Jun 2017 22:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320342 - vendor/elftoolchain/elftoolchain-r3561 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 22:19:35 -0000 Author: emaste Date: Sun Jun 25 22:19:34 2017 New Revision: 320342 URL: https://svnweb.freebsd.org/changeset/base/320342 Log: Tag ELF Tool Chain r3561 Added: vendor/elftoolchain/elftoolchain-r3561/ - copied from r320341, vendor/elftoolchain/dist/ From owner-svn-src-all@freebsd.org Sun Jun 25 22:39:29 2017 Return-Path: Delivered-To: svn-src-all@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 DD235D9BB93; Sun, 25 Jun 2017 22:39:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 89D9780434; Sun, 25 Jun 2017 22:39:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PMdSaJ052167; Sun, 25 Jun 2017 22:39:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PMdS2N052163; Sun, 25 Jun 2017 22:39:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706252239.v5PMdS2N052163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Jun 2017 22:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320343 - in head/contrib/elftoolchain: elfdump libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 22:39:30 -0000 Author: emaste Date: Sun Jun 25 22:39:28 2017 New Revision: 320343 URL: https://svnweb.freebsd.org/changeset/base/320343 Log: Update to ELF Tool Chain snapshot at r3561 This update is primarily bug fixes in C++ symbol demangling, including: - rvalue reference - builtin type auto and decltype(auto) - revamped support for function return types - formatting fixes - omit void when its the only param - ref-qualifiers and others in function types - type qualifiers in pointer-to-member function types - incorrect handling regarding CV-qualifiers in function types - ref-qualifier found in nested-name - properly handle ::= - make sure that nested function name is not a substitute candidate - correctly handle expression in template args - skip unknown substitution abbreviations MFC after: 4 days Modified: head/contrib/elftoolchain/elfdump/elfdump.c head/contrib/elftoolchain/libelftc/_libelftc.h head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c head/contrib/elftoolchain/libelftc/libelftc_vstr.c Directory Properties: head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/elfdump/ (props changed) Modified: head/contrib/elftoolchain/elfdump/elfdump.c ============================================================================== --- head/contrib/elftoolchain/elfdump/elfdump.c Sun Jun 25 22:19:34 2017 (r320342) +++ head/contrib/elftoolchain/elfdump/elfdump.c Sun Jun 25 22:39:28 2017 (r320343) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3497 2016-10-17 20:57:22Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -2226,8 +2226,8 @@ elf_print_svr4_hash64(struct elfdump *ed, struct secti uint64_t *buf; uint64_t *bucket, *chain; uint64_t nbucket, nchain; - uint64_t *bl, *c, maxl, total; - uint64_t i, j; + uint64_t *bl, *c, j, maxl, total; + size_t i; int elferr, first; char idx[10]; Modified: head/contrib/elftoolchain/libelftc/_libelftc.h ============================================================================== --- head/contrib/elftoolchain/libelftc/_libelftc.h Sun Jun 25 22:19:34 2017 (r320342) +++ head/contrib/elftoolchain/libelftc/_libelftc.h Sun Jun 25 22:39:28 2017 (r320343) @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: _libelftc.h 3174 2015-03-27 17:13:41Z emaste $ + * $Id: _libelftc.h 3531 2017-06-05 05:08:43Z kaiwang27 $ */ #ifndef __LIBELFTC_H_ @@ -82,6 +82,8 @@ bool vector_str_init(struct vector_str *_vs); bool vector_str_pop(struct vector_str *_vs); bool vector_str_push(struct vector_str *_vs, const char *_str, size_t _len); +bool vector_str_push_vector(struct vector_str *_dst, + struct vector_str *_org); bool vector_str_push_vector_head(struct vector_str *_dst, struct vector_str *_org); char *vector_str_substr(const struct vector_str *_vs, size_t _begin, Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jun 25 22:19:34 2017 (r320342) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jun 25 22:39:28 2017 (r320343) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2007 Hyogeol Lee + * Copyright (c) 2015-2017 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +37,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 07:04:19Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3560 2017-06-25 00:28:23Z kaiwang27 $"); /** * @file cpp_demangle.c @@ -50,7 +51,7 @@ ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST, TYPE_VEC + TYPE_CST, TYPE_VEC, TYPE_RREF }; struct vector_type_qualifier { @@ -64,29 +65,49 @@ enum read_cmd { READ_TYPE, READ_FUNC, READ_PTRMEM }; +struct read_cmd_item { + enum read_cmd cmd; + void *data; +}; + struct vector_read_cmd { size_t size, capacity; - enum read_cmd *r_container; + struct read_cmd_item *r_container; }; +enum push_qualifier { + PUSH_ALL_QUALIFIER, + PUSH_CV_QUALIFIER, + PUSH_NON_CV_QUALIFIER, +}; + struct cpp_demangle_data { struct vector_str output; /* output string vector */ - struct vector_str output_tmp; struct vector_str subst; /* substitution string vector */ struct vector_str tmpl; struct vector_str class_type; + struct vector_str *cur_output; /* ptr to current output vec */ struct vector_read_cmd cmd; - bool paren; /* parenthesis opened */ - bool pfirst; /* first element of parameter */ bool mem_rst; /* restrict member function */ bool mem_vat; /* volatile member function */ bool mem_cst; /* const member function */ + bool mem_ref; /* lvalue-ref member func */ + bool mem_rref; /* rvalue-ref member func */ + bool is_tmpl; /* template args */ + bool is_functype; /* function type */ + bool ref_qualifier; /* ref qualifier */ + enum type_qualifier ref_qualifier_type; /* ref qualifier type */ + enum push_qualifier push_qualifier; /* which qualifiers to push */ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ - int push_head; }; +struct type_delimit { + bool paren; + bool firstp; +}; + #define CPP_DEMANGLE_TRY_LIMIT 128 #define FLOAT_SPRINTF_TRY_LIMIT 5 #define FLOAT_QUADRUPLE_BYTES 16 @@ -105,6 +126,7 @@ static int cpp_demangle_push_fp(struct cpp_demangle_da char *(*)(const char *, size_t)); static int cpp_demangle_push_str(struct cpp_demangle_data *, const char *, size_t); +static int cpp_demangle_pop_str(struct cpp_demangle_data *); static int cpp_demangle_push_subst(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_push_subst_v(struct cpp_demangle_data *, @@ -137,16 +159,18 @@ static int cpp_demangle_read_number_as_string(struct c 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 *); -static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *); +static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *, + struct vector_type_qualifier *); static int cpp_demangle_read_sname(struct cpp_demangle_data *); static int cpp_demangle_read_subst(struct cpp_demangle_data *); static int cpp_demangle_read_subst_std(struct cpp_demangle_data *); static int cpp_demangle_read_subst_stdtmpl(struct cpp_demangle_data *, - const char *, size_t); + const char *); static int cpp_demangle_read_tmpl_arg(struct cpp_demangle_data *); 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(struct cpp_demangle_data *, + struct type_delimit *); static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); @@ -158,10 +182,12 @@ static char *decode_fp_to_float80(const char *, size_t static char *decode_fp_to_long_double(const char *, size_t); static int hex_to_dec(char); static void vector_read_cmd_dest(struct vector_read_cmd *); -static int vector_read_cmd_find(struct vector_read_cmd *, enum read_cmd); +static struct read_cmd_item *vector_read_cmd_find(struct vector_read_cmd *, + enum read_cmd); static int vector_read_cmd_init(struct vector_read_cmd *); static int vector_read_cmd_pop(struct vector_read_cmd *); -static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd); +static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd, + void *); static void vector_type_qualifier_dest(struct vector_type_qualifier *); static int vector_type_qualifier_init(struct vector_type_qualifier *); static int vector_type_qualifier_push(struct vector_type_qualifier *, @@ -178,9 +204,12 @@ char * cpp_demangle_gnu3(const char *org) { struct cpp_demangle_data ddata; + struct vector_str ret_type; + struct type_delimit td; ssize_t org_len; unsigned int limit; char *rtn; + bool has_ret, more_type; if (org == NULL || (org_len = strlen(org)) < 2) return (NULL); @@ -200,26 +229,75 @@ cpp_demangle_gnu3(const char *org) return (NULL); rtn = NULL; + has_ret = more_type = false; if (!cpp_demangle_read_encoding(&ddata)) goto clean; + /* + * Pop function name from substitution candidate list. + */ + if (*ddata.cur != 0 && ddata.subst.size >= 1) { + if (!vector_str_pop(&ddata.subst)) + goto clean; + } + + td.paren = false; + td.firstp = true; limit = 0; + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata.is_tmpl) { + ddata.is_tmpl = false; + if (!vector_str_init(&ret_type)) + goto clean; + ddata.cur_output = &ret_type; + has_ret = true; + } + while (*ddata.cur != '\0') { /* * Breaking at some gcc info at tail. e.g) @@GLIBCXX_3.4 */ if (*ddata.cur == '@' && *(ddata.cur + 1) == '@') break; - if (!cpp_demangle_read_type(&ddata, 1)) - goto clean; + + if (has_ret) { + /* Read return type */ + if (!cpp_demangle_read_type(&ddata, NULL)) + goto clean; + } else { + /* Read function arg type */ + if (!cpp_demangle_read_type(&ddata, &td)) + goto clean; + } + + if (has_ret) { + /* Push return type to the beginning */ + if (!VEC_PUSH_STR(&ret_type, " ")) + goto clean; + if (!vector_str_push_vector_head(&ddata.output, + &ret_type)) + goto clean; + ddata.cur_output = &ddata.output; + vector_str_dest(&ret_type); + has_ret = false; + more_type = true; + } else if (more_type) + more_type = false; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) goto clean; } + if (more_type) + goto clean; if (ddata.output.size == 0) goto clean; - if (ddata.paren && !VEC_PUSH_STR(&ddata.output, ")")) + if (td.paren && !VEC_PUSH_STR(&ddata.output, ")")) goto clean; if (ddata.mem_vat && !VEC_PUSH_STR(&ddata.output, " volatile")) goto clean; @@ -227,10 +305,17 @@ cpp_demangle_gnu3(const char *org) goto clean; if (ddata.mem_rst && !VEC_PUSH_STR(&ddata.output, " restrict")) goto clean; + if (ddata.mem_ref && !VEC_PUSH_STR(&ddata.output, " &")) + goto clean; + if (ddata.mem_rref && !VEC_PUSH_STR(&ddata.output, " &&")) + goto clean; rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); clean: + if (has_ret) + vector_str_dest(&ret_type); + cpp_demangle_data_dest(&ddata); return (rtn); @@ -247,7 +332,6 @@ cpp_demangle_data_dest(struct cpp_demangle_data *d) vector_str_dest(&d->class_type); vector_str_dest(&d->tmpl); vector_str_dest(&d->subst); - vector_str_dest(&d->output_tmp); vector_str_dest(&d->output); } @@ -260,43 +344,42 @@ cpp_demangle_data_init(struct cpp_demangle_data *d, co if (!vector_str_init(&d->output)) return (0); - if (!vector_str_init(&d->output_tmp)) - goto clean1; if (!vector_str_init(&d->subst)) - goto clean2; + goto clean1; if (!vector_str_init(&d->tmpl)) - goto clean3; + goto clean2; if (!vector_str_init(&d->class_type)) - goto clean4; + goto clean3; if (!vector_read_cmd_init(&d->cmd)) - goto clean5; + goto clean4; assert(d->output.container != NULL); - assert(d->output_tmp.container != NULL); assert(d->subst.container != NULL); assert(d->tmpl.container != NULL); assert(d->class_type.container != NULL); - d->paren = false; - d->pfirst = false; d->mem_rst = false; d->mem_vat = false; d->mem_cst = false; + d->mem_ref = false; + d->mem_rref = false; + d->is_tmpl = false; + d->is_functype = false; + d->ref_qualifier = false; + d->push_qualifier = PUSH_ALL_QUALIFIER; d->func_type = 0; d->cur = cur; + d->cur_output = &d->output; d->last_sname = NULL; - d->push_head = 0; return (1); -clean5: - vector_str_dest(&d->class_type); clean4: - vector_str_dest(&d->tmpl); + vector_str_dest(&d->class_type); clean3: - vector_str_dest(&d->subst); + vector_str_dest(&d->tmpl); clean2: - vector_str_dest(&d->output_tmp); + vector_str_dest(&d->subst); clean1: vector_str_dest(&d->output); @@ -341,13 +424,27 @@ cpp_demangle_push_str(struct cpp_demangle_data *ddata, if (ddata == NULL || str == NULL || len == 0) return (0); - if (ddata->push_head > 0) - return (vector_str_push(&ddata->output_tmp, str, len)); + /* + * is_tmpl is used to check if the type (function arg) is right next + * to template args, and should always be cleared whenever new string + * pushed. + */ + ddata->is_tmpl = false; - return (vector_str_push(&ddata->output, str, len)); + return (vector_str_push(ddata->cur_output, str, len)); } static int +cpp_demangle_pop_str(struct cpp_demangle_data *ddata) +{ + + if (ddata == NULL) + return (0); + + return (vector_str_pop(ddata->cur_output)); +} + +static int cpp_demangle_push_subst(struct cpp_demangle_data *ddata, const char *str, size_t len) { @@ -386,9 +483,11 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d struct vector_type_qualifier *v, const char *type_str) { struct vector_str subst_v; + enum type_qualifier t; size_t idx, e_idx, e_len; - int rtn; char *buf; + int rtn; + bool cv; if (ddata == NULL || v == NULL) return (0); @@ -404,10 +503,14 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d goto clean; } + cv = true; e_idx = 0; while (idx > 0) { switch (v->q_container[idx - 1]) { case TYPE_PTR: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "*")) goto clean; if (type_str != NULL) { @@ -420,6 +523,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_REF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "&")) goto clean; if (type_str != NULL) { @@ -431,7 +537,25 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d } break; + case TYPE_RREF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&&")) + goto clean; + if (type_str != NULL) { + if (!VEC_PUSH_STR(&subst_v, "&&")) + goto clean; + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) + goto clean; + } + break; + case TYPE_CMX: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " complex")) goto clean; if (type_str != NULL) { @@ -444,6 +568,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_IMG: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { @@ -457,6 +584,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_EXT: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -489,11 +619,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_RST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " restrict")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " restrict")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -501,11 +642,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VAT: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " volatile")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " volatile")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -513,11 +665,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_CST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " const")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " const")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -525,6 +688,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VEC: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -614,7 +780,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[]")) @@ -630,7 +796,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat assert(num_len > 0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[")) return (0); @@ -660,7 +826,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat free(exp); return (0); } - if (!cpp_demangle_read_type(ddata, 0)) { + if (!cpp_demangle_read_type(ddata, NULL)) { free(exp); return (0); } @@ -777,11 +943,11 @@ cpp_demangle_read_expression(struct cpp_demangle_data switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('s', 't'): ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('s', 'r'): ddata->cur += 2; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!cpp_demangle_read_uqname(ddata)) return (0); @@ -1058,8 +1224,7 @@ cpp_demangle_read_expression_flat(struct cpp_demangle_ size_t i, p_idx, idx, exp_len; char *exp; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = &ddata->output; p_idx = output->size; @@ -1136,8 +1301,12 @@ static int cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, struct vector_type_qualifier *v) { + struct type_delimit td; + struct read_cmd_item *rc; size_t class_type_size, class_type_len, limit; const char *class_type; + int i; + bool paren, non_cv_qualifier; if (ddata == NULL || *ddata->cur != 'F' || v == NULL) return (0); @@ -1148,12 +1317,43 @@ cpp_demangle_read_function(struct cpp_demangle_data *d *ext_c = 1; ++ddata->cur; } - if (!cpp_demangle_read_type(ddata, 0)) + + /* Return type */ + if (!cpp_demangle_read_type(ddata, NULL)) return (0); + if (*ddata->cur != 'E') { - if (!DEM_PUSH_STR(ddata, "(")) + if (!DEM_PUSH_STR(ddata, " ")) return (0); - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM)) { + + non_cv_qualifier = false; + if (v->size > 0) { + for (i = 0; (size_t) i < v->size; i++) { + if (v->q_container[i] != TYPE_RST && + v->q_container[i] != TYPE_VAT && + v->q_container[i] != TYPE_CST) { + non_cv_qualifier = true; + break; + } + } + } + + paren = false; + rc = vector_read_cmd_find(&ddata->cmd, READ_PTRMEM); + if (non_cv_qualifier || rc != NULL) { + if (!DEM_PUSH_STR(ddata, "(")) + return (0); + paren = true; + } + + /* Push non-cv qualifiers. */ + ddata->push_qualifier = PUSH_NON_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) + return (0); + + if (rc) { + if (non_cv_qualifier && !DEM_PUSH_STR(ddata, " ")) + return (0); if ((class_type_size = ddata->class_type.size) == 0) return (0); class_type = @@ -1167,40 +1367,67 @@ cpp_demangle_read_function(struct cpp_demangle_data *d return (0); if (!DEM_PUSH_STR(ddata, "::*")) return (0); + /* Push pointer-to-member qualifiers. */ + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, rc->data, + NULL)) + return (0); ++ddata->func_type; - } else { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + } + + if (paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + paren = false; } - if (!DEM_PUSH_STR(ddata, ")(")) - return (0); - + td.paren = false; + td.firstp = true; limit = 0; + ddata->is_functype = true; for (;;) { - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, &td)) return (0); if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } - - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM) == 1) { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + ddata->is_functype = false; + if (td.paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + td.paren = false; } - if (!DEM_PUSH_STR(ddata, ")")) + /* Push CV qualifiers. */ + ddata->push_qualifier = PUSH_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) return (0); + + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + + /* Release type qualifier vector. */ + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + + /* Push ref-qualifiers. */ + if (ddata->ref_qualifier) { + switch (ddata->ref_qualifier_type) { + case TYPE_REF: + if (!DEM_PUSH_STR(ddata, " &")) + return (0); + break; + case TYPE_RREF: + if (!DEM_PUSH_STR(ddata, " &&")) + return (0); + break; + default: + return (0); + } + ddata->ref_qualifier = false; + } } ++ddata->cur; @@ -1306,7 +1533,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d goto clean3; if (*ddata->cur++ != '_') goto clean3; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (!DEM_PUSH_STR(ddata, "-in-")) goto clean3; @@ -1328,7 +1555,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'h'): /* virtual function non-virtual override thunk */ @@ -1358,7 +1585,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'J'): /* java class */ @@ -1367,7 +1594,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'S'): /* RTTI name (NTBS) */ @@ -1376,7 +1603,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'T'): /* VTT table */ @@ -1385,7 +1612,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'v'): /* virtual function virtual override thunk */ @@ -1406,7 +1633,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'W'): /* TLS wrapper function */ @@ -1424,30 +1651,74 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d static int cpp_demangle_read_local_name(struct cpp_demangle_data *ddata) { + struct vector_str local_name; + struct type_delimit td; size_t limit; + bool more_type; if (ddata == NULL) return (0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_encoding(ddata)) + + vector_str_init(&local_name); + ddata->cur_output = &local_name; + + if (!cpp_demangle_read_encoding(ddata)) { + vector_str_dest(&local_name); return (0); + } + ddata->cur_output = &ddata->output; + + td.paren = false; + td.firstp = true; + more_type = false; limit = 0; - for (;;) { - if (!cpp_demangle_read_type(ddata, 1)) + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata->is_tmpl) { + ddata->is_tmpl = false; + + /* Read return type */ + if (!cpp_demangle_read_type(ddata, NULL)) { + vector_str_dest(&local_name); return (0); + } + + more_type = true; + } + + /* Now we can push the name after possible return type is handled. */ + if (!vector_str_push_vector(&ddata->output, &local_name)) { + vector_str_dest(&local_name); + return (0); + } + vector_str_dest(&local_name); + + while (*ddata->cur != '\0') { + if (!cpp_demangle_read_type(ddata, &td)) + return (0); + if (more_type) + more_type = false; if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } + if (more_type) + return (0); + if (*(++ddata->cur) == '\0') return (0); - if (ddata->paren == true) { + if (td.paren == true) { if (!DEM_PUSH_STR(ddata, ")")) return (0); - ddata->paren = false; + td.paren = false; } if (*ddata->cur == 's') ++ddata->cur; @@ -1477,7 +1748,7 @@ cpp_demangle_read_name(struct cpp_demangle_data *ddata if (ddata == NULL || *ddata->cur == '\0') return (0); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; + output = ddata->cur_output; subst_str = NULL; @@ -1539,8 +1810,7 @@ cpp_demangle_read_name_flat(struct cpp_demangle_data * size_t i, p_idx, idx, name_len; char *name; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = ddata->cur_output; p_idx = output->size; @@ -1577,8 +1847,7 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (*(++ddata->cur) == '\0') return (0); - while (*ddata->cur == 'r' || *ddata->cur == 'V' || - *ddata->cur == 'K') { + do { switch (*ddata->cur) { case 'r': ddata->mem_rst = true; @@ -1589,11 +1858,19 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data case 'K': ddata->mem_cst = true; break; + case 'R': + ddata->mem_ref = true; + break; + case 'O': + ddata->mem_rref = true; + break; + default: + goto next; } - ++ddata->cur; - } + } while (*(++ddata->cur)); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; +next: + output = ddata->cur_output; if (!vector_str_init(&v)) return (0); @@ -1619,6 +1896,8 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data goto clean; } + if (p_idx == output->size) + goto next_comp; if ((subst_str = vector_str_substr(output, p_idx, output->size - 1, &subst_str_len)) == NULL) goto clean; @@ -1630,10 +1909,12 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (!cpp_demangle_push_subst_v(ddata, &v)) goto clean; + + next_comp: if (*ddata->cur == 'E') break; - else if (*ddata->cur != 'I' && - *ddata->cur != 'C' && *ddata->cur != 'D') { + else if (*ddata->cur != 'I' && *ddata->cur != 'C' && + *ddata->cur != 'D' && p_idx != output->size) { if (!DEM_PUSH_STR(ddata, "::")) goto clean; if (!VEC_PUSH_STR(&v, "::")) @@ -1776,7 +2057,8 @@ cpp_demangle_read_offset_number(struct cpp_demangle_da } static int -cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata) +cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata, + struct vector_type_qualifier *v) { size_t class_type_len, i, idx, p_idx; int p_func_type, rtn; @@ -1786,7 +2068,7 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl return (0); p_idx = ddata->output.size; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if ((class_type = vector_str_substr(&ddata->output, p_idx, @@ -1799,14 +2081,14 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl if (!vector_str_pop(&ddata->output)) goto clean1; - if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM)) + if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM, v)) goto clean1; if (!vector_str_push(&ddata->class_type, class_type, class_type_len)) goto clean2; p_func_type = ddata->func_type; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (p_func_type == ddata->func_type) { @@ -1828,6 +2110,10 @@ clean2: clean1: free(class_type); + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + return (rtn); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 25 23:16:38 2017 Return-Path: Delivered-To: svn-src-all@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 B24B1D9C426; Sun, 25 Jun 2017 23:16:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 706D881339; Sun, 25 Jun 2017 23:16:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PNGbQl068278; Sun, 25 Jun 2017 23:16:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PNGb51068277; Sun, 25 Jun 2017 23:16:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706252316.v5PNGb51068277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Jun 2017 23:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320344 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 23:16:38 -0000 Author: kib Date: Sun Jun 25 23:16:37 2017 New Revision: 320344 URL: https://svnweb.freebsd.org/changeset/base/320344 Log: For now, allow mprotect(2) over the guards to succeed regardless of the requested protection. The syscall returns success without changing the protection of the guard. This is consistent with the current mprotect(2) behaviour on the unmapped ranges. More important, the calls performed by libc and libthr to allow execution of stacks, if requested by the loaded ELF objects, do the expected change instead of failing on the grow space guard. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jun 25 22:39:28 2017 (r320343) +++ head/sys/vm/vm_map.c Sun Jun 25 23:16:37 2017 (r320344) @@ -2003,6 +2003,8 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_off */ for (current = entry; current != &map->header && current->start < end; current = current->next) { + if ((current->eflags & MAP_ENTRY_GUARD) != 0) + continue; if (current->eflags & MAP_ENTRY_IS_SUB_MAP) { vm_map_unlock(map); return (KERN_INVALID_ARGUMENT); From owner-svn-src-all@freebsd.org Mon Jun 26 00:43:06 2017 Return-Path: Delivered-To: svn-src-all@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 55329D9DC4A; Mon, 26 Jun 2017 00:43:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 30BCF838DA; Mon, 26 Jun 2017 00:43:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q0h5mf005324; Mon, 26 Jun 2017 00:43:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q0h4w8005319; Mon, 26 Jun 2017 00:43:04 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706260043.v5Q0h4w8005319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 26 Jun 2017 00:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320345 - in head/sys/fs: nfs nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 00:43:06 -0000 Author: rmacklem Date: Mon Jun 26 00:43:04 2017 New Revision: 320345 URL: https://svnweb.freebsd.org/changeset/base/320345 Log: Add support to the NFSv4.1/pNFS client for commits through the DS. A NFSv4.1/pNFS server using File Layout can specify that Commit operations are to be done against the DS instead of MDS. Since no extant pNFS server did this, the code was untested and "#ifdef notyet". The FreeBSD pNFS server I am developing does specify that Commits be done through the DS, so the code has been enabled/tested. This patch should only affect the case of a pNFS server that specfies Commits through the DS. PR: 219551 MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsclient/nfsnode.h Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sun Jun 25 23:16:37 2017 (r320344) +++ head/sys/fs/nfs/nfs_var.h Mon Jun 26 00:43:04 2017 (r320345) @@ -490,7 +490,7 @@ int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *, NFSPROC_T *, void *); int nfsrpc_reclaimcomplete(struct nfsmount *, struct ucred *, NFSPROC_T *); -int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t, +int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t, int, struct ucred *, NFSPROC_T *); int nfscl_findlayoutforio(struct nfscllayout *, uint64_t, uint32_t, struct nfsclflayout **); Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Sun Jun 25 23:16:37 2017 (r320344) +++ head/sys/fs/nfsclient/nfs_clnode.c Mon Jun 26 00:43:04 2017 (r320345) @@ -259,10 +259,12 @@ ncl_inactive(struct vop_inactive_args *ap) /* * NMODIFIED means that there might be dirty/stale buffers - * associated with the NFS vnode. None of the other flags are - * meaningful after the vnode is unused. + * associated with the NFS vnode. + * NDSCOMMIT means that the file is on a pNFS server and commits + * should be done to the DS. + * None of the other flags are meaningful after the vnode is unused. */ - np->n_flag &= NMODIFIED; + np->n_flag &= (NMODIFIED | NDSCOMMIT); mtx_unlock(&np->n_mtx); return (0); } Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Jun 25 23:16:37 2017 (r320344) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Mon Jun 26 00:43:04 2017 (r320345) @@ -114,7 +114,8 @@ static int nfsrpc_fillsa(struct nfsmount *, struct soc static void nfscl_initsessionslots(struct nfsclsession *); static int nfscl_doflayoutio(vnode_t, struct uio *, int *, int *, int *, nfsv4stateid_t *, int, struct nfscldevinfo *, struct nfscllayout *, - struct nfsclflayout *, uint64_t, uint64_t, struct ucred *, NFSPROC_T *); + struct nfsclflayout *, uint64_t, uint64_t, int, struct ucred *, + NFSPROC_T *); static int nfsrpc_readds(vnode_t, struct uio *, nfsv4stateid_t *, int *, struct nfsclds *, uint64_t, int, struct nfsfh *, struct ucred *, NFSPROC_T *); @@ -123,10 +124,8 @@ static int nfsrpc_writeds(vnode_t, struct uio *, int * struct nfsfh *, int, struct ucred *, NFSPROC_T *); static enum nfsclds_state nfscl_getsameserver(struct nfsmount *, struct nfsclds *, struct nfsclds **); -#ifdef notyet static int nfsrpc_commitds(vnode_t, uint64_t, int, struct nfsclds *, - struct nfsfh *, struct ucred *, NFSPROC_T *, void *); -#endif + struct nfsfh *, struct ucred *, NFSPROC_T *); static void nfsrv_setuplayoutget(struct nfsrv_descript *, int, uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, int); static int nfsrv_parselayoutget(struct nfsrv_descript *, nfsv4stateid_t *, @@ -5439,7 +5438,7 @@ nfscl_initsessionslots(struct nfsclsession *sep) */ int nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, - uint32_t rwaccess, struct ucred *cred, NFSPROC_T *p) + uint32_t rwaccess, int docommit, struct ucred *cred, NFSPROC_T *p) { struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); @@ -5523,7 +5522,8 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode if (dip != NULL) { error = nfscl_doflayoutio(vp, uiop, iomode, must_commit, &eof, &stateid, rwaccess, dip, - layp, rflp, off, xfer, newcred, p); + layp, rflp, off, xfer, docommit, newcred, + p); nfscl_reldevinfo(dip); lastbyte = off + xfer - 1; if (error == 0) { @@ -5599,10 +5599,10 @@ static int nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, int *eofp, nfsv4stateid_t *stateidp, int rwflag, struct nfscldevinfo *dp, struct nfscllayout *lyp, struct nfsclflayout *flp, uint64_t off, - uint64_t len, struct ucred *cred, NFSPROC_T *p) + uint64_t len, int docommit, struct ucred *cred, NFSPROC_T *p) { uint64_t io_off, rel_off, stripe_unit_size, transfer, xfer; - int commit_thru_mds, error = 0, stripe_index, stripe_pos; + int commit_thru_mds, error, stripe_index, stripe_pos; struct nfsnode *np; struct nfsfh *fhp; struct nfsclds **dspp; @@ -5613,12 +5613,13 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *i stripe_pos = (rel_off / stripe_unit_size + flp->nfsfl_stripe1) % dp->nfsdi_stripecnt; transfer = stripe_unit_size - (rel_off % stripe_unit_size); + error = 0; /* Loop around, doing I/O for each stripe unit. */ while (len > 0 && error == 0) { stripe_index = nfsfldi_stripeindex(dp, stripe_pos); dspp = nfsfldi_addr(dp, stripe_index); - if (len > transfer) + if (len > transfer && docommit == 0) xfer = transfer; else xfer = len; @@ -5642,11 +5643,33 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *i fhp = np->n_fhp; io_off = off; } - if ((flp->nfsfl_util & NFSFLAYUTIL_COMMIT_THRU_MDS) != 0) + if ((flp->nfsfl_util & NFSFLAYUTIL_COMMIT_THRU_MDS) != 0) { commit_thru_mds = 1; - else + if (docommit != 0) + error = EIO; + } else { commit_thru_mds = 0; - if (rwflag == FREAD) + mtx_lock(&np->n_mtx); + np->n_flag |= NDSCOMMIT; + mtx_unlock(&np->n_mtx); + } + if (docommit != 0) { + if (error == 0) + error = nfsrpc_commitds(vp, io_off, xfer, + *dspp, fhp, cred, p); + if (error == 0) { + /* + * Set both eof and uio_resid = 0 to end any + * loops. + */ + *eofp = 1; + uiop->uio_resid = 0; + } else { + mtx_lock(&np->n_mtx); + np->n_flag &= ~NDSCOMMIT; + mtx_unlock(&np->n_mtx); + } + } else if (rwflag == FREAD) error = nfsrpc_readds(vp, uiop, stateidp, eofp, *dspp, io_off, xfer, fhp, cred, p); else { @@ -5882,13 +5905,12 @@ nfscl_getsameserver(struct nfsmount *nmp, struct nfscl return (NFSDSP_NOTFOUND); } -#ifdef notyet /* - * NFS commit rpc to a DS. + * NFS commit rpc to a NFSv4.1 DS. */ static int nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp, - struct nfsfh *fhp, struct ucred *cred, NFSPROC_T *p, void *stuff) + struct nfsfh *fhp, struct ucred *cred, NFSPROC_T *p) { uint32_t *tl; struct nfsrv_descript nfsd, *nd = &nfsd; @@ -5896,6 +5918,7 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfssockreq *nrp; int error; + nd->nd_mrep = NULL; nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED); @@ -5908,7 +5931,7 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, nrp = &nmp->nm_sockreq; error = newnfs_request(nd, nmp, NULL, nrp, vp, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, &dsp->nfsclds_sess); - if (error) + if (error != 0) return (error); if (nd->nd_repstat == 0) { NFSM_DISSECT(tl, u_int32_t *, NFSX_VERF); @@ -5925,7 +5948,6 @@ nfsmout: mbuf_freem(nd->nd_mrep); return (error); } -#endif /* * Set up the XDR arguments for the LayoutGet operation. Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Jun 25 23:16:37 2017 (r320344) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Jun 26 00:43:04 2017 (r320345) @@ -1367,7 +1367,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct attrflag = 0; if (NFSHASPNFS(nmp)) error = nfscl_doiods(vp, uiop, NULL, NULL, - NFSV4OPEN_ACCESSREAD, cred, uiop->uio_td); + NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); if (error != 0) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, @@ -1398,7 +1398,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struc attrflag = 0; if (NFSHASPNFS(nmp)) error = nfscl_doiods(vp, uiop, iomode, must_commit, - NFSV4OPEN_ACCESSWRITE, cred, uiop->uio_td); + NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); if (error != 0) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, @@ -2555,16 +2555,34 @@ ncl_commit(struct vnode *vp, u_quad_t offset, int cnt, { struct nfsvattr nfsva; struct nfsmount *nmp = VFSTONFS(vp->v_mount); + struct nfsnode *np; + struct uio uio; int error, attrflag; - mtx_lock(&nmp->nm_mtx); - if ((nmp->nm_state & NFSSTA_HASWRITEVERF) == 0) { + np = VTONFS(vp); + error = EIO; + attrflag = 0; + if (NFSHASPNFS(nmp) && (np->n_flag & NDSCOMMIT) != 0) { + uio.uio_offset = offset; + uio.uio_resid = cnt; + error = nfscl_doiods(vp, &uio, NULL, NULL, + NFSV4OPEN_ACCESSWRITE, 1, cred, td); + if (error != 0) { + mtx_lock(&np->n_mtx); + np->n_flag &= ~NDSCOMMIT; + mtx_unlock(&np->n_mtx); + } + } + if (error != 0) { + mtx_lock(&nmp->nm_mtx); + if ((nmp->nm_state & NFSSTA_HASWRITEVERF) == 0) { + mtx_unlock(&nmp->nm_mtx); + return (0); + } mtx_unlock(&nmp->nm_mtx); - return (0); + error = nfsrpc_commit(vp, offset, cnt, cred, td, &nfsva, + &attrflag, NULL); } - mtx_unlock(&nmp->nm_mtx); - error = nfsrpc_commit(vp, offset, cnt, cred, td, &nfsva, - &attrflag, NULL); if (attrflag != 0) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Sun Jun 25 23:16:37 2017 (r320344) +++ head/sys/fs/nfsclient/nfsnode.h Mon Jun 26 00:43:04 2017 (r320345) @@ -158,6 +158,7 @@ struct nfsnode { #define NNOLAYOUT 0x00020000 /* Can't get a layout for this file */ #define NWRITEOPENED 0x00040000 /* Has been opened for writing */ #define NHASBEENLOCKED 0x00080000 /* Has been file locked. */ +#define NDSCOMMIT 0x00100000 /* Commit is done via the DS. */ /* * Convert between nfsnode pointers and vnode pointers From owner-svn-src-all@freebsd.org Mon Jun 26 02:00:23 2017 Return-Path: Delivered-To: svn-src-all@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 72738D9EA21; Mon, 26 Jun 2017 02:00:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3FA0DEA; Mon, 26 Jun 2017 02:00:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q20Me7034040; Mon, 26 Jun 2017 02:00:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q20M0A034039; Mon, 26 Jun 2017 02:00:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706260200.v5Q20M0A034039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 26 Jun 2017 02:00:22 +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: r320346 - stable/10/contrib/libstdc++/config/abi/pre X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 02:00:23 -0000 Author: emaste Date: Mon Jun 26 02:00:22 2017 New Revision: 320346 URL: https://svnweb.freebsd.org/changeset/base/320346 Log: MFC r317159: libstdc++: fix symbol version script for LLD LLD is less tolerant of inconsistencies in the symbol version script. - Add a ; on the last entry in a version block - Remove duplicated symbols, retaining those in the earliest block PR: 214796 Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/libstdc++/config/abi/pre/gnu.ver Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libstdc++/config/abi/pre/gnu.ver ============================================================================== --- stable/10/contrib/libstdc++/config/abi/pre/gnu.ver Mon Jun 26 00:43:04 2017 (r320345) +++ stable/10/contrib/libstdc++/config/abi/pre/gnu.ver Mon Jun 26 02:00:22 2017 (r320346) @@ -121,7 +121,7 @@ GLIBCXX_3.4 { std::__moneypunct_cache*; std::__numpunct_cache*; std::__timepunct_cache*; - __gnu_debug::_Error_formatter* + __gnu_debug::_Error_formatter*; }; # Names not in an 'extern' block are mangled names. @@ -604,34 +604,6 @@ GLIBCXX_3.4.4 { } GLIBCXX_3.4.3; GLIBCXX_3.4.5 { - - # std::string - _ZNKSs11_M_disjunctEPKc; - _ZNKSs15_M_check_lengthE[jm][jm]PKc; - _ZNSs4_Rep26_M_set_length_and_sharableE*; - _ZNSs7_M_copyEPcPKc[jm]; - _ZNSs7_M_moveEPcPKc[jm]; - _ZNSs9_M_assignEPc[jm]c; - - # std::wstring - _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw; - _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthE[jm][jm]PKc; - _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableE*; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPw[jm]w; - - _ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - - _ZNSi6ignoreE[ilv]; - _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilv]; - - _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_; - - _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv; - } GLIBCXX_3.4.4; GLIBCXX_3.4.6 { @@ -642,8 +614,6 @@ GLIBCXX_3.4.6 { _ZNSt6locale5facet13_S_get_c_nameEv; _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv; - - _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; From owner-svn-src-all@freebsd.org Mon Jun 26 02:25:21 2017 Return-Path: Delivered-To: svn-src-all@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 52D63D9F25E; Mon, 26 Jun 2017 02:25:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2D5AA1126; Mon, 26 Jun 2017 02:25:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q2PKXd046123; Mon, 26 Jun 2017 02:25:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q2PJCT046112; Mon, 26 Jun 2017 02:25:19 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706260225.v5Q2PJCT046112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 26 Jun 2017 02:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320347 - in head: . share/man/man7 sys/compat/freebsd32 sys/net sys/powerpc/include sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 02:25:21 -0000 Author: jhibbits Date: Mon Jun 26 02:25:19 2017 New Revision: 320347 URL: https://svnweb.freebsd.org/changeset/base/320347 Log: Solve the y2038 problem for powerpc AKA Make time_t 64 bits on powerpc(32). PowerPC currently (until now) was one of two architectures with a 32-bit time_t on 32-bit archs (the other being i386). This is an ABI breakage, so all ports, and all local binaries, *must* be recompiled. Tested by: andreast, others MFC after: Never Relnotes: Yes Modified: head/UPDATING head/share/man/man7/arch.7 head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/net/bpf.c head/sys/powerpc/include/_types.h head/sys/powerpc/include/proc.h head/sys/sys/acct.h head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jun 26 02:00:22 2017 (r320346) +++ head/UPDATING Mon Jun 26 02:25:19 2017 (r320347) @@ -51,6 +51,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170625: + The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is + a very major ABI incompatible change, so users of FreeBSD/powerpc must + be careful when performing source upgrades. It is best to run + 'make installworld' from an alternate root system, either a live + CD/memory stick, or a temporary root partition. Additionally, all ports + must be recompiled. powerpc64 is largely unaffected, except in the case + of 32-bit compatibility. All 32-bit binaries will be affected. + 20170623: Forward compatibility for the "ino64" project have been committed. This will allow most new binaries to run on older kernels in a limited Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Jun 26 02:00:22 2017 (r320346) +++ head/share/man/man7/arch.7 Mon Jun 26 02:25:19 2017 (r320347) @@ -203,8 +203,8 @@ Machine-dependent type sizes: .It mips64el Ta 8 Ta 8 Ta 8 .It mips64elhf Ta 8 Ta 8 Ta 8 .It mips64hf Ta 8 Ta 8 Ta 8 -.It powerpc Ta 4 Ta 8 Ta 4 -.It powerpcspe Ta 4 Ta 8 Ta 4 +.It powerpc Ta 4 Ta 8 Ta 8 +.It powerpcspe Ta 4 Ta 8 Ta 8 .It powerpc64 Ta 8 Ta 8 Ta 8 .It riscv64 Ta 8 Ta 16 Ta 8 .It riscv64sf Ta 8 Ta 16 Ta 8 Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/compat/freebsd32/freebsd32.h Mon Jun 26 02:25:19 2017 (r320347) @@ -45,7 +45,7 @@ /* * Being a newer port, 32-bit FreeBSD/MIPS uses 64-bit time_t. */ -#ifdef __mips__ +#if defined (__mips__) || defined(__powerpc__) typedef int64_t time32_t; #else typedef int32_t time32_t; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Jun 26 02:25:19 2017 (r320347) @@ -109,13 +109,13 @@ __FBSDID("$FreeBSD$"); FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct timeval32) == 8); CTASSERT(sizeof(struct timespec32) == 8); CTASSERT(sizeof(struct itimerval32) == 16); #endif CTASSERT(sizeof(struct statfs32) == 256); -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); @@ -125,7 +125,7 @@ CTASSERT(sizeof(struct msghdr32) == 28); #ifdef __amd64__ CTASSERT(sizeof(struct stat32) == 208); #endif -#ifndef __mips__ +#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct freebsd11_stat32) == 96); #endif CTASSERT(sizeof(struct sigaction32) == 24); Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/net/bpf.c Mon Jun 26 02:25:19 2017 (r320347) @@ -1283,7 +1283,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i #endif case BIOCGETIF: case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCGRTIMEOUT32: #endif case BIOCGSTATS: @@ -1295,7 +1295,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i case FIONREAD: case BIOCLOCK: case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCSRTIMEOUT32: #endif case BIOCIMMEDIATE: @@ -1519,7 +1519,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i * Set read timeout. */ case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCSRTIMEOUT32: #endif { @@ -1550,12 +1550,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i * Get read timeout. */ case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) case BIOCGRTIMEOUT32: #endif { struct timeval *tv; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) struct timeval32 *tv32; struct timeval tv64; @@ -1567,7 +1567,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i tv->tv_sec = d->bd_rtout / hz; tv->tv_usec = (d->bd_rtout % hz) * tick; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) +#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) if (cmd == BIOCGRTIMEOUT32) { tv32 = (struct timeval32 *)addr; tv32->tv_sec = tv->tv_sec; Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/powerpc/include/_types.h Mon Jun 26 02:25:19 2017 (r320347) @@ -98,16 +98,18 @@ typedef __int64_t __register_t; typedef __int64_t __segsz_t; /* segment size (in pages) */ typedef __uint64_t __size_t; /* sizeof() */ typedef __int64_t __ssize_t; /* byte count or error */ -typedef __int64_t __time_t; /* time()... */ -typedef __uint64_t __uintfptr_t; -typedef __uint64_t __uintptr_t; #else typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int32_t __register_t; typedef __int32_t __segsz_t; /* segment size (in pages) */ typedef __uint32_t __size_t; /* sizeof() */ typedef __int32_t __ssize_t; /* byte count or error */ -typedef __int32_t __time_t; /* time()... */ +#endif +typedef __int64_t __time_t; /* time()... */ +#ifdef __LP64__ +typedef __uint64_t __uintfptr_t; +typedef __uint64_t __uintptr_t; +#else typedef __uint32_t __uintfptr_t; typedef __uint32_t __uintptr_t; #endif Modified: head/sys/powerpc/include/proc.h ============================================================================== --- head/sys/powerpc/include/proc.h Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/powerpc/include/proc.h Mon Jun 26 02:25:19 2017 (r320347) @@ -48,9 +48,9 @@ struct mdproc { #ifdef __powerpc64__ #define KINFO_PROC_SIZE 1088 -#define KINFO_PROC32_SIZE 768 +#define KINFO_PROC32_SIZE 816 #else -#define KINFO_PROC_SIZE 768 +#define KINFO_PROC_SIZE 816 #endif struct syscall_args { Modified: head/sys/sys/acct.h ============================================================================== --- head/sys/sys/acct.h Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/sys/acct.h Mon Jun 26 02:25:19 2017 (r320347) @@ -66,9 +66,6 @@ struct acctv3 { float ac_io; /* count of IO blocks */ __dev_t ac_tty; /* controlling tty */ uint32_t ac_pad0; -#if defined(__powerpc__) && !defined(_LP64) - uint32_t ac_pad1; -#endif uint16_t ac_len2; /* record length */ union { uint32_t ac_align; /* force v1 compatible alignment */ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Jun 26 02:00:22 2017 (r320346) +++ head/sys/sys/param.h Mon Jun 26 02:25:19 2017 (r320347) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200035 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200036 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Jun 26 02:34:01 2017 Return-Path: Delivered-To: svn-src-all@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 1CD91D9F458; Mon, 26 Jun 2017 02:34:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DFFBC15ED; Mon, 26 Jun 2017 02:34:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q2Y0LR050180; Mon, 26 Jun 2017 02:34:00 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q2Y0rB050179; Mon, 26 Jun 2017 02:34:00 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201706260234.v5Q2Y0rB050179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 26 Jun 2017 02:34:00 +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: r320348 - stable/10/sys/dev/hyperv/storvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 02:34:01 -0000 Author: sephe Date: Mon Jun 26 02:33:59 2017 New Revision: 320348 URL: https://svnweb.freebsd.org/changeset/base/320348 Log: MFC 320184 hyperv/storvsc: Reduce log verbosity On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors. PR: 219973 Submitted by: Hongjiang Zhang Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jun 26 02:25:19 2017 (r320347) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jun 26 02:33:59 2017 (r320348) @@ -2095,6 +2095,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) struct vmscsi_req *vm_srb = &reqp->vstor_packet.u.vm_srb; bus_dma_segment_t *ori_sglist = NULL; int ori_sg_count = 0; + const struct scsi_generic *cmd; /* destroy bounce buffer if it is used */ if (reqp->bounce_sgl_count) { @@ -2145,16 +2146,14 @@ storvsc_io_done(struct hv_storvsc_request *reqp) callout_drain(&reqp->callout); } #endif + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.status &= ~CAM_STATUS_MASK; int srb_status = SRB_STATUS(vm_srb->srb_status); if (vm_srb->scsi_status == SCSI_STATUS_OK) { - const struct scsi_generic *cmd; - - cmd = (const struct scsi_generic *) - ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? - csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (srb_status != SRB_STATUS_SUCCESS) { /* * If there are errors, for example, invalid LUN, @@ -2252,11 +2251,23 @@ storvsc_io_done(struct hv_storvsc_request *reqp) } } } else { - mtx_lock(&sc->hs_lock); - xpt_print(ccb->ccb_h.path, - "storvsc scsi_status = %d\n", - vm_srb->scsi_status); - mtx_unlock(&sc->hs_lock); + /** + * On Some Windows hosts TEST_UNIT_READY command can return + * SRB_STATUS_ERROR and sense data, for example, asc=0x3a,1 + * "(Medium not present - tray closed)". This error can be + * ignored since it will be sent to host periodically. + */ + boolean_t unit_not_ready = \ + vm_srb->scsi_status == SCSI_STATUS_CHECK_COND && + cmd->opcode == TEST_UNIT_READY && + srb_status == SRB_STATUS_ERROR; + if (!unit_not_ready && bootverbose) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc scsi_status = %d, srb_status = %d\n", + vm_srb->scsi_status, srb_status); + mtx_unlock(&sc->hs_lock); + } ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; } From owner-svn-src-all@freebsd.org Mon Jun 26 05:42:37 2017 Return-Path: Delivered-To: svn-src-all@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 332AEDA1FAC; Mon, 26 Jun 2017 05:42:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 028C566F00; Mon, 26 Jun 2017 05:42:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q5gabx030134; Mon, 26 Jun 2017 05:42:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q5gaZ4030133; Mon, 26 Jun 2017 05:42:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706260542.v5Q5gaZ4030133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 26 Jun 2017 05:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320349 - stable/11/etc/ntp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 05:42:37 -0000 Author: cy Date: Mon Jun 26 05:42:35 2017 New Revision: 320349 URL: https://svnweb.freebsd.org/changeset/base/320349 Log: MFC r320242, r320256: Update leap-seconds to leap-seconds.3676924800. As per https://datacenter.iers.org/eop/-/somos/5Rgv/latest/16: INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France) Tel. : 33 (0) 1 40 51 23 35 FAX : 33 (0) 1 40 51 22 91 Internet : services.iers@obspm.fr Paris, 9 January 2017 Bulletin C 53 To authorities responsible for the measurement and distribution of time INFORMATION ON UTC - TAI NO leap second will be introduced at the end of June 2017. The difference between Coordinated Universal Time UTC and the International Atomic Time TAI is : from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37 s Leap seconds can be introduced in UTC at the end of the months of December or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every six months, either to announce a time step in UTC, or to confirm that there will be no time step at the next possible date. Christian BIZOUARD Director Earth Orientation Center of IERS Observatoire de Paris, France Obtained from: ftp://time.nist.gov/pub/leap-seconds.3676924800 Approved by: re@ (delphij@) Modified: stable/11/etc/ntp/leap-seconds Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/ntp/leap-seconds ============================================================================== --- stable/11/etc/ntp/leap-seconds Mon Jun 26 02:33:59 2017 (r320348) +++ stable/11/etc/ntp/leap-seconds Mon Jun 26 05:42:35 2017 (r320349) @@ -1,10 +1,10 @@ # # In the following text, the symbol '#' introduces -# a comment, which continues from that symbol until +# a comment, which continues from that symbol until # the end of the line. A plain comment line has a # whitespace character following the comment indicator. -# There are also special comment lines defined below. -# A special comment will always have a non-whitespace +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace # character in column 2. # # A blank line should be ignored. @@ -15,17 +15,22 @@ # are transmitted by almost all time services. # # The first column shows an epoch as a number of seconds -# since 1900.0 and the second column shows the number of -# seconds that must be added to UTC to compute TAI for -# any timestamp at or after that epoch. The value on -# each line is valid from the indicated initial instant -# until the epoch given on the next one or indefinitely -# into the future if there is no next line. +# since 1 January 1900, 00:00:00 (1900.0 is also used to +# indicate the same epoch.) Both of these time stamp formats +# ignore the complexities of the time scales that were +# used before the current definition of UTC at the start +# of 1972. (See note 3 below.) +# The second column shows the number of seconds that +# must be added to UTC to compute TAI for any timestamp +# at or after that epoch. The value on each line is +# valid from the indicated initial instant until the +# epoch given on the next one or indefinitely into the +# future if there is no next line. # (The comment on each line shows the representation of -# the corresponding initial epoch in the usual +# the corresponding initial epoch in the usual # day-month-year format. The epoch always begins at # 00:00:00 UTC on the indicated day. See Note 5 below.) -# +# # Important notes: # # 1. Coordinated Universal Time (UTC) is often referred to @@ -33,7 +38,7 @@ # longer used, and the use of GMT to designate UTC is # discouraged. # -# 2. The UTC time scale is realized by many national +# 2. The UTC time scale is realized by many national # laboratories and timing centers. Each laboratory # identifies its realization with its name: Thus # UTC(NIST), UTC(USNO), etc. The differences among @@ -42,12 +47,12 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # -# 3. The current defintion of the relationship between UTC -# and TAI dates from 1 January 1972. A number of different -# time scales were in use before than epoch, and it can be -# quite difficult to compute precise timestamps and time +# 3. The current definition of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before that epoch, and it can be +# quite difficult to compute precise timestamps and time # intervals in those "prehistoric" days. For more information, # consult: # @@ -58,36 +63,34 @@ # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. # -# 4. The insertion of leap seconds into UTC is currently the -# responsibility of the International Earth Rotation Service, -# which is located at the Paris Observatory: +# 4. The decision to insert a leap second into UTC is currently +# the responsibility of the International Earth Rotation and +# Reference Systems Service. (The name was changed from the +# International Earth Rotation Service, but the acronym IERS +# is still used.) # -# Central Bureau of IERS -# 61, Avenue de l'Observatoire -# 75014 Paris, France. +# Leap seconds are announced by the IERS in its Bulletin C. # -# Leap seconds are announced by the IERS in its Bulletin C +# See www.iers.org for more details. # -# See hpiers.obspm.fr or www.iers.org for more details. +# Every national laboratory and timing center uses the +# data from the BIPM and the IERS to construct UTC(lab), +# their local realization of UTC. # -# All national laboratories and timing centers use the -# data from the BIPM and the IERS to construct their -# local realizations of UTC. -# # Although the definition also includes the possibility -# of dropping seconds ("negative" leap seconds), this has -# never been done and is unlikely to be necessary in the +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the # foreseeable future. # # 5. If your system keeps time as the number of seconds since # some epoch (e.g., NTP timestamps), then the algorithm for # assigning a UTC time stamp to an event that happens during a positive -# leap second is not well defined. The official name of that leap -# second is 23:59:60, but there is no way of representing that time -# in these systems. -# Many systems of this type effectively stop the system clock for -# one second during the leap second and use a time that is equivalent -# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI # timestamp would be obtained by advancing to the next entry in the # following table when the time equivalent to 23:59:59 UTC # is used for the second time. Thus the leap second which @@ -102,7 +105,7 @@ # # If your system realizes the leap second by repeating 00:00:00 UTC twice # (this is possible but not usual), then the advance to the next entry -# in the table must occur the second time that a time equivlent to +# in the table must occur the second time that a time equivalent to # 00:00:00 UTC is used. Thus, using the same example as above: # # ... @@ -112,66 +115,94 @@ # ... # # in both cases the use of timestamps based on TAI produces a smooth -# time scale with no discontinuity in the time interval. +# time scale with no discontinuity in the time interval. However, +# although the long-term behavior of the time scale is correct in both +# methods, the second method is technically not correct because it adds +# the extra second to the wrong day. # -# This complexity would not be needed for negative leap seconds (if they -# are ever used). The UTC time would skip 23:59:59 and advance from -# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by -# 1 second at the same instant. This is a much easier situation to deal -# with, since the difficulty of unambiguously representing the epoch +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. +# # Questions or comments to: -# Jeff Prillaman -# Time Service Department -# US Naval Observatory -# Washington, DC -# jeffrey.prillaman@usno.navy.mil +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# Judah.Levine@nist.gov # -# Last Update of leap second values: 6 Jul 2016 +# Last Update of leap second values: 8 July 2016 # -# The following line shows this last update date in NTP timestamp +# The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to # the leap second data was added to the file. This line can -# be identified by the unique pair of characters in the first two +# be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3676752000 +#$ 3676924800 # -# The data in this file will be updated periodically as new leap +# The NTP timestamps are in units of seconds since the NTP epoch, +# which is 1 January 1900, 00:00:00. The Modified Julian Day number +# corresponding to the NTP time stamp, X, can be computed as +# +# X/86400 + 15020 +# +# where the first term converts seconds to days and the second +# term adds the MJD corresponding to the time origin defined above. +# The integer portion of the result is the integer MJD for that +# day, and any remainder is the time of day, expressed as the +# fraction of the day since 0 hours UTC. The conversion from day +# fraction to seconds or to hours, minutes, and seconds may involve +# rounding or truncation, depending on the method used in the +# computation. +# +# The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line -# above, the update time (in NTP format) will be added to the basic +# above, the update time (in NTP format) will be added to the basic # file name leap-seconds to form the name leap-seconds.. -# In addition, the generic name leap-seconds.list will always point to +# In addition, the generic name leap-seconds.list will always point to # the most recent version of the file. # # This update procedure will be performed only when a new leap second -# is announced. +# is announced. # # The following entry specifies the expiration date of the data -# in this file in units of seconds since 1900.0. This expiration date -# will be changed at least twice per year whether or not a new leap -# second is announced. These semi-annual changes will be made no -# later than 1 June and 1 December of each year to indicate what -# action (if any) is to be taken on 30 June and 31 December, +# in this file in units of seconds since the origin at the instant +# 1 January 1900, 00:00:00. This expiration date will be changed +# at least twice per year whether or not a new leap second is +# announced. These semi-annual changes will be made no later +# than 1 June and 1 December of each year to indicate what +# action (if any) is to be taken on 30 June and 31 December, # respectively. (These are the customary effective dates for new # leap seconds.) This expiration date will be identified by a # unique pair of characters in columns 1 and 2 as shown below. -# In the unlikely event that a leap second is announced with an +# In the unlikely event that a leap second is announced with an # effective date other than 30 June or 31 December, then this # file will be edited to include that leap second as soon as it is # announced or at least one month before the effective date -# (whichever is later). -# If an announcement by the IERS specifies that no leap second is -# scheduled, then only the expiration date of the file will +# (whichever is later). +# If an announcement by the IERS specifies that no leap second is +# scheduled, then only the expiration date of the file will # be advanced to show that the information in the file is still -# current -- the update time stamp, the data and the name of the file +# current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 52 -# File expires on: 1 Jun 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 # -#@ 3705264000 +#@ 3723408000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -205,16 +236,15 @@ # the following special comment contains the # hash value of the data in this file computed # use the secure hash algorithm as specified -# by FIPS 180-1. See the files in ~/sha for +# by FIPS 180-1. See the files in ~/pub/sha for # the details of how this hash value is # computed. Note that the hash computation # ignores comments and whitespace characters # in data lines. It includes the NTP values -# of both the last modification time and the +# of both the last modification time and the # expiration time of the file, but not the # white space on those lines. # the hash line is also ignored in the # computation. # -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 -# +#h 62cf8c5d 8bbb6dcc c61e3b56 c308343 869bb80d From owner-svn-src-all@freebsd.org Mon Jun 26 05:43:45 2017 Return-Path: Delivered-To: svn-src-all@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 E4972DA202A; Mon, 26 Jun 2017 05:43:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B0ED06702D; Mon, 26 Jun 2017 05:43:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q5hiJB030221; Mon, 26 Jun 2017 05:43:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q5hipu030220; Mon, 26 Jun 2017 05:43:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706260543.v5Q5hipu030220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 26 Jun 2017 05:43: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: r320350 - stable/10/etc/ntp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 05:43:46 -0000 Author: cy Date: Mon Jun 26 05:43:44 2017 New Revision: 320350 URL: https://svnweb.freebsd.org/changeset/base/320350 Log: MFC r320242, r320256: Update leap-seconds to leap-seconds.3676924800. As per https://datacenter.iers.org/eop/-/somos/5Rgv/latest/16: INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France) Tel. : 33 (0) 1 40 51 23 35 FAX : 33 (0) 1 40 51 22 91 Internet : services.iers@obspm.fr Paris, 9 January 2017 Bulletin C 53 To authorities responsible for the measurement and distribution of time INFORMATION ON UTC - TAI NO leap second will be introduced at the end of June 2017. The difference between Coordinated Universal Time UTC and the International Atomic Time TAI is : from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37 s Leap seconds can be introduced in UTC at the end of the months of December or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every six months, either to announce a time step in UTC, or to confirm that there will be no time step at the next possible date. Christian BIZOUARD Director Earth Orientation Center of IERS Observatoire de Paris, France Obtained from: ftp://time.nist.gov/pub/leap-seconds.3676924800 Modified: stable/10/etc/ntp/leap-seconds Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/ntp/leap-seconds ============================================================================== --- stable/10/etc/ntp/leap-seconds Mon Jun 26 05:42:35 2017 (r320349) +++ stable/10/etc/ntp/leap-seconds Mon Jun 26 05:43:44 2017 (r320350) @@ -1,10 +1,10 @@ # # In the following text, the symbol '#' introduces -# a comment, which continues from that symbol until +# a comment, which continues from that symbol until # the end of the line. A plain comment line has a # whitespace character following the comment indicator. -# There are also special comment lines defined below. -# A special comment will always have a non-whitespace +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace # character in column 2. # # A blank line should be ignored. @@ -15,17 +15,22 @@ # are transmitted by almost all time services. # # The first column shows an epoch as a number of seconds -# since 1900.0 and the second column shows the number of -# seconds that must be added to UTC to compute TAI for -# any timestamp at or after that epoch. The value on -# each line is valid from the indicated initial instant -# until the epoch given on the next one or indefinitely -# into the future if there is no next line. +# since 1 January 1900, 00:00:00 (1900.0 is also used to +# indicate the same epoch.) Both of these time stamp formats +# ignore the complexities of the time scales that were +# used before the current definition of UTC at the start +# of 1972. (See note 3 below.) +# The second column shows the number of seconds that +# must be added to UTC to compute TAI for any timestamp +# at or after that epoch. The value on each line is +# valid from the indicated initial instant until the +# epoch given on the next one or indefinitely into the +# future if there is no next line. # (The comment on each line shows the representation of -# the corresponding initial epoch in the usual +# the corresponding initial epoch in the usual # day-month-year format. The epoch always begins at # 00:00:00 UTC on the indicated day. See Note 5 below.) -# +# # Important notes: # # 1. Coordinated Universal Time (UTC) is often referred to @@ -33,7 +38,7 @@ # longer used, and the use of GMT to designate UTC is # discouraged. # -# 2. The UTC time scale is realized by many national +# 2. The UTC time scale is realized by many national # laboratories and timing centers. Each laboratory # identifies its realization with its name: Thus # UTC(NIST), UTC(USNO), etc. The differences among @@ -42,12 +47,12 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # -# 3. The current defintion of the relationship between UTC -# and TAI dates from 1 January 1972. A number of different -# time scales were in use before than epoch, and it can be -# quite difficult to compute precise timestamps and time +# 3. The current definition of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before that epoch, and it can be +# quite difficult to compute precise timestamps and time # intervals in those "prehistoric" days. For more information, # consult: # @@ -58,36 +63,34 @@ # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. # -# 4. The insertion of leap seconds into UTC is currently the -# responsibility of the International Earth Rotation Service, -# which is located at the Paris Observatory: +# 4. The decision to insert a leap second into UTC is currently +# the responsibility of the International Earth Rotation and +# Reference Systems Service. (The name was changed from the +# International Earth Rotation Service, but the acronym IERS +# is still used.) # -# Central Bureau of IERS -# 61, Avenue de l'Observatoire -# 75014 Paris, France. +# Leap seconds are announced by the IERS in its Bulletin C. # -# Leap seconds are announced by the IERS in its Bulletin C +# See www.iers.org for more details. # -# See hpiers.obspm.fr or www.iers.org for more details. +# Every national laboratory and timing center uses the +# data from the BIPM and the IERS to construct UTC(lab), +# their local realization of UTC. # -# All national laboratories and timing centers use the -# data from the BIPM and the IERS to construct their -# local realizations of UTC. -# # Although the definition also includes the possibility -# of dropping seconds ("negative" leap seconds), this has -# never been done and is unlikely to be necessary in the +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the # foreseeable future. # # 5. If your system keeps time as the number of seconds since # some epoch (e.g., NTP timestamps), then the algorithm for # assigning a UTC time stamp to an event that happens during a positive -# leap second is not well defined. The official name of that leap -# second is 23:59:60, but there is no way of representing that time -# in these systems. -# Many systems of this type effectively stop the system clock for -# one second during the leap second and use a time that is equivalent -# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI # timestamp would be obtained by advancing to the next entry in the # following table when the time equivalent to 23:59:59 UTC # is used for the second time. Thus the leap second which @@ -102,7 +105,7 @@ # # If your system realizes the leap second by repeating 00:00:00 UTC twice # (this is possible but not usual), then the advance to the next entry -# in the table must occur the second time that a time equivlent to +# in the table must occur the second time that a time equivalent to # 00:00:00 UTC is used. Thus, using the same example as above: # # ... @@ -112,66 +115,94 @@ # ... # # in both cases the use of timestamps based on TAI produces a smooth -# time scale with no discontinuity in the time interval. +# time scale with no discontinuity in the time interval. However, +# although the long-term behavior of the time scale is correct in both +# methods, the second method is technically not correct because it adds +# the extra second to the wrong day. # -# This complexity would not be needed for negative leap seconds (if they -# are ever used). The UTC time would skip 23:59:59 and advance from -# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by -# 1 second at the same instant. This is a much easier situation to deal -# with, since the difficulty of unambiguously representing the epoch +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. +# # Questions or comments to: -# Jeff Prillaman -# Time Service Department -# US Naval Observatory -# Washington, DC -# jeffrey.prillaman@usno.navy.mil +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# Judah.Levine@nist.gov # -# Last Update of leap second values: 6 Jul 2016 +# Last Update of leap second values: 8 July 2016 # -# The following line shows this last update date in NTP timestamp +# The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to # the leap second data was added to the file. This line can -# be identified by the unique pair of characters in the first two +# be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3676752000 +#$ 3676924800 # -# The data in this file will be updated periodically as new leap +# The NTP timestamps are in units of seconds since the NTP epoch, +# which is 1 January 1900, 00:00:00. The Modified Julian Day number +# corresponding to the NTP time stamp, X, can be computed as +# +# X/86400 + 15020 +# +# where the first term converts seconds to days and the second +# term adds the MJD corresponding to the time origin defined above. +# The integer portion of the result is the integer MJD for that +# day, and any remainder is the time of day, expressed as the +# fraction of the day since 0 hours UTC. The conversion from day +# fraction to seconds or to hours, minutes, and seconds may involve +# rounding or truncation, depending on the method used in the +# computation. +# +# The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line -# above, the update time (in NTP format) will be added to the basic +# above, the update time (in NTP format) will be added to the basic # file name leap-seconds to form the name leap-seconds.. -# In addition, the generic name leap-seconds.list will always point to +# In addition, the generic name leap-seconds.list will always point to # the most recent version of the file. # # This update procedure will be performed only when a new leap second -# is announced. +# is announced. # # The following entry specifies the expiration date of the data -# in this file in units of seconds since 1900.0. This expiration date -# will be changed at least twice per year whether or not a new leap -# second is announced. These semi-annual changes will be made no -# later than 1 June and 1 December of each year to indicate what -# action (if any) is to be taken on 30 June and 31 December, +# in this file in units of seconds since the origin at the instant +# 1 January 1900, 00:00:00. This expiration date will be changed +# at least twice per year whether or not a new leap second is +# announced. These semi-annual changes will be made no later +# than 1 June and 1 December of each year to indicate what +# action (if any) is to be taken on 30 June and 31 December, # respectively. (These are the customary effective dates for new # leap seconds.) This expiration date will be identified by a # unique pair of characters in columns 1 and 2 as shown below. -# In the unlikely event that a leap second is announced with an +# In the unlikely event that a leap second is announced with an # effective date other than 30 June or 31 December, then this # file will be edited to include that leap second as soon as it is # announced or at least one month before the effective date -# (whichever is later). -# If an announcement by the IERS specifies that no leap second is -# scheduled, then only the expiration date of the file will +# (whichever is later). +# If an announcement by the IERS specifies that no leap second is +# scheduled, then only the expiration date of the file will # be advanced to show that the information in the file is still -# current -- the update time stamp, the data and the name of the file +# current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 52 -# File expires on: 1 Jun 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 # -#@ 3705264000 +#@ 3723408000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -205,16 +236,15 @@ # the following special comment contains the # hash value of the data in this file computed # use the secure hash algorithm as specified -# by FIPS 180-1. See the files in ~/sha for +# by FIPS 180-1. See the files in ~/pub/sha for # the details of how this hash value is # computed. Note that the hash computation # ignores comments and whitespace characters # in data lines. It includes the NTP values -# of both the last modification time and the +# of both the last modification time and the # expiration time of the file, but not the # white space on those lines. # the hash line is also ignored in the # computation. # -#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 -# +#h 62cf8c5d 8bbb6dcc c61e3b56 c308343 869bb80d From owner-svn-src-all@freebsd.org Mon Jun 26 05:56:50 2017 Return-Path: Delivered-To: svn-src-all@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 C978ADA22C9; Mon, 26 Jun 2017 05:56:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8281567534; Mon, 26 Jun 2017 05:56:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q5uniu034243; Mon, 26 Jun 2017 05:56:49 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q5unK3034242; Mon, 26 Jun 2017 05:56:49 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201706260556.v5Q5unK3034242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 26 Jun 2017 05:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320351 - stable/11/sys/dev/hyperv/storvsc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 05:56:50 -0000 Author: sephe Date: Mon Jun 26 05:56:49 2017 New Revision: 320351 URL: https://svnweb.freebsd.org/changeset/base/320351 Log: MFC 320184 hyperv/storvsc: Reduce log verbosity On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors. Approved by: re (delphij) PR: 219973 Submitted by: Hongjiang Zhang Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jun 26 05:43:44 2017 (r320350) +++ stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jun 26 05:56:49 2017 (r320351) @@ -2095,6 +2095,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) struct vmscsi_req *vm_srb = &reqp->vstor_packet.u.vm_srb; bus_dma_segment_t *ori_sglist = NULL; int ori_sg_count = 0; + const struct scsi_generic *cmd; /* destroy bounce buffer if it is used */ if (reqp->bounce_sgl_count) { @@ -2145,16 +2146,14 @@ storvsc_io_done(struct hv_storvsc_request *reqp) callout_drain(&reqp->callout); } #endif + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.status &= ~CAM_STATUS_MASK; int srb_status = SRB_STATUS(vm_srb->srb_status); if (vm_srb->scsi_status == SCSI_STATUS_OK) { - const struct scsi_generic *cmd; - - cmd = (const struct scsi_generic *) - ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? - csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); if (srb_status != SRB_STATUS_SUCCESS) { /* * If there are errors, for example, invalid LUN, @@ -2252,11 +2251,23 @@ storvsc_io_done(struct hv_storvsc_request *reqp) } } } else { - mtx_lock(&sc->hs_lock); - xpt_print(ccb->ccb_h.path, - "storvsc scsi_status = %d\n", - vm_srb->scsi_status); - mtx_unlock(&sc->hs_lock); + /** + * On Some Windows hosts TEST_UNIT_READY command can return + * SRB_STATUS_ERROR and sense data, for example, asc=0x3a,1 + * "(Medium not present - tray closed)". This error can be + * ignored since it will be sent to host periodically. + */ + boolean_t unit_not_ready = \ + vm_srb->scsi_status == SCSI_STATUS_CHECK_COND && + cmd->opcode == TEST_UNIT_READY && + srb_status == SRB_STATUS_ERROR; + if (!unit_not_ready && bootverbose) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc scsi_status = %d, srb_status = %d\n", + vm_srb->scsi_status, srb_status); + mtx_unlock(&sc->hs_lock); + } ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; } From owner-svn-src-all@freebsd.org Mon Jun 26 09:10:11 2017 Return-Path: Delivered-To: svn-src-all@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 4B405DA533C; Mon, 26 Jun 2017 09:10:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 25CDE70376; Mon, 26 Jun 2017 09:10:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q9AAfs011177; Mon, 26 Jun 2017 09:10:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q9AAi5011174; Mon, 26 Jun 2017 09:10:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706260910.v5Q9AAi5011174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 26 Jun 2017 09:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320352 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 09:10:11 -0000 Author: avg Date: Mon Jun 26 09:10:09 2017 New Revision: 320352 URL: https://svnweb.freebsd.org/changeset/base/320352 Log: zfs: port vdev_file part of illumos change 3306 3306 zdb should be able to issue reads in parallel illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1 https://www.illumos.org/issues/3306 The upstream change was made before we started to import upstream commits individually. It was imported into the illumos vendor area as r242733. That commit was MFV-ed in r260138, but as the commit message says vdev_file.c was left intact. This commit actually implements the parallel I/O for vdev_file using a taskqueue with multiple thread. This implementation does not depend on the illumos or FreeBSD bio interface at all, but uses zio_t to pass around all the relevent data. So, the code looks a bit different from the upstream. This commit also incorporates ZoL commit zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed https://github.com/zfsonlinux/zfs/issues/2270 We need to use a dedicated taskqueue for exactly the same reason as ZoL as we do not implement TASKQ_DYNAMIC. Obtained from: illumos, ZFS on Linux MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Jun 26 05:56:49 2017 (r320351) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Jun 26 09:10:09 2017 (r320352) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -2020,6 +2021,7 @@ spa_init(int mode) dmu_init(); zil_init(); vdev_cache_stat_init(); + vdev_file_init(); zfs_prop_init(); zpool_prop_init(); zpool_feature_init(); @@ -2039,6 +2041,7 @@ spa_fini(void) spa_evict_all(); + vdev_file_fini(); vdev_cache_stat_fini(); zil_fini(); dmu_fini(); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Mon Jun 26 05:56:49 2017 (r320351) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Mon Jun 26 09:10:09 2017 (r320352) @@ -39,6 +39,9 @@ typedef struct vdev_file { vnode_t *vf_vnode; } vdev_file_t; +extern void vdev_file_init(void); +extern void vdev_file_fini(void); + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Jun 26 05:56:49 2017 (r320351) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Jun 26 09:10:09 2017 (r320352) @@ -36,6 +36,21 @@ * Virtual device vector for files. */ +static taskq_t *vdev_file_taskq; + +void +vdev_file_init(void) +{ + vdev_file_taskq = taskq_create("z_vdev_file", MAX(max_ncpus, 16), + minclsyspri, max_ncpus, INT_MAX, 0); +} + +void +vdev_file_fini(void) +{ + taskq_destroy(vdev_file_taskq); +} + static void vdev_file_hold(vdev_t *vd) { @@ -157,41 +172,32 @@ vdev_file_close(vdev_t *vd) vd->vdev_tsd = NULL; } +/* + * Implements the interrupt side for file vdev types. This routine will be + * called when the I/O completes allowing us to transfer the I/O to the + * interrupt taskqs. For consistency, the code structure mimics disk vdev + * types. + */ static void -vdev_file_io_start(zio_t *zio) +vdev_file_io_intr(zio_t *zio) { + zio_delay_interrupt(zio); +} + +static void +vdev_file_io_strategy(void *arg) +{ + zio_t *zio = arg; vdev_t *vd = zio->io_vd; vdev_file_t *vf; vnode_t *vp; void *addr; ssize_t resid; - if (!vdev_readable(vd)) { - zio->io_error = SET_ERROR(ENXIO); - zio_interrupt(zio); - return; - } - vf = vd->vdev_tsd; vp = vf->vf_vnode; - if (zio->io_type == ZIO_TYPE_IOCTL) { - switch (zio->io_cmd) { - case DKIOCFLUSHWRITECACHE: - zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC, - kcred, NULL); - break; - default: - zio->io_error = SET_ERROR(ENOTSUP); - } - - zio_execute(zio); - return; - } - ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); - zio->io_target_timestamp = zio_handle_io_delay(zio); - if (zio->io_type == ZIO_TYPE_READ) { addr = abd_borrow_buf(zio->io_abd, zio->io_size); } else { @@ -211,12 +217,41 @@ vdev_file_io_start(zio_t *zio) if (resid != 0 && zio->io_error == 0) zio->io_error = ENOSPC; - zio_delay_interrupt(zio); + vdev_file_io_intr(zio); +} -#ifdef illumos - VERIFY3U(taskq_dispatch(system_taskq, vdev_file_io_strategy, bp, +static void +vdev_file_io_start(zio_t *zio) +{ + vdev_t *vd = zio->io_vd; + vdev_file_t *vf = vd->vdev_tsd; + + if (zio->io_type == ZIO_TYPE_IOCTL) { + /* XXPOLICY */ + if (!vdev_readable(vd)) { + zio->io_error = SET_ERROR(ENXIO); + zio_interrupt(zio); + return; + } + + switch (zio->io_cmd) { + case DKIOCFLUSHWRITECACHE: + zio->io_error = VOP_FSYNC(vf->vf_vnode, FSYNC | FDSYNC, + kcred, NULL); + break; + default: + zio->io_error = SET_ERROR(ENOTSUP); + } + + zio_execute(zio); + return; + } + + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); + zio->io_target_timestamp = zio_handle_io_delay(zio); + + VERIFY3U(taskq_dispatch(vdev_file_taskq, vdev_file_io_strategy, zio, TQ_SLEEP), !=, 0); -#endif } /* ARGSUSED */ From owner-svn-src-all@freebsd.org Mon Jun 26 09:13:26 2017 Return-Path: Delivered-To: svn-src-all@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 B46C3DA555E; Mon, 26 Jun 2017 09:13:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 826D17075F; Mon, 26 Jun 2017 09:13:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q9DPPX015227; Mon, 26 Jun 2017 09:13:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q9DPoV015226; Mon, 26 Jun 2017 09:13:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706260913.v5Q9DPoV015226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 26 Jun 2017 09:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320353 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 09:13:26 -0000 Author: avg Date: Mon Jun 26 09:13:25 2017 New Revision: 320353 URL: https://svnweb.freebsd.org/changeset/base/320353 Log: linux_getdents, linux_readdir: fix mismatch between malloc and free tags MFC after: 3 days Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jun 26 09:10:09 2017 (r320352) +++ head/sys/compat/linux/linux_file.c Mon Jun 26 09:13:25 2017 (r320353) @@ -381,9 +381,9 @@ linux_getdents(struct thread *td, struct linux_getdent td->td_retval[0] = retval; out: - free(lbuf, M_LINUX); + free(lbuf, M_TEMP); out1: - free(buf, M_LINUX); + free(buf, M_TEMP); return (error); } @@ -507,9 +507,9 @@ linux_readdir(struct thread *td, struct linux_readdir_ if (error == 0) td->td_retval[0] = linuxreclen; - free(lbuf, M_LINUX); + free(lbuf, M_TEMP); out: - free(buf, M_LINUX); + free(buf, M_TEMP); return (error); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ From owner-svn-src-all@freebsd.org Mon Jun 26 09:26:06 2017 Return-Path: Delivered-To: svn-src-all@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 59081DA57B3; Mon, 26 Jun 2017 09:26:06 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 23DD870C01; Mon, 26 Jun 2017 09:26:04 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v5Q9PuOX052510 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Jun 2017 09:25:57 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v5Q9PtsT002474 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Jun 2017 12:25:55 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v5Q9Ptw8002471; Mon, 26 Jun 2017 12:25:55 +0300 (MSK) (envelope-from dchagin) Date: Mon, 26 Jun 2017 12:25:55 +0300 From: Chagin Dmitry To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320353 - head/sys/compat/linux Message-ID: <20170626092555.GA2367@mordor.heemeyer.club> References: <201706260913.v5Q9DPoV015226@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706260913.v5Q9DPoV015226@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 09:26:06 -0000 On Mon, Jun 26, 2017 at 09:13:25AM +0000, Andriy Gapon wrote: > Author: avg > Date: Mon Jun 26 09:13:25 2017 > New Revision: 320353 > URL: https://svnweb.freebsd.org/changeset/base/320353 > > Log: > linux_getdents, linux_readdir: fix mismatch between malloc and free tags > > MFC after: 3 days > whoops, thanks From owner-svn-src-all@freebsd.org Mon Jun 26 09:32:59 2017 Return-Path: Delivered-To: svn-src-all@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 236D7DA5AFB; Mon, 26 Jun 2017 09:32:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E5A197111A; Mon, 26 Jun 2017 09:32:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q9WwnP023674; Mon, 26 Jun 2017 09:32:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q9WwKP023673; Mon, 26 Jun 2017 09:32:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706260932.v5Q9WwKP023673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 26 Jun 2017 09:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320354 - stable/11/sys/dev/jedec_ts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 09:32:59 -0000 Author: avg Date: Mon Jun 26 09:32:57 2017 New Revision: 320354 URL: https://svnweb.freebsd.org/changeset/base/320354 Log: MFC r320259: jedec_ts: read device id from the correct register Approved by: re (marius) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/11/sys/dev/jedec_ts/jedec_ts.c Mon Jun 26 09:13:25 2017 (r320353) +++ stable/11/sys/dev/jedec_ts/jedec_ts.c Mon Jun 26 09:32:57 2017 (r320354) @@ -114,7 +114,7 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Manufacturer ID\n"); return (ENXIO); } - err = ts_readw_be(dev, 6, &devid); + err = ts_readw_be(dev, 7, &devid); if (err != 0) { device_printf(dev, "failed to read Device ID\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Mon Jun 26 09:34:42 2017 Return-Path: Delivered-To: svn-src-all@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 8AA20DA5B73; Mon, 26 Jun 2017 09:34:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 586E971270; Mon, 26 Jun 2017 09:34:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5Q9YfGP023848; Mon, 26 Jun 2017 09:34:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5Q9YfHK023847; Mon, 26 Jun 2017 09:34:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706260934.v5Q9YfHK023847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 26 Jun 2017 09:34:41 +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: r320355 - stable/10/sys/dev/jedec_ts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 09:34:42 -0000 Author: avg Date: Mon Jun 26 09:34:41 2017 New Revision: 320355 URL: https://svnweb.freebsd.org/changeset/base/320355 Log: MFC r320259: jedec_ts: read device id from the correct register Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- stable/10/sys/dev/jedec_ts/jedec_ts.c Mon Jun 26 09:32:57 2017 (r320354) +++ stable/10/sys/dev/jedec_ts/jedec_ts.c Mon Jun 26 09:34:41 2017 (r320355) @@ -114,7 +114,7 @@ ts_attach(device_t dev) device_printf(dev, "failed to read Manufacturer ID\n"); return (ENXIO); } - err = ts_readw_be(dev, 6, &devid); + err = ts_readw_be(dev, 7, &devid); if (err != 0) { device_printf(dev, "failed to read Device ID\n"); return (ENXIO); From owner-svn-src-all@freebsd.org Mon Jun 26 12:17:05 2017 Return-Path: Delivered-To: svn-src-all@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 7CD01DA90E2; Mon, 26 Jun 2017 12:17:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4C0DF76563; Mon, 26 Jun 2017 12:17:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QCH4eP090153; Mon, 26 Jun 2017 12:17:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QCH4nM090152; Mon, 26 Jun 2017 12:17:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706261217.v5QCH4nM090152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Jun 2017 12:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320356 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 12:17:05 -0000 Author: kib Date: Mon Jun 26 12:17:04 2017 New Revision: 320356 URL: https://svnweb.freebsd.org/changeset/base/320356 Log: MFC r320108: Allow negative aio_offset only for the read and write LIO ops on device nodes. Approved by: re (marius) Modified: stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Mon Jun 26 09:34:41 2017 (r320355) +++ stable/11/sys/kern/vfs_aio.c Mon Jun 26 12:17:04 2017 (r320356) @@ -1550,7 +1550,9 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, stru goto aqueue_fail; } - if (opcode != LIO_SYNC && job->uaiocb.aio_offset == -1LL) { + if ((opcode == LIO_READ || opcode == LIO_WRITE) && + job->uaiocb.aio_offset < 0 && + (fp->f_vnode == NULL || fp->f_vnode->v_type != VCHR)) { error = EINVAL; goto aqueue_fail; } From owner-svn-src-all@freebsd.org Mon Jun 26 12:30:40 2017 Return-Path: Delivered-To: svn-src-all@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 A7D6DDA99BD; Mon, 26 Jun 2017 12:30:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7E8CB77047; Mon, 26 Jun 2017 12:30:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QCUduZ094395; Mon, 26 Jun 2017 12:30:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QCUdaT094392; Mon, 26 Jun 2017 12:30:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706261230.v5QCUdaT094392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Jun 2017 12:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320357 - stable/11/sys/x86/iommu X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 12:30:40 -0000 Author: kib Date: Mon Jun 26 12:30:39 2017 New Revision: 320357 URL: https://svnweb.freebsd.org/changeset/base/320357 Log: MFC r320125: Fix batched unload for DMAR busdma in qi mode. Approved by: re (marius) Modified: stable/11/sys/x86/iommu/intel_ctx.c stable/11/sys/x86/iommu/intel_dmar.h stable/11/sys/x86/iommu/intel_qi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/11/sys/x86/iommu/intel_ctx.c Mon Jun 26 12:17:04 2017 (r320356) +++ stable/11/sys/x86/iommu/intel_ctx.c Mon Jun 26 12:30:39 2017 (r320357) @@ -703,7 +703,7 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry, if (unit->qi_enabled) { DMAR_LOCK(unit); dmar_qi_invalidate_locked(entry->domain, entry->start, - entry->end - entry->start, &entry->gseq); + entry->end - entry->start, &entry->gseq, true); if (!free) entry->flags |= DMAR_MAP_ENTRY_QI_NF; TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link); @@ -715,16 +715,14 @@ dmar_domain_unload_entry(struct dmar_map_entry *entry, } } -static struct dmar_qi_genseq * -dmar_domain_unload_gseq(struct dmar_domain *domain, - struct dmar_map_entry *entry, struct dmar_qi_genseq *gseq) +static bool +dmar_domain_unload_emit_wait(struct dmar_domain *domain, + struct dmar_map_entry *entry) { - if (TAILQ_NEXT(entry, dmamap_link) != NULL) - return (NULL); - if (domain->batch_no++ % dmar_batch_coalesce != 0) - return (NULL); - return (gseq); + if (TAILQ_NEXT(entry, dmamap_link) == NULL) + return (true); + return (domain->batch_no++ % dmar_batch_coalesce == 0); } void @@ -733,7 +731,6 @@ dmar_domain_unload(struct dmar_domain *domain, { struct dmar_unit *unit; struct dmar_map_entry *entry, *entry1; - struct dmar_qi_genseq gseq; int error; unit = domain->dmar; @@ -757,17 +754,11 @@ dmar_domain_unload(struct dmar_domain *domain, KASSERT(unit->qi_enabled, ("loaded entry left")); DMAR_LOCK(unit); TAILQ_FOREACH(entry, entries, dmamap_link) { - entry->gseq.gen = 0; - entry->gseq.seq = 0; dmar_qi_invalidate_locked(domain, entry->start, entry->end - - entry->start, dmar_domain_unload_gseq(domain, entry, - &gseq)); + entry->start, &entry->gseq, + dmar_domain_unload_emit_wait(domain, entry)); } - TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { - entry->gseq = gseq; - TAILQ_REMOVE(entries, entry, dmamap_link); - TAILQ_INSERT_TAIL(&unit->tlb_flush_entries, entry, dmamap_link); - } + TAILQ_CONCAT(&unit->tlb_flush_entries, entries, dmamap_link); DMAR_UNLOCK(unit); } Modified: stable/11/sys/x86/iommu/intel_dmar.h ============================================================================== --- stable/11/sys/x86/iommu/intel_dmar.h Mon Jun 26 12:17:04 2017 (r320356) +++ stable/11/sys/x86/iommu/intel_dmar.h Mon Jun 26 12:30:39 2017 (r320357) @@ -305,7 +305,7 @@ void dmar_disable_qi_intr(struct dmar_unit *unit); int dmar_init_qi(struct dmar_unit *unit); void dmar_fini_qi(struct dmar_unit *unit); void dmar_qi_invalidate_locked(struct dmar_domain *domain, dmar_gaddr_t start, - dmar_gaddr_t size, struct dmar_qi_genseq *pseq); + dmar_gaddr_t size, struct dmar_qi_genseq *psec, bool emit_wait); void dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit); Modified: stable/11/sys/x86/iommu/intel_qi.c ============================================================================== --- stable/11/sys/x86/iommu/intel_qi.c Mon Jun 26 12:17:04 2017 (r320356) +++ stable/11/sys/x86/iommu/intel_qi.c Mon Jun 26 12:30:39 2017 (r320357) @@ -171,7 +171,8 @@ dmar_qi_emit_wait_descr(struct dmar_unit *unit, uint32 } static void -dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct dmar_qi_genseq *pseq) +dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct dmar_qi_genseq *pseq, + bool emit_wait) { struct dmar_qi_genseq gsec; uint32_t seq; @@ -192,7 +193,10 @@ dmar_qi_emit_wait_seq(struct dmar_unit *unit, struct d seq = unit->inv_waitd_seq++; pseq->gen = unit->inv_waitd_gen; pseq->seq = seq; - dmar_qi_emit_wait_descr(unit, seq, true, true, false); + if (emit_wait) { + dmar_qi_ensure(unit, 1); + dmar_qi_emit_wait_descr(unit, seq, true, true, false); + } } static void @@ -215,7 +219,7 @@ dmar_qi_wait_for_seq(struct dmar_unit *unit, const str void dmar_qi_invalidate_locked(struct dmar_domain *domain, dmar_gaddr_t base, - dmar_gaddr_t size, struct dmar_qi_genseq *pseq) + dmar_gaddr_t size, struct dmar_qi_genseq *pseq, bool emit_wait) { struct dmar_unit *unit; dmar_gaddr_t isize; @@ -232,10 +236,7 @@ dmar_qi_invalidate_locked(struct dmar_domain *domain, DMAR_IQ_DESCR_IOTLB_DID(domain->domain), base | am); } - if (pseq != NULL) { - dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, pseq); - } + dmar_qi_emit_wait_seq(unit, pseq, emit_wait); dmar_qi_advance_tail(unit); } @@ -247,7 +248,7 @@ dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *u DMAR_ASSERT_LOCKED(unit); dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_CTX_INV | DMAR_IQ_DESCR_CTX_GLOB, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -261,7 +262,7 @@ dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_IOTLB_INV | DMAR_IQ_DESCR_IOTLB_GLOB | DMAR_IQ_DESCR_IOTLB_DW | DMAR_IQ_DESCR_IOTLB_DR, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -274,7 +275,7 @@ dmar_qi_invalidate_iec_glob(struct dmar_unit *unit) DMAR_ASSERT_LOCKED(unit); dmar_qi_ensure(unit, 2); dmar_qi_emit(unit, DMAR_IQ_DESCR_IEC_INV, 0); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); } @@ -298,7 +299,7 @@ dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int s DMAR_IQ_DESCR_IEC_IM(l), 0); } dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); /* @@ -344,8 +345,7 @@ dmar_qi_task(void *arg, int pending __unused) entry = TAILQ_FIRST(&unit->tlb_flush_entries); if (entry == NULL) break; - if ((entry->gseq.gen == 0 && entry->gseq.seq == 0) || - !dmar_qi_seq_processed(unit, &entry->gseq)) + if (!dmar_qi_seq_processed(unit, &entry->gseq)) break; TAILQ_REMOVE(&unit->tlb_flush_entries, entry, dmamap_link); DMAR_UNLOCK(unit); @@ -432,7 +432,7 @@ dmar_fini_qi(struct dmar_unit *unit) DMAR_LOCK(unit); /* quisce */ dmar_qi_ensure(unit, 1); - dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_emit_wait_seq(unit, &gseq, true); dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq, false); /* only after the quisce, disable queue */ From owner-svn-src-all@freebsd.org Mon Jun 26 12:37:13 2017 Return-Path: Delivered-To: svn-src-all@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 0A2FCDA9C1A; Mon, 26 Jun 2017 12:37:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C4F21774B1; Mon, 26 Jun 2017 12:37:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QCbBoP098193; Mon, 26 Jun 2017 12:37:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QCbBgY098192; Mon, 26 Jun 2017 12:37:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706261237.v5QCbBgY098192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Jun 2017 12:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320358 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 12:37:13 -0000 Author: kib Date: Mon Jun 26 12:37:11 2017 New Revision: 320358 URL: https://svnweb.freebsd.org/changeset/base/320358 Log: MFC r320121: Ignore the P_SYSTEM process flag, and do not request VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack. Approved by: re (marius) Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Mon Jun 26 12:30:39 2017 (r320357) +++ stable/11/sys/vm/vm_map.c Mon Jun 26 12:37:11 2017 (r320358) @@ -3891,9 +3891,7 @@ Retry: vm_map_wire(map, (stack_entry == next_entry) ? addr : addr - grow_amount, (stack_entry == next_entry) ? stack_entry->start : addr, - (p->p_flag & P_SYSTEM) - ? VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES - : VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); } out: From owner-svn-src-all@freebsd.org Mon Jun 26 13:11:23 2017 Return-Path: Delivered-To: svn-src-all@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 63E71D86942; Mon, 26 Jun 2017 13:11:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3515F789EC; Mon, 26 Jun 2017 13:11:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QDBMWc013148; Mon, 26 Jun 2017 13:11:22 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QDBMBb013146; Mon, 26 Jun 2017 13:11:22 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706261311.v5QDBMBb013146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jun 2017 13:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320359 - in head/sys/fs: nfs nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 13:11:23 -0000 Author: trasz Date: Mon Jun 26 13:11:21 2017 New Revision: 320359 URL: https://svnweb.freebsd.org/changeset/base/320359 Log: Add vfs.nfsd.nfsd_enable_uidtostring, which works just like vfs.nfsd.nfsd_enable_stringtouid, but in reverse - when set to 1, it forces the NFSv4 server to return numeric UIDs and GIDs instead of "user@domain" strings. This helps with clients that can't translate returned identifiers, eg when rerooting. The same can be achieved by just never running nfsuserd(8), but the sysctl is useful to toggle the behaviour back and forth without rebooting. Reviewed by: rmacklem (earlier version) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11326 Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Jun 26 12:37:11 2017 (r320358) +++ head/sys/fs/nfs/nfs_commonsubs.c Mon Jun 26 13:11:21 2017 (r320359) @@ -68,6 +68,7 @@ gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; +int nfsd_enable_uidtostring = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; @@ -2561,7 +2562,7 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { /* * Always map nfsrv_defaultuid to "nobody". */ @@ -2671,7 +2672,7 @@ nfsrv_getgrpscred(struct ucred *oldcred) cnt = 0; uid = oldcred->cr_uid; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { hp = NFSUSERHASH(uid); mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { @@ -2823,7 +2824,7 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { /* * Always map nfsrv_defaultgid to "nogroup". */ Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Mon Jun 26 12:37:11 2017 (r320358) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Mon Jun 26 13:11:21 2017 (r320359) @@ -87,6 +87,7 @@ static int nfs_commit_miss; extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; extern int nfsd_enable_stringtouid; +extern int nfsd_enable_uidtostring; SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, @@ -103,6 +104,8 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, debuglevel, CTLFLAG_RW 0, "Debug level for NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW, &nfsd_enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names"); +SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_uidtostring, CTLFLAG_RW, + &nfsd_enable_uidtostring, 0, "Make nfsd always send numeric owner_names"); #define MAX_REORDERED_RPC 16 #define NUM_HEURISTIC 1031 From owner-svn-src-all@freebsd.org Mon Jun 26 13:14:42 2017 Return-Path: Delivered-To: svn-src-all@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 EA421D86C5A; Mon, 26 Jun 2017 13:14:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BA6B278D5F; Mon, 26 Jun 2017 13:14:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QDEfRf014898; Mon, 26 Jun 2017 13:14:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QDEfHj014897; Mon, 26 Jun 2017 13:14:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706261314.v5QDEfHj014897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jun 2017 13:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320360 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 13:14:43 -0000 Author: trasz Date: Mon Jun 26 13:14:41 2017 New Revision: 320360 URL: https://svnweb.freebsd.org/changeset/base/320360 Log: Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW followed by tcflush(3). This works just as well and is more elegant. Suggested by: bde MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon Jun 26 13:11:21 2017 (r320359) +++ head/usr.bin/resizewin/resizewin.c Mon Jun 26 13:14:41 2017 (r320360) @@ -91,20 +91,15 @@ main(int argc, char **argv) exit(0); } - /* Disable echo */ + /* Disable echo, drain the input, and flush the output */ if (tcgetattr(fd, &old) == -1) exit(1); new = old; new.c_cflag |= (CLOCAL | CREAD); new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); - if (tcsetattr(fd, TCSANOW, &new) == -1) + if (tcsetattr(fd, TCSAFLUSH, &new) == -1) exit(1); - - /* Discard input received so far */ - error = tcflush(fd, TCIOFLUSH); - if (error != 0) - warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; From owner-svn-src-all@freebsd.org Mon Jun 26 13:20:18 2017 Return-Path: Delivered-To: svn-src-all@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 A0EDDD86E07 for ; Mon, 26 Jun 2017 13:20:18 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::22b]) (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 7419278FF8 for ; Mon, 26 Jun 2017 13:20:18 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22b.google.com with SMTP id s9so321711ybe.3 for ; Mon, 26 Jun 2017 06:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Mp4aTWP1no6X7UGAtb8KuyWTZlbxIbNvHU2JsUvRgb4=; b=Vaxdju/k+7WuYR08/qe08a1W77tlY3kN5cnxMYGeAaXuQpndXcmihpcsAhX2vAUqT9 BtyiZG2QLxRTV+cGM7tNKKhMlhzPXvX2WBlKbl0w7zUmmKlQbEhMRWqay/LdJD4uIYGR Ypl3dRwOfJ+650Bvc6DD8ILmMg/7MwsB6KMJc8INB/LSgx7rglPvzysbIQ3AZ0eDaqeQ REp1Yg1cxNhLh+9ZoKajWeJlIK4CtrZo79cl8XmPqywuqkyZAKA9PBlDc5Op05yckNmh ssXMa5JZM1EdJtZP54GHaWKAIFEuk0X6VTNH8kRMpidQV3Dk3qNi9iJ9J29+wPQRBHeU 5ixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Mp4aTWP1no6X7UGAtb8KuyWTZlbxIbNvHU2JsUvRgb4=; b=RBqhkxPCpojp6o48dnyrL6GUpDTmOVkqHJkKXw/gsUAu2HtO7rjh10YE2+8BdDgtnr Fn5KRVIaMPEfz3zge2JaeSuS3hb/mAlchcSaRlZuAo8xQcCjFDiebGyedjwc+C8vcNTs KuijXikcNriFMTwVtJl9eS5QhaLvla+2IVLNwWnepQWV2fufu956E7C1hDF2+ECTqzCm vsoU5okNfu+SwRh/J3xTCfUd4pT/qAWE4c5fY//sY/bRUtJ3e8c5yJ5zXBzZ9+U1B8uz /1yxe5WIJEX7ipNYBQdk1paT9Xt+/OZwQtikNwt9uO+1T/TnnllAOaLgjul/xMSL0Ayd 0wJA== X-Gm-Message-State: AKS2vOzScUwlrmb3sMFE1lC1hsmSRoFDkf3sZn0SuAFZYxuvjTbYrgaD VY9DnJFUwEAaek2P1RqfL+GLsDWdNAcf X-Received: by 10.37.37.131 with SMTP id l125mr129887ybl.53.1498483217527; Mon, 26 Jun 2017 06:20:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.216.142 with HTTP; Mon, 26 Jun 2017 06:19:47 -0700 (PDT) In-Reply-To: <201706261314.v5QDEfHj014897@repo.freebsd.org> References: <201706261314.v5QDEfHj014897@repo.freebsd.org> From: Ed Schouten Date: Mon, 26 Jun 2017 15:19:47 +0200 Message-ID: Subject: Re: svn commit: r320360 - head/usr.bin/resizewin To: Edward Tomasz Napierala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 13:20:18 -0000 2017-06-26 15:14 GMT+02:00 Edward Tomasz Napierala : > + /* Disable echo, drain the input, and flush the output */ > if (tcgetattr(fd, &old) == -1) > exit(1); > + if (tcsetattr(fd, TCSAFLUSH, &new) == -1) > exit(1); Would it make sense to print diagnostics here? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Jun 26 14:32:16 2017 Return-Path: Delivered-To: svn-src-all@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 00BE0D88C5D for ; Mon, 26 Jun 2017 14:32:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 D9B807B8F3 for ; Mon, 26 Jun 2017 14:32:15 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 3ed2f43a-5a7c-11e7-8dc9-a95799a96e8f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 3ed2f43a-5a7c-11e7-8dc9-a95799a96e8f; Mon, 26 Jun 2017 14:32:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v5QEW7X3017552; Mon, 26 Jun 2017 08:32:07 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1498487527.85102.5.camel@freebsd.org> Subject: Re: svn commit: r320360 - head/usr.bin/resizewin From: Ian Lepore To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 26 Jun 2017 08:32:07 -0600 In-Reply-To: <201706261314.v5QDEfHj014897@repo.freebsd.org> References: <201706261314.v5QDEfHj014897@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 14:32:16 -0000 On Mon, 2017-06-26 at 13:14 +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Jun 26 13:14:41 2017 > New Revision: 320360 > URL: https://svnweb.freebsd.org/changeset/base/320360 > > Log: >   Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW >   followed by tcflush(3).  This works just as well and is more > elegant. >    >   Suggested by: bde >   MFC after: 2 weeks >   Sponsored by: DARPA, AFRL > > Modified: >   head/usr.bin/resizewin/resizewin.c > > Modified: head/usr.bin/resizewin/resizewin.c > ===================================================================== > ========= > --- head/usr.bin/resizewin/resizewin.c Mon Jun 26 13:11:21 > 2017 (r320359) > +++ head/usr.bin/resizewin/resizewin.c Mon Jun 26 13:14:41 > 2017 (r320360) > @@ -91,20 +91,15 @@ main(int argc, char **argv) >   exit(0); >   } >   > - /* Disable echo */ > + /* Disable echo, drain the input, and flush the output */ This comment is backwards.  Draining happens to output, and flushing happens to input. -- Ian From owner-svn-src-all@freebsd.org Mon Jun 26 15:23:13 2017 Return-Path: Delivered-To: svn-src-all@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 BF6C1D89C2C; Mon, 26 Jun 2017 15:23:13 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8D1E37D068; Mon, 26 Jun 2017 15:23:13 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QFNCI4068094; Mon, 26 Jun 2017 15:23:12 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QFNCBZ068093; Mon, 26 Jun 2017 15:23:12 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201706261523.v5QFNCBZ068093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 26 Jun 2017 15:23:12 +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: r320361 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 15:23:13 -0000 Author: ken Date: Mon Jun 26 15:23:12 2017 New Revision: 320361 URL: https://svnweb.freebsd.org/changeset/base/320361 Log: MFC r320123: Fix a potential sleep while holding a mutex in the sa(4) driver. If the user issues a MTIOCEXTGET ioctl, and the tape drive in question has a serial number that is longer than 80 characters, we malloc a buffer in saextget() to hold the output of cam_strvis(). Since a mutex is held in that codepath, doing a M_WAITOK malloc could lead to sleeping while holding a mutex. Change it to a M_NOWAIT malloc and bail out if we fail to allocate the memory. Devices with serial numbers longer than 80 bytes are very rare (I don't recall seeing one), so this should be a very unusual case to hit. But it is a bug that should be fixed. sys/cam/scsi/scsi_sa.c: In saextget(), if we need to malloc a buffer to hold the output of cam_strvis(), don't wait for the memory. Fail and return an error if we can't allocate the memory immediately. PR: kern/220094 Submitted by: Jia-Ju Bai Sponsored by: Spectra Logic Modified: stable/10/sys/cam/scsi/scsi_sa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sa.c Mon Jun 26 13:14:41 2017 (r320360) +++ stable/10/sys/cam/scsi/scsi_sa.c Mon Jun 26 15:23:12 2017 (r320361) @@ -4464,7 +4464,18 @@ saextget(struct cdev *dev, struct cam_periph *periph, if (cgd.serial_num_len > sizeof(tmpstr)) { ts2_len = cgd.serial_num_len + 1; ts2_malloc = 1; - tmpstr2 = malloc(ts2_len, M_SCSISA, M_WAITOK | M_ZERO); + tmpstr2 = malloc(ts2_len, M_SCSISA, M_NOWAIT | M_ZERO); + /* + * The 80 characters allocated on the stack above + * will handle the vast majority of serial numbers. + * If we run into one that is larger than that, and + * we can't malloc the length without blocking, + * bail out with an out of memory error. + */ + if (tmpstr2 == NULL) { + error = ENOMEM; + goto extget_bailout; + } } else { ts2_len = sizeof(tmpstr); ts2_malloc = 0; From owner-svn-src-all@freebsd.org Mon Jun 26 15:40:25 2017 Return-Path: Delivered-To: svn-src-all@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 E530ED8A2E3; Mon, 26 Jun 2017 15:40:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B3B4A7DABE; Mon, 26 Jun 2017 15:40:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QFeOvA072842; Mon, 26 Jun 2017 15:40:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QFeOTj072841; Mon, 26 Jun 2017 15:40:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706261540.v5QFeOTj072841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jun 2017 15:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320362 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 15:40:26 -0000 Author: trasz Date: Mon Jun 26 15:40:24 2017 New Revision: 320362 URL: https://svnweb.freebsd.org/changeset/base/320362 Log: Provide visual feedback when timezone files are installed. After r320003 it wasn't being shown in any way. Submitted by: bdrewery MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D11154 Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 (r320361) +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 (r320362) @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} +.if make(*install*) +TZS!= cd ${TZBUILDDIR} && find -s * -type f +.endif + beforeinstall: install-zoneinfo install-zoneinfo: mkdir -p ${DESTDIR}/usr/share/zoneinfo cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} - cd ${TZBUILDDIR} && \ - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ +.for f in ${TZS} + ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} +.endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ From owner-svn-src-all@freebsd.org Mon Jun 26 16:08:29 2017 Return-Path: Delivered-To: svn-src-all@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 F1ACFD8AE79; Mon, 26 Jun 2017 16:08:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C03DB7E990; Mon, 26 Jun 2017 16:08:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QG8SoE084788; Mon, 26 Jun 2017 16:08:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QG8Ssw084787; Mon, 26 Jun 2017 16:08:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706261608.v5QG8Ssw084787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 26 Jun 2017 16:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320363 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 16:08:30 -0000 Author: trasz Date: Mon Jun 26 16:08:28 2017 New Revision: 320363 URL: https://svnweb.freebsd.org/changeset/base/320363 Log: Improve terminology in a comment. Suggested by: ian MFC after: 2 weeks Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon Jun 26 15:40:24 2017 (r320362) +++ head/usr.bin/resizewin/resizewin.c Mon Jun 26 16:08:28 2017 (r320363) @@ -91,7 +91,7 @@ main(int argc, char **argv) exit(0); } - /* Disable echo, drain the input, and flush the output */ + /* Disable echo, flush the input, and drain the output */ if (tcgetattr(fd, &old) == -1) exit(1); From owner-svn-src-all@freebsd.org Mon Jun 26 16:28:47 2017 Return-Path: Delivered-To: svn-src-all@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 BBB33D8B711; Mon, 26 Jun 2017 16:28:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 948957F49E; Mon, 26 Jun 2017 16:28:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QGSkW8092974; Mon, 26 Jun 2017 16:28:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QGSkts092970; Mon, 26 Jun 2017 16:28:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706261628.v5QGSkts092970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 26 Jun 2017 16:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320364 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 16:28:47 -0000 Author: markj Date: Mon Jun 26 16:28:46 2017 New Revision: 320364 URL: https://svnweb.freebsd.org/changeset/base/320364 Log: Implement parts of the hrtimer API in the LinuxKPI. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11359 Added: head/sys/compat/linuxkpi/common/include/linux/hrtimer.h (contents, props changed) head/sys/compat/linuxkpi/common/src/linux_hrtimer.c (contents, props changed) Modified: head/sys/conf/files head/sys/modules/linuxkpi/Makefile Added: head/sys/compat/linuxkpi/common/include/linux/hrtimer.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/hrtimer.h Mon Jun 26 16:28:46 2017 (r320364) @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2017 Mark Johnston + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_HRTIMER_H_ +#define _LINUX_HRTIMER_H_ + +#include +#include + +#include +#include + +enum hrtimer_mode { + HRTIMER_MODE_REL, +}; + +enum hrtimer_restart { + HRTIMER_RESTART, + HRTIMER_NORESTART, +}; + +struct hrtimer { + enum hrtimer_restart (*function)(struct hrtimer *); + struct mtx mtx; + struct callout callout; + uint32_t flags; +}; + +#define hrtimer_active(hrtimer) linux_hrtimer_active(hrtimer) +#define hrtimer_cancel(hrtimer) linux_hrtimer_cancel(hrtimer) +#define hrtimer_init(hrtimer, clock, mode) do { \ + CTASSERT((clock) == CLOCK_MONOTONIC); \ + CTASSERT((mode) == HRTIMER_MODE_REL); \ + linux_hrtimer_init(hrtimer); \ +} while (0) +#define hrtimer_set_expires(hrtimer, time) \ + linux_hrtimer_set_expires(hrtimer, time) +#define hrtimer_start(hrtimer, time, mode) do { \ + CTASSERT((mode) == HRTIMER_MODE_REL); \ + linux_hrtimer_start(hrtimer, time); \ +} while (0) +#define hrtimer_start_range_ns(hrtimer, time, prec, mode) do { \ + CTASSERT((mode) == HRTIMER_MODE_REL); \ + linux_hrtimer_start_range_ns(hrtimer, time, prec); \ +} while (0) + +bool linux_hrtimer_active(struct hrtimer *); +int linux_hrtimer_cancel(struct hrtimer *); +void linux_hrtimer_init(struct hrtimer *); +void linux_hrtimer_set_expires(struct hrtimer *, ktime_t); +void linux_hrtimer_start(struct hrtimer *, ktime_t); +void linux_hrtimer_start_range_ns(struct hrtimer *, ktime_t, int64_t); + +#endif /* _LINUX_HRTIMER_H_ */ Added: head/sys/compat/linuxkpi/common/src/linux_hrtimer.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_hrtimer.c Mon Jun 26 16:28:46 2017 (r320364) @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 2017 Mark Johnston + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +#include + +/* hrtimer flags */ +#define HRTIMER_ACTIVE 0x01 + +static void +hrtimer_call_handler(void *arg) +{ + struct hrtimer *hrtimer; + enum hrtimer_restart ret; + + hrtimer = arg; + ret = hrtimer->function(hrtimer); + MPASS(ret == HRTIMER_NORESTART); + hrtimer->flags &= ~HRTIMER_ACTIVE; +} + +bool +linux_hrtimer_active(struct hrtimer *hrtimer) +{ + bool ret; + + mtx_lock(&hrtimer->mtx); + ret = (hrtimer->flags & HRTIMER_ACTIVE) != 0; + mtx_unlock(&hrtimer->mtx); + return (ret); +} + +int +linux_hrtimer_cancel(struct hrtimer *hrtimer) +{ + + if (!hrtimer_active(hrtimer)) + return (0); + (void)callout_drain(&hrtimer->callout); + return (1); +} + +void +linux_hrtimer_init(struct hrtimer *hrtimer) +{ + + hrtimer->function = NULL; + hrtimer->flags = 0; + mtx_init(&hrtimer->mtx, "hrtimer", NULL, MTX_DEF | MTX_RECURSE); + callout_init_mtx(&hrtimer->callout, &hrtimer->mtx, 0); +} + +void +linux_hrtimer_set_expires(struct hrtimer *hrtimer __unused, + ktime_t time __unused) +{ +} + +void +linux_hrtimer_start(struct hrtimer *hrtimer, ktime_t time) +{ + + linux_hrtimer_start_range_ns(hrtimer, time, 0); +} + +void +linux_hrtimer_start_range_ns(struct hrtimer *hrtimer, ktime_t time, int64_t nsec) +{ + + mtx_lock(&hrtimer->mtx); + callout_reset_sbt(&hrtimer->callout, time.tv64 * SBT_1NS, + nsec * SBT_1NS, hrtimer_call_handler, hrtimer, 0); + hrtimer->flags |= HRTIMER_ACTIVE; + mtx_unlock(&hrtimer->mtx); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jun 26 16:08:28 2017 (r320363) +++ head/sys/conf/files Mon Jun 26 16:28:46 2017 (r320364) @@ -4269,6 +4269,8 @@ compat/linuxkpi/common/src/linux_compat.c optional com compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_current.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_hrtimer.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Mon Jun 26 16:08:28 2017 (r320363) +++ head/sys/modules/linuxkpi/Makefile Mon Jun 26 16:28:46 2017 (r320364) @@ -5,6 +5,7 @@ KMOD= linuxkpi SRCS= linux_kmod.c \ linux_compat.c \ linux_current.c \ + linux_hrtimer.c \ linux_kthread.c \ linux_lock.c \ linux_page.c \ From owner-svn-src-all@freebsd.org Mon Jun 26 17:29:33 2017 Return-Path: Delivered-To: svn-src-all@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 B92C8D8CAC2; Mon, 26 Jun 2017 17:29:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 78F35811D8; Mon, 26 Jun 2017 17:29:33 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QHTWmS017699; Mon, 26 Jun 2017 17:29:32 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QHTWME017698; Mon, 26 Jun 2017 17:29:32 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201706261729.v5QHTWME017698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 26 Jun 2017 17:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320365 - stable/11/sbin/newfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 17:29:33 -0000 Author: mckusick Date: Mon Jun 26 17:29:32 2017 New Revision: 320365 URL: https://svnweb.freebsd.org/changeset/base/320365 Log: MFC of 320176: Allow '_' in labels when specifying -L to newfs. PR: 220163 Reported by: Keve Nagy Reviewed by: kib Approved by: re@ (Xin Li) Modified: stable/11/sbin/newfs/newfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/newfs/newfs.c ============================================================================== --- stable/11/sbin/newfs/newfs.c Mon Jun 26 16:28:46 2017 (r320364) +++ stable/11/sbin/newfs/newfs.c Mon Jun 26 17:29:32 2017 (r320365) @@ -150,7 +150,8 @@ main(int argc, char *argv[]) case 'L': volumelabel = optarg; i = -1; - while (isalnum(volumelabel[++i])); + while (isalnum(volumelabel[++i]) || + volumelabel[i] == '_'); if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters are alphanumerics."); } From owner-svn-src-all@freebsd.org Mon Jun 26 17:33:34 2017 Return-Path: Delivered-To: svn-src-all@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 4B1DBD8CD1E; Mon, 26 Jun 2017 17:33:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 19E4581648; Mon, 26 Jun 2017 17:33:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QHXXUF021628; Mon, 26 Jun 2017 17:33:33 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QHXXTk021627; Mon, 26 Jun 2017 17:33:33 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201706261733.v5QHXXTk021627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 26 Jun 2017 17:33: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: r320366 - stable/10/sbin/newfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 17:33:34 -0000 Author: mckusick Date: Mon Jun 26 17:33:33 2017 New Revision: 320366 URL: https://svnweb.freebsd.org/changeset/base/320366 Log: MFC of 320176: Allow '_' in labels when specifying -L to newfs. PR: 220163 Reported by: Keve Nagy Reviewed by: kib Modified: stable/10/sbin/newfs/newfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/newfs/newfs.c ============================================================================== --- stable/10/sbin/newfs/newfs.c Mon Jun 26 17:29:32 2017 (r320365) +++ stable/10/sbin/newfs/newfs.c Mon Jun 26 17:33:33 2017 (r320366) @@ -153,7 +153,8 @@ main(int argc, char *argv[]) case 'L': volumelabel = optarg; i = -1; - while (isalnum(volumelabel[++i])); + while (isalnum(volumelabel[++i]) || + volumelabel[i] == '_'); if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters are alphanumerics."); } From owner-svn-src-all@freebsd.org Mon Jun 26 18:11:50 2017 Return-Path: Delivered-To: svn-src-all@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 21812D8D873; Mon, 26 Jun 2017 18:11:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 52AA8827EA; Mon, 26 Jun 2017 18:11:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QIBm7g036464; Mon, 26 Jun 2017 18:11:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QIBmtr036462; Mon, 26 Jun 2017 18:11:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706261811.v5QIBmtr036462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 26 Jun 2017 18:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320367 - head/share/vt/fonts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 18:11:50 -0000 Author: emaste Date: Mon Jun 26 18:11:48 2017 New Revision: 320367 URL: https://svnweb.freebsd.org/changeset/base/320367 Log: Add "Terminus BSD Console" size 32 Dimitar Toshkov, Terminus' creator, has made size 32 available under the 2-clause BSD license for use by *BSD consoles. Added: head/share/vt/fonts/terminus-b32.hex (contents, props changed) Modified: head/share/vt/fonts/Makefile Modified: head/share/vt/fonts/Makefile ============================================================================== --- head/share/vt/fonts/Makefile Mon Jun 26 17:33:33 2017 (r320366) +++ head/share/vt/fonts/Makefile Mon Jun 26 18:11:48 2017 (r320367) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= gallant.fnt \ + terminus-b32.fnt \ vgarom-8x8.fnt \ vgarom-8x14.fnt \ vgarom-8x16.fnt \ Added: head/share/vt/fonts/terminus-b32.hex ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/fonts/terminus-b32.hex Mon Jun 26 18:11:48 2017 (r320367) @@ -0,0 +1,1294 @@ +# $FreeBSD$ +# Height: 32 +# Width: 16 +0000:0000000000000000000000003C3C3C3C300C300C300C000000000000300C300C300C300C000000000000300C300C300C3C3C3C3C000000000000000000000000 +0020:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0021:00000000000000000000000001800180018001800180018001800180018001800180018001800000000000000180018001800180000000000000000000000000 +0022:00000000000000000C300C300C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0023:0000000000000000000000000C300C300C300C300C303FFC3FFC0C300C300C300C300C300C303FFC3FFC0C300C300C300C300C30000000000000000000000000 +0024:00000000000000000180018001800FF01FF8399C318C31803180318039801FF00FF8019C018C018C018C318C399C1FF80FF00180018001800000000000000000 +0025:0000000000000000000000001E183F18333033303F601E6000C000C00180018003000300060006000CF00DF81998199831F830F0000000000000000000000000 +0026:0000000000000000000000000F801FC038E030603060306038E01DC00F800F001F8C39DC70F8607060306030607070F83FDC1F8C000000000000000000000000 +0027:00000000000000000180018001800180018001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0028:000000000000000000000000006000E001C00380030007000600060006000600060006000600060007000300038001C000E00060000000000000000000000000 +0029:00000000000000000000000006000700038001C000C000E00060006000600060006000600060006000E000C001C0038007000600000000000000000000000000 +002A:000000000000000000000000000000000000000038381C700EE007C003807FFC7FFC038007C00EE01C7038380000000000000000000000000000000000000000 +002B:0000000000000000000000000000000000000000018001800180018001803FFC3FFC018001800180018001800000000000000000000000000000000000000000 +002C:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800380030006000000000000000000 +002D:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +002E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800180000000000000000000000000 +002F:00000000000000000000000000180018003000300060006000C000C00180018003000300060006000C000C001800180030003000000000000000000000000000 +0030:0000000000000000000000000FF01FF8381C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C381C1FF80FF0000000000000000000000000 +0031:0000000000000000000000000180038007800F800D8001800180018001800180018001800180018001800180018001800FF00FF0000000000000000000000000 +0032:0000000000000000000000000FF01FF8381C300C300C300C300C000C001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +0033:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0034:000000000000000000000000000C001C003C007C00EC01CC038C070C0E0C1C0C380C300C300C3FFC3FFC000C000C000C000C000C000000000000000000000000 +0035:0000000000000000000000003FFC3FFC3000300030003000300030003FF03FF8001C000C000C000C000C000C300C380C1FF80FF0000000000000000000000000 +0036:0000000000000000000000000FF81FF83800300030003000300030003FF03FF8301C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0037:0000000000000000000000003FFC3FFC300C300C300C30180018003000300060006000C000C00180018001800180018001800180000000000000000000000000 +0038:0000000000000000000000000FF01FF8381C300C300C300C300C300C381C1FF81FF8381C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0039:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +003A:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000180018001800180000000000000000000000000 +003B:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000180018001800380030006000000000000000000 +003C:000000000000000000000000001C0038007000E001C0038007000E001C00380038001C000E000700038001C000E000700038001C000000000000000000000000 +003D:0000000000000000000000000000000000000000000000003FFC3FFC00000000000000003FFC3FFC000000000000000000000000000000000000000000000000 +003E:00000000000000000000000038001C000E000700038001C000E000700038001C001C0038007000E001C0038007000E001C003800000000000000000000000000 +003F:0000000000000000000000000FF01FF8381C300C300C300C300C001C0038007000E001C001800180000000000180018001800180000000000000000000000000 +0040:0000000000000000000000001FF03FF8701C600C61FC63FC670C660C660C660C660C660C660C671C63FC61EC600070003FFC1FFC000000000000000000000000 +0041:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0042:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0043:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0044:0000000000000000000000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +0045:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0046:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE0300030003000300030003000300030003000000000000000000000000000 +0047:0000000000000000000000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0048:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0049:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +004A:000000000000000000000000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +004B:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +004C:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +004D:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +004E:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +004F:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0050:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +0051:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C31CC38FC1FF80FF8001C000E0000000000000000 +0052:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0053:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0054:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0055:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0056:000000000000000000000000300C300C300C300C300C181818181818181818180C300C300C300C3006600660066003C003C003C0000000000000000000000000 +0057:000000000000000000000000600C600C600C600C600C600C600C600C600C600C610C638C638C67CC6C6C6C6C783C701C600C600C000000000000000000000000 +0058:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +0059:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +005A:0000000000000000000000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +005B:0000000000000000000000000FE00FE00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000FE00FE0000000000000000000000000 +005C:00000000000000000000000030003000180018000C000C0006000600030003000180018000C000C0006000600030003000180018000000000000000000000000 +005D:0000000000000000000000000FE00FE000600060006000600060006000600060006000600060006000600060006000600FE00FE0000000000000000000000000 +005E:0000000000000000018003C007E00E701C38381C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +005F:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000 +0060:00000E000700038001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0061:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0062:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0063:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0064:000000000000000000000000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0065:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0066:000000000000000000000000007E00FE01C00180018001801FF81FF8018001800180018001800180018001800180018001800180000000000000000000000000 +0067:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0068:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0069:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +006A:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +006B:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +006C:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +006D:0000000000000000000000000000000000000000000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000000000000000000000000 +006E:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +006F:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0070:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +0071:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C0000 +0072:00000000000000000000000000000000000000000000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +0073:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0074:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000000000000000000000 +0075:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0076:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300C300660066003C003C003C0000000000000000000000000 +0077:000000000000000000000000000000000000000000000000300C300C300C300C318C318C318C318C318C318C318C399C1FF80FF0000000000000000000000000 +0078:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300C300C000000000000000000000000 +0079:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +007A:0000000000000000000000000000000000000000000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +007B:00000000000000000000000000F001F003800300030003000300030003001E001E00030003000300030003000300038001F000F0000000000000000000000000 +007C:00000000000000000000000001800180018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +007D:0000000000000000000000001E001F00038001800180018001800180018000F000F001800180018001800180018003801F001E00000000000000000000000000 +007E:00000000000000000E0C1F0C3B8C31DC30F830700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A0:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A1:00000000000000000000000001800180018001800000000001800180018001800180018001800180018001800180018001800180000000000000000000000000 +00A2:0000000000000000000000000000000000000180018001800FF01FF8399C318C318031803180318031803180318C399C1FF80FF0018001800180000000000000 +00A3:00000000000000000000000003E007F00E380C180C000C000C000C000C003FE03FE00C000C000C000C000C000C0C0C0C3FFC3FFC000000000000000000000000 +00A4:000000000000000000000000000000000000381C1C380FF00FF01C3818181818181818181C380FF00FF01C38381C000000000000000000000000000000000000 +00A5:000000000000000000000000300C300C181818180C300C300660066003C003C0018001801FF81FF8018001801FF81FF801800180000000000000000000000000 +00A6:00000000000000000000000001800180018001800180018001800180000000000000000001800180018001800180018001800180000000000000000000000000 +00A7:000000000000000007C00FE01C70183018001C000F800FC018E018701830183018301C300E3007E003E00070003018301C700FE007C000000000000000000000 +00A8:00000C300C300C300C30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A9:000000000000000000000000000000001FF83FFC700E67E66FF66C366C066C066C066C066C366FF667E6700E3FFC1FF800000000000000000000000000000000 +00AA:000000000FE00FF00038001807F80FF81C1818181C180FF807F8000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00AB:00000000000000000000000000000000000000000000000001CE039C07380E701CE039C07380738039C01CE00E700738039C01CE000000000000000000000000 +00AC:0000000000000000000000000000000000000000000000003FFC3FFC000C000C000C000C000C000C000000000000000000000000000000000000000000000000 +00AD:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00AE:000000000000000000000000000000001FF83FFC700E6FE66FF66C366C366C366FE66FC66DC66CE66C76700E3FFC1FF800000000000000000000000000000000 +00AF:000000000FF00FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B0:000000000000000007E00FF00C300C300C300C300FF007E000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B1:0000000000000000000000000000000000000000018001800180018001803FFC3FFC01800180018001800180000000003FFC3FFC000000000000000000000000 +00B2:00000000000007E00FF00C300C30007000E001C0038007000FF00FF0000000000000000000000000000000000000000000000000000000000000000000000000 +00B3:00000000000007E00FF00C30003001E001E0003000300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +00B4:0000007000E001C00380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C301C303C307C3FEC3FCC300030003000300030000000 +00B6:0000000000000000000000001FFC3FFC718C618C618C618C618C618C718C3F8C1F8C018C018C018C018C018C018C018C018C018C000000000000000000000000 +00B7:00000000000000000000000000000000000000000000000000000000018001800180018000000000000000000000000000000000000000000000000000000000 +00B8:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018001800380030006000000 +00B9:00000000000001800380078007800180018001800180018007E007E0000000000000000000000000000000000000000000000000000000000000000000000000 +00BA:0000000007E00FF01C38181818181818181818181C380FF007E0000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00BB:000000000000000000000000000000000000000000000000738039C01CE00E700738039C01CE01CE039C07380E701CE039C07380000000000000000000000000 +00BC:0000000000000000000000000C001C003C000C000C060C0E0C1C0C380C7000E001C6038E071E0E361C6638C671FE61FE00060006000000000000000000000000 +00BD:000000000000000000000000180038007806180E181C1838187018E019C0038007000E7C1CFE38C670C6600C00180030007E00FE000000000000000000000000 +00BE:0000000000000000000000003F007F8061800F000F000186618E7F9C3F38007000E601CE039E07360E661CC639FE71FE60060006000000000000000000000000 +00BF:000000000000000000000000018001800180018000000000018001800180030006000C001800300C300C300C300C381C1FF80FF0000000000000000000000000 +00C0:00000E000700038001C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C1:0000007000E001C0038000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C2:0000018003C007E00E7000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C3:00000F181B9819D818F000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C4:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C5:000003C006600660066003C00FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C6:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C07FFE7FFE60C060C060C060C060C060C060C060FF60FF000000000000000000000000 +00C7:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0018001800380030006000000 +00C8:00000E000700038001C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00C9:0000007000E001C0038000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CA:0000018003C007E00E7000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CB:00000C300C300C300C3000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CC:00000E000700038001C0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CD:0000007000E001C00380000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CE:0000018003C007E00E70000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CF:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00D0:0000000000000000000000003FC03FF030383018300C300C300C300C300C7F8C7F8C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +00D1:00000F181B9819D818F00000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +00D2:00000E000700038001C000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D3:0000007000E001C0038000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D4:0000018003C007E00E7000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D5:00000F181B9819D818F000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D6:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D7:00000000000000000000000000000000000000000000701C38381C700EE007C0038007C00EE01C703838701C0000000000000000000000000000000000000000 +00D8:0000000000000000000000000FF01FF8381C300E300E301C303C307C30EC31CC338C370C3E0C3C0C380C700C700C381C1FF80FF0000000000000000000000000 +00D9:00000E000700038001C00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DA:0000007000E001C003800000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DB:0000018003C007E00E700000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DC:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DD:0000007000E001C003800000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +00DE:00000000000000000000000030003000300030003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03000300030003000000000000000000000000000 +00DF:0000000000000000000000001FE03FF03038301830183018301830303FF03FF03038301C300C300C300C300C380C3C1C37F833F0000000000000000000000000 +00E0:0000000000000000000000000E000700038001C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E1:000000000000000000000000007000E001C00380000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E2:000000000000000000000000018003C007E00E70000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E3:0000000000000000000000000F181B9819D818F0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E4:0000000000000000000000000C300C300C300C30000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E5:00000000000000000000000003C006600660066003C000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E6:0000000000000000000000000000000000000000000000003EF83FFC018E018601861F863FFE71FE61806180618071C63FFE1F7C000000000000000000000000 +00E7:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0018001800380030006000000 +00E8:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00E9:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EA:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EB:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EC:0000000000000000000000001C000E00070003800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00ED:000000000000000000000000007000E001C003800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00EE:000000000000000000000000018003C007E00E700000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00EF:0000000000000000000000000C300C300C300C300000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00F0:0000000000000000000000001DC00F801F003B8001C000E00FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F1:0000000000000000000000000F181B9819D818F0000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +00F2:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F3:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F4:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F5:0000000000000000000000000F181B9819D818F0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F6:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F7:0000000000000000000000000000000000000180018001800180000000003FFC3FFC000000000180018001800180000000000000000000000000000000000000 +00F8:0000000000000000000000000000000000000000000000000FF61FFE381C303C307C30EC31CC338C370C3E0C3C0C381C7FF8EFF0000000000000000000000000 +00F9:0000000000000000000000000E000700038001C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FA:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FB:000000000000000000000000018003C007E00E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FC:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FD:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +00FE:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +00FF:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0100:000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0101:000000000000000000000000000000000FF00FF0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0102:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0103:0000000000000000000000000C300C3007E003C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0104:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C003C00700060007C003C0000 +0105:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC003C00700060007C003C0000 +0106:0000007000E001C0038000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0107:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0108:0000018003C007E00E7000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0109:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010A:0000018001800180018000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +010B:0000000000000000000000000180018001800180000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010C:00000E7007E003C0018000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +010D:0000000000000000000000000E7007E003C00180000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010E:00000E7007E003C0018000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +010F:00000E7007E003C001800000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0110:0000000000000000000000003FC03FF030383018300C300C300C300C300C7F8C7F8C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +0111:000000000000000000000000000C000C01FF01FF000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0112:000000000FF00FF0000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0113:000000000000000000000000000000000FF00FF0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0114:00000C300C3007E003C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0115:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0116:0000018001800180018000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0117:0000000000000000000000000180018001800180000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0118:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC003C00700060007C003C0000 +0119:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF801C00380030003E001E00000 +011A:00000E7007E003C0018000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +011B:0000000000000000000000000E7007E003C00180000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +011C:0000018003C007E00E7000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +011D:000000000000000000000000018003C007E00E70000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +011E:00000C300C3007E003C000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +011F:0000000000000000000000000C300C3007E003C0000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0120:0000018001800180018000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0121:00000000000000000000000000C000C000C000C0000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0122:0000000000000000000000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000001800180038003000600 +0123:0000000000000000000000000030006000E000C000C000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0124:0000018003C007E00E700000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0125:0000018003C007E00E7000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0126:000000000000000000000000300C300C300C7FFE7FFE300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0127:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0128:00000F181B9819D818F0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0129:0000000000000000000000000F181B9819D818F00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012A:000000000FF00FF00000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +012B:000000000000000000000000000000000FF00FF00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012C:00000C300C3007E003C0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +012D:0000000000000000000000000C300C3007E003C00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012E:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E001800380030003E001E00000 +012F:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E001800380030003E001E00000 +0130:00000180018001800180000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0131:00000000000000000000000000000000000000000000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0132:000000000000000000000000F01EF01E600C600C600C600C600C600C600C600C600C600C600C600C630C630C630C639CF1F8F0F0000000000000000000000000 +0133:000000000000000000000000300630063006300600000000701E701E3006300630063006300630063006300630063006780678060186018601CE00FC00780000 +0134:00000018003C007E00E70000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +0135:0000000000000000000000000018003C007E00E70000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0136:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000001800180038003000600 +0137:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C000001800180038003000600 +0138:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +0139:000007000E001C00380000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +013A:0000007000E001C00380000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +013B:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000001800180038003000600 +013C:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180038003000600 +013D:00000E7007E003C0018000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +013E:00000E7007E003C00180000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +013F:0000000000000000000000003000300030003000300030003000300030303030303030303000300030003000300030003FFC3FFC000000000000000000000000 +0140:00000000000000000000000007800780018001800180018001800180018301830183018301800180018001800180018007E007E0000000000000000000000000 +0141:0000000000000000000000003000300030003000300030003000330036003C0038007000F000300030003000300030003FFC3FFC000000000000000000000000 +0142:000000000000000000000000078007800180018001800180018001B001E001C0038007800D800180018001800180018007E007E0000000000000000000000000 +0143:0000007000E001C003800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +0144:000000000000000000000000007000E001C00380000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0145:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000001800180038003000600 +0146:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000001800180038003000600 +0147:00000E7007E003C001800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +0148:0000000000000000000000000E7007E003C00180000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0149:0000000000000000300030003000300060006000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +014A:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000C000C001C00F800F00000 +014B:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C001C00F800F00000 +014C:000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014D:000000000000000000000000000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014E:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014F:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0150:000001CE039C07380E7000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0151:00000000000000000000000001CE039C07380E70000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0152:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C060FE60FE60C060C060C060C060C060C070C03FFF1FFF000000000000000000000000 +0153:0000000000000000000000000000000000000000000000001FF83FFC718E61866186618661FE61FE61806180618071863FFE1FFC000000000000000000000000 +0154:0000007000E001C0038000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0155:000000000000000000000000007000E001C003800000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +0156:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000001800180038003000600 +0157:00000000000000000000000000000000000000000000000031FC33FC36003C00380030003000300030003000300030003000300000003000300070006000C000 +0158:00000E7007E003C0018000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0159:0000000000000000000000000E7007E003C001800000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +015A:0000007000E001C0038000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +015B:000000000000000000000000007000E001C00380000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +015C:0000018003C007E00E7000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +015D:000000000000000000000000018003C007E00E70000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +015E:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0018001800380030006000000 +015F:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0018001800380030006000000 +0160:00000E7007E003C0018000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0161:0000000000000000000000000E7007E003C00180000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0162:0000000000000000000000003FFC3FFC01800180018001800180018001800180018001800180018001800180018001800180018000C000C001C0018003000000 +0163:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC003000300070006000C00000 +0164:00000E7007E003C0018000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0165:00001CE00FC00780030000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000000000000000000000 +0166:0000000000000000000000003FFC3FFC01800180018001800180018001800FF00FF0018001800180018001800180018001800180000000000000000000000000 +0167:0000000000000000000000000300030003000300030003003FF03FF0030003000FC00FC003000300030003000300038001FC00FC000000000000000000000000 +0168:00000F181B9819D818F00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0169:0000000000000000000000000F181B9819D818F000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016A:000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016B:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016C:00000C300C3007E003C00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016D:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016E:000003C006600660066003C0300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016F:00000000000000000000000003C006600660066003C00000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0170:000001CE039C07380E700000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0171:00000000000000000000000001CE039C07380E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0172:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF001C00380030003E001E00000 +0173:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC003C00700060007C003C0000 +0174:0000018003C007E00E700000600C600C600C600C600C600C600C600C600C600C610C638C638C67CC6C6C6C6C783C701C600C600C000000000000000000000000 +0175:000000000000000000000000018003C007E00E7000000000300C300C300C300C318C318C318C318C318C318C318C399C1FF80FF0000000000000000000000000 +0178:00000C300C300C300C300000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +0179:0000007000E001C0038000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017A:000000000000000000000000007000E001C00380000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017B:0000018001800180018000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017C:0000000000000000000000000180018001800180000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017D:00000E7007E003C0018000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017E:0000000000000000000000000E7007E003C00180000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017F:00000000000000000000000000FC01FC038003000300030003000300030003000300030003000300030003000300030003000300000000000000000000000000 +0186:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C000C000C000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +018E:0000000000000000000000003FFC3FFC000C000C000C000C000C000C000C07FC07FC000C000C000C000C000C000C000C3FFC3FFC000000000000000000000000 +018F:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0190:0000000000000000000000000FF01FF8381C300C300C30003000300038001FE01FE03800300030003000300C300C381C1FF80FF0000000000000000000000000 +0192:00000000000000000000000000F801FC018C018C01800180018001800FF00FF00180018001800180018001800180018001800180318031803F801F0000000000 +019D:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C3000300030007000E0000000 +019E:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +01B7:0000000000000000000000003FFC3FFC001C0038007000E001C0038007F007F8001C000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0218:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000001800180038003000600 +0219:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000001800180038003000600 +021A:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000001800180038003000600 +021B:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC0000003000300070006000C0 +0232:000000000FF00FF000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +0233:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0237:00000000000000000000000000000000000000000000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0254:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C000C000C000C000C000C300C381C1FF80FF0000000000000000000000000 +0258:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC000C000C000C301C3FF81FF0000000000000000000000000 +0259:0000000000000000000000000000000000000000000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +025B:0000000000000000000000000000000000000000000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +0272:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C3000300030007000E0000000 +0292:0000000000000000000000000000000000000000000000003FFC3FFC001C0038007000E001C0038007F007F8001C000C000C000C000C300C381C1FF80FF00000 +02BB:0000006000C001C00180018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02BC:00000180018003800300060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02BD:00000180018001C000C0006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02C6:0000018003C007E00E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02C7:00000E7007E003C00180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02D8:00000C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02D9:00000180018001800180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02DB:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003C00700060007C003C0000 +02DC:00000F181B9819D818F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02DD:000001CE039C07380E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0300:00000E000700038001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0301:0000007000E001C00380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0302:0000018003C007E00E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0303:00000F181B9819D818F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0304:000000000FF00FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0305:000000003FFC3FFC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0306:00000C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0307:00000180018001800180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0308:00000C300C300C300C30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030A:000003C006600660066003C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030B:000001CE039C07380E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030C:00000E7007E003C00180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0329:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800180018001800000 +0384:000000001C0038007000E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0385:0000007000E001C0038000000C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0386:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0387:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000000000000000000000000000000000000000000 +0388:000000001C0038007000E0003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0389:000000001C0038007000E000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +038A:000000001C0038007000E00007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +038C:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +038E:000000001C0038007000E0001806180618060C0C0C0C061806180330033001E001E000C000C000C000C000C000C000C000C000C0000000000000000000000000 +038F:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +0390:000000E001C00380070000001860186018601860000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +0391:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0392:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0393:0000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0394:00000000000000000000000001800180018003C003C003C00660066006600C300C300C30181818181818300C300C300C3FFC3FFC000000000000000000000000 +0395:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0396:0000000000000000000000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +0397:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0398:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C37EC37EC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0399:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +039A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +039B:00000000000000000000000001800180018003C003C003C00660066006600C300C300C301818181818181818300C300C300C300C000000000000000000000000 +039C:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +039D:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +039E:0000000000000000000000003FFC3FFC00000000000000000000000000000FF00FF000000000000000000000000000003FFC3FFC000000000000000000000000 +039F:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03A0:0000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +03A1:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +03A3:0000000000000000000000003FFC3FFC38001C000E000700038001C000E00070007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +03A4:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +03A5:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +03A6:000000000000000000000000018001800FF01FF8399C318C318C318C318C318C318C318C318C318C318C399C1FF80FF001800180000000000000000000000000 +03A7:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +03A8:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF00180018001800180000000000000000000000000 +03A9:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +03AA:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +03AB:00000C300C300C300C300000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +03AC:000000000000000000000000007000E001C00380000000001FCC3FFC70386030603060306030603060306030603070383FFC1FCC000000000000000000000000 +03AD:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +03AE:000000000000000000000000007000E001C00380000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +03AF:00000000000000000000000000E001C003800700000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03B0:0000007000E001C0038000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03B1:0000000000000000000000000000000000000000000000001FCC3FFC70386030603060306030603060306030603070383FFC1FCC000000000000000000000000 +03B2:0000000000000000000000001FE03FF03038301830183018301830303FF03FF03038301C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +03B3:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001800180018001800180018001800000 +03B4:0000000000000000000000001FF01FF00E000700038001C007E00FF01818300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03B5:0000000000000000000000000000000000000000000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +03B6:0000000000000000000000003FFC3FFC0038007000E001C0038007000E001C00180038003000300030003000300038001FF00FF8001C000C001C007800700000 +03B7:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +03B8:00000000000000000000000007E00FF01C381818181818181818181818181FF81FF81818181818181818181818181C380FF007E0000000000000000000000000 +03B9:0000000000000000000000000000000000000000000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03BA:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +03BB:00000000000000000000000006000600030003000180018003C003C00660066006600C300C300C30181818181818300C300C300C000000000000000000000000 +03BC:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C301C303C307C3FEC3FCC300030003000300030000000 +03BD:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300C300660066003C003C003C0000000000000000000000000 +03BE:0000000000000000000000000FFC1FFC3800300030003000300018000FF00FF01C0038003000300030003000300038001FF00FF8001C000C001C007800700000 +03BF:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C0:0000000000000000000000000000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +03C1:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +03C2:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300038001FF00FF8001C000C001C007800700000 +03C3:0000000000000000000000000000000000000000000000000FFE1FFE38703038301C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C4:0000000000000000000000000000000000000000000000003FFC3FFC01800180018001800180018001800180018001C000F80078000000000000000000000000 +03C5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C6:0000000000000000000000000000000000000000000000000CF01DF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180018001800000 +03C7:000000000000000000000000000000000000000000000000300C300C181818180C300C300660066003C003C003C0066006600C300C3018181818300C300C0000 +03C8:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180018001800000 +03C9:0000000000000000000000000000000000000000000000000C301C38381C300C318C318C318C318C318C318C318C3BDC1FF80E70000000000000000000000000 +03CA:0000000000000000000000001860186018601860000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03CB:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CC:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CD:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CE:000000000000000000000000007000E001C00380000000000C301C38381C300C318C318C318C318C318C318C318C3BDC1FF80E70000000000000000000000000 +03D1:00000000000000000000000007E00FF01C3818181818181818180FFE07FE001800180018781878181818181818181C380FF007E0000000000000000000000000 +03D5:0000000000000000000000000000000000000180018001800FF01FF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180000000000000 +03F0:000000000000000000000000000000000000000000000000780C7C1C0E38067003E003C00380038007800F801CC038E0707C603C000000000000000000000000 +03F1:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C301C3FF83FF03000300038001FF80FF80000 +03F2:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +03F3:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +03F4:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03F5:00000000000000000000000000000000000000000000000003FC0FFC1C001800300030003FF03FF03000300018001C000FFC03FC000000000000000000000000 +03F6:0000000000000000000000000000000000000000000000003FC03FF000380018000C000C0FFC0FFC000C000C001800383FF03FC0000000000000000000000000 +0400:00000E000700038001C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0401:00000C300C300C300C3000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0402:000000000000000000000000FF00FF00180018001800180018001FF01FF8181C180C180C180C180C180C180C180C181C18F818F0000000000000000000000000 +0403:0000007000E001C0038000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0404:0000000000000000000000000FF01FF8381C300C300C30003000300030003FE03FE03000300030003000300C300C381C1FF80FF0000000000000000000000000 +0405:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0406:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0407:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0408:000000000000000000000000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +0409:0000000000000000000000001F803F807180618061806180618061F861FC618E6186618661866186618661866186618EE1FCC1F8000000000000000000000000 +040A:000000000000000000000000618061806180618061806180618061F861FC7F8E7F86618661866186618661866186618E61FC61F8000000000000000000000000 +040B:000000000000000000000000FF00FF00180018001800180018001FF01FF8181C180C180C180C180C180C180C180C180C180C180C000000000000000000000000 +040C:0000007000E001C003800000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +040D:00000E000700038001C00000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +040E:00000C300C3007E003C00000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +040F:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C3FFC3FFC018001800180018001800000 +0410:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0411:0000000000000000000000003FF83FF8300030003000300030003FF03FF8301C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0412:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0413:0000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0414:00000000000000000000000007F80FF81C181818181818181818181818181818181818181818181818181818181818183FFC7FFE600660066006600600000000 +0415:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0416:000000000000000000000000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +0417:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0418:000000000000000000000000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +0419:00000C300C3007E003C00000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +041A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +041B:00000000000000000000000003FC07FC0E0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C1C0C380C000000000000000000000000 +041C:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +041D:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +041E:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +041F:0000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0420:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +0421:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0422:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0423:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +0424:0000000000000000018001800FF01FF8399C318C318C318C318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF0018001800000000000000000 +0425:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +0426:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C380E1FFF0FFF000300030003000300030000 +0427:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000C000C000000000000000000000000 +0428:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C398C1FFC0FFC000000000000000000000000 +0429:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C398C1FFE0FFF000300030003000300030000 +042A:000000000000000000000000F000F00030003000300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +042B:000000000000000000000000600C600C600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +042C:0000000000000000000000003000300030003000300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +042D:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C07FC07FC000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +042E:00000000000000000000000060F061F8639C630C630C630C630C630C630C7F0C7F0C630C630C630C630C630C630C639C61F860F0000000000000000000000000 +042F:0000000000000000000000000FFC1FFC380C300C300C300C300C300C300C380C1FFC0FFC00EC01CC038C070C0E0C1C0C380C300C000000000000000000000000 +0430:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0431:0000000000000000000000000FF01FF0380030003000300030003FF03FF8301C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0432:0000000000000000000000001FC03FE03070303030303030303030703FE03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0433:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0434:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0435:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0436:000000000000000000000000000000000000000000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +0437:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0000000000000000000000000 +0438:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0439:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +043A:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +043B:00000000000000000000000000000000000000000000000003FC07FC0E0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C1C0C380C000000000000000000000000 +043C:000000000000000000000000000000000000000000000000600C701C783C7C7C6EEC67CC638C610C600C600C600C600C600C600C000000000000000000000000 +043D:000000000000000000000000000000000000000000000000300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C000000000000000000000000 +043E:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +043F:0000000000000000000000000000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0440:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +0441:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0442:0000000000000000000000000000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180000000000000000000000000 +0443:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0444:0000000000000000000000000000000000000180018001800FF01FF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180000000000000 +0445:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300C300C000000000000000000000000 +0446:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFE0FFF000300030003000300030000 +0447:000000000000000000000000000000000000000000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000000000000000000000000 +0448:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C398C1FFC0FFC000000000000000000000000 +0449:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C398C1FFE0FFF000300030003000300030000 +044A:0000000000000000000000000000000000000000000000003C003C000C000C000FF00FF80C1C0C0C0C0C0C0C0C0C0C1C0FF80FF0000000000000000000000000 +044B:000000000000000000000000000000000000000000000000600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +044C:00000000000000000000000000000000000000000000000018001800180018001FE01FF01838181818181818181818381FF01FE0000000000000000000000000 +044D:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C000C03FC03FC000C000C300C381C1FF80FF0000000000000000000000000 +044E:00000000000000000000000000000000000000000000000060F061F8630C630C630C630C7F0C7F0C630C630C630C630C61F860F0000000000000000000000000 +044F:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C380C1FFC0FFC00EC01CC038C070C0E0C1C0C000000000000000000000000 +0450:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0451:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0452:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C001C00F800F00000 +0453:000000000000000000000000007000E001C00380000000003FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0454:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003FC03FC030003000300C381C1FF80FF0000000000000000000000000 +0455:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0456:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0457:0000000000000000000000000C300C300C300C300000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0458:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0459:0000000000000000000000000000000000000000000000000F801F803980318031F831FC318E3186318631863186318E71FC61F8000000000000000000000000 +045A:000000000000000000000000000000000000000000000000618061806180618061F861FC7F8E7F86618661866186618E61FC61F8000000000000000000000000 +045B:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +045C:000000000000000000000000007000E001C0038000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +045D:0000000000000000000000000E000700038001C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +045E:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +045F:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C3FFC3FFC018001800180018001800000 +0462:00000000000000000000000030003000FF00FF00300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +0463:0000000000000000000000000C000C000C000C003FC03FC00C000C000C000C000FF00FF80C1C0C0C0C0C0C0C0C0C0C1C0FF80FF0000000000000000000000000 +046A:0000000000000000000000003FFC3FFC300C181818180C300C30066003C007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +046B:0000000000000000000000000000000000000000000000003FFC3FFC300C381C1C380E7007E00FF01DB8399C318C318C318C318C000000000000000000000000 +0490:00000000000C000C000C000C3FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0491:00000000000000000000000000000000000C000C000C000C3FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0492:0000000000000000000000003FFC3FFC30003000300030003000300030007F807F80300030003000300030003000300030003000000000000000000000000000 +0493:0000000000000000000000000000000000000000000000003FFC3FFC30003000300030007F807F80300030003000300030003000000000000000000000000000 +0494:0000000000000000000000003FFC3FFC300030003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C000C000C0018003000000000 +0495:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003FC03FE03070303030303030303000300030006000C000000000 +0496:000000000000000000000000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318E318F000300030003000300030000 +0497:000000000000000000000000000000000000000000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318E318F000300030003000300030000 +0498:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0018001800180018001800000 +0499:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0018001800180018001800000 +049A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300E000600060006000600060000 +049B:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000C000C000C000C000C0000 +049C:000000000000000000000000600C600C601C60386C706CE06DC06F806F007E007E006F006F806DC06CE06C706038601C600C600C000000000000000000000000 +049D:000000000000000000000000000000000000000000000000300C301C3638367036E037C03F803F8037C036E036703638301C300C000000000000000000000000 +04A0:000000000000000000000000F00CF01C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +04A1:000000000000000000000000000000000000000000000000781C7838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +04A2:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300E300F000300030003000300030000 +04A3:000000000000000000000000000000000000000000000000300C300C300C300C300C300C3FFC3FFC300C300C300C300C300E300F000300030003000300030000 +04A4:000000000000000000000000607F607F60606060606060606060606060607FE07FE0606060606060606060606060606060606060000000000000000000000000 +04A5:000000000000000000000000000000000000000000000000607F607F60606060606060607FE07FE0606060606060606060606060000000000000000000000000 +04AA:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0018001800180018001800000 +04AB:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0018001800180018001800000 +04AE:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +04AF:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001800180018001800180018001800000 +04B0:000000000000000000000000300C300C300C181818180C300C300660066003C003C001801FF81FF8018001800180018001800180000000000000000000000000 +04B1:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001801FF81FF801800180018001800000 +04B2:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300E300F000300030003000300030000 +04B3:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300E300F000300030003000300030000 +04B6:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000E000F000300030003000300030000 +04B7:000000000000000000000000000000000000000000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000E000F000300030003000300030000 +04B8:000000000000000000000000300C300C300C300C300C300C318C318C318C398C1FFC0FFC018C018C018C018C000C000C000C000C000000000000000000000000 +04B9:000000000000000000000000000000000000000000000000300C300C300C318C318C398C1FFC0FFC018C018C018C000C000C000C000000000000000000000000 +04BA:000000000000000000000000300030003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C000000000000000000000000 +04BB:000000000000000000000000000000000000000000000000300030003000300030003FF03FF8301C300C300C300C300C300C300C000000000000000000000000 +04C0:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +04C1:00000C300C3007E003C00000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +04C2:0000000000000000000000000C300C3007E003C000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +04CF:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +04D0:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +04D1:0000000000000000000000000C300C3007E003C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +04D2:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +04D3:0000000000000000000000000C300C300C300C30000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +04D4:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C07FFE7FFE60C060C060C060C060C060C060C060FF60FF000000000000000000000000 +04D5:0000000000000000000000000000000000000000000000003EF83FFC018E018601861F863FFE71FE61806180618071C63FFE1F7C000000000000000000000000 +04D6:00000C300C3007E003C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +04D7:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +04D8:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04D9:0000000000000000000000000000000000000000000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04DA:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04DB:0000000000000000000000000C300C300C300C30000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04DC:00000C300C300C300C300000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +04DD:0000000000000000000000000C300C300C300C3000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +04DE:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +04DF:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0000000000000000000000000 +04E2:000000000FF00FF000000000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +04E3:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +04E4:00000C300C300C300C300000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +04E5:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +04E6:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E7:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E8:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E9:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04EA:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04EB:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04EC:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C000C07FC07FC000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +04ED:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C000C000C03FC03FC000C000C300C381C1FF80FF0000000000000000000000000 +04EE:000000000FF00FF000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04EF:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F0:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04F1:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F2:000001CE039C07380E700000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04F3:00000000000000000000000001CE039C07380E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F4:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000C000C000000000000000000000000 +04F5:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000000000000000000000000 +04F8:00000C300C300C300C300000600C600C600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +04F9:0000000000000000000000000C300C300C300C3000000000600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +1E0C:0000000000000000000000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000003000300030003000000 +1E0D:000000000000000000000000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000C000C000C000C00000 +1E34:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000FF00FF000000000 +1E35:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C0000000007F007F000000000 +1E36:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000001800180018001800000 +1E37:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180018001800000 +1E40:000001800180018001800000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +1E41:0000000000000000000000000180018001800180000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000000000000000000000000 +1E42:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000001800180018001800000 +1E43:0000000000000000000000000000000000000000000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000001800180018001800000 +1E44:000001800180018001800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +1E45:0000000000000000000000000180018001800180000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +1E46:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000001800180018001800000 +1E47:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000001800180018001800000 +1E6C:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000001800180018001800000 +1E6D:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000300030003000300000 +1EB8:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000001800180018001800000 +1EB9:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000001800180018001800000 +1EBC:00000F181B9819D818F000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +1EBD:0000000000000000000000000F181B9819D818F0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +1ECA:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180018001800000 +1ECB:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000001800180018001800000 +1ECC:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1ECD:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1EE4:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1EE5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000C000C000C000C00000 +1EF8:00000F181B9819D818F00000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +1EF9:0000000000000000000000000F181B9819D818F000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +2000:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2001:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2002:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2003:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2004:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2005:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2006:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2007:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2008:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2009:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200A:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200B:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200C:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200D:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200F:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2010:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +2011:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +2012:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2013:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2014:0000000000000000000000000000000000000000000000000000000000007FFC7FFC000000000000000000000000000000000000000000000000000000000000 +2015:0000000000000000000000000000000000000000000000000000000000007FFC7FFC000000000000000000000000000000000000000000000000000000000000 +2016:00000000000000000000000006600660066006600660066006600660066006600660066006600660066006600660066006600660000000000000000000000000 +2017:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003FFC3FFC000000003FFC3FFC +2018:000000000000000000C000C001800180018001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2019:00000000000000000180018001800180030003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201A:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800180030003000000000000000000 +201B:0000000000000000018001800180018000C000C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201C:0000000000000000061806180C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201D:000000000000000006180618061806180C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C300C300C300C30186018600000000000000000 +201F:000000000000000018601860186018600C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2020:00000000000000000000000001800180018001801FF81FF801800180018001800180018001800180018001800180018001800180000000000000000000000000 +2021:00000000000000000000000001800180018001801FF81FF8018001800180018001800180018001801FF81FF80180018001800180000000000000000000000000 +2022:000000000000000000000000000000000000000000000000000003C007E007E007E007E003C00000000000000000000000000000000000000000000000000000 +2026:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000318C318C318C318C000000000000000000000000 +2030:0000000000000000000000001C303E30366036603EC01CC00180018003000300060006000C000C0019DC1BFE3376337663FE61DC000000000000000000000000 +2032:000000000000000001C001C001C00180018001800180018000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2033:00000000000000001C701C701C701860186018601860186000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2039:000000000000000000000000000000000000000000000000007000E001C0038007000E001C001C000E000700038001C000E00070000000000000000000000000 +203A:0000000000000000000000000000000000000000000000001C000E000700038001C000E00070007000E001C0038007000E001C00000000000000000000000000 +203C:0000000000000000000000000C300C300C300C300C300C300C300C300C300C300C300C300C300000000000000C300C300C300C30000000000000000000000000 +203E:000000003FFC3FFC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2070:00000000000003C007E00C300C300C300C300C300C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000 +2071:01800180018000000780078001800180018001800180018007E007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2074:0000000000000030007000F001F003B007300E300FF00FF000300030000000000000000000000000000000000000000000000000000000000000000000000000 +2075:0000000000000FE00FE00C000C000FE00FF0003000300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2076:00000000000003E007E00C000C000FE00FF00C300C300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2077:0000000000000FF00FF00C3000300060006000C000C0018001800180000000000000000000000000000000000000000000000000000000000000000000000000 +2078:00000000000007E00FF00C300C300FF007E00C300C300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2079:00000000000007E00FF00C300C300C300FF007F00030003007E007C0000000000000000000000000000000000000000000000000000000000000000000000000 +207A:000000000000000000000180018001800FF00FF00180018001800000000000000000000000000000000000000000000000000000000000000000000000000000 +207B:000000000000000000000000000000001FF01FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +207C:000000000000000000001FF01FF00000000000001FF01FF000000000000000000000000000000000000000000000000000000000000000000000000000000000 +207D:00000000000000C001800300030003000300030003000300018000C0000000000000000000000000000000000000000000000000000000000000000000000000 +207E:0000000000000300018000C000C000C000C000C000C000C001800300000000000000000000000000000000000000000000000000000000000000000000000000 +207F:00000000000000001FC01FE018301830183018301830183018301830000000000000000000000000000000000000000000000000000000000000000000000000 +2080:00000000000000000000000000000000000000000000000000000000000000000000000003C007E00C300C300C300C300C300C300C3007E003C0000000000000 +2081:00000000000000000000000000000000000000000000000000000000000000000000000001800380078007800180018001800180018007E007E0000000000000 +2082:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C30007000E001C0038007000FF00FF0000000000000 +2083:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C30003001E001E0003000300C300FF007E0000000000000 +2084:0000000000000000000000000000000000000000000000000000000000000000000000000030007000F001F003B007300E300FF00FF000300030000000000000 +2085:0000000000000000000000000000000000000000000000000000000000000000000000000FE00FE00C000C000FE00FF0003000300C300FF007E0000000000000 +2086:00000000000000000000000000000000000000000000000000000000000000000000000003E007E00C000C000FE00FF00C300C300C300FF007E0000000000000 +2087:0000000000000000000000000000000000000000000000000000000000000000000000000FF00FF00C3000300060006000C000C0018001800180000000000000 +2088:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C300FF007E00C300C300C300FF007E0000000000000 +2089:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C300C300FF007F00030003007E007C0000000000000 +208A:000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800FF00FF00180018001800000000000000000 +208B:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001FF01FF00000000000000000000000000000 +208C:000000000000000000000000000000000000000000000000000000000000000000000000000000001FF01FF00000000000001FF01FF000000000000000000000 +208D:00000000000000000000000000000000000000000000000000000000000000000000000000C001800300030003000300030003000300018000C0000000000000 +208E:0000000000000000000000000000000000000000000000000000000000000000000000000300018000C000C000C000C000C000C000C001800300000000000000 +2090:00000000000000000000000000000000000000000000000000000000000000000000000000000FC00FE0003000300FF01FF0183018301FF00FF0000000000000 +2091:000000000000000000000000000000000000000000000000000000000000000000000000000007C00FE0183018301FF01FF0180018000FF007E0000000000000 +2092:000000000000000000000000000000000000000000000000000000000000000000000000000007C00FE01830183018301830183018300FE007C0000000000000 +2093:000000000000000000000000000000000000000000000000000000000000000000000000000018301C700EE007C00380038007C00EE01C701830000000000000 +2094:00000000000000000000000000000000000000000000000000000000000000000000000000000FC01FE0003000301FF01FF0183018300FE007C0000000000000 +2095:00000000000000000000000000000000000000000000000000000000000018001800180018001FC01FE018301830183018301830183018301830000000000000 +2096:0000000000000000000000000000000000000000000000000000000000000C000C000C000C000C380C700CE00DC00F800F800DC00CE00C700C38000000000000 +2097:00000000000000000000000000000000000000000000000000000000000007800780018001800180018001800180018001800180018007E007E0000000000000 +2098:00000000000000000000000000000000000000000000000000000000000000000000000000003FF03FF8318C318C318C318C318C318C318C318C000000000000 +209A:00000000000000000000000000000000000000000000000000000000000000000000000000001FC01FE01830183018301830183018301FE01FC0180018001800 +20A7:0000000000000000000000007F007F8061C060C060C060C060C060C061C07FB07F30603061FE61FE6030603060306030603E601E000000000000000000000000 +20AC:00000000000000000000000003F007F80E1C1C0E380030003000FFC0FFC030003000FFC0FFC03000300038001C0E0E1C07F803F0000000000000000000000000 +20AE:0000000000000000000000003FFC3FFC0180018001800180018001B801F003C00FB81DF003C00F801D8001800180018001800180000000000000000000000000 +2102:0000000000000000000000000FF01FF83E1C360C360C3600360036003600360036003600360036003600360C360C3E1C1FF80FF0000000000000000000000000 +210E:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +210F:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +2115:000000000000000000000000300C300C300C300C380C3C0C360C3B0C3D8C36CC336C31BC30DC306C303C301C300C300C300C300C000000000000000000000000 +2116:000000000000000000000000C180C19CC1BEE1B6E1B6F1BEF19CF980D980DD80CD80CF80C780C7BEC3BEC380C1BEC1BEC180C180000000000000000000000000 +211A:0000000000000000000000000FF01FF83E1C360C360C360C360C360C360C360C360C360C360C360C360C360C36CC3EFC1FF80FF8001C000E0000000000000000 +211D:0000000000000000000000003FF03FF8361C360C360C360C360C360C360C361C37F837F036C0376037B036D8366C3636361A3E0E000000000000000000000000 +2122:0000000000000000000000007E827EC618FE18D618C618C618C618C6000000000000000000000000000000000000000000000000000000000000000000000000 +2124:0000000000000000000000003FFC3FFC000C000C001C003C006C00D801B0036006C00D801B0036003C003800300030003FFC3FFC000000000000000000000000 +2126:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +2135:00000000000000000000000030303030181818180C0C0C0C06060E0E1F1C3B3871F061E060C060C0606060606030703038181C18000000000000000000000000 +2190:0000000000000000000000000000000000000000030007000E001C0038007FFE7FFE38001C000E00070003000000000000000000000000000000000000000000 +2191:000000000000000000000000018003C007E00FF01DB8399C318C0180018001800180018001800180018001800180018001800180000000000000000000000000 +2192:000000000000000000000000000000000000000000C000E000700038001C7FFE7FFE001C0038007000E000C00000000000000000000000000000000000000000 +2193:0000000000000000000000000180018001800180018001800180018001800180018001800180318C399C1DB80FF007E003C00180000000000000000000000000 +2194:000000000000000000000000000000000000000006600E701C38381C700EFFFFFFFF700E381C1C380E7006600000000000000000000000000000000000000000 +2195:000000000000000000000000018003C007E00FF01DB8399C318C018001800180018001800180318C399C1DB80FF007E003C00180000000000000000000000000 +21A4:0000000000000000000000000000000000000000030607060E061C0638067FFE7FFE38061C060E06070603060000000000000000000000000000000000000000 +21A6:000000000000000000000000000000000000000060C060E060706038601C7FFE7FFE601C6038607060E060C00000000000000000000000000000000000000000 +21A8:000000000000000000000000018003C007E00FF01DB8399C318C0180018001800180318C399C1DB80FF007E003C001803FFC3FFC000000000000000000000000 +21B5:000000000000000000000000000C000C000C000C000C000C000C000C030C070C0E0C1C0C380C7FFC7FFC38001C000E0007000300000000000000000000000000 +21BB:0000000000000000000000000000000000007F007F001F003B183318630C600C600C600C600C301838381FF00FE0000000000000000000000000000000000000 +21CB:0000000000000000000000000000000000000800180038007000FFFEFFFE00000000FFFEFFFE001C003800300020000000000000000000000000000000000000 +21CC:000000000000000000000000000000000000002000300038001CFFFEFFFE00000000FFFEFFFE7000380018000800000000000000000000000000000000000000 +21D0:000000000000000000000000000000000000000006000E001C003FFE7FFEF000F0007FFE3FFE1C000E0006000000000000000000000000000000000000000000 +21D1:000000000000000000000000018003C007E00FF01E783E7C366C0660066006600660066006600660066006600660066006600660000000000000000000000000 +21D2:000000000000000000000000000000000000000000C000E00070FFF8FFFC001E001EFFFCFFF8007000E000C00000000000000000000000000000000000000000 +21D3:0000000000000000000000000660066006600660066006600660066006600660066006600660366C3E7C1E780FF007E003C00180000000000000000000000000 +21D4:000000000000000000000000000000000000000006600E701C383FFC7FFEF00FF00F7FFE3FFC1C380E7006600000000000000000000000000000000000000000 +21D5:000000000000000000000000018003C007E00FF01E783E7C366C066006600660066006600660366C3E7C1E780FF007E003C00180000000000000000000000000 +2200:000000000000000000000000600C600C600C600C301830183FF83FF81830183018300C600C600C6006C006C006C0038003800380000000000000000000000000 +2203:0000000000000000000000003FFC3FFC000C000C000C000C000C000C000C3FFC3FFC000C000C000C000C000C000C000C3FFC3FFC000000000000000000000000 +2204:000000000000000C000C001C3FFC3FFC003C006C006C00CC00CC018C018C3FFC3FFC030C030C060C060C0C0C0C0C180C3FFC3FFC300060006000000000000000 +2205:00000000000000000000000000180018003000300FE01FF030D830D83198319833183318361836181FF00FE01800180030003000000000000000000000000000 +2206:00000000000000000000000001800180018003C003C003C00660066006600C300C300C30181818181818300C300C300C3FFC3FFC000000000000000000000000 +2207:0000000000000000000000003FFC3FFC300C300C300C1818181818180C300C300C3006600660066003C003C003C0018001800180000000000000000000000000 +2208:00000000000000000000000001FC07FC0E001800180030003000300030003FFC3FFC3000300030003000180018000E0007FC01FC000000000000000000000000 +2209:00000000000000060006000C01FC07FC0E18183018303060306030C030C03FFC3FFC318031803300330016001E000E000FFC19FC180030003000000000000000 +220A:00000000000000000000000000000000000003FC0FFC1C001800300030003FFC3FFC3000300018001C000FFC03FC000000000000000000000000000000000000 +220B:0000000000000000000000003F803FE0007000180018000C000C000C000C3FFC3FFC000C000C000C000C0018001800703FE03F80000000000000000000000000 +220C:0000000000006000600030003F803FE018700C180C18060C060C030C030C3FFC3FFC018C018C00CC00CC0068007800703FF03F980018000C000C000000000000 +220D:0000000000000000000000000000000000003FC03FF000380018000C000C3FFC3FFC000C000C001800383FF03FC0000000000000000000000000000000000000 +2212:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2213:00000000000000000000000000000000000000003FFC3FFC00000000018001800180018001803FFC3FFC01800180018001800180000000000000000000000000 +2214:00000000000000000000000000000000018001800180018000000000018001800180018001803FFC3FFC01800180018001800180000000000000000000000000 +2215:0000000000000000000000000000000000000000000C001C0038007000E001C0038007000E001C00380070006000000000000000000000000000000000000000 +2216:00000000000000000000000000000000000000006000700038001C000E000700038001C000E000700038001C000C000000000000000000000000000000000000 +2219:0000000000000000000000000000000000000000000000000000038007C007C007C0038000000000000000000000000000000000000000000000000000000000 +221A:000000000000001E001E001800180018001800180018001800180018001830183018301838181C180E180718039801D800F80078000000000000000000000000 +221E:000000000000000000000000000000000000000000001E783FFC73CE618661866186618673CE3FFC1E7800000000000000000000000000000000000000000000 +221F:000000000000000000000000000000000000000030003000300030003000300030003000300030003FFC3FFC0000000000000000000000000000000000000000 +2225:00000000000000000000000006600660066006600660066006600660066006600660066006600660066006600660066006600660000000000000000000000000 +2227:0000000000000000000000000000000000000000000000000180018003C003C0066006600C300C300C30181818181818300C300C000000000000000000000000 +2228:000000000000000000000000000000000000000000000000300C300C1818181818180C300C300C300660066003C003C001800180000000000000000000000000 +2229:000000000000000000000000000000000000000007E00FF01C381818300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +222A:0000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C18181C380FF007E0000000000000000000000000 +2248:000000000000000000000000000000000000000000001F0C3F9C39FC30F8000000001F0C3F9C39FC30F800000000000000000000000000000000000000000000 +2260:0000000000000000000000000000000000000000001C00387FFC7FFC00E001C0038007007FFC7FFC380070000000000000000000000000000000000000000000 +2261:0000000000000000000000000000000000003FFC3FFC00000000000000003FFC3FFC00000000000000003FFC3FFC000000000000000000000000000000000000 +2264:0000000000000000000000000038007000E001C0038007000E001C001C000E000700038001C000E000700038000000003FFC3FFC000000000000000000000000 +2265:0000000000000000000000001C000E000700038001C000E0007000380038007000E001C0038007000E001C00000000003FFC3FFC000000000000000000000000 +226A:000000000000000000000000000000C301C7038E071C0E381C7038E071C0E380E38071C038E01C700E38071C038E01C700C30000000000000000000000000000 +226B:0000000000000000000000000000C300E38071C038E01C700E38071C038E01C701C7038E071C0E381C7038E071C0E380C3000000000000000000000000000000 +2282:00000000000000000000000000000000000007FC1FFC38007000600060006000600060006000700038001FFC07FC000000000000000000000000000000000000 +2283:0000000000000000000000000000000000007FC07FF00038001C000C000C000C000C000C000C001C00387FF07FC0000000000000000000000000000000000000 +2286:000000000000000000000000000007FC1FFC38007000600060006000600060006000700038001FFC07FC000000007FFC7FFC0000000000000000000000000000 +2287:00000000000000000000000000007FC07FF00038001C000C000C000C000C000C000C001C00387FF07FC0000000007FFC7FFC0000000000000000000000000000 +22A5:0000000000000000000000000000000000000000018001800180018001800180018001800180018001800180018001803FFC3FFC000000000000000000000000 +22C2:00000000000000000000000007E00FF01C381818300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +22C3:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C18181C380FF007E0000000000000000000000000 +2300:00000000000000000000000000180018003000300FE01FF030D830D83198319833183318361836181FF00FE01800180030003000000000000000000000000000 +2302:0000000000000000000000000000000000000000018003C007E00E701C38381C700E60066006600660066006600660067FFE7FFE000000000000000000000000 +2308:0000000000000000000000000FE00FE00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C00000000000000000000000000 +2309:0000000000000000000000000FE00FE0006000600060006000600060006000600060006000600060006000600060006000600060000000000000000000000000 +230A:0000000000000000000000000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000FE00FE0000000000000000000000000 +230B:0000000000000000000000000060006000600060006000600060006000600060006000600060006000600060006000600FE00FE0000000000000000000000000 +2310:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003000000000000000000000000000000000000000000000000000 +2319:0000000000000000000000000000000000000000000000003000300030003000300030003FFC3FFC000000000000000000000000000000000000000000000000 +2320:00000000000000000000000000F801FC018C018C0180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2321:0180018001800180018001800180018001800180018001800180018001800180018001800180018001800180318031803F801F00000000000000000000000000 +239B:00180030006000C001800180030003000600060006000C000C000C000C0018001800180018001800180018001800180018001800180018001800180018001800 +239C:18001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +239D:180018001800180018001800180018001800180018001800180018001800180018000C000C000C000C00060006000600030003000180018000C0006000300018 +239E:18000C00060003000180018000C000C0006000600060003000300030003000180018001800180018001800180018001800180018001800180018001800180018 +239F:00180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A0:00180018001800180018001800180018001800180018001800180018001800180018003000300030003000600060006000C000C001800180030006000C001800 +23A1:1FF81FF8180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +23A2:18001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +23A3:1800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001FF81FF8 +23A4:1FF81FF8001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A5:00180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A6:0018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800181FF81FF8 +23A7:007E01FE038003000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600 +23A8:06000600060006000600060006000600060006000600060006000E001C00F800F8001C000E000600060006000600060006000600060006000600060006000600 +23A9:06000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000300038001FE007E +23AB:FC00FF000380018000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C0 +23AC:00C000C000C000C000C000C000C000C000C000C000C000C000C000C00060003E003E006000C000C000C000C000C000C000C000C000C000C000C000C000C000C0 +23AD:00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C001800380FF00FC00 +23AE:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +23AF:000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +23BA:FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +23BB:00000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +23BC:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000 +23BD:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF +23D0:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2409:0000000000000000000000006180618061807F807F8061806180618061800000000003FC03FC0060006000600060006000600060000000000000000000000000 +240A:00000000000000000000000060006000600060006000600060007F807F800000000003FC03FC0300030003F003F0030003000300000000000000000000000000 +240B:00000000000000000000000061806180618061806180618033001E000C000000000003FC03FC0060006000600060006000600060000000000000000000000000 +240C:0000000000000000000000007F807F80600060007E007E006000600060000000000003FC03FC0300030003F003F0030003000300000000000000000000000000 +240D:0000000000000000000000003F007F80618060006000600061807F803F000000000003F803FC030C030C03F803E003700338031C000000000000000000000000 +2424:00000000000000000000000061806180718079806D80678063806180618000000000030003000300030003000300030003FC03FC000000000000000000000000 +2500:000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2501:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +2502:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2503:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2508:000000000000000000000000000000000000000000000000000000000000F7DEF7DE000000000000000000000000000000000000000000000000000000000000 +2509:00000000000000000000000000000000000000000000000000000000F7DEF7DEF7DEF7DE00000000000000000000000000000000000000000000000000000000 +250A:01800180018001800180018000000000018001800180018001800180000000000180018001800180018001800000000001800180018001800180018000000000 +250B:03C003C003C003C003C003C00000000003C003C003C003C003C003C00000000003C003C003C003C003C003C00000000003C003C003C003C003C003C000000000 +250C:00000000000000000000000000000000000000000000000000000000000001FF01FF018001800180018001800180018001800180018001800180018001800180 +250D:0000000000000000000000000000000000000000000000000000000001FF01FF01FF01FF01800180018001800180018001800180018001800180018001800180 +250E:00000000000000000000000000000000000000000000000000000000000003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +250F:0000000000000000000000000000000000000000000000000000000003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2510:000000000000000000000000000000000000000000000000000000000000FF80FF80018001800180018001800180018001800180018001800180018001800180 +2511:00000000000000000000000000000000000000000000000000000000FF80FF80FF80FF8001800180018001800180018001800180018001800180018001800180 +2512:000000000000000000000000000000000000000000000000000000000000FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2513:00000000000000000000000000000000000000000000000000000000FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2514:01800180018001800180018001800180018001800180018001800180018001FF01FF000000000000000000000000000000000000000000000000000000000000 +2515:0180018001800180018001800180018001800180018001800180018001FF01FF01FF01FF00000000000000000000000000000000000000000000000000000000 +2516:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF000000000000000000000000000000000000000000000000000000000000 +2517:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF00000000000000000000000000000000000000000000000000000000 +2518:018001800180018001800180018001800180018001800180018001800180FF80FF80000000000000000000000000000000000000000000000000000000000000 +2519:01800180018001800180018001800180018001800180018001800180FF80FF80FF80FF8000000000000000000000000000000000000000000000000000000000 +251A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0000000000000000000000000000000000000000000000000000000000000 +251B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC000000000000000000000000000000000000000000000000000000000 +251C:01800180018001800180018001800180018001800180018001800180018001FF01FF018001800180018001800180018001800180018001800180018001800180 +251D:0180018001800180018001800180018001800180018001800180018001FF01FF01FF01FF01800180018001800180018001800180018001800180018001800180 +251E:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF018001800180018001800180018001800180018001800180018001800180 +251F:01800180018001800180018001800180018001800180018001800180018003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2520:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2521:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF01800180018001800180018001800180018001800180018001800180 +2522:0180018001800180018001800180018001800180018001800180018003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2523:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2524:018001800180018001800180018001800180018001800180018001800180FF80FF80018001800180018001800180018001800180018001800180018001800180 +2525:01800180018001800180018001800180018001800180018001800180FF80FF80FF80FF8001800180018001800180018001800180018001800180018001800180 +2526:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0018001800180018001800180018001800180018001800180018001800180 +2527:018001800180018001800180018001800180018001800180018001800180FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2528:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2529:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC001800180018001800180018001800180018001800180018001800180 +252A:01800180018001800180018001800180018001800180018001800180FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +252B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +252C:000000000000000000000000000000000000000000000000000000000000FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +252D:00000000000000000000000000000000000000000000000000000000FF80FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +252E:0000000000000000000000000000000000000000000000000000000001FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +252F:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2530:000000000000000000000000000000000000000000000000000000000000FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2531:00000000000000000000000000000000000000000000000000000000FFC0FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2532:0000000000000000000000000000000000000000000000000000000003FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2533:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2534:018001800180018001800180018001800180018001800180018001800180FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2535:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFF8000000000000000000000000000000000000000000000000000000000 +2536:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF01FF00000000000000000000000000000000000000000000000000000000 +2537:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +2538:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2539:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFFC000000000000000000000000000000000000000000000000000000000 +253A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF03FF00000000000000000000000000000000000000000000000000000000 +253B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +253C:018001800180018001800180018001800180018001800180018001800180FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +253D:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +253E:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +253F:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2540:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +2541:018001800180018001800180018001800180018001800180018001800180FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2542:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2543:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +2544:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +2545:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2546:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2547:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2548:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2549:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +254A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +254B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2550:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +2551:06600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660 +2552:000000000000000000000000000000000000000000000000000001FF01FF0180018001FF01FF0180018001800180018001800180018001800180018001800180 +2553:00000000000000000000000000000000000000000000000000000000000007FF07FF066006600660066006600660066006600660066006600660066006600660 +2554:000000000000000000000000000000000000000000000000000007FF07FF06000600067F067F0660066006600660066006600660066006600660066006600660 +2555:0000000000000000000000000000000000000000000000000000FF80FF8001800180FF80FF800180018001800180018001800180018001800180018001800180 +2556:000000000000000000000000000000000000000000000000000000000000FFE0FFE0066006600660066006600660066006600660066006600660066006600660 +2557:0000000000000000000000000000000000000000000000000000FFE0FFE000600060FE60FE600660066006600660066006600660066006600660066006600660 +2558:018001800180018001800180018001800180018001800180018001FF01FF0180018001FF01FF0000000000000000000000000000000000000000000000000000 +2559:06600660066006600660066006600660066006600660066006600660066007FF07FF000000000000000000000000000000000000000000000000000000000000 +255A:0660066006600660066006600660066006600660066006600660067F067F0600060007FF07FF0000000000000000000000000000000000000000000000000000 +255B:0180018001800180018001800180018001800180018001800180FF80FF8001800180FF80FF800000000000000000000000000000000000000000000000000000 +255C:066006600660066006600660066006600660066006600660066006600660FFE0FFE0000000000000000000000000000000000000000000000000000000000000 +255D:0660066006600660066006600660066006600660066006600660FE60FE6000600060FFE0FFE00000000000000000000000000000000000000000000000000000 +255E:018001800180018001800180018001800180018001800180018001FF01FF0180018001FF01FF0180018001800180018001800180018001800180018001800180 +255F:066006600660066006600660066006600660066006600660066006600660067F067F066006600660066006600660066006600660066006600660066006600660 +2560:0660066006600660066006600660066006600660066006600660067F067F06000600067F067F0660066006600660066006600660066006600660066006600660 +2561:0180018001800180018001800180018001800180018001800180FF80FF8001800180FF80FF800180018001800180018001800180018001800180018001800180 +2562:066006600660066006600660066006600660066006600660066006600660FE60FE60066006600660066006600660066006600660066006600660066006600660 +2563:0660066006600660066006600660066006600660066006600660FE60FE6000600060FE60FE600660066006600660066006600660066006600660066006600660 +2564:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FFFFFFFF0180018001800180018001800180018001800180018001800180 +2565:000000000000000000000000000000000000000000000000000000000000FFFFFFFF066006600660066006600660066006600660066006600660066006600660 +2566:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FE7FFE7F0660066006600660066006600660066006600660066006600660 +2567:0180018001800180018001800180018001800180018001800180FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +2568:066006600660066006600660066006600660066006600660066006600660FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2569:0660066006600660066006600660066006600660066006600660FE7FFE7F00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +256A:0180018001800180018001800180018001800180018001800180FFFFFFFF01800180FFFFFFFF0180018001800180018001800180018001800180018001800180 +256B:066006600660066006600660066006600660066006600660066006600660FFFFFFFF066006600660066006600660066006600660066006600660066006600660 +256C:0660066006600660066006600660066006600660066006600660FE7FFE7F00000000FE7FFE7F0660066006600660066006600660066006600660066006600660 +256D:000000000000000000000000000000000000000000000000000000000000000F003F007800E000C001C001800180018001800180018001800180018001800180 +256E:000000000000000000000000000000000000000000000000000000000000F000FC001E0007000300038001800180018001800180018001800180018001800180 +256F:018001800180018001800180018001800180018001800380030007001E00FC00F000000000000000000000000000000000000000000000000000000000000000 +2570:0180018001800180018001800180018001800180018001C000C000E00078003F000F000000000000000000000000000000000000000000000000000000000000 +2571:00010003000300060006000C000C00180018003000300060006000C000C00180018003000300060006000C000C00180018003000300060006000C000C0008000 +2572:8000C000C0006000600030003000180018000C000C0006000600030003000180018000C000C0006000600030003000180018000C000C00060006000300030001 +2573:8001C003C00360066006300C300C181818180C300C300660066003C003C00180018003C003C0066006600C300C3018181818300C300C60066006C003C0038001 +2574:000000000000000000000000000000000000000000000000000000000000FF80FF80000000000000000000000000000000000000000000000000000000000000 +2575:01800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000000000000000000000000000000000000000 +2576:00000000000000000000000000000000000000000000000000000000000001FF01FF000000000000000000000000000000000000000000000000000000000000 +2577:00000000000000000000000000000000000000000000000000000000000001800180018001800180018001800180018001800180018001800180018001800180 +2578:00000000000000000000000000000000000000000000000000000000FF80FF80FF80FF8000000000000000000000000000000000000000000000000000000000 +2579:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0000000000000000000000000000000000000000000000000000000000000 +257A:0000000000000000000000000000000000000000000000000000000001FF01FF01FF01FF00000000000000000000000000000000000000000000000000000000 +257B:00000000000000000000000000000000000000000000000000000000000003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +257C:0000000000000000000000000000000000000000000000000000000001FFFFFFFFFF01FF00000000000000000000000000000000000000000000000000000000 +257D:01800180018001800180018001800180018001800180018001800180018003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +257E:00000000000000000000000000000000000000000000000000000000FF80FFFFFFFFFF8000000000000000000000000000000000000000000000000000000000 +257F:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0018001800180018001800180018001800180018001800180018001800180 +2580:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000 +2581:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF +2582:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2583:00000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2584:0000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2585:000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2586:00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2587:0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2588:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2589:FFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFC +258A:FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0 +258B:FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0 +258C:FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 +258D:FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00 +258E:F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000 +258F:C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000 +2590:00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF +2591:AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000 +2592:AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555 +2593:FFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAA +2596:0000000000000000000000000000000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 18:21:22 2017 Return-Path: Delivered-To: svn-src-all@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 4C421D8DF16; Mon, 26 Jun 2017 18:21:22 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 1981182E8F; Mon, 26 Jun 2017 18:21:21 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (75-173-114-235.albq.qwest.net [75.173.114.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 241A81928AB; Mon, 26 Jun 2017 18:21:19 +0000 (UTC) Subject: Re: svn commit: r320362 - head/share/zoneinfo To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706261540.v5QFeOTj072841@repo.freebsd.org> From: Sean Bruno Message-ID: Date: Mon, 26 Jun 2017 12:21:15 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 18:21:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f Content-Type: multipart/mixed; boundary="VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ"; protected-headers="v1" From: Sean Bruno To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r320362 - head/share/zoneinfo References: <201706261540.v5QFeOTj072841@repo.freebsd.org> In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hmmm ... This seems to break 'poudriere jail -c jailname -m src=3D/usr/sr= c -v head" --- realinstall_subdir_share/zoneinfo --- install: builddir/Africa/Abidjan: No such file or directory On 06/26/17 09:40, Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Jun 26 15:40:24 2017 > New Revision: 320362 > URL: https://svnweb.freebsd.org/changeset/base/320362 >=20 > Log: > Provide visual feedback when timezone files are installed. > After r320003 it wasn't being shown in any way. > =20 > Submitted by: bdrewery > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D11154 >=20 > Modified: > head/share/zoneinfo/Makefile >=20 > Modified: head/share/zoneinfo/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 (r320361) > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 (r320362) > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > =20 > +.if make(*install*) > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > +.endif > + > beforeinstall: install-zoneinfo > install-zoneinfo: > mkdir -p ${DESTDIR}/usr/share/zoneinfo > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > - cd ${TZBUILDDIR} && \ > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > +.for f in ${TZS} > + ${INSTALL} ${TAG_ARGS} \ > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo= /${f} > +.endfor > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > =20 >=20 >=20 --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== =9Mia -----END PGP SIGNATURE----- --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- From owner-svn-src-all@freebsd.org Mon Jun 26 18:23:42 2017 Return-Path: Delivered-To: svn-src-all@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 0A9CAD8DFCE; Mon, 26 Jun 2017 18:23:42 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CE3C0831FA; Mon, 26 Jun 2017 18:23:41 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QINfrg041933; Mon, 26 Jun 2017 18:23:41 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QINe9K041931; Mon, 26 Jun 2017 18:23:40 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706261823.v5QINe9K041931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 26 Jun 2017 18:23:40 +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: r320368 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 18:23:42 -0000 Author: davidcs Date: Mon Jun 26 18:23:40 2017 New Revision: 320368 URL: https://svnweb.freebsd.org/changeset/base/320368 Log: MFC r320175 Add pkts_cnt_oversized to stats. Modified: stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 18:11:48 2017 (r320367) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 18:23:40 2017 (r320368) @@ -1554,6 +1554,8 @@ qla_rcv_stats(qla_host_t *ha, q80_rcv_stats_t *rstat) rstat->lro_flows_active); device_printf(dev, "%s: pkts_droped_unknown\t\t%" PRIu64 "\n", __func__, rstat->pkts_droped_unknown); + device_printf(dev, "%s: pkts_cnt_oversized\t\t%" PRIu64 "\n", + __func__, rstat->pkts_cnt_oversized); } static void Modified: stable/10/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 18:11:48 2017 (r320367) +++ stable/10/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 18:23:40 2017 (r320368) @@ -748,6 +748,7 @@ typedef struct _q80_rcv_stats { uint64_t lro_flows_deleted; uint64_t lro_flows_active; uint64_t pkts_droped_unknown; + uint64_t pkts_cnt_oversized; } __packed q80_rcv_stats_t; typedef struct _q80_xmt_stats { From owner-svn-src-all@freebsd.org Mon Jun 26 18:28:01 2017 Return-Path: Delivered-To: svn-src-all@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 ED98BD8E064; Mon, 26 Jun 2017 18:28:01 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BC23783390; Mon, 26 Jun 2017 18:28:01 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QIS0NM042136; Mon, 26 Jun 2017 18:28:00 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QIS0a0042135; Mon, 26 Jun 2017 18:28:00 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201706261828.v5QIS0a0042135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 26 Jun 2017 18:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320369 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 18:28:02 -0000 Author: lidl Date: Mon Jun 26 18:28:00 2017 New Revision: 320369 URL: https://svnweb.freebsd.org/changeset/base/320369 Log: Add IPSEC support to mips ERL kernel config file Modified: head/sys/mips/conf/ERL Modified: head/sys/mips/conf/ERL ============================================================================== --- head/sys/mips/conf/ERL Mon Jun 26 18:23:40 2017 (r320368) +++ head/sys/mips/conf/ERL Mon Jun 26 18:28:00 2017 (r320369) @@ -53,6 +53,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options IPSEC # IP (v4/v6) security options TCP_HHOOK # hhook(9) framework for TCP options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem @@ -201,7 +202,7 @@ device ural # Ralink Technology RT2500USB wireless N device zyd # ZyDAS zd1211/zd1211b wireless NICs # crypto subsystem -device crypto # core crypto support +device crypto # core crypto support (required for IPSEC) device cryptodev # /dev/crypto for access to h/w device cryptocteon # Octeon coprocessor 2 crypto offload From owner-svn-src-all@freebsd.org Mon Jun 26 19:34:42 2017 Return-Path: Delivered-To: svn-src-all@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 8965AD8F6AB; Mon, 26 Jun 2017 19:34:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49529820; Mon, 26 Jun 2017 19:34:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id 792AA10AB01; Mon, 26 Jun 2017 15:34:40 -0400 (EDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd To: Ngie Cooper References: <201706220708.v5M78IYv080609@repo.freebsd.org> <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> <52481168-DCDD-4D6A-8F68-1EBDA44513D1@gmail.com> Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: John Baldwin Message-ID: <126a318e-61a3-bfdc-e1dd-b16a67734d30@FreeBSD.org> Date: Mon, 26 Jun 2017 15:34:40 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <52481168-DCDD-4D6A-8F68-1EBDA44513D1@gmail.com> Content-Type: text/plain; charset=shift_jis Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 26 Jun 2017 15:34:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:34:42 -0000 On 6/22/17 10:08 AM, Ngie Cooper wrote: > >> On Jun 22, 2017, at 03:28, John Baldwin wrote: >> >>> On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: >>> >>>> On Jun 22, 2017, at 00:35, John Baldwin wrote: >>> >>> c >>> >>>> Please revert the breakout of the existing config files. I think that splitting >>>> up the conf files is too disruptive of a change (POLA) for stable branches. >>> >>> Done in r320229 and r320230. >> >> I haven't checked if this was merged to 11, but if so, I think they should also >> stay a single conf file in 11 for the same reason. > > No, it wasn't merged to 11, so no further action required here. > >>>> This was agreed to by other folks in the followup thread to the commits in >>>> head that you continue to ignore. >>> >>> >>>> In head please either fully split up the files or revert to a single file >>>> (another part of that thread you continue to ignore). >>> >>> My eyes glazed over trying to read through all of the posts. I seem to have missed the point where a proposed change was made to split up the config files further. Could this please be summarized again? >> >> I think that having the files partially split up is the worst of both >> worlds as folks writing config management rules, etc. have to use >> different approaches depending on the rule. I think that is a headache >> and would rather have the config either be all in a single file, or all >> be split up into conf.d/ so that it is consistent. I also think that >> when splitting up a conf file we should do it all at once so that there is >> only one painful /etc merge instead of several of them. > > This still doesn't answer my concern fully. In what way are the config files in base not broken down 100%, i.e., what action can I take to resolve your concerns about it not being fully modularized? I think syslog.conf having kerberos.log is likely the last issue, but I would really like clarification in order to move forward. Hmm, I had assumed that in a fully modularized form we wouldn't have foo.conf at all, but _only_ files in conf.d. However, looking at the files it does seem that there are some system-wide entries that aren't part of a specific program and that those should probably stay in foo.conf. I do think there are some remaining entries that are for a single program though: For syslog.conf: - /var/log/cron probably belongs in /etc/syslog.d/cron.conf? - commented out lines for /var/log/devd.log belong in /etc/syslogd.d/devd.conf? For newsyslog.conf: - /var/log/cron -> cron.conf - /var/log/{daily,monthly,security,weekly}.log -> periodic.conf - /var/log/init.log -> init.conf? - /var/log/kerberos.log -> kerberos.conf - /var/log/devd.log -> devd.conf -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 26 19:36:25 2017 Return-Path: Delivered-To: svn-src-all@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 8450FD8F9D6; Mon, 26 Jun 2017 19:36:25 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 544FDEE8; Mon, 26 Jun 2017 19:36:25 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QJaOMS071911; Mon, 26 Jun 2017 19:36:24 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QJaOAN071909; Mon, 26 Jun 2017 19:36:24 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706261936.v5QJaOAN071909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 26 Jun 2017 19:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320370 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:36:25 -0000 Author: davidcs Date: Mon Jun 26 19:36:24 2017 New Revision: 320370 URL: https://svnweb.freebsd.org/changeset/base/320370 Log: MFC r320175 Add pkts_cnt_oversized to stats. Approved by: re(marius) Modified: stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_hw.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 18:28:00 2017 (r320369) +++ stable/11/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 19:36:24 2017 (r320370) @@ -1554,6 +1554,8 @@ qla_rcv_stats(qla_host_t *ha, q80_rcv_stats_t *rstat) rstat->lro_flows_active); device_printf(dev, "%s: pkts_droped_unknown\t\t%" PRIu64 "\n", __func__, rstat->pkts_droped_unknown); + device_printf(dev, "%s: pkts_cnt_oversized\t\t%" PRIu64 "\n", + __func__, rstat->pkts_cnt_oversized); } static void Modified: stable/11/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 18:28:00 2017 (r320369) +++ stable/11/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 19:36:24 2017 (r320370) @@ -748,6 +748,7 @@ typedef struct _q80_rcv_stats { uint64_t lro_flows_deleted; uint64_t lro_flows_active; uint64_t pkts_droped_unknown; + uint64_t pkts_cnt_oversized; } __packed q80_rcv_stats_t; typedef struct _q80_xmt_stats { From owner-svn-src-all@freebsd.org Mon Jun 26 19:38:01 2017 Return-Path: Delivered-To: svn-src-all@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 D9BDAD8FE99; Mon, 26 Jun 2017 19:38:01 +0000 (UTC) (envelope-from kevans91@ksu.edu) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0043.outbound.protection.outlook.com [104.47.40.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB801998; Mon, 26 Jun 2017 19:38:00 +0000 (UTC) (envelope-from kevans91@ksu.edu) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ksu.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/qNUOPo5hmvQHx/E3p8nPgcVdfQV5H3ln+UgGzGo/cY=; b=B98Dj8PRl3MtoRaRm/HS2VPM4ROTQlLEq4fW3paY/Qnc8SV1poEHJQODq5fsfCgbFnaMrswWEL2vY2jbMgILrnsupqBvw9ILlZQeh5ohvgR71uPuL3KCd0vGaxrhDMjkikQqU3ieltHOTwTEW9Bpq3DQqveMVBle6Dt/VjqDeNw= Received: from CY1PR05CA0037.namprd05.prod.outlook.com (10.166.186.175) by CY1PR05MB2281.namprd05.prod.outlook.com (10.166.192.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.5; Mon, 26 Jun 2017 19:37:59 +0000 Received: from BL2NAM02FT003.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by CY1PR05CA0037.outlook.office365.com (2a01:111:e400:c5a4::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.5 via Frontend Transport; Mon, 26 Jun 2017 19:37:59 +0000 Authentication-Results: spf=pass (sender IP is 129.130.18.151) smtp.mailfrom=ksu.edu; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=bestguesspass action=none header.from=ksu.edu; Received-SPF: Pass (protection.outlook.com: domain of ksu.edu designates 129.130.18.151 as permitted sender) receiver=protection.outlook.com; client-ip=129.130.18.151; helo=ome-vm-smtp2.campus.ksu.edu; Received: from ome-vm-smtp2.campus.ksu.edu (129.130.18.151) by BL2NAM02FT003.mail.protection.outlook.com (10.152.76.204) with Microsoft SMTP Server id 15.1.1199.9 via Frontend Transport; Mon, 26 Jun 2017 19:37:59 +0000 Received: from calypso.engg.ksu.edu (calypso.engg.ksu.edu [129.130.43.181]) by ome-vm-smtp2.campus.ksu.edu (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id v5QJbwEe025286; Mon, 26 Jun 2017 14:37:58 -0500 Received: by calypso.engg.ksu.edu (Postfix, from userid 110) id 492FF3B66; Mon, 26 Jun 2017 14:37:58 -0500 (CDT) Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by calypso.engg.ksu.edu (Postfix) with ESMTPA id 1DDAD2BDD; Mon, 26 Jun 2017 14:37:56 -0500 (CDT) Received: by mail-vk0-f51.google.com with SMTP id y70so5944234vky.3; Mon, 26 Jun 2017 12:37:56 -0700 (PDT) X-Gm-Message-State: AKS2vOyZvRMSJzpI8HZQi7pG6Fi34nsRQvJNV3GxICtX+wW2pQV3OFL6 1iGkzKUZOEKehU8Qf5lhcBD/r2vMrQ== X-Received: by 10.31.82.1 with SMTP id g1mr886378vkb.121.1498505875713; Mon, 26 Jun 2017 12:37:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.51.218 with HTTP; Mon, 26 Jun 2017 12:37:35 -0700 (PDT) In-Reply-To: <201706231826.v5NIQvYa060882@repo.freebsd.org> References: <201706231826.v5NIQvYa060882@repo.freebsd.org> From: Kyle Evans Date: Mon, 26 Jun 2017 14:37:35 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320284 - head To: Bryan Drewery CC: src-committers , , X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:129.130.18.151; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39450400003)(39860400002)(39400400002)(39410400002)(39850400002)(2980300002)(438002)(377454003)(189002)(24454002)(199003)(13624006)(9896002)(478600001)(45336002)(63696999)(512874002)(46386002)(966005)(8936002)(305945005)(2906002)(54356999)(229853002)(61266001)(53546010)(93516999)(50986999)(189998001)(76176999)(498394004)(5660300001)(606005)(7906003)(75432002)(86362001)(9686003)(8676002)(356003)(236005)(6306002)(88552002)(59536001)(6246003)(54906002)(42186005)(2950100002)(6916009)(8576002)(450100002)(110136004)(98316002)(38730400002)(106466001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB2281; H:ome-vm-smtp2.campus.ksu.edu; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT003; 1:yV+7ZbEPaWQIIpjsonNTuKar4DMAYm4yA51LTLXSlYqiQXDf7/fCcBr8ECVCXLAtjXqTg9GUOyQEaKMSKUFnvhAin1+gjB7mcKv+O2O+n4uV+a00H4q6IdMbbGW3Hqk7io/sifNx8Vy2fBd+Um6/zftCRnSEf0M7Z657UC8mZvQRNukORecSk5XRyfq2f83rD2xmvz6WHRU9OIgh5O8YmnC7SAa51YxVeyEDw3c3qpDiiuMnjFduqpKAy+v7rNQyNz4696e9eUUx96UUkVSm/HDrVPrmIQNGlduW29jLGQVWhtXkWaui/Sd0lvNcDcOIZ7jIqyU4ea940pfYA6wDoHa+Q7jzqUQba7tRIdCylZAQmUacCVYOJVhDP1YZUGNR9B9HHQB18vBalWrRsPjrotReOj4VJ6098pvb1rNh8Yz/cC9Er6APYQVskEPE/8tInJHqeiCpUlp2V7JBIPnY322IyXFsnmuRDJuWvFQ4hN1OPzx6+vaanAjRPAf7Mss4lvfH3ZTUYDOgQZB4ROpsUO+ez+xIZanNzgaFpwu+ZAABt7EmytYPHgOvgION9gGomNOKlVOj23VIiR3X9pplgmNAhdb1htniA14CXOq5FyFW69kD+5pmN+5T1kBjQl3StY+DAcjDIazM1j9LmqF+PBjzT95Pdfu5T1IQD9d8LFBKTL7ye2H6MfXLPEYH+AMxqmI8WScttysT+67eis1RnQnlXFqOj14GKkbMeJ4jYpF2i2/gkmPMO/2JzNiqsJ98A8X+rgm/InRagEnGUMFAl9yFeLzdsslYLYI9fEEGSb+7kf/4MX4xEbp+GC5C6h/p5+LAqn/mIBAqRrF5OSNwB67rKS1OtfpK31vlIOcbTnydQlZMDSezPgWJyoYi/tpX X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34eb69f6-89b5-4880-084e-08d4bccad9f1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(8251501002)(2017030254075)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095); SRVR:CY1PR05MB2281; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 3:vfHLlIKWSZE0zRZcJz6I7Px1o5MGqJKd4JrWkk3Of4CIjhuJ/LxctlKTkU8quzpv2iHimbvw7QS1QfhNAgsXUBjDy4iiMN4QpW9ImPhEExeSkKKmpZCdNCVYTOW91r4FcdKEUuvV3BpZ0FGSHgm8ANjVL2MOXBNmFgd2yqiymOike9Gxdg53Ue1yjpfqLmIneAEDwoCtsmZPY4vmtwmztDrhIDVE8qwaCD6wLJWIlCG6Mb1R327yYItVaqh/GqEmrcxF8wPYBzsdL2JCRQWvkek42xULbAQTsiLIAiZgy83i5jJKjuaR+iu7Au7eqN2m/gRLegZe8t5nN3YMKWw29znLi9UyC3BapOf/bhNbwumtS8ovn7fsYqI0wu91gBeRM7BCw4bjiGdLMMq3xnWjJBG4HlTsUp3ULGfMUQGsZix9x4c7qL9U1v+ge/fQLqMFqVxnuybzhiDk8udOutPJuRbQRySs65D5h9PyVHbfczGTAeNS5QqYSrvQLYDhquy9mB9AOKaEO4xAJxWOeUZcOxd2s5rJKW2AtB5LNjV++94tGmNsSdwXy5mCKu4s8Kt5pJcYenfUsfleOGPdD3EnTfFLzJweQZgpLIoHUL+YuadQrI0smPEEeTUaM+txpccJ0GItsSm2ScIWMSXbuLmLBveVAdTvj0XM2n7JpolhcIFzN5pUkg/tenQHrdrQKh9TM4iSFiqTz1+ofNwZW0JwjaKavW+x17UycAzfD2EbnixtHbvhdT9Uh5pvCT3+gWBEfE8hVj2VMH3qNK9c/ZEgR6YI9BK66vgOETSulQLDn6DKXdGD7FZgTIJJQ2YDNOtjeKQ0YKcZmVKsemVPeGg6XMx7NnpT6VvmStiJyKzLfj9SVKLPZixaiaFGWLJHmAwTCo+XLl7V74ypOF15YQdNAQ== X-MS-TrafficTypeDiagnostic: CY1PR05MB2281: X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 25:KWPt4/QcxHgIvXHStZb/NcLQ3SNIifBdq7wS3f9zWFMn6Ot6b038rkc30yT8TR14LOiZsMwNT53S2XAA5F0aYxF0L49SpUZULQPiOzBuzHuZjRgWLhmF+VwKIeGirQPN8HE7ApRYPE11vDbCWt6o7sBs7p/VzPk/UVtIVafW/6kbo2bQ/Zn3JrngSKqj6sJOkWIM0Vwj9VhiAoCbcvsw3wxF9VCCb57VkKd4UHpgtq3i0Mhqz94H1fj6JFEINimxmmIJJkH5/Nd7nV5RjUw3sIdnKJTzvHK//YBtO+zJfdtAccFD2yTBCJFlCuujB0moMQSAKPmq3pv59iBcynch4od4jXcvn4uM9WwWeQibq2qX+jpa330eo0wK9Zp5+GNH2msfFDVIFRjIQ8Q5CM0CsbdvJl3jVz2yy3LUq+W2apGmy8LLVtzQqS97D5/h8lYdjQ0MXk4BXWQFUWb4gKzWj/niXk2nlPazogPiPzmA5J4HArXs4FhKCjV13McIj8Fz7+JIfscGM7h5MBe03TR7NeqDsJ8xkezkfm3Z7ji2ihIrUKE8a80i2oLOVvvwJE+a5rG9Nt57xY2+s9bzB9RBoOzFARZx1YyhT5EhSxCbsGgr0vLqPTuyOpgpgTh+8E7G2ixaZqJ3eIw9T0DTq6kMHgRusoI486szMDMQbPjXd/E38i8nfdpKPdvmWohUU7DG9aqbsMbhUoHHCJrmEmh0AY5zoj+mwDpe5Wbox/KdrGMvP9NhIybiwewkPSfzdZxOh0PaiJ4orG1+eGIzz/BDdfBbU//J+I1vFug+Uu0KQt6yxeERG3McSe9UR93++l6AGjp3XJqQPORFgv6aOGPFl3KrL6wuqZajPl5TjrRKweBNuHIf158wHf5dww9FqrGnlljFL9BCwWUwI2TvgwPjbKFdQphbYwG+9rK/CwM89No= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 31:AInvQ+5PVCnu/2Bw1zU44ZubTSjXdCLalESAEYxb+kw9kTK8nhyO3cq2BK2z4+/zxHrsEmfs4L421FeelAlHuDoFuCVnBI2SbEPUTUNnL38vs/PpOAE/iQcptKX1se9+ZB6xYOiNM0AmaLB0TQwPUsnOYO3SCr5rOj1DSSngw9aIvBYoSQdFQ0tzMperNrqwxbT2bvTg1vPbs+er6pSW16v8LO5KeK0cypCe7eptr8RbnT79CyUjVsq49Psa8z8sAw0bErgD8p92BcMycx6V1hdPKMM/uPcUIXaX1rdROdXBXaCa7T6kLGhD5hhnXd44uTkS2gps9UtSjSIhyH/stIDQBgXix+Huk9r+luKt33LOo5sQdm1MBYrwcuf5Y0x9zVdpAhKfEu+Cf3ZsKM1CdKviF2xpH/zbTjiBU33KOhoSkbxTvY8QrpGfLXtLuXrlhI8NOjn2gSyrOXiMcFmOOtX0JgR6hSukiyTqvr1yC9w7XDzkxEwYggB+TuN6E9RlhPDloRxTwwa9BKWX5JhErD9ri8AeBYN73XW7R0q+v0vVFojypgk90U4RfoYTYQVKj1gm+3xJNrRL/ljcfIiwU6ifC0gBxzDyD8ZE82N5iSexgNJ1NapK4MzTmGCA6oZh+Vd6brT1uWkGkELacrg13WRSQvXH5ZBF0BjOZvcDdWbj7npTIgrh/HyuHPuZFg90 X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 20:3K/inymGrhf+9hdujYlOlSPWKLoDRnssMxJW/EkMgkjnk1IWBTMDiiCDK7sJNdfsju90Nn1FRz2ALccTXTotYTwS4gIVibLbl1eC2RmWO5vLVsZ7PX5Gro3KLYntKwHnjRp1+NWuIAdO/60z2+jajk4U5jUSVaB0nBEAkRmmA686GgIylK3eZ8NdKgogACZrmCODlG2r8iifV9xnkD4P5+zilHllmu+7AW4Vg6IlAL3dv9hCvScAv2REMtEG8S83Yg8jKKfHPVBKNpV2pkGHKnrAAcASLuYZiy95xyMTnSr63UXQsHuRfLBFoyhsdtXiQAs5jJG3F6NpaciX9JngJFnrkqoOPqqqHocMuI/qmAc1QcwLV9dkmHjPq3XbnaVtRl4pk8GMv4XAQNTEOXgGjxvMJ7waNjYkQETv5xffl0/MUk/HHpv/tWcgAD17WptkA0peBHXIxzGDFzsek0vzKroXE5EuQAVFCHfUyI5mR7nJxDt5joI3IhVEO72WvOAk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(56005881305849)(90097320859284)(148574349560750)(75325880899374); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93004095)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR05MB2281; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR05MB2281; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB2281; 4:lfiAU0hdsuK4Nsbdi30++yCszaF1TIUAh2gTC6+sW4?= =?us-ascii?Q?aRQ5KsoB+LzBtSa6ifm7gQbnreR5Ty+E2nCCHx/PNKfx2cE+m/68sKOxLpSS?= =?us-ascii?Q?jkJh1Yr5yFxpgPj8rcOcQQBYVSQah2KJS5Aaa6OcTegsBB1WMQeYndItuodS?= =?us-ascii?Q?UYb5g2ddWYmUFnj5FQLlVDj7oZIWXmTdqfi3dPyx+JkNvW1IJgvU27AHHBiI?= =?us-ascii?Q?v0UEWFtrvID1pmmXfPu8kOChZ9OAaQoPGe0YsvWaFsXdVlY7GGwYcP/SCL5B?= =?us-ascii?Q?/RN+5Zmd2BMu1UOFu2YM0bi43ux/6GnnYjvXKPa3ic2Ob6k39cdEyEWGjBTv?= =?us-ascii?Q?hpo6IkQ1uQUA1o98+Z1la8H4xfMV2bVUXCdmxyHouoq+UC9rwP34T1wTOS6+?= =?us-ascii?Q?7XYR2FXfA1QHiRDt+5BxDvJaqZOE0UAi0rn28c8ul6jQU2XB6sfi928Xn8Uz?= =?us-ascii?Q?wzpZeh1wiBlMQLY7VucirXBSuAQFe/hnr5ogBktC1IrKAzKwNxbmtUu0dabg?= =?us-ascii?Q?DbV+mNGWdVgb9OBaUJr9PnrCkI5L/XhxrYKUpBudLpAq1a86PIAt93U89hoE?= =?us-ascii?Q?U9dlWawFt0m+piN9HjWPchDNj77TgsIvmunGbl1FBHWeJalbDMj/wRD9qEFr?= =?us-ascii?Q?s4fvlYTgKkoj3OtkDieCwkRO97oYuwzfAak0TGJV6hnt8rnWxwAoV0P9XDXt?= =?us-ascii?Q?Y0te5wpuWoWy0O0M/rZ57L9pyHP2d0mFI/UKFd88Qi2sZwHoKhpptxcchLcJ?= =?us-ascii?Q?aEfhPLAGeV1UfVjUaS3+uo1r/m/djblzJPa87whC3CPX4RR6HOe94uAZ/1OB?= =?us-ascii?Q?m5Ws5WlK6FqFGX1n9HPpNffmmxMgAG9fFQfskr5/dhNz8uWWd/R1W2Ggn5d4?= =?us-ascii?Q?5s3BrCyPNRtemT3eDBkZTtcpccOaT8FDdIo8mT3Qmaa6h9HRpXRboX1iKrR1?= =?us-ascii?Q?NUUvr+94wcKpr7igtxqyCU2fAck0EYDoVwTtZPQH4rV901N91ONzUnJndu5i?= =?us-ascii?Q?AjfF31A1UYGxkG1bLAlR5UnecjDFFqMCPPhTBfLRCQk0KDf9Ss1n+kCmnZot?= =?us-ascii?Q?xq7oQRzCU9r3fIstg0HsYAVdyKrlU5LBwoDPIBE/p9S3Uq6izsb9WjNbjwy3?= =?us-ascii?Q?8cv4EXWvmpkjqcCtL+0EnwVH9B18blHs6izkWGn1pwrC52BFucZIN3+TOrfQ?= =?us-ascii?Q?8XFdFBtsg1hU+2BrOE8ArGs/9MsAPSEFYRt1fvJYLP/sfnUdCW2/OgtXF0Nd?= =?us-ascii?Q?CDWBD1l3AWiQIDM8e/crTz9wBXSLV49/kQ+YeckeapdjHRvSR3hHf66Rh+4k?= =?us-ascii?Q?EShUaMDMcMfTQoDNbPpUlHATsKUWqneAa0nxpktnL1QeR5znYyQ52NYQ73SV?= =?us-ascii?Q?sMPg=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB2281; 23:bYJ+DJDvVL2DXKNjEi0Xm12pi/dzLj0yuDYZz1nic?= =?us-ascii?Q?jFPAtGmPjz2waONe0vICZWXTNXXOZsVCevy+UZVA4PEmQLJfR90I9bCvT6d/?= =?us-ascii?Q?rgn1S9f7GHJBOWKdRviavxeFDI5jDRDGSc7bXHD96EgwX3JdGLn6ZDICMo9F?= =?us-ascii?Q?fLlmG0rVud0CXBYSBOFv6xgKlVdGFnkcuK6cVQI33Tx64k4d25jzQI50cweo?= =?us-ascii?Q?7zqXF9TmntmeeqMq7yzrhai4+lr5EhjjTGh2PpRxyKfS7o+gl3iYWg3HtoYj?= =?us-ascii?Q?J4WBEU6Q94iIreGtewKz4gdUstnyYxYgY9hnGXucr6DM9z8f67j3PhJK9h1i?= =?us-ascii?Q?zogzOngNXi6PGSxR/VR5hGWwXt0YGsi9YNFA9zY3UwkNcEzKPtEbZ11BPws9?= =?us-ascii?Q?UNW4zfRNTtc3Gz4+AUhNA4qnaHPM+NZhWl1RXq61Bm76ubGzoeIo2xRyUOH3?= =?us-ascii?Q?Sxmd9HrNoyHTadtxbPagecC89UjDvGJINOAkiO/Hzsd7di8m4G777/caqxuU?= =?us-ascii?Q?VKrDXFwnoU/yKjPwNwaFUrJUxhJzW6sxYi/g1el/B/r3MELhcFqSb2+qKocR?= =?us-ascii?Q?fW6jbB735qzgGfPEDwPZVAEE8OOmIUm4zdfpgvB5ID8qoQlavKEBfvfMazcn?= =?us-ascii?Q?uv41knPMrwIMjjTUQJzcxs2vUHthTD35ot/81EO54CHkEeIvn+QaT8ms+IEA?= =?us-ascii?Q?VHGNmveco4upy28qwY7ZeAtA7rSsTRQ9P+YDVK8UvaigLIHUltDxUXU1MBwh?= =?us-ascii?Q?36lo9uraF1kyiasnkFinrQhpzijdvJkhtspPuw0pTGIvvysLFSl5iy+PICKu?= =?us-ascii?Q?xoG+1DNfpkyQufOmMDwCH9SVio9Wy9lQI4YrE458BLgenHFH+kRbaW6LXEfd?= =?us-ascii?Q?pnjOWYdnXaah1r/ISoNkJ71DIvmOrjd3CFmkXxs7IyjPGnx9go/pMuIxa+M9?= =?us-ascii?Q?UDN2SkL3G9R9WOw0WcHK7pbuW9uyYnjpSoMdVVIdosKv5nMPc2LKdDw71S9y?= =?us-ascii?Q?0FO0kb/kyjL5J/vlxlUpZNgZBHflnzi2xP3kl0WhIo8FGR5aIwcfuYruJasV?= =?us-ascii?Q?xDkcKSkpCoB2dvwZIOXta3mT0OuDSwmK0UhzIXJTE1mWAvAAJAUBmrJlIv75?= =?us-ascii?Q?Y2Gc/Wif7x/XfHrgy6fYmtRUrKuhEEIYmNSl51teNxY00bJe9XnGZTIOqN/q?= =?us-ascii?Q?jmODioLbnD7JGlMQtmyq2oTz0cNtQoKGpgCB1/CejIuGIeLz11Iz7TyomzXQ?= =?us-ascii?Q?3m9OcFrt3CBBA0u2S3c143QkNHzm9TnCWamvex86tzWz4fWH281eulneQYkS?= =?us-ascii?Q?F4tS8tV4xIoZyaveMBk9HE=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB2281; 6:laQ+eiMWLlJqdL8yEx8cZY6lUZUIl1G0zs9llLaAOS?= =?us-ascii?Q?tFlhUBeCf8sv+FRKcrKFyUgIl83JFP+bLHjxWXenVd2ewkpxUxKoZz5sf5yp?= =?us-ascii?Q?ghULz2g54pakg1E20EYkdfiBc2uCNIoRh2Csm9J33XwhJ1Jhap0rtZHGvS9S?= =?us-ascii?Q?t2lai+RrF13wOhxUTnuw5LkbMJkhBGvEUDKyFJF/mc2YUdJXMwrEOZHvgdSc?= =?us-ascii?Q?KsTTSyNzRjZv4CcaocbDVE9nI1BBXVWtdkocEAu4KOfnJNL9d0X3XAmPy/+l?= =?us-ascii?Q?HS+Ji/toDYVEsFpmmylqMq6XQssMEB/ng9exshO6Y7K0cLsdtujdxe9A3Qox?= =?us-ascii?Q?HxJfxUvHiNVWzwEkCPgtW5FJhcSdvh0crNld0ZW7bRXgY4yepqdypNPCm6tv?= =?us-ascii?Q?XxA7tw1Afs32rryqY8KNn27yzfGKMnme0EiypLprZV4mUh2brAZgOJtkC+t2?= =?us-ascii?Q?Spdkcq0N/EkBxhax3ljInOhMzZ5FSQ4Zj3SV3H9bdO7ffdpE2FHTPGlllnEz?= =?us-ascii?Q?AAx944Ad9GMVp/C+K8mbDaTiBIgnMhY7z/tLz/Dbvw05wsQg7F/2wHRcUile?= =?us-ascii?Q?jNwrZaZ/Q/LwZyPY8uGwGBzhxc87IObFdDwZ9UGtS0j47bOrtvdwdHoqO0qL?= =?us-ascii?Q?G+uViIbL3EcAPuanMNbNY5KM7x1o1kG6mV51eFsq0o34KZW0JmVdfGJb2QDl?= =?us-ascii?Q?95W1tbunmigTU1X43GhgkVhu+NB6WXlmzo1Bqz1Uj/seb2nuhE+gXzPtCKI1?= =?us-ascii?Q?/i1qXE5TBKkLQMgXR31bjEYdhiHkj/1KiCSs6zWxVdch97lHcNXetc+5Fkwz?= =?us-ascii?Q?6cVcZDSNv+YEXK/u2SbtqzC77dk2iX/9s5frxeCHWUVd1Ktr0UocugkMYbpM?= =?us-ascii?Q?Ap/u0e8czYGdJfXaVItT1H0xaGH07QVrfVnnQ89PlsUZk2J5KStIqGLfXBs+?= =?us-ascii?Q?GDZ6B9+kxPKIxACVKBWANlet5TTfBgqb+3QBWUAMCFX68pHR98LrRO8GIE4y?= =?us-ascii?Q?I=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 5:9bJujw52pVrqp0nIx1Waz9+jAq71JFjhQfkYbyBFvz+IfGxsF8T+lffJ2PiU6ersWdOZdz4JYhm3wz63rvMCimaHxP51Tj5M+h7lUBRC+Nia7qVH+0cyT31OApiaQQZtduct+V3x0tuQbGqFOzoaiSalbQuRfYCMAim4f89o20zm6GKtzFYb/Ry41E+NdzQZeSiHdm1q3jVObDfus5zj8qnDn8gMfGCUjfu2Ap8ORfPq+M/sn09nERo3R0P+xefJksnlo7+IUVKlcB1dkvQ4vQI6jZ+e1yNADms0DK9QcyIJmXgqV6a8Fk9FixirEs0AAKs6RVAzhLXTALuzoVsvEmKvGRJ+ClJ4J7rFDZY0Xv4Wgd8vU6cty2BywC3bVapX/vmTqK/lPiMIS0Vla6GsJXUGlwSD9eEvY6UQUT3SMEquSF34b8BodJX0MaVfXi/JnYl8Ic9ecH9wcu3Mqzbn6bElpRZkQTOIVisMUrXdkRmM2pQd0LKE1fuqHWBvZjZA; 24:g7F7dxNIQsmSrF8bmOh2EsfqX+wWWZ4/Ye78wwXfXIiYrkulEc45b5elGSV/n6OsdqZGmvkCk2dP0/G22tmxDqoofDD1psTFcPp6ymMRZV4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 7:s++h4NrrYjpIZIna1n57NLE2zhKKT2mQdqdGDYVD7ws1YRao0YoZ9D9pBQ8GzOyCSkOjwGBfdD5WAzYh4w6buXcIqD3qHf6rt7lbZ9OuLWUEQI6clnqkFQFZOJJNorw7k4dpDrcdWwPd2mTjghK+vgpju0YUYqKYCk9mt7S+Nlxj6XK0wZdRlC16jJYbHu5PQwFkBPNrxIhdpYt4mZ9SY1kBbVupc9s3lA8DGGQdCuW97X/RyB5ZqSCtfwrPQaIi2zdWPIyfHONzRDYVcw41h3fC2aZsRA8CIEt4SAyfU4Ccfx/sXCO4K5Vr49r2MiIlwanJbLkHU6Us+cEedg8luQQfWbg+1auZcqeCrWMR9fHiBUdiy0qg8TjeVCjOtHLqatBfscxK3DTM8cSxKXSRJ3588eyOHXF75orLqlpOlk3MIgTehpYxM7PpL6b6VR5WjT6Asl+u0qCQY0K863Um9qz1GpOZWdI7vRFrx9ZEcGcHsncf+syOq5K3UDsnEmwgKRzfZci8cg3gam8BtpFbe1c5Cwi3t6FjHWievwMMhsb/85uFfulQwb8edKg/7e3R31s25G7911cvUd7DEcXlQi4u9y9/hBh7Kk+Vt/o0navwSqTWMlvGJtuRNzgmmuwEYmh3qJm8j9xR5ltlaMa3q4wmasFQ7KlubFeSc4CbvrEWfqYCSegvCgJljfWBnat5kB5TCLA1mznXKQYp70znrW0egIm0Onzsl/Q+h9ZYiOv45j3ufpG+FDBerVjzBh9Z7CMZH1kL9DFSZl4JvYQIUnYIBilrzZW8K6kHgFQlds0= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2281; 20:fbIJdw/753+9DPPVBIlVJWjpTDhHkCvDMLWF/zF5Ktw5dTstNdTmB1VOJYgN1x0o3lZYw4fkVtn51QZjzFgF8lKtBYeh+poKg6KhOuoPjQ8wPbyooFqXsY+17DhV+1hOq9SOA3gM2ZTYPVmDG+8mv4RrE1+mkkesAWwKUcAp17I= X-OriginatorOrg: ksu.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 19:37:59.0544 (UTC) X-MS-Exchange-CrossTenant-Id: d9a2fa71-d67d-4cb6-b541-06ccaa8013fb X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d9a2fa71-d67d-4cb6-b541-06ccaa8013fb; Ip=[129.130.18.151]; Helo=[ome-vm-smtp2.campus.ksu.edu] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2281 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:38:02 -0000 Hi, This broke my setup that builds my 7 different kernels due to duplicate target errors. This seems to do what I want: https://files.kyle- evans.net/freebsd/fix-packages.diff =) Thanks, Kyle Evans On Fri, Jun 23, 2017 at 1:26 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Fri Jun 23 18:26:57 2017 > New Revision: 320284 > URL: https://svnweb.freebsd.org/changeset/base/320284 > > Log: > packages: Parallelize individual kernel packaging. > > MFC after: 2 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > ============================================================ > ================== > --- head/Makefile.inc1 Fri Jun 23 18:26:54 2017 (r320283) > +++ head/Makefile.inc1 Fri Jun 23 18:26:57 2017 (r320284) > @@ -1599,9 +1599,12 @@ create-world-package-${pkgname}: .PHONY > -o ${REPODIR}/$$(${PKG_CMD} -o > ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} > .endfor > > -create-kernel-packages: _pkgbootstrap .PHONY > +create-kernel-packages: .PHONY > +_default_flavor= -default > .if exists(${KSTAGEDIR}/kernel.meta) > .for flavor in "" -debug > +create-kernel-packages: create-kernel-packages-flavor$ > {flavor:C,^""$,${_default_flavor},} > +create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: > _pkgbootstrap .PHONY > @cd ${KSTAGEDIR}/${DISTDIR} ; \ > awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ > -v kernel=yes -v _kernconf=${INSTALLKERNEL} \ > @@ -1631,6 +1634,8 @@ create-kernel-packages: _pkgbootstrap .PHONY > .for _kernel in ${BUILDKERNELS:[2..-1]} > .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta) > .for flavor in "" -debug > +create-kernel-packages: create-kernel-packages-extra-f > lavor${flavor:C,^""$,${_default_flavor},} > +create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}: > _pkgbootstrap .PHONY > @cd ${KSTAGEDIR}/kernel.${_kernel} ; \ > awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ > -v kernel=yes -v _kernconf=${_kernel} \ > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Mon Jun 26 19:40:12 2017 Return-Path: Delivered-To: svn-src-all@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 2E305D8FFBD; Mon, 26 Jun 2017 19:40:12 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 ED9942545; Mon, 26 Jun 2017 19:40:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QJeBw2073990; Mon, 26 Jun 2017 19:40:11 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QJeAXh073987; Mon, 26 Jun 2017 19:40:10 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706261940.v5QJeAXh073987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 26 Jun 2017 19:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r320371 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:40:12 -0000 Author: davidcs Date: Mon Jun 26 19:40:10 2017 New Revision: 320371 URL: https://svnweb.freebsd.org/changeset/base/320371 Log: MFC r320175 Add pkts_cnt_oversized to stats. Modified: stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_hw.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 19:36:24 2017 (r320370) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Mon Jun 26 19:40:10 2017 (r320371) @@ -1554,6 +1554,8 @@ qla_rcv_stats(qla_host_t *ha, q80_rcv_stats_t *rstat) rstat->lro_flows_active); device_printf(dev, "%s: pkts_droped_unknown\t\t%" PRIu64 "\n", __func__, rstat->pkts_droped_unknown); + device_printf(dev, "%s: pkts_cnt_oversized\t\t%" PRIu64 "\n", + __func__, rstat->pkts_cnt_oversized); } static void Modified: stable/9/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 19:36:24 2017 (r320370) +++ stable/9/sys/dev/qlxgbe/ql_hw.h Mon Jun 26 19:40:10 2017 (r320371) @@ -748,6 +748,7 @@ typedef struct _q80_rcv_stats { uint64_t lro_flows_deleted; uint64_t lro_flows_active; uint64_t pkts_droped_unknown; + uint64_t pkts_cnt_oversized; } __packed q80_rcv_stats_t; typedef struct _q80_xmt_stats { From owner-svn-src-all@freebsd.org Mon Jun 26 19:41:16 2017 Return-Path: Delivered-To: svn-src-all@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 130B5D90049; Mon, 26 Jun 2017 19:41:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D24922BB3; Mon, 26 Jun 2017 19:41:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QJfELw076899; Mon, 26 Jun 2017 19:41:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QJfEP8076898; Mon, 26 Jun 2017 19:41:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706261941.v5QJfEP8076898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 26 Jun 2017 19:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320372 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:41:16 -0000 Author: markj Date: Mon Jun 26 19:41:14 2017 New Revision: 320372 URL: https://svnweb.freebsd.org/changeset/base/320372 Log: Fix a memory leak in ses_get_elm_devnames(). After r307132 the sbuf buffer is malloc()ed, but corresponding sbuf_delete() call was missing. Fix a nearby whitespace bug. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Mon Jun 26 19:40:10 2017 (r320371) +++ head/sys/cam/scsi/scsi_enc_ses.c Mon Jun 26 19:41:14 2017 (r320372) @@ -2684,10 +2684,11 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devn cam_periph_unlock(enc->periph); sbuf_new(&sb, NULL, len, SBUF_FIXEDLEN); ses_paths_iter(enc, &enc->enc_cache.elm_map[elmdn->elm_idx], - ses_elmdevname_callback, &sb); + ses_elmdevname_callback, &sb); sbuf_finish(&sb); elmdn->elm_names_len = sbuf_len(&sb); copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1); + sbuf_delete(&sb); cam_periph_lock(enc->periph); return (elmdn->elm_names_len > 0 ? 0 : ENODEV); } From owner-svn-src-all@freebsd.org Mon Jun 26 19:41:18 2017 Return-Path: Delivered-To: svn-src-all@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 DD9BAD90054; Mon, 26 Jun 2017 19:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B87B12BEE; Mon, 26 Jun 2017 19:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2F19010AF01; Mon, 26 Jun 2017 15:41:17 -0400 (EDT) Subject: Re: svn commit: r320279 - head/usr.bin/truss To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706231806.v5NI6kh4052293@repo.freebsd.org> From: John Baldwin Message-ID: <6d940202-48a1-1c1f-ae36-d9c61def9560@FreeBSD.org> Date: Mon, 26 Jun 2017 15:41:16 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706231806.v5NI6kh4052293@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 26 Jun 2017 15:41:17 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 19:41:19 -0000 On 6/23/17 2:06 PM, Warner Losh wrote: > Author: imp > Date: Fri Jun 23 18:06:46 2017 > New Revision: 320279 > URL: https://svnweb.freebsd.org/changeset/base/320279 > > Log: > Decode FreeBSD 11 compat stat, fstat and lstat calls. > > Modified: > head/usr.bin/truss/syscall.h > head/usr.bin/truss/syscalls.c > > Modified: head/usr.bin/truss/syscall.h > ============================================================================== > --- head/usr.bin/truss/syscall.h Fri Jun 23 18:06:20 2017 (r320278) > +++ head/usr.bin/truss/syscall.h Fri Jun 23 18:06:46 2017 (r320279) > @@ -10,6 +10,7 @@ > * BinString -- pointer to an array of chars, printed via strvisx(). > * Ptr -- pointer to some unspecified structure. Just print as hex for now. > * Stat -- a pointer to a stat buffer. Prints a couple fields. > + * Stat11 -- a pointer to a freebsd 11 stat buffer. Prints a couple fields. > * StatFs -- a pointer to a statfs buffer. Prints a few fields. > * Ioctl -- an ioctl command. Woefully limited. > * Quad -- a double-word value. e.g., lseek(int, offset_t, int) > @@ -38,7 +39,7 @@ > * $FreeBSD$ > */ > > -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl, > +enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Stat11, Ioctl, > Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, > Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, > Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, > > Modified: head/usr.bin/truss/syscalls.c > ============================================================================== > --- head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:20 2017 (r320278) > +++ head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:46 2017 (r320279) > @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#define _WANT_FREEBSD11_STAT > #include > #include > #include > @@ -215,6 +216,14 @@ static struct syscall decoded_syscalls[] = { > .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, > { .name = "flock", .ret_type = 1, .nargs = 2, > .args = { { Int, 0 }, { Flockop, 1 } } }, > + { .name = "compat11.fstat", .ret_type = 1, .nargs = 2, > + .args = { { Int, 0 }, { Stat11 | OUT, 1 } } }, > + { .name = "compat11.lstat", .ret_type = 1, .nargs = 2, > + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, > + { .name = "compat11.stat", .ret_type = 1, .nargs = 2, > + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, > + { .name = "compat11.stat", .ret_type = 1, .nargs = 2, > + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, This list is sorted alphabetically by system call name, and compat11.stat is listed twice. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 26 20:17:49 2017 Return-Path: Delivered-To: svn-src-all@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 75326D90A25; Mon, 26 Jun 2017 20:17:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 461643F35; Mon, 26 Jun 2017 20:17:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKHmeH090581; Mon, 26 Jun 2017 20:17:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKHmhM090580; Mon, 26 Jun 2017 20:17:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706262017.v5QKHmhM090580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 26 Jun 2017 20:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320373 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:17:49 -0000 Author: gjb Date: Mon Jun 26 20:17:48 2017 New Revision: 320373 URL: https://svnweb.freebsd.org/changeset/base/320373 Log: Revert r319603, r319608, and r319609. Creating a hard link to the dtb file for the cubieboard2 is no longer needed in 12-CURRENT. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/CUBIEBOARD2.conf Modified: head/release/arm/CUBIEBOARD2.conf ============================================================================== --- head/release/arm/CUBIEBOARD2.conf Mon Jun 26 19:41:14 2017 (r320372) +++ head/release/arm/CUBIEBOARD2.conf Mon Jun 26 20:17:48 2017 (r320373) @@ -30,8 +30,6 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/cubieboard2.dtb \ - ${UFSMOUNT}/boot/dtb/sun7i-a20-cubieboard2.dtb chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:02 2017 Return-Path: Delivered-To: svn-src-all@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 945D0D91219; Mon, 26 Jun 2017 20:33:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4ADE564C35; Mon, 26 Jun 2017 20:33:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKX1xB098726; Mon, 26 Jun 2017 20:33:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKX1u6098725; Mon, 26 Jun 2017 20:33:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKX1u6098725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320375 - vendor/llvm/llvm-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:02 -0000 Author: dim Date: Mon Jun 26 20:33:01 2017 New Revision: 320375 URL: https://svnweb.freebsd.org/changeset/base/320375 Log: Tag llvm trunk r306325. Added: vendor/llvm/llvm-trunk-r306325/ - copied from r320374, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 20:32:57 2017 Return-Path: Delivered-To: svn-src-all@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 00B71D911B0; Mon, 26 Jun 2017 20:32:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 375A364C01; Mon, 26 Jun 2017 20:32:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKWthN098657; Mon, 26 Jun 2017 20:32:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKWrTp098634; Mon, 26 Jun 2017 20:32:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262032.v5QKWrTp098634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320374 - in vendor/llvm/dist: . cmake/modules docs docs/Proposals examples/Kaleidoscope/BuildingAJIT/Chapter1 examples/Kaleidoscope/BuildingAJIT/Chapter2 examples/Kaleidoscope/Building... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:32:57 -0000 Author: dim Date: Mon Jun 26 20:32:52 2017 New Revision: 320374 URL: https://svnweb.freebsd.org/changeset/base/320374 Log: Vendor import of llvm trunk r306325: https://llvm.org/svn/llvm-project/llvm/trunk@306325 Added: vendor/llvm/dist/include/llvm/CodeGen/MacroFusion.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeName.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/Solaris/ vendor/llvm/dist/include/llvm/Support/Solaris/sys/ vendor/llvm/dist/include/llvm/Support/Solaris/sys/regset.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/MacroFusion.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeName.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCWinCOFFStreamer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64CondBrTuning.cpp (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMMacroFusion.cpp (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMMacroFusion.h (contents, props changed) vendor/llvm/dist/test/Analysis/BasicAA/fallback-mayalias.ll vendor/llvm/dist/test/Analysis/CostModel/X86/interleaved-load-i8.ll vendor/llvm/dist/test/Analysis/CostModel/X86/interleaved-store-i8.ll vendor/llvm/dist/test/CodeGen/AArch64/atomic-ops-lse.ll vendor/llvm/dist/test/CodeGen/AArch64/cond-br-tuning.ll vendor/llvm/dist/test/CodeGen/AArch64/mergestores_noimplicitfloat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir vendor/llvm/dist/test/CodeGen/AMDGPU/callee-frame-setup.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-cond-add-sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fold-operands-order.mir vendor/llvm/dist/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.hsa.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.load.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/opt-sgpr-to-vgpr-copy.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-gfx9.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-vop2-64bit.mir vendor/llvm/dist/test/CodeGen/AMDGPU/shrink-carry.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select-cmp.mir vendor/llvm/dist/test/CodeGen/ARM/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/ARM/v6m-umul-with-overflow.ll vendor/llvm/dist/test/CodeGen/Hexagon/duplex-addi-global-imm.mir vendor/llvm/dist/test/CodeGen/Hexagon/expand-condsets-imm.mir vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill1.mir vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill3.mir vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump-kill.ll vendor/llvm/dist/test/CodeGen/Hexagon/stack-align-reset.ll vendor/llvm/dist/test/CodeGen/Hexagon/store-imm-large-stack.ll vendor/llvm/dist/test/CodeGen/Hexagon/vec-vararg-align.ll vendor/llvm/dist/test/CodeGen/MSP430/struct_layout.ll vendor/llvm/dist/test/CodeGen/PowerPC/licm-remat.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcpy_dereferenceable.ll vendor/llvm/dist/test/CodeGen/SPARC/constructor.ll vendor/llvm/dist/test/CodeGen/SystemZ/frame-21.ll vendor/llvm/dist/test/CodeGen/SystemZ/int-cmp-54.ll vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-neon-deprecated.mir vendor/llvm/dist/test/CodeGen/WebAssembly/offset-fastisel.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-insert-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-insert-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-extract-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-extract-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-insert-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-insert-vec512.mir vendor/llvm/dist/test/CodeGen/X86/avx512-vec3-crash.ll vendor/llvm/dist/test/CodeGen/X86/combine-pmuldq.ll vendor/llvm/dist/test/CodeGen/X86/merge-consecutive-stores.ll vendor/llvm/dist/test/CodeGen/X86/non-value-mem-operand.mir vendor/llvm/dist/test/CodeGen/X86/pr15705.ll vendor/llvm/dist/test/CodeGen/X86/pr15981.ll vendor/llvm/dist/test/CodeGen/X86/pr33396.ll vendor/llvm/dist/test/CodeGen/X86/sbb.ll vendor/llvm/dist/test/CodeGen/X86/stack-probe-red-zone.ll vendor/llvm/dist/test/CodeGen/X86/stack-probes.ll vendor/llvm/dist/test/DebugInfo/MIR/AArch64/implicit-def-dead-scope.mir vendor/llvm/dist/test/DebugInfo/PDB/dbi-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/module-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/tpi-bytes.test vendor/llvm/dist/test/DebugInfo/X86/partial-constant.ll vendor/llvm/dist/test/MC/AMDGPU/flat-global.s (contents, props changed) vendor/llvm/dist/test/MC/AMDGPU/mtbuf.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-beq-fixup.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/cross-section-relative-err.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/secrel32-undef.s (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/AMDGPU/gfx9_dasm_all.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/AMDGPU/mtbuf_vi.txt (contents, props changed) vendor/llvm/dist/test/MC/Hexagon/duplex-addi-global-imm.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-rdata.s (contents, props changed) vendor/llvm/dist/test/MC/WebAssembly/stack-ptr.ll vendor/llvm/dist/test/ObjectYAML/wasm/weak_symbols.yaml vendor/llvm/dist/test/Transforms/GVN/PRE/phi-translate-2.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/huge_muls.ll vendor/llvm/dist/test/Transforms/Inline/inline-probe-stack.ll vendor/llvm/dist/test/Transforms/Inline/inline-stack-probe-size.ll vendor/llvm/dist/test/Transforms/InstCombine/compare-3way.ll vendor/llvm/dist/test/Transforms/InstCombine/early_constfold_changes_IR.ll vendor/llvm/dist/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll vendor/llvm/dist/test/Transforms/InstCombine/pr33453.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/X86/interleavedStore.ll vendor/llvm/dist/test/Transforms/LICM/strlen.ll vendor/llvm/dist/test/Transforms/LoopRotate/catchret.ll (contents, props changed) vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/bin_power.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AMDGPU/packed-math.ll vendor/llvm/dist/test/Transforms/LoopVectorize/tripcount.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33461.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo_exit_merge.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo_mexits.ll vendor/llvm/dist/test/Transforms/PGOProfile/memop_size_from_strlen.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AMDGPU/packed-math.ll vendor/llvm/dist/test/Transforms/SROA/non-integral-pointers.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify_buckets.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/Inputs/Strip-ST.dylib.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/dyldinfo.test vendor/llvm/dist/test/tools/llvm-nm/wasm/weak-symbols.yaml vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/kextbundle.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/macho-kextbundle.test vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/kextbundle.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-disassembly-kextbundle.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-data-end.exe (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-x64.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-x86.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/coff-load-config.test vendor/llvm/dist/test/tools/obj2yaml/ vendor/llvm/dist/test/tools/obj2yaml/invalid_input_file.test vendor/llvm/dist/tools/llvm-pdbutil/BytesOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/BytesOutputStyle.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.h (contents, props changed) vendor/llvm/dist/unittests/Analysis/AliasSetTrackerTest.cpp (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h vendor/llvm/dist/include/llvm/Support/Solaris.h vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabaseVisitor.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill.mir vendor/llvm/dist/test/CodeGen/SystemZ/serialize-01.ll vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-neon.ll vendor/llvm/dist/test/CodeGen/X86/2012-12-06-python27-miscompile.ll vendor/llvm/dist/test/MC/COFF/secidx-diagnostic.s vendor/llvm/dist/test/Transforms/LoadCombine/deadcode.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-aa.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-assume.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-negativegep.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AMDGPU/simplebb.ll vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.h vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.cpp vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.h vendor/llvm/dist/tools/llvm-pdbutil/RawOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbutil/RawOutputStyle.h Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/TableGen.cmake vendor/llvm/dist/docs/AMDGPUUsage.rst vendor/llvm/dist/docs/GetElementPtr.rst vendor/llvm/dist/docs/GoldPlugin.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst vendor/llvm/dist/docs/XRay.rst vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h vendor/llvm/dist/include/llvm-c/OrcBindings.h vendor/llvm/dist/include/llvm/ADT/APFloat.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h vendor/llvm/dist/include/llvm/Analysis/Loads.h vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/BinaryFormat/COFF.h vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.h vendor/llvm/dist/include/llvm/BinaryFormat/MachO.h vendor/llvm/dist/include/llvm/BinaryFormat/Wasm.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/InstructionSelector.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Legalizer.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Utils.h vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfoImpls.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/EnumTables.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableCollection.h vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MSFBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MSFCommon.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MappedBlockStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIASession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/InfoStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBFile.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h vendor/llvm/dist/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h vendor/llvm/dist/include/llvm/DebugInfo/Symbolize/Symbolize.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/GenericValue.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITEventListener.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITSymbol.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/LambdaResolver.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcABISupport.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/Attributes.td vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/ConstantRange.h vendor/llvm/dist/include/llvm/IR/DerivedUser.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist/include/llvm/IR/IntrinsicsX86.td vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCFragment.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSymbolWasm.h vendor/llvm/dist/include/llvm/MC/MCValue.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFObjectWriter.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/IRSymtab.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/Object/WindowsResource.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/Option/OptParser.td vendor/llvm/dist/include/llvm/Option/OptTable.h vendor/llvm/dist/include/llvm/Option/Option.h vendor/llvm/dist/include/llvm/ProfileData/Coverage/CoverageMapping.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfReader.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfWriter.h vendor/llvm/dist/include/llvm/ProfileData/SampleProf.h vendor/llvm/dist/include/llvm/ProfileData/SampleProfReader.h vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h vendor/llvm/dist/include/llvm/Support/BinaryStreamRef.h vendor/llvm/dist/include/llvm/Support/CachePruning.h vendor/llvm/dist/include/llvm/Support/DataExtractor.h vendor/llvm/dist/include/llvm/Support/Errno.h vendor/llvm/dist/include/llvm/Support/Error.h vendor/llvm/dist/include/llvm/Support/GCOV.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/Host.h vendor/llvm/dist/include/llvm/Support/Path.h vendor/llvm/dist/include/llvm/Support/TargetRegistry.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/TableGen/Main.h vendor/llvm/dist/include/llvm/Target/GenericOpcodes.td vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.def vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Testing/Support/Error.h vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/include/llvm/Transforms/InstrProfiling.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVN.h vendor/llvm/dist/include/llvm/Transforms/Scalar/Reassociate.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/OrderedInstructions.h vendor/llvm/dist/include/llvm/Transforms/Vectorize/LoopVectorize.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/AssumptionCache.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CFLSteensAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/DemandedBits.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/BinaryFormat/Magic.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelector.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Legalizer.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerInfo.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Utils.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.h vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfoImpls.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/RegisterUsageInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/TargetSubtargetInfo.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MSFBuilder.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MSFCommon.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MappedBlockStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIASession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/InfoStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeSession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFile.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcCBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcCBindingsStack.h vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/IR/AsmWriter.cpp vendor/llvm/dist/lib/IR/AttributeImpl.h vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/AutoUpgrade.cpp vendor/llvm/dist/lib/IR/BasicBlock.cpp vendor/llvm/dist/lib/IR/ConstantRange.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Statepoint.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCFragment.cpp vendor/llvm/dist/lib/MC/MCSection.cpp vendor/llvm/dist/lib/MC/MCWasmStreamer.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/IRSymtab.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/Option/OptTable.cpp vendor/llvm/dist/lib/Option/Option.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMappingReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/ProfileData/InstrProfReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProfWriter.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp vendor/llvm/dist/lib/Support/CachePruning.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/DataExtractor.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/Host.inc vendor/llvm/dist/lib/Support/Unix/Memory.inc vendor/llvm/dist/lib/Support/Unix/Program.inc vendor/llvm/dist/lib/Support/Windows/Host.inc vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/Support/YAMLTraits.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64.h vendor/llvm/dist/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrAtomics.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MacroFusion.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MacroFusion.h vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SchedA57.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorDetails.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedKryoDetails.td vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/CMakeLists.txt vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/BUFInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h vendor/llvm/dist/lib/Target/AMDGPU/FLATInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/AMDGPU/Processors.td vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIDefines.h vendor/llvm/dist/lib/Target/AMDGPU/SIFixSGPRCopies.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIShrinkInstructions.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP2Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPCInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPInstructions.td vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonExpandCondsets.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonGenMux.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonNewValueJump.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPeephole.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp vendor/llvm/dist/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h vendor/llvm/dist/lib/Target/Mips/Mips32r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.h vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZFrameLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZMachineScheduler.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMachineScheduler.h vendor/llvm/dist/lib/Target/SystemZ/SystemZOperators.td vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFastISel.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86InterleavedAccess.cpp vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MacroFusion.cpp vendor/llvm/dist/lib/Target/X86/X86MacroFusion.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.h vendor/llvm/dist/lib/Testing/Support/LLVMBuild.txt vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LibDriver.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/IPO/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PGOInstrumentation.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll vendor/llvm/dist/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll vendor/llvm/dist/test/Analysis/BasicAA/bug.23540.ll vendor/llvm/dist/test/Analysis/BasicAA/bug.23626.ll vendor/llvm/dist/test/Analysis/BasicAA/constant-over-index.ll vendor/llvm/dist/test/Analysis/BasicAA/q.bad.ll vendor/llvm/dist/test/Analysis/BasicAA/returned.ll vendor/llvm/dist/test/Analysis/BasicAA/sequential-gep.ll vendor/llvm/dist/test/Analysis/BasicAA/struct-geps.ll vendor/llvm/dist/test/Analysis/BasicAA/zext.ll vendor/llvm/dist/test/Analysis/CostModel/X86/arith.ll vendor/llvm/dist/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/no-regclass.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-bitcast.mir vendor/llvm/dist/test/CodeGen/AArch64/arm64-early-ifcvt.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-neon-copy.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-shrink-v1i64.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-shrink-wrapping.ll vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir vendor/llvm/dist/test/CodeGen/AArch64/misched-fusion.ll vendor/llvm/dist/test/CodeGen/AArch64/reg-scavenge-frame.mir vendor/llvm/dist/test/CodeGen/AArch64/stack-guard-remat-bitcast.ll vendor/llvm/dist/test/CodeGen/AArch64/swiftself-scavenger.ll vendor/llvm/dist/test/CodeGen/AArch64/tbz-tbnz.ll vendor/llvm/dist/test/CodeGen/AArch64/thread-pointer.ll vendor/llvm/dist/test/CodeGen/AArch64/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/AArch64/xray-tail-call-sled.ll vendor/llvm/dist/test/CodeGen/AMDGPU/attr-amdgpu-num-sgpr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-relaxation.ll vendor/llvm/dist/test/CodeGen/AMDGPU/code-object-metadata-kernel-debug-props.ll vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fpext.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/frame-index-elimination.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.qsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.rint.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-store-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-store-usedef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mubuf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scheduler-subrange-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-scalar-ops.mir vendor/llvm/dist/test/CodeGen/AMDGPU/si-triv-disjoint-mem-access.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-m0.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/ARM/2012-08-30-select.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-isel.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir vendor/llvm/dist/test/CodeGen/ARM/alloca-align.ll vendor/llvm/dist/test/CodeGen/ARM/constantfp.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-big-stack-frame.ll vendor/llvm/dist/test/CodeGen/ARM/fpoffset_overflow.mir vendor/llvm/dist/test/CodeGen/ARM/vector-promotion.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/Generic/llc-start-stop.ll vendor/llvm/dist/test/CodeGen/Generic/print-machineinstrs.ll vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill2.mir vendor/llvm/dist/test/CodeGen/MSP430/Inst16mm.ll vendor/llvm/dist/test/CodeGen/Mips/dins.ll vendor/llvm/dist/test/CodeGen/Mips/emergency-spill-slot-near-fp.ll vendor/llvm/dist/test/CodeGen/Mips/longbranch.ll vendor/llvm/dist/test/CodeGen/Mips/msa/3r_splat.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-12-saveCR.ll vendor/llvm/dist/test/CodeGen/PowerPC/complex-return.ll vendor/llvm/dist/test/CodeGen/PowerPC/dyn-alloca-aligned.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/scavenging.mir vendor/llvm/dist/test/CodeGen/PowerPC/vsx-spill.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx.ll vendor/llvm/dist/test/CodeGen/SystemZ/trap-02.ll vendor/llvm/dist/test/CodeGen/Thumb/large-stack.ll vendor/llvm/dist/test/CodeGen/WebAssembly/byval.ll vendor/llvm/dist/test/CodeGen/WebAssembly/reg-stackify.ll vendor/llvm/dist/test/CodeGen/WebAssembly/stack-alignment.ll vendor/llvm/dist/test/CodeGen/WebAssembly/userstack.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-11-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/callingconv.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar-x32.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar.mir vendor/llvm/dist/test/CodeGen/X86/MergeConsecutiveStores.ll vendor/llvm/dist/test/CodeGen/X86/atom-fixup-lea3.ll vendor/llvm/dist/test/CodeGen/X86/avg.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/avx-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx-vperm2x128.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx2-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vbroadcast.ll vendor/llvm/dist/test/CodeGen/X86/avx512-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512-round.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-logic.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-i256.ll vendor/llvm/dist/test/CodeGen/X86/clear_upper_vector_element_bits.ll vendor/llvm/dist/test/CodeGen/X86/constructor.ll vendor/llvm/dist/test/CodeGen/X86/extract-store.ll vendor/llvm/dist/test/CodeGen/X86/full-lsr.ll vendor/llvm/dist/test/CodeGen/X86/hoist-spill.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-checks.mir vendor/llvm/dist/test/CodeGen/X86/insertelement-zero.ll vendor/llvm/dist/test/CodeGen/X86/insertps-combine.ll vendor/llvm/dist/test/CodeGen/X86/jump_sign.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/machine-cse.ll vendor/llvm/dist/test/CodeGen/X86/madd.ll vendor/llvm/dist/test/CodeGen/X86/masked-iv-safe.ll vendor/llvm/dist/test/CodeGen/X86/masked_gather_scatter.ll vendor/llvm/dist/test/CodeGen/X86/memcmp.ll vendor/llvm/dist/test/CodeGen/X86/scavenger.mir vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/shuffle-vs-trunc-128.ll vendor/llvm/dist/test/CodeGen/X86/shuffle-vs-trunc-256.ll vendor/llvm/dist/test/CodeGen/X86/splat-for-size.ll vendor/llvm/dist/test/CodeGen/X86/sse-scalar-fp-arith.ll vendor/llvm/dist/test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/sse2.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/vec_ctbits.ll vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll vendor/llvm/dist/test/CodeGen/X86/vector-interleave.ll vendor/llvm/dist/test/CodeGen/X86/vector-merge-store-fp-constants.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v2.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v32.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-masked.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-sse1.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v1.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v48.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-zmov.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-3.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-4.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-5.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-6.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-3.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-4.ll vendor/llvm/dist/test/CodeGen/X86/widen_conv-1.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/CodeGen/X86/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/X86/xray-custom-log.ll vendor/llvm/dist/test/CodeGen/X86/xray-log-args.ll vendor/llvm/dist/test/CodeGen/X86/xray-tail-call-sled.ll vendor/llvm/dist/test/DebugInfo/COFF/globals.ll vendor/llvm/dist/test/DebugInfo/Generic/sugared-constants.ll vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.s vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.x86_64.o vendor/llvm/dist/test/DebugInfo/MIR/X86/bit-piece-dh.mir vendor/llvm/dist/test/DebugInfo/PDB/pdb-yaml-symbols.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergeids.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-blocks.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-stream.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-readwrite.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-types.test vendor/llvm/dist/test/DebugInfo/X86/dbg-merge-loc-entry.ll vendor/llvm/dist/test/DebugInfo/X86/inlined-formal-parameter.ll vendor/llvm/dist/test/DebugInfo/X86/parameters.ll vendor/llvm/dist/test/DebugInfo/X86/pieces-3.ll vendor/llvm/dist/test/DebugInfo/X86/reference-argument.ll vendor/llvm/dist/test/DebugInfo/X86/this-stack_value.ll vendor/llvm/dist/test/DebugInfo/dwarfdump-str-offsets.test vendor/llvm/dist/test/MC/AArch64/label-arithmetic-diags-darwin.s vendor/llvm/dist/test/MC/AMDGPU/gfx7_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/gfx8_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/gfx9_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/regression/bug28168.s vendor/llvm/dist/test/MC/AMDGPU/vop3-errs.s vendor/llvm/dist/test/MC/AMDGPU/vop3.s vendor/llvm/dist/test/MC/ARM/basic-thumb2-instructions.s vendor/llvm/dist/test/MC/ARM/elf-movt.s vendor/llvm/dist/test/MC/ARM/thumb-branches.s vendor/llvm/dist/test/MC/AsmParser/negativ_altmacro_expression.s vendor/llvm/dist/test/MC/COFF/bad-expr.s vendor/llvm/dist/test/MC/COFF/cross-section-relative.s vendor/llvm/dist/test/MC/COFF/diff.s vendor/llvm/dist/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt vendor/llvm/dist/test/MC/ELF/bad-expr.s vendor/llvm/dist/test/MC/ELF/bad-expr2.s vendor/llvm/dist/test/MC/Mips/mips-register-names-o32.s vendor/llvm/dist/test/MC/Mips/mips32r6/valid.s vendor/llvm/dist/test/MC/Mips/mips64-register-names-n32-n64.s vendor/llvm/dist/test/MC/Mips/mips64-register-names-o32.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/WebAssembly/func-address.ll vendor/llvm/dist/test/MC/X86/macho-reloc-errors-x86_64.s vendor/llvm/dist/test/Object/obj2yaml.test vendor/llvm/dist/test/ObjectYAML/wasm/header_invalid_version.yaml vendor/llvm/dist/test/TableGen/GlobalISelEmitter.td vendor/llvm/dist/test/Transforms/CodeGenPrepare/X86/memcmp.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-gep-load.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-load.ll vendor/llvm/dist/test/Transforms/InferFunctionAttrs/annotate.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/switch.ll vendor/llvm/dist/test/Transforms/InstCombine/add.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-not.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-bigendian.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast.ll vendor/llvm/dist/test/Transforms/InstCombine/ctpop.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-xor-signbit.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll vendor/llvm/dist/test/Transforms/InstCombine/memcpy-from-global.ll vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/phi-select-constant.ll vendor/llvm/dist/test/Transforms/InstCombine/select-with-bitwise-ops.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InstCombine/set.ll vendor/llvm/dist/test/Transforms/InstCombine/xor2.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll vendor/llvm/dist/test/Transforms/LoopDeletion/unreachable-loops.ll vendor/llvm/dist/test/Transforms/LoopSimplify/basictest.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/canonical.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-expand-quadratic.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-2.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/nested-loop.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches-Threshold.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/small-size.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/export-icall.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-ReassociateVector.ll vendor/llvm/dist/test/Transforms/Reassociate/xor_reassoc.ll vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/einline.prof vendor/llvm/dist/test/Transforms/SampleProfile/early-inline.ll vendor/llvm/dist/test/Transforms/TailCallElim/reorder_load.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_buckets.s vendor/llvm/dist/test/tools/llvm-nm/wasm/exports.yaml vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-info-plist.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-objc-meta-data.test vendor/llvm/dist/test/tools/llvm-objdump/macho-exports-trie.test vendor/llvm/dist/tools/bugpoint/CMakeLists.txt vendor/llvm/dist/tools/bugpoint/LLVMBuild.txt vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/lli/OrcLazyJIT.cpp vendor/llvm/dist/tools/lli/OrcLazyJIT.h vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.cpp vendor/llvm/dist/tools/llvm-dwp/llvm-dwp.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-pdbutil/Analyze.cpp vendor/llvm/dist/tools/llvm-pdbutil/CMakeLists.txt vendor/llvm/dist/tools/llvm-pdbutil/Diff.cpp vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.cpp vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.h vendor/llvm/dist/tools/llvm-profdata/llvm-profdata.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/ObjDumper.h vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.cpp vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/obj2yaml/obj2yaml.cpp vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist/unittests/ADT/StringExtrasTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/BinaryFormat/TestFileMagic.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp vendor/llvm/dist/unittests/DebugInfo/PDB/PDBApiTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/LazyEmittingLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcTestCommon.h vendor/llvm/dist/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp vendor/llvm/dist/unittests/Option/OptionParsingTest.cpp vendor/llvm/dist/unittests/ProfileData/CoverageMappingTest.cpp vendor/llvm/dist/unittests/ProfileData/InstrProfTest.cpp vendor/llvm/dist/unittests/Support/CachePruningTest.cpp vendor/llvm/dist/unittests/Support/CommandLineTest.cpp vendor/llvm/dist/unittests/Support/ErrorTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/opt-viewer/opt-stats.py vendor/llvm/dist/utils/opt-viewer/opt-viewer.py vendor/llvm/dist/utils/opt-viewer/optrecord.py vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CMakeLists.txt Mon Jun 26 20:32:52 2017 (r320374) @@ -94,7 +94,7 @@ if(CMAKE_HOST_APPLE AND APPLE) set(LIBTOOL_NO_WARNING_FLAG "-no_warning_for_no_symbols") endif() endif() - + foreach(lang ${languages}) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "${CMAKE_LIBTOOL} -static ${LIBTOOL_NO_WARNING_FLAG} -o \ @@ -570,6 +570,10 @@ if (LLVM_BUILD_STATIC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") endif() +# Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV. +set(LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank.") +mark_as_advanced(LLVM_TARGET_TRIPLE_ENV) + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run @@ -800,7 +804,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") + # special hack for Solaris to handle crazy system sys/regset.h + include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris") endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) # Make sure we don't get -rdynamic in every binary. For those that need it, Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CODE_OWNERS.TXT Mon Jun 26 20:32:52 2017 (r320374) @@ -195,6 +195,7 @@ D: MemorySanitizer (LLVM part) N: Craig Topper E: craig.topper@gmail.com +E: craig.topper@intel.com D: X86 Backend N: Ulrich Weigand Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CREDITS.TXT Mon Jun 26 20:32:52 2017 (r320374) @@ -220,7 +220,7 @@ W: http://randomhacks.net/ D: llvm-config script N: Anton Korobeynikov -E: asl@math.spbu.ru +E: anton at korobeynikov dot info D: Mingw32 fixes, cross-compiling support, stdcall/fastcall calling conv. D: x86/linux PIC codegen, aliases, regparm/visibility attributes D: Switch lowering refactoring Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -1133,6 +1133,19 @@ function(configure_lit_site_cfg input output) set(LIT_SITE_CFG_IN_HEADER "## Autogenerated from ${input}\n## Do not edit!") + # Override config_target_triple (and the env) + if(LLVM_TARGET_TRIPLE_ENV) + # This is expanded into the heading. + string(CONCAT LIT_SITE_CFG_IN_HEADER "${LIT_SITE_CFG_IN_HEADER}\n\n" + "import os\n" + "target_env = \"${LLVM_TARGET_TRIPLE_ENV}\"\n" + "config.target_triple = config.environment[target_env] = os.environ.get(target_env, \"${TARGET_TRIPLE}\")\n" + ) + + # This is expanded to; config.target_triple = ""+config.target_triple+"" + set(TARGET_TRIPLE "\"+config.target_triple+\"") + endif() + configure_file(${input} ${output} @ONLY) endfunction() Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -642,6 +642,9 @@ if(LLVM_USE_SANITIZER) append_common_sanitizer_flags() append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + elseif (LLVM_USE_SANITIZER STREQUAL "Leaks") + append_common_sanitizer_flags() + append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") endif() Modified: vendor/llvm/dist/cmake/modules/TableGen.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/TableGen.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/TableGen.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -14,8 +14,31 @@ function(tablegen project ofn) message(FATAL_ERROR "${project}_TABLEGEN_EXE not set") endif() - file(GLOB local_tds "*.td") - file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td") + # Use depfile instead of globbing arbitrary *.td(s) + # DEPFILE is available for Ninja Generator with CMake>=3.7. + if(CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.7) + # Make output path relative to build.ninja, assuming located on + # ${CMAKE_BINARY_DIR}. + # CMake emits build targets as relative paths but Ninja doesn't identify + # absolute path (in *.d) as relative path (in build.ninja) + # Note that tblgen is executed on ${CMAKE_BINARY_DIR} as working directory. + file(RELATIVE_PATH ofn_rel + ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${ofn}) + set(additional_cmdline + -o ${ofn_rel}.tmp + -d ${ofn_rel}.d + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.d + ) + set(local_tds) + set(global_tds) + else() + file(GLOB local_tds "*.td") + file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td") + set(additional_cmdline + -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + ) + endif() if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) @@ -44,7 +67,7 @@ function(tablegen project ofn) COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} ${LLVM_TABLEGEN_FLAGS} ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} - -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + ${additional_cmdline} # The file in LLVM_TARGET_DEFINITIONS may be not in the current # directory and local_tds may not contain it, so we must # explicitly list it here: @@ -104,7 +127,8 @@ macro(add_tablegen target project) set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) - if(NOT XCODE) + # CMake-3.9 doesn't let compilation units depend on their dependent libraries. + if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE) # FIXME: It leaks to user, callee of add_tablegen. set(LLVM_ENABLE_OBJLIB ON) endif() Modified: vendor/llvm/dist/docs/AMDGPUUsage.rst ============================================================================== --- vendor/llvm/dist/docs/AMDGPUUsage.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/AMDGPUUsage.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -587,7 +587,7 @@ Code Object Metadata The code object metadata is specified by the ``NT_AMD_AMDHSA_METADATA`` note record (see :ref:`amdgpu-note-records`). -The metadata is specified as a YAML formated string (see [YAML]_ and +The metadata is specified as a YAML formatted string (see [YAML]_ and :doc:`YamlIO`). The metadata is represented as a single YAML document comprised of the mapping @@ -1031,11 +1031,11 @@ Global variable appropriate section according to if it has initialized data or is readonly. If the symbol is external then its section is ``STN_UNDEF`` and the loader - will resolve relocations using the defintion provided by another code object + will resolve relocations using the definition provided by another code object or explicitly defined by the runtime. All global symbols, whether defined in the compilation unit or external, are - accessed by the machine code indirectly throught a GOT table entry. This + accessed by the machine code indirectly through a GOT table entry. This allows them to be preemptable. The GOT table is only supported when the target triple OS is ``amdhsa`` (see :ref:`amdgpu-target-triples`). @@ -1160,7 +1160,7 @@ Register Mapping Define DWARF register enumeration. If want to present a wavefront state then should expose vector registers as - 64 wide (rather than per work-item view that LLVM uses). Either as seperate + 64 wide (rather than per work-item view that LLVM uses). Either as separate registers, or a 64x4 byte single register. In either case use a new LANE op (akin to XDREF) to select the current lane usage in a location expression. This would also allow scalar register spilling to vector register @@ -1653,7 +1653,7 @@ CP microcode requires the Kernel descritor to be alloc ``COMPUTE_PGM_RSRC2.USER_SGPR``. 6 1 bit enable_trap_handler Set to 1 if code contains a TRAP instruction which - requires a trap hander to + requires a trap handler to be enabled. CP sets @@ -2146,7 +2146,7 @@ This section describes the mapping of LLVM memory mode .. TODO Update when implementation complete. - Support more relaxed OpenCL memory model to be controled by environment + Support more relaxed OpenCL memory model to be controlled by environment component of target triple. The AMDGPU backend supports the memory synchronization scopes specified in @@ -2201,7 +2201,7 @@ For GFX6-GFX9: can be reordered relative to each other, which can result in reordering the visibility of vector memory operations with respect to LDS operations of other wavefronts in the same work-group. A ``s_waitcnt lgkmcnt(0)`` is required to - ensure synchonization between LDS operations and vector memory operations + ensure synchronization between LDS operations and vector memory operations between waves of a work-group, but not between operations performed by the same wavefront. * The vector memory operations are performed as wavefront wide operations and @@ -2226,7 +2226,7 @@ For GFX6-GFX9: scalar memory operations performed by waves executing in different work-groups (which may be executing on different CUs) of an agent can be reordered relative to each other. A ``s_waitcnt vmcnt(0)`` is required to ensure - synchonization between vector memory operations of different CUs. It ensures a + synchronization between vector memory operations of different CUs. It ensures a previous vector memory operation has completed before executing a subsequent vector memory or LDS operation and so can be used to meet the requirements of acquire and release. @@ -2268,7 +2268,7 @@ and vector L1 caches are invalidated between kernel di constant address space data may change between kernel dispatch executions. See :ref:`amdgpu-amdhsa-memory-spaces`. -The one exeception is if scalar writes are used to spill SGPR registers. In this +The one execption is if scalar writes are used to spill SGPR registers. In this case the AMDGPU backend ensures the memory location used to spill is never accessed by vector memory operations at the same time. If scalar writes are used then a ``s_dcache_wb`` is inserted before the ``s_endpgm`` and before a function @@ -3310,7 +3310,7 @@ table be moved before the acquire. - If a fence then same as load atomic, plus no preceding associated fence-paired-atomic can be moved after the fence. - release - If a store atomic/atomicrmw then no preceeding load/load + release - If a store atomic/atomicrmw then no preceding load/load atomic/store/ store atomic/atomicrmw/fence instruction can be moved after the release. - If a fence then same as store atomic, plus no following Modified: vendor/llvm/dist/docs/GetElementPtr.rst ============================================================================== --- vendor/llvm/dist/docs/GetElementPtr.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/GetElementPtr.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -27,7 +27,7 @@ questions. What is the first index of the GEP instruction? ----------------------------------------------- -Quick answer: The index stepping through the first operand. +Quick answer: The index stepping through the second operand. The confusion with the first index usually arises from thinking about the GetElementPtr instruction as if it was a C index operator. They aren't the @@ -59,7 +59,7 @@ Sometimes this question gets rephrased as: won't be dereferenced?* The answer is simply because memory does not have to be accessed to perform the -computation. The first operand to the GEP instruction must be a value of a +computation. The second operand to the GEP instruction must be a value of a pointer type. The value of the pointer is provided directly to the GEP instruction as an operand without any need for accessing memory. It must, therefore be indexed and requires an index operand. Consider this example: @@ -80,8 +80,8 @@ therefore be indexed and requires an index operand. Co In this "C" example, the front end compiler (Clang) will generate three GEP instructions for the three indices through "P" in the assignment statement. The -function argument ``P`` will be the first operand of each of these GEP -instructions. The second operand indexes through that pointer. The third +function argument ``P`` will be the second operand of each of these GEP +instructions. The third operand indexes through that pointer. The fourth operand will be the field offset into the ``struct munger_struct`` type, for either the ``f1`` or ``f2`` field. So, in LLVM assembly the ``munge`` function looks like: @@ -100,8 +100,8 @@ looks like: ret void } -In each case the first operand is the pointer through which the GEP instruction -starts. The same is true whether the first operand is an argument, allocated +In each case the second operand is the pointer through which the GEP instruction +starts. The same is true whether the second operand is an argument, allocated memory, or a global variable. To make this clear, let's consider a more obtuse example: @@ -159,11 +159,11 @@ confusion: i32 }*``. That is, ``%MyStruct`` is a pointer to a structure containing a pointer to a ``float`` and an ``i32``. -#. Point #1 is evidenced by noticing the type of the first operand of the GEP +#. Point #1 is evidenced by noticing the type of the second operand of the GEP instruction (``%MyStruct``) which is ``{ float*, i32 }*``. #. The first index, ``i64 0`` is required to step over the global variable - ``%MyStruct``. Since the first argument to the GEP instruction must always + ``%MyStruct``. Since the second argument to the GEP instruction must always be a value of pointer type, the first index steps through that pointer. A value of 0 means 0 elements offset from that pointer. @@ -267,7 +267,7 @@ in the IR. In the future, it will probably be outright What effect do address spaces have on GEPs? ------------------------------------------- -None, except that the address space qualifier on the first operand pointer type +None, except that the address space qualifier on the second operand pointer type always matches the address space qualifier on the result type. How is GEP different from ``ptrtoint``, arithmetic, and ``inttoptr``? @@ -526,7 +526,7 @@ instruction: #. The GEP instruction never accesses memory, it only provides pointer computations. -#. The first operand to the GEP instruction is always a pointer and it must be +#. The second operand to the GEP instruction is always a pointer and it must be indexed. #. There are no superfluous indices for the GEP instruction. Modified: vendor/llvm/dist/docs/GoldPlugin.rst ============================================================================== --- vendor/llvm/dist/docs/GoldPlugin.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/GoldPlugin.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -7,7 +7,7 @@ Introduction Building with link time optimization requires cooperation from the system linker. LTO support on Linux systems requires that you use the -`gold linker`_ which supports LTO via plugins. This is the same mechanism +`gold linker`_ or ld.bfd from binutils >= 2.21.51.0.2, as they support LTO via plugins. This is the same mechanism used by the `GCC LTO`_ project. The LLVM gold plugin implements the gold plugin interface on top of @@ -23,24 +23,22 @@ The LLVM gold plugin implements the gold plugin interf How to build it =============== -You need to have gold with plugin support and build the LLVMgold plugin. -Check whether you have gold running ``/usr/bin/ld -v``. It will report "GNU -gold" or else "GNU ld" if not. If you have gold, check for plugin support -by running ``/usr/bin/ld -plugin``. If it complains "missing argument" then -you have plugin support. If not, such as an "unknown option" error then you -will either need to build gold or install a version with plugin support. +Check for plugin support by running ``/usr/bin/ld -plugin``. If it complains +"missing argument" then you have plugin support. If not, such as an "unknown option" +error then you will either need to build gold or install a recent version +of ld.bfd with plugin support and then build gold plugin. -* Download, configure and build gold with plugin support: +* Download, configure and build ld.bfd with plugin support: .. code-block:: bash $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils $ mkdir build $ cd build - $ ../binutils/configure --enable-gold --enable-plugins --disable-werror - $ make all-gold + $ ../binutils/configure --disable-werror # ld.bfd includes plugin support by default + $ make all-ld - That should leave you with ``build/gold/ld-new`` which supports + That should leave you with ``build/ld/ld-new`` which supports the ``-plugin`` option. Running ``make`` will additionally build ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins. Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/LangRef.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -1468,6 +1468,19 @@ example: This attribute by itself does not imply restrictions on inter-procedural optimizations. All of the semantic effects the patching may have to be separately conveyed via the linkage type. +``"probe-stack"`` + This attribute indicates that the function will trigger a guard region + in the end of the stack. It ensures that accesses to the stack must be + no further apart than the size of the guard region to a previous + access of the stack. It takes one required string value, the name of + the stack probing function that will be called. + + If a function that has a ``"probe-stack"`` attribute is inlined into + a function with another ``"probe-stack"`` attribute, the resulting + function has the ``"probe-stack"`` attribute of the caller. If a + function that has a ``"probe-stack"`` attribute is inlined into a + function that has no ``"probe-stack"`` attribute at all, the resulting + function has the ``"probe-stack"`` attribute of the callee. ``readnone`` On a function, this attribute indicates that the function computes its result (or decides to unwind an exception) based strictly on its arguments, @@ -1498,6 +1511,21 @@ example: On an argument, this attribute indicates that the function does not write through this pointer argument, even though it may write to the memory that the pointer points to. +``"stack-probe-size"`` + This attribute controls the behavior of stack probes: either + the ``"probe-stack"`` attribute, or ABI-required stack probes, if any. + It defines the size of the guard region. It ensures that if the function + may use more stack space than the size of the guard region, stack probing + sequence will be emitted. It takes one required integer value, which + is 4096 by default. + + If a function that has a ``"stack-probe-size"`` attribute is inlined into + a function with another ``"stack-probe-size"`` attribute, the resulting + function has the ``"stack-probe-size"`` attribute that has the lower + numeric value. If a function that has a ``"stack-probe-size"`` attribute is + inlined into a function that has no ``"stack-probe-size"`` attribute + at all, the resulting function has the ``"stack-probe-size"`` attribute + of the callee. ``writeonly`` On a function, this attribute indicates that the function may write to but does not read from memory. @@ -1989,7 +2017,7 @@ A pointer value is *based* on another pointer value ac following rules: - A pointer value formed from a ``getelementptr`` operation is *based* - on the first value operand of the ``getelementptr``. + on the second value operand of the ``getelementptr``. - The result value of a ``bitcast`` is *based* on the operand of the ``bitcast``. - A pointer value formed by an ``inttoptr`` is *based* on all pointer @@ -3166,7 +3194,7 @@ The following is the syntax for constant expressions: ``getelementptr (TY, CSTPTR, IDX0, IDX1, ...)``, ``getelementptr inbounds (TY, CSTPTR, IDX0, IDX1, ...)`` Perform the :ref:`getelementptr operation ` on constants. As with the :ref:`getelementptr ` - instruction, the index list may have zero or more indexes, which are + instruction, the index list may have one or more indexes, which are required to make sense for the type of "pointer to TY". ``select (COND, VAL1, VAL2)`` Perform the :ref:`select operation ` on constants. @@ -7805,7 +7833,7 @@ base address to start from. The remaining arguments ar that indicate which of the elements of the aggregate object are indexed. The interpretation of each index is dependent on the type being indexed into. The first index always indexes the pointer value given as the -first argument, the second index indexes a value of the type pointed to +second argument, the second index indexes a value of the type pointed to (not necessarily the value directly pointed to, since the first index can be non-zero), etc. The first type indexed into must be a pointer value, subsequent types can be arrays, vectors, and structs. Note that Modified: vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst ============================================================================== --- vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -27,7 +27,7 @@ Vectorization Workflow VPlan-based vectorization involves three major steps, taking a "scenario-based approach" to vectorization planning: -1. Legal Step: check if a loop can be legally vectorized; encode contraints and +1. Legal Step: check if a loop can be legally vectorized; encode constraints and artifacts if so. 2. Plan Step: Modified: vendor/llvm/dist/docs/XRay.rst ============================================================================== --- vendor/llvm/dist/docs/XRay.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/XRay.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -150,7 +150,7 @@ variable, where we list down the options and their def | xray_logfile_base | ``const char*`` | ``xray-log.`` | Filename base for the | | | | | XRay logfile. | +-------------------+-----------------+---------------+------------------------+ -| xray_fdr_log | ``bool`` | ``false`` | Wheter to install the | +| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | | | | | Flight Data Recorder | | | | | (FDR) mode. | +-------------------+-----------------+---------------+------------------------+ Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -40,11 +40,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; public: - using ModuleHandle = decltype(CompileLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(CompileLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), @@ -72,15 +72,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return CompileLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return CompileLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -91,7 +87,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - CompileLayer.removeModuleSet(H); + CompileLayer.removeModule(H); } }; Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -44,22 +44,22 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }) { llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr); @@ -85,15 +85,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -104,11 +100,11 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -47,11 +47,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -59,13 +59,13 @@ class KaleidoscopeJIT { CompileOnDemandLayer CODLayer; public: - using ModuleHandle = decltype(CODLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(CODLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), CompileCallbackManager( @@ -98,15 +98,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return CODLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return CODLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -117,11 +113,11 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - CODLayer.removeModuleSet(H); + CODLayer.removeModule(H); } private: - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -73,11 +73,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -85,14 +85,14 @@ class KaleidoscopeJIT { std::unique_ptr IndirectStubsMgr; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), CompileCallbackMgr( @@ -125,15 +125,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } Error addFunctionAST(std::unique_ptr FnAST) { @@ -199,7 +195,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: @@ -210,7 +206,7 @@ class KaleidoscopeJIT { return MangledNameStream.str(); } - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -78,11 +78,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -91,7 +91,7 @@ class KaleidoscopeJIT { MyRemote &Remote; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT(MyRemote &Remote) : TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "", @@ -99,7 +99,7 @@ class KaleidoscopeJIT { DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), Remote(Remote) { @@ -153,15 +153,11 @@ class KaleidoscopeJIT { exit(1); } - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - std::move(MemMgr), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + std::move(MemMgr), + std::move(Resolver)); } Error addFunctionAST(std::unique_ptr FnAST) { @@ -231,7 +227,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: @@ -242,7 +238,7 @@ class KaleidoscopeJIT { return MangledNameStream.str(); } - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -39,9 +39,9 @@ namespace orc { class KaleidoscopeJIT { public: - using ObjLayerT = RTDyldObjectLinkingLayer<>; - using CompileLayerT = IRCompileLayer; - using ModuleHandleT = CompileLayerT::ModuleSetHandleT; + using ObjLayerT = RTDyldObjectLinkingLayer; + using CompileLayerT = IRCompileLayer; + using ModuleHandleT = CompileLayerT::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), @@ -62,9 +62,9 @@ class KaleidoscopeJIT { (public) return JITSymbol(nullptr); }, [](const std::string &S) { return nullptr; }); - auto H = CompileLayer.addModuleSet(singletonSet(std::move(M)), - make_unique(), - std::move(Resolver)); + auto H = CompileLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); ModuleHandles.push_back(H); return H; @@ -72,7 +72,7 @@ class KaleidoscopeJIT { (public) void removeModule(ModuleHandleT H) { ModuleHandles.erase(find(ModuleHandles, H)); - CompileLayer.removeModuleSet(H); + CompileLayer.removeModule(H); } JITSymbol findSymbol(const std::string Name) { @@ -87,12 +87,6 @@ class KaleidoscopeJIT { (public) Mangler::getNameWithPrefix(MangledNameStream, Name, DL); } return MangledName; - } - - template static std::vector singletonSet(T t) { - std::vector Vec; - Vec.push_back(std::move(t)); - return Vec; } JITSymbol findMangledSymbol(const std::string &Name) { Modified: vendor/llvm/dist/include/llvm-c/OrcBindings.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/OrcBindings.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm-c/OrcBindings.h Mon Jun 26 20:32:52 2017 (r320374) @@ -29,6 +29,8 @@ extern "C" { #endif +typedef struct LLVMOpaqueSharedModule *LLVMSharedModuleRef; +typedef struct LLVMOpaqueSharedObjectBuffer *LLVMSharedObjectBufferRef; typedef struct LLVMOrcOpaqueJITStack *LLVMOrcJITStackRef; typedef uint32_t LLVMOrcModuleHandle; typedef uint64_t LLVMOrcTargetAddress; @@ -39,6 +41,45 @@ typedef uint64_t (*LLVMOrcLazyCompileCallbackFn)(LLVMO typedef enum { LLVMOrcErrSuccess = 0, LLVMOrcErrGeneric } LLVMOrcErrorCode; /** + * Turn an LLVMModuleRef into an LLVMSharedModuleRef. + * + * The JIT uses shared ownership for LLVM modules, since it is generally + * difficult to know when the JIT will be finished with a module (and the JIT + * has no way of knowing when a user may be finished with one). + * + * Calling this method with an LLVMModuleRef creates a shared-pointer to the + * module, and returns a reference to this shared pointer. + * + * The shared module should be disposed when finished with by calling + * LLVMOrcDisposeSharedModule (not LLVMDisposeModule). The Module will be + * deleted when the last shared pointer owner relinquishes it. + */ + +LLVMSharedModuleRef LLVMOrcMakeSharedModule(LLVMModuleRef Mod); + +/** + * Dispose of a shared module. + * + * The module should not be accessed after this call. The module will be + * deleted once all clients (including the JIT itself) have released their + * shared pointers. + */ + +void LLVMOrcDisposeSharedModuleRef(LLVMSharedModuleRef SharedMod); + +/** + * Get an LLVMSharedObjectBufferRef from an LLVMMemoryBufferRef. + */ +LLVMSharedObjectBufferRef +LLVMOrcMakeSharedObjectBuffer(LLVMMemoryBufferRef ObjBuffer); + +/** + * Dispose of a shared object buffer. + */ +void +LLVMOrcDisposeSharedObjectBufferRef(LLVMSharedObjectBufferRef SharedObjBuffer); + +/** * Create an ORC JIT stack. * * The client owns the resulting stack, and must call OrcDisposeInstance(...) @@ -95,7 +136,8 @@ LLVMOrcErrorCode LLVMOrcSetIndirectStubPointer(LLVMOrc * Add module to be eagerly compiled. */ LLVMOrcModuleHandle -LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, +LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStack, + LLVMSharedModuleRef Mod, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); @@ -103,7 +145,8 @@ LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStac * Add module to be lazily compiled one function at a time. */ LLVMOrcModuleHandle -LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, +LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack, + LLVMSharedModuleRef Mod, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); @@ -111,7 +154,7 @@ LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack * Add an object file. */ LLVMOrcModuleHandle LLVMOrcAddObjectFile(LLVMOrcJITStackRef JITStack, - LLVMObjectFileRef Obj, + LLVMSharedObjectBufferRef Obj, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); Modified: vendor/llvm/dist/include/llvm/ADT/APFloat.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APFloat.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/APFloat.h Mon Jun 26 20:32:52 2017 (r320374) @@ -140,8 +140,8 @@ enum lostFraction { // Example of truncated bits: // implementation classes. This struct should not define any non-static data // members. struct APFloatBase { - // TODO remove this and use APInt typedef directly. typedef APInt::WordType integerPart; + static const unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; /// A signed type to represent a floating point numbers unbiased exponent. typedef signed short ExponentType; Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Mon Jun 26 20:32:52 2017 (r320374) @@ -213,6 +213,12 @@ class LLVM_NODISCARD APInt { (private) /// out-of-line slow case for countLeadingZeros unsigned countLeadingZerosSlowCase() const LLVM_READONLY; + /// out-of-line slow case for countLeadingOnes. + unsigned countLeadingOnesSlowCase() const LLVM_READONLY; + + /// out-of-line slow case for countTrailingZeros. + unsigned countTrailingZerosSlowCase() const LLVM_READONLY; + /// out-of-line slow case for countTrailingOnes unsigned countTrailingOnesSlowCase() const LLVM_READONLY; @@ -383,7 +389,7 @@ class LLVM_NODISCARD APInt { (private) bool isAllOnesValue() const { if (isSingleWord()) return U.VAL == WORD_MAX >> (APINT_BITS_PER_WORD - BitWidth); - return countPopulationSlowCase() == BitWidth; + return countTrailingOnesSlowCase() == BitWidth; } /// \brief Determine if all bits are clear @@ -408,7 +414,9 @@ class LLVM_NODISCARD APInt { (private) /// This checks to see if the value of this APInt is the maximum signed /// value for the APInt's bit width. bool isMaxSignedValue() const { - return !isNegative() && countPopulation() == BitWidth - 1; + if (isSingleWord()) + return U.VAL == ((WordType(1) << (BitWidth - 1)) - 1); + return !isNegative() && countTrailingOnesSlowCase() == BitWidth - 1; } /// \brief Determine if this is the smallest unsigned value. @@ -422,7 +430,9 @@ class LLVM_NODISCARD APInt { (private) /// This checks to see if the value of this APInt is the minimum signed /// value for the APInt's bit width. bool isMinSignedValue() const { - return isNegative() && isPowerOf2(); + if (isSingleWord()) + return U.VAL == (WordType(1) << (BitWidth - 1)); + return isNegative() && countTrailingZerosSlowCase() == BitWidth - 1; } /// \brief Check if this APInt has an N-bits unsigned integer value. @@ -1574,7 +1584,11 @@ class LLVM_NODISCARD APInt { (private) /// /// \returns 0 if the high order bit is not set, otherwise returns the number /// of 1 bits from the most significant to the least - unsigned countLeadingOnes() const LLVM_READONLY; + unsigned countLeadingOnes() const { + if (isSingleWord()) + return llvm::countLeadingOnes(U.VAL << (APINT_BITS_PER_WORD - BitWidth)); + return countLeadingOnesSlowCase(); + } /// Computes the number of leading bits of this APInt that are equal to its /// sign bit. @@ -1590,7 +1604,11 @@ class LLVM_NODISCARD APInt { (private) /// /// \returns BitWidth if the value is zero, otherwise returns the number of /// zeros from the least significant bit to the first one bit. - unsigned countTrailingZeros() const LLVM_READONLY; + unsigned countTrailingZeros() const { + if (isSingleWord()) + return std::min(unsigned(llvm::countTrailingZeros(U.VAL)), BitWidth); + return countTrailingZerosSlowCase(); + } /// \brief Count the number of trailing one bits. /// Modified: vendor/llvm/dist/include/llvm/ADT/StringExtras.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/StringExtras.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/StringExtras.h Mon Jun 26 20:32:52 2017 (r320374) @@ -15,10 +15,12 @@ #define LLVM_ADT_STRINGEXTRAS_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include #include #include +#include #include #include #include @@ -127,6 +129,32 @@ static inline std::string fromHex(StringRef Input) { /// Returns true if the number was successfully converted, false otherwise. template bool to_integer(StringRef S, N &Num, unsigned Base = 0) { return !S.getAsInteger(Base, Num); +} + +namespace detail { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:15 2017 Return-Path: Delivered-To: svn-src-all@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 DF0D7D91323; Mon, 26 Jun 2017 20:33:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 832D864D43; Mon, 26 Jun 2017 20:33:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXELc098789; Mon, 26 Jun 2017 20:33:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXDgq098773; Mon, 26 Jun 2017 20:33:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXDgq098773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320376 - in vendor/clang/dist: docs docs/tools include/clang-c include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Driver include/clang/Edit include/clang/Format... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:16 -0000 Author: dim Date: Mon Jun 26 20:33:12 2017 New Revision: 320376 URL: https://svnweb.freebsd.org/changeset/base/320376 Log: Vendor import of clang trunk r306325: https://llvm.org/svn/llvm-project/cfe/trunk@306325 Added: vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h (contents, props changed) vendor/clang/dist/lib/Driver/ToolChains/Ananas.cpp (contents, props changed) vendor/clang/dist/lib/Driver/ToolChains/Ananas.h (contents, props changed) vendor/clang/dist/lib/Format/UsingDeclarationsSorter.cpp (contents, props changed) vendor/clang/dist/lib/Format/UsingDeclarationsSorter.h (contents, props changed) vendor/clang/dist/lib/Frontend/PrecompiledPreamble.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/autogenerated_automoc.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/dbus_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/moc_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/not-autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/ui_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c (contents, props changed) vendor/clang/dist/test/CodeGen/ms-intrinsics-other.c (contents, props changed) vendor/clang/dist/test/CodeGen/no-devirt.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/objc_copyStruct.m vendor/clang/dist/test/Driver/ananas.c (contents, props changed) vendor/clang/dist/test/Driver/compress-noias.c (contents, props changed) vendor/clang/dist/test/Driver/fsanitize-object-size.c (contents, props changed) vendor/clang/dist/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext vendor/clang/dist/test/Frontend/pp-only-no-editor-placeholders.c (contents, props changed) vendor/clang/dist/test/Import/indirect-struct-member-access/ vendor/clang/dist/test/Import/indirect-struct-member-access/Inputs/ vendor/clang/dist/test/Import/indirect-struct-member-access/Inputs/S.c (contents, props changed) vendor/clang/dist/test/Import/indirect-struct-member-access/test.c (contents, props changed) vendor/clang/dist/test/Index/single-file-parse.m vendor/clang/dist/test/Misc/Inputs/module.modulemap vendor/clang/dist/test/Misc/cc1as-compress.s (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess/other.h (contents, props changed) vendor/clang/dist/test/Modules/const-var-init-update.cpp (contents, props changed) vendor/clang/dist/test/Modules/interface-visibility.m vendor/clang/dist/test/Parser/objc-at-implementation-eof-crash.m vendor/clang/dist/test/Parser/objc-at-interface-eof-crash.m vendor/clang/dist/test/SemaCXX/invalid-template-params.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-throw-out-noexcept-func.cpp (contents, props changed) vendor/clang/dist/test/SemaObjC/unguarded-availability-new.m vendor/clang/dist/unittests/Format/UsingDeclarationsSorterTest.cpp (contents, props changed) Deleted: vendor/clang/dist/test/Analysis/builtin-assume.c vendor/clang/dist/test/CodeGen/pr27892.c vendor/clang/dist/test/Index/singe-file-parse.m Modified: vendor/clang/dist/docs/Block-ABI-Apple.rst vendor/clang/dist/docs/ClangFormat.rst vendor/clang/dist/docs/ClangFormatStyleOptions.rst vendor/clang/dist/docs/LibFormat.rst vendor/clang/dist/docs/MemorySanitizer.rst vendor/clang/dist/docs/SourceBasedCodeCoverage.rst vendor/clang/dist/docs/ThinLTO.rst vendor/clang/dist/docs/tools/dump_format_style.py vendor/clang/dist/include/clang-c/CXCompilationDatabase.h vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/Analysis/CloneDetection.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Edit/EditedSource.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDumper.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/ExternalASTMerger.cpp vendor/clang/dist/lib/Analysis/CloneDetection.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypeCache.h vendor/clang/dist/lib/CodeGen/SwiftCallingConv.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/DriverOptions.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp vendor/clang/dist/lib/Driver/ToolChains/WebAssembly.cpp vendor/clang/dist/lib/Edit/EditedSource.cpp vendor/clang/dist/lib/Format/CMakeLists.txt vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaCUDA.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CloneChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineC.cpp vendor/clang/dist/test/Analysis/analyzer-config.c vendor/clang/dist/test/Analysis/analyzer-config.cpp vendor/clang/dist/test/Analysis/builtin-functions.cpp vendor/clang/dist/test/Analysis/null-deref-ps-region.c vendor/clang/dist/test/CXX/except/except.spec/p11.cpp vendor/clang/dist/test/CodeGen/64bit-swiftcall.c vendor/clang/dist/test/CodeGen/aarch64-neon-intrinsics.c vendor/clang/dist/test/CodeGen/aarch64-neon-ldst-one.c vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGen/arm_neon_intrinsics.c vendor/clang/dist/test/CodeGen/default-address-space.c vendor/clang/dist/test/CodeGen/mcount.c vendor/clang/dist/test/CodeGen/ms-inline-asm.c vendor/clang/dist/test/CodeGen/ms-intrinsics-rotations.c vendor/clang/dist/test/CodeGen/target-data.c vendor/clang/dist/test/CodeGen/vectorcall.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/amdgcn-automatic-variable.cpp vendor/clang/dist/test/CodeGenObjC/ubsan-nonnull-and-nullability.m vendor/clang/dist/test/CodeGenObjC/ubsan-nullability.m vendor/clang/dist/test/CodeGenOpenCL/spir_version.cl vendor/clang/dist/test/Driver/autocomplete.c vendor/clang/dist/test/Driver/compress.c vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/Driver/nozlibcompress.c vendor/clang/dist/test/Driver/wasm-toolchain.c vendor/clang/dist/test/FixIt/fixit-format-darwin.m vendor/clang/dist/test/Frontend/optimization-remark-with-hotness.c vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Misc/ast-dump-decl.c vendor/clang/dist/test/Misc/ast-dump-decl.cpp vendor/clang/dist/test/Modules/Inputs/preprocess/file.h vendor/clang/dist/test/Modules/Inputs/preprocess/fwd.h vendor/clang/dist/test/Modules/Inputs/preprocess/module.modulemap vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Modules/string_names.cpp vendor/clang/dist/test/Sema/asm.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/SemaCXX/PR16677.cpp vendor/clang/dist/test/SemaCXX/cxx1y-deduced-return-type.cpp vendor/clang/dist/test/SemaCXX/cxx1z-noexcept-function-type.cpp vendor/clang/dist/test/SemaCXX/friend2.cpp vendor/clang/dist/test/SemaOpenCL/storageclass.cl vendor/clang/dist/tools/clang-format/clang-format.py vendor/clang/dist/tools/clang-import-test/clang-import-test.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/unittests/Format/CMakeLists.txt vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/utils/TableGen/NeonEmitter.cpp vendor/clang/dist/utils/bash-autocomplete.sh Modified: vendor/clang/dist/docs/Block-ABI-Apple.rst ============================================================================== --- vendor/clang/dist/docs/Block-ABI-Apple.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/Block-ABI-Apple.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -856,15 +856,15 @@ mentioned above, call: .. code-block:: c - _Block_object_assign(&dst->target, src->target, BLOCK_FIELD_); + _Block_object_assign(&dst->target, src->target, BLOCK_FIELD_); in the copy helper and: .. code-block:: c - _Block_object_dispose(->target, BLOCK_FIELD_); + _Block_object_dispose(->target, BLOCK_FIELD_); -in the dispose helper where ```` is: +in the dispose helper where ```` is: .. code-block:: c @@ -888,7 +888,7 @@ and functions are generated in the same manner. Under ObjC we allow ``__weak`` as an attribute on ``__block`` variables, and this causes the addition of ``BLOCK_FIELD_IS_WEAK`` orred onto the ``BLOCK_FIELD_IS_BYREF`` flag when copying the ``block_byref`` structure in the -``Block`` copy helper, and onto the ``BLOCK_FIELD_`` field within the +``Block`` copy helper, and onto the ``BLOCK_FIELD_`` field within the ``block_byref`` copy/dispose helper calls. The prototypes, and summary, of the helper functions are: Modified: vendor/clang/dist/docs/ClangFormat.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormat.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ClangFormat.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -120,6 +120,18 @@ entity. It operates on the current, potentially unsaved buffer and does not create or save any files. To revert a formatting, just undo. +An alternative option is to format changes when saving a file and thus to +have a zero-effort integration into the coding workflow. To do this, add this to +your `.vimrc`: + +.. code-block:: vim + + function! Formatonsave() + let l:formatdiff = 1 + pyf ~/llvm/tools/clang/tools/clang-format/clang-format.py + endfunction + autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave() + Emacs Integration ================= Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormatStyleOptions.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -309,12 +309,28 @@ the configuration (without a prefix: ``Auto``). * ``SFS_None`` (in configuration: ``None``) Never merge functions into a single line. + * ``SFS_InlineOnly`` (in configuration: ``InlineOnly``) + Only merge functions defined inside a class. Same as "inline", + except it does not implies "empty": i.e. top level empty functions + are not merged either. + + .. code-block:: c++ + + class Foo { + void f() { foo(); } + }; + void f() { + foo(); + } + void f() { + } + * ``SFS_Empty`` (in configuration: ``Empty``) Only merge empty functions. .. code-block:: c++ - void f() { bar(); } + void f() {} void f2() { bar2(); } @@ -327,6 +343,10 @@ the configuration (without a prefix: ``Auto``). class Foo { void f() { foo(); } }; + void f() { + foo(); + } + void f() {} * ``SFS_All`` (in configuration: ``All``) Merge all functions fitting on a single line. @@ -518,148 +538,160 @@ the configuration (without a prefix: ``Auto``). * ``bool AfterClass`` Wrap class definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - class foo - {}; + true: + class foo {}; - false: - class foo {}; + false: + class foo + {}; * ``bool AfterControlStatement`` Wrap control statements (``if``/``for``/``while``/``switch``/..). - .. code-block:: c++ + .. code-block:: c++ - true: - if (foo()) - { - } else - {} - for (int i = 0; i < 10; ++i) - {} + true: + if (foo()) + { + } else + {} + for (int i = 0; i < 10; ++i) + {} - false: - if (foo()) { - } else { - } - for (int i = 0; i < 10; ++i) { - } + false: + if (foo()) { + } else { + } + for (int i = 0; i < 10; ++i) { + } * ``bool AfterEnum`` Wrap enum definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - enum X : int - { - B - }; + true: + enum X : int + { + B + }; - false: - enum X : int { B }; + false: + enum X : int { B }; * ``bool AfterFunction`` Wrap function definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - void foo() - { - bar(); - bar2(); - } + true: + void foo() + { + bar(); + bar2(); + } - false: - void foo() { - bar(); - bar2(); - } + false: + void foo() { + bar(); + bar2(); + } * ``bool AfterNamespace`` Wrap namespace definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - namespace - { - int foo(); - int bar(); - } + true: + namespace + { + int foo(); + int bar(); + } - false: - namespace { - int foo(); - int bar(); - } + false: + namespace { + int foo(); + int bar(); + } * ``bool AfterObjCDeclaration`` Wrap ObjC definitions (``@autoreleasepool``, interfaces, ..). * ``bool AfterStruct`` Wrap struct definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - struct foo - { - int x; - }; + true: + struct foo + { + int x; + }; - false: - struct foo { - int x; - }; + false: + struct foo { + int x; + }; * ``bool AfterUnion`` Wrap union definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - union foo - { - int x; - } + true: + union foo + { + int x; + } - false: - union foo { - int x; - } + false: + union foo { + int x; + } * ``bool BeforeCatch`` Wrap before ``catch``. - .. code-block:: c++ + .. code-block:: c++ - true: - try { - foo(); - } - catch () { - } + true: + try { + foo(); + } + catch () { + } - false: - try { - foo(); - } catch () { - } + false: + try { + foo(); + } catch () { + } * ``bool BeforeElse`` Wrap before ``else``. - .. code-block:: c++ + .. code-block:: c++ - true: - if (foo()) { - } - else { - } + true: + if (foo()) { + } + else { + } - false: - if (foo()) { - } else { - } + false: + if (foo()) { + } else { + } * ``bool IndentBraces`` Indent the wrapped braces themselves. + * ``bool SplitEmptyFunctionBody`` If ``false``, empty function body can be put on a single line. + This option is used only if the opening brace of the function has + already been wrapped, i.e. the `AfterFunction` brace wrapping mode is + set, and the function could/should not be put on a single line (as per + `AllowShortFunctionsOnASingleLine` and constructor formatting options). + .. code-block:: c++ + + int f() vs. inf f() + {} { + } + + **BreakAfterJavaFieldAnnotations** (``bool``) Break after each annotation on a field in Java files. @@ -899,18 +931,41 @@ the configuration (without a prefix: ``Auto``). firstValue : SecondValueVeryVeryVeryVeryLong; -**BreakConstructorInitializersBeforeComma** (``bool``) - Always break constructor initializers before commas and align - the commas with the colon. +**BreakConstructorInitializers** (``BreakConstructorInitializersStyle``) + The constructor initializers style to use. - .. code-block:: c++ + Possible values: - true: false: - SomeClass::Constructor() vs. SomeClass::Constructor() : a(a), - : a(a) b(b), - , b(b) c(c) {} - , c(c) {} + * ``BCIS_BeforeColon`` (in configuration: ``BeforeColon``) + Break constructor initializers before the colon and after the commas. + .. code-block:: c++ + + Constructor() + : initializer1(), + initializer2() + + * ``BCIS_BeforeComma`` (in configuration: ``BeforeComma``) + Break constructor initializers before the colon and commas, and align + the commas with the colon. + + .. code-block:: c++ + + Constructor() + : initializer1() + , initializer2() + + * ``BCIS_AfterColon`` (in configuration: ``AfterColon``) + Break constructor initializers after the colon and commas. + + .. code-block:: c++ + + Constructor() : + initializer1(), + initializer2() + + + **BreakStringLiterals** (``bool``) Allow breaking string literals when formatting. @@ -931,6 +986,31 @@ the configuration (without a prefix: ``Auto``). // Will leave the following line unaffected #include // FOOBAR pragma: keep +**CompactNamespaces** (``bool``) + If ``true``, consecutive namespace declarations will be on the same + line. If ``false``, each namespace is declared on a new line. + + .. code-block:: c++ + + true: + namespace Foo { namespace Bar { + }} + + false: + namespace Foo { + namespace Bar { + } + } + + If it does not fit on a single line, the overflowing namespaces get + wrapped: + + .. code-block:: c++ + + namespace Foo { namespace Bar { + namespace Extra { + }}} + **ConstructorInitializerAllOnOneLineOrOnePerLine** (``bool``) If the constructor initializers don't fit on a line, put each initializer on its own line. @@ -1321,6 +1401,9 @@ the configuration (without a prefix: ``Auto``). Add a space in front of an Objective-C protocol list, i.e. use ``Foo `` instead of ``Foo``. +**PenaltyBreakAssignment** (``unsigned``) + The penalty for breaking around an assignment operator. + **PenaltyBreakBeforeFirstCallParameter** (``unsigned``) The penalty for breaking a function call after ``call(``. @@ -1391,6 +1474,15 @@ the configuration (without a prefix: ``Auto``). false: true: #include "b.h" vs. #include "a.h" #include "a.h" #include "b.h" + +**SortUsingDeclarations** (``bool``) + If ``true``, clang-format will sort using declarations. + + .. code-block:: c++ + + false: true: + using std::cout; vs. using std::cin; + using std::cin; using std::cout; **SpaceAfterCStyleCast** (``bool``) If ``true``, a space is inserted after C style casts. Modified: vendor/clang/dist/docs/LibFormat.rst ============================================================================== --- vendor/clang/dist/docs/LibFormat.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/LibFormat.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -28,7 +28,9 @@ The core routine of LibFormat is ``reformat()``: This reads a token stream out of the lexer ``Lex`` and reformats all the code ranges in ``Ranges``. The ``FormatStyle`` controls basic decisions made during -formatting. A list of options can be found under :ref:`style-options`. +formatting. A list of options can be found under :ref:`style-options`. + +The style options are described in :doc:`ClangFormatStyleOptions`. .. _style-options: Modified: vendor/clang/dist/docs/MemorySanitizer.rst ============================================================================== --- vendor/clang/dist/docs/MemorySanitizer.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/MemorySanitizer.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -27,7 +27,7 @@ executable, so make sure to use ``clang`` (not ``ld``) link step. When linking shared libraries, the MemorySanitizer run-time is not linked, so ``-Wl,-z,defs`` may cause link errors (don't use it with MemorySanitizer). To get a reasonable performance add ``-O1`` or -higher. To get meaninful stack traces in error messages add +higher. To get meaningful stack traces in error messages add ``-fno-omit-frame-pointer``. To get perfect stack traces you may need to disable inlining (just use ``-O1``) and tail call elimination (``-fno-optimize-sibling-calls``). Modified: vendor/clang/dist/docs/SourceBasedCodeCoverage.rst ============================================================================== --- vendor/clang/dist/docs/SourceBasedCodeCoverage.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/SourceBasedCodeCoverage.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -274,6 +274,11 @@ To specify an alternate directory for raw profiles, us Drawbacks and limitations ========================= +* Prior to version 2.26, the GNU binutils BFD linker is not able link programs + compiled with ``-fcoverage-mapping`` in its ``--gc-sections`` mode. Possible + workarounds include disabling ``--gc-sections``, upgrading to a newer version + of BFD, or using the Gold linker. + * Code coverage does not handle unpredictable changes in control flow or stack unwinding in the presence of exceptions precisely. Consider the following function: Modified: vendor/clang/dist/docs/ThinLTO.rst ============================================================================== --- vendor/clang/dist/docs/ThinLTO.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ThinLTO.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -126,6 +126,50 @@ which currently must be enabled through a linker optio - lld (as of LLVM r296702): ``-Wl,--thinlto-cache-dir=/path/to/cache`` +Cache Pruning +------------- + +To help keep the size of the cache under control, ThinLTO supports cache +pruning. Cache pruning is supported with ld64 and ELF lld, but currently only +ELF lld allows you to control the policy with a policy string. The cache +policy must be specified with a linker option. + +- ELF lld (as of LLVM r298036): + ``-Wl,--thinlto-cache-policy,POLICY`` + +A policy string is a series of key-value pairs separated by ``:`` characters. +Possible key-value pairs are: + +- ``cache_size=X%``: The maximum size for the cache directory is ``X`` percent + of the available space on the the disk. Set to 100 to indicate no limit, + 50 to indicate that the cache size will not be left over half the available + disk space. A value over 100 is invalid. A value of 0 disables the percentage + size-based pruning. The default is 75%. + +- ``cache_size_bytes=X``, ``cache_size_bytes=Xk``, ``cache_size_bytes=Xm``, + ``cache_size_bytes=Xg``: + Sets the maximum size for the cache directory to ``X`` bytes (or KB, MB, + GB respectively). A value over the amount of available space on the disk + will be reduced to the amount of available space. A value of 0 disables + the byte size-based pruning. The default is no byte size-based pruning. + + Note that ThinLTO will apply both size-based pruning policies simultaneously, + and changing one does not affect the other. For example, a policy of + ``cache_size_bytes=1g`` on its own will cause both the 1GB and default 75% + policies to be applied unless the default ``cache_size`` is overridden. + +- ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the + expiration time for cache files to ``X`` seconds (or minutes, hours + respectively). When a file hasn't been accessed for ``prune_after`` seconds, + it is removed from the cache. A value of 0 disables the expiration-based + pruning. The default is 1 week. + +- ``prune_interval=Xs``, ``prune_interval=Xm``, ``prune_interval=Xh``: + Sets the pruning interval to ``X`` seconds (or minutes, hours + respectively). This is intended to be used to avoid scanning the directory + too often. It does not impact the decision of which files to prune. A + value of 0 forces the scan to occur. The default is every 20 minutes. + Clang Bootstrap --------------- Modified: vendor/clang/dist/docs/tools/dump_format_style.py ============================================================================== --- vendor/clang/dist/docs/tools/dump_format_style.py Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/tools/dump_format_style.py Mon Jun 26 20:33:12 2017 (r320376) @@ -24,10 +24,10 @@ def doxygen2rst(text): text = re.sub(r'\\\w+ ', '', text) return text -def indent(text, columns): +def indent(text, columns, indent_first_line=True): indent = ' ' * columns s = re.sub(r'\n([^\n])', '\n' + indent + '\\1', text, flags=re.S) - if s.startswith('\n'): + if not indent_first_line or s.startswith('\n'): return s return indent + s @@ -64,7 +64,9 @@ class NestedField: self.comment = comment.strip() def __str__(self): - return '\n* ``%s`` %s' % (self.name, doxygen2rst(self.comment)) + return '\n* ``%s`` %s' % ( + self.name, + doxygen2rst(indent(self.comment, 2, indent_first_line=False))) class Enum: def __init__(self, name, comment): @@ -179,7 +181,7 @@ def read_options(header): if enums.has_key(option.type): option.enum = enums[option.type] elif nested_structs.has_key(option.type): - option.nested_struct = nested_structs[option.type]; + option.nested_struct = nested_structs[option.type] else: raise Exception('Unknown type: %s' % option.type) return options @@ -195,4 +197,3 @@ contents = substitute(contents, 'FORMAT_STYLE_OPTIONS' with open(DOC_FILE, 'wb') as output: output.write(contents) - Modified: vendor/clang/dist/include/clang-c/CXCompilationDatabase.h ============================================================================== --- vendor/clang/dist/include/clang-c/CXCompilationDatabase.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang-c/CXCompilationDatabase.h Mon Jun 26 20:33:12 2017 (r320376) @@ -7,7 +7,7 @@ |* *| |*===----------------------------------------------------------------------===*| |* *| -|* This header provides a public inferface to use CompilationDatabase without *| +|* This header provides a public interface to use CompilationDatabase without *| |* the full Clang C++ API. *| |* *| \*===----------------------------------------------------------------------===*/ Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang-c/Index.h Mon Jun 26 20:33:12 2017 (r320376) @@ -7,7 +7,7 @@ |* *| |*===----------------------------------------------------------------------===*| |* *| -|* This header provides a public inferface to a Clang library for extracting *| +|* This header provides a public interface to a Clang library for extracting *| |* high-level symbol information from source files without exposing the full *| |* Clang C++ API. *| |* *| Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/AST/Decl.h Mon Jun 26 20:33:12 2017 (r320376) @@ -1656,6 +1656,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec unsigned HasImplicitReturnZero : 1; unsigned IsLateTemplateParsed : 1; unsigned IsConstexpr : 1; + unsigned InstantiationIsPending:1; /// \brief Indicates if the function uses __try. unsigned UsesSEHTry : 1; @@ -1751,6 +1752,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec IsDeleted(false), IsTrivial(false), IsDefaulted(false), IsExplicitlyDefaulted(false), HasImplicitReturnZero(false), IsLateTemplateParsed(false), IsConstexpr(isConstexprSpecified), + InstantiationIsPending(false), UsesSEHTry(false), HasSkippedBody(false), WillHaveBody(false), EndRangeLoc(NameInfo.getEndLoc()), TemplateOrSpecialization(), DNLoc(NameInfo.getInfo()) {} @@ -1872,7 +1874,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// bool isThisDeclarationADefinition() const { return IsDeleted || IsDefaulted || Body || IsLateTemplateParsed || - hasDefiningAttr(); + WillHaveBody || hasDefiningAttr(); } /// doesThisDeclarationHaveABody - Returns whether this specific @@ -1942,6 +1944,15 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// Whether this is a (C++11) constexpr function or constexpr constructor. bool isConstexpr() const { return IsConstexpr; } void setConstexpr(bool IC) { IsConstexpr = IC; } + + /// \brief Whether the instantiation of this function is pending. + /// This bit is set when the decision to instantiate this function is made + /// and unset if and when the function body is created. That leaves out + /// cases where instantiation did not happen because the template definition + /// was not seen in this TU. This bit remains set in those cases, under the + /// assumption that the instantiation will happen in some other TU. + bool instantiationIsPending() const { return InstantiationIsPending; } + void setInstantiationIsPending(bool IC) { InstantiationIsPending = IC; } /// \brief Indicates the function uses __try. bool usesSEHTry() const { return UsesSEHTry; } Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Mon Jun 26 20:33:12 2017 (r320376) @@ -202,26 +202,33 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu OBJC_TQ_CSNullability = 0x40 }; -protected: - // Enumeration values used in the bits stored in NextInContextAndBits. - enum { - /// \brief Whether this declaration is a top-level declaration (function, - /// global variable, etc.) that is lexically inside an objc container - /// definition. - TopLevelDeclInObjCContainerFlag = 0x01, - - /// \brief Whether this declaration is private to the module in which it was - /// defined. - ModulePrivateFlag = 0x02 + /// The kind of ownership a declaration has, for visibility purposes. + /// This enumeration is designed such that higher values represent higher + /// levels of name hiding. + enum class ModuleOwnershipKind : unsigned { + /// This declaration is not owned by a module. + Unowned, + /// This declaration has an owning module, but is globally visible + /// (typically because its owning module is visible and we know that + /// modules cannot later become hidden in this compilation). + /// After serialization and deserialization, this will be converted + /// to VisibleWhenImported. + Visible, + /// This declaration has an owning module, and is visible when that + /// module is imported. + VisibleWhenImported, + /// This declaration has an owning module, but is only visible to + /// lookups that occur within that module. + ModulePrivate }; - + +protected: /// \brief The next declaration within the same lexical /// DeclContext. These pointers form the linked list that is /// traversed via DeclContext's decls_begin()/decls_end(). /// - /// The extra two bits are used for the TopLevelDeclInObjCContainer and - /// ModulePrivate bits. - llvm::PointerIntPair NextInContextAndBits; + /// The extra two bits are used for the ModuleOwnershipKind. + llvm::PointerIntPair NextInContextAndBits; private: friend class DeclContext; @@ -282,6 +289,11 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// are regarded as "referenced" but not "used". unsigned Referenced : 1; + /// \brief Whether this declaration is a top-level declaration (function, + /// global variable, etc.) that is lexically inside an objc container + /// definition. + unsigned TopLevelDeclInObjCContainer : 1; + /// \brief Whether statistic collection is enabled. static bool StatisticsEnabled; @@ -294,11 +306,6 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Whether this declaration was loaded from an AST file. unsigned FromASTFile : 1; - /// \brief Whether this declaration is hidden from normal name lookup, e.g., - /// because it is was loaded from an AST file is either module-private or - /// because its submodule has not been made visible. - unsigned Hidden : 1; - /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. unsigned IdentifierNamespace : 13; @@ -332,26 +339,38 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu private: bool AccessDeclContextSanity() const; + /// Get the module ownership kind to use for a local lexical child of \p DC, + /// which may be either a local or (rarely) an imported declaration. + static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) { + if (DC) { + auto *D = cast(DC); + auto MOK = D->getModuleOwnershipKind(); + if (MOK != ModuleOwnershipKind::Unowned && + (!D->isFromASTFile() || D->hasLocalOwningModuleStorage())) + return MOK; + // If D is not local and we have no local module storage, then we don't + // need to track module ownership at all. + } + return ModuleOwnershipKind::Unowned; + } + protected: Decl(Kind DK, DeclContext *DC, SourceLocation L) - : NextInContextAndBits(), DeclCtx(DC), Loc(L), DeclKind(DK), - InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), - Referenced(false), Access(AS_none), FromASTFile(0), - Hidden(DC && cast(DC)->Hidden && - (!cast(DC)->isFromASTFile() || - hasLocalOwningModuleStorage())), + : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)), + DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(0), HasAttrs(false), + Implicit(false), Used(false), Referenced(false), + TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0), IdentifierNamespace(getIdentifierNamespaceForKind(DK)), CacheValidAndLinkage(0) { if (StatisticsEnabled) add(DK); } Decl(Kind DK, EmptyShell Empty) - : NextInContextAndBits(), DeclKind(DK), InvalidDecl(0), - HasAttrs(false), Implicit(false), Used(false), Referenced(false), - Access(AS_none), FromASTFile(0), Hidden(0), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)), - CacheValidAndLinkage(0) - { + : NextInContextAndBits(), DeclKind(DK), InvalidDecl(0), HasAttrs(false), + Implicit(false), Used(false), Referenced(false), + TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0), + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + CacheValidAndLinkage(0) { if (StatisticsEnabled) add(DK); } @@ -551,16 +570,11 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// global variable, etc.) that is lexically inside an objc container /// definition. bool isTopLevelDeclInObjCContainer() const { - return NextInContextAndBits.getInt() & TopLevelDeclInObjCContainerFlag; + return TopLevelDeclInObjCContainer; } void setTopLevelDeclInObjCContainer(bool V = true) { - unsigned Bits = NextInContextAndBits.getInt(); - if (V) - Bits |= TopLevelDeclInObjCContainerFlag; - else - Bits &= ~TopLevelDeclInObjCContainerFlag; - NextInContextAndBits.setInt(Bits); + TopLevelDeclInObjCContainer = V; } /// \brief Looks on this and related declarations for an applicable @@ -570,7 +584,7 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Whether this declaration was marked as being private to the /// module in which it was defined. bool isModulePrivate() const { - return NextInContextAndBits.getInt() & ModulePrivateFlag; + return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate; } /// \brief Whether this declaration is exported (by virtue of being lexically @@ -585,15 +599,14 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu const Attr *getDefiningAttr() const; protected: - /// \brief Specify whether this declaration was marked as being private + /// \brief Specify that this declaration was marked as being private /// to the module in which it was defined. - void setModulePrivate(bool MP = true) { - unsigned Bits = NextInContextAndBits.getInt(); - if (MP) - Bits |= ModulePrivateFlag; - else - Bits &= ~ModulePrivateFlag; - NextInContextAndBits.setInt(Bits); + void setModulePrivate() { + // The module-private specifier has no effect on unowned declarations. + // FIXME: We should track this in some way for source fidelity. + if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned) + return; + setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate); } /// \brief Set the owning module ID. @@ -692,7 +705,7 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Get the imported owning module, if this decl is from an imported /// (non-local) module. Module *getImportedOwningModule() const { - if (!isFromASTFile()) + if (!isFromASTFile() || !hasOwningModule()) return nullptr; return getOwningModuleSlow(); @@ -701,31 +714,57 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Get the local owning module, if known. Returns nullptr if owner is /// not yet known or declaration is not from a module. Module *getLocalOwningModule() const { - if (isFromASTFile() || !Hidden) + if (isFromASTFile() || !hasOwningModule()) return nullptr; assert(hasLocalOwningModuleStorage() && - "hidden local decl but no local module storage"); + "owned local decl but no local module storage"); return reinterpret_cast(this)[-1]; } void setLocalOwningModule(Module *M) { - assert(!isFromASTFile() && Hidden && hasLocalOwningModuleStorage() && + assert(!isFromASTFile() && hasOwningModule() && + hasLocalOwningModuleStorage() && "should not have a cached owning module"); reinterpret_cast(this)[-1] = M; } + /// Is this declaration owned by some module? + bool hasOwningModule() const { + return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned; + } + + /// Get the module that owns this declaration. Module *getOwningModule() const { return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule(); } - /// \brief Determine whether this declaration is hidden from name lookup. - bool isHidden() const { return Hidden; } + /// \brief Determine whether this declaration might be hidden from name + /// lookup. Note that the declaration might be visible even if this returns + /// \c false, if the owning module is visible within the query context. + // FIXME: Rename this to make it clearer what it does. + bool isHidden() const { + return (int)getModuleOwnershipKind() > (int)ModuleOwnershipKind::Visible; + } + /// Set that this declaration is globally visible, even if it came from a + /// module that is not visible. + void setVisibleDespiteOwningModule() { + if (hasOwningModule()) + setModuleOwnershipKind(ModuleOwnershipKind::Visible); + } + + /// \brief Get the kind of module ownership for this declaration. + ModuleOwnershipKind getModuleOwnershipKind() const { + return NextInContextAndBits.getInt(); + } + /// \brief Set whether this declaration is hidden from name lookup. - void setHidden(bool Hide) { - assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && - "declaration with no owning module can't be hidden"); - Hidden = Hide; + void setModuleOwnershipKind(ModuleOwnershipKind MOK) { + assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned && + MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() && + !hasLocalOwningModuleStorage()) && + "no storage available for owning module for this declaration"); + NextInContextAndBits.setInt(MOK); } unsigned getIdentifierNamespace() const { Modified: vendor/clang/dist/include/clang/Analysis/CloneDetection.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/CloneDetection.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/Analysis/CloneDetection.h Mon Jun 26 20:33:12 2017 (r320376) @@ -17,6 +17,8 @@ #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Regex.h" #include namespace clang { @@ -317,6 +319,26 @@ class MinGroupSizeConstraint { (public) /// Ensures that no clone group fully contains another clone group. struct OnlyLargestCloneConstraint { void constrain(std::vector &Result); +}; + +struct FilenamePatternConstraint { + StringRef IgnoredFilesPattern; + std::shared_ptr IgnoredFilesRegex; + + FilenamePatternConstraint(StringRef IgnoredFilesPattern) + : IgnoredFilesPattern(IgnoredFilesPattern) { + IgnoredFilesRegex = std::make_shared("^(" + + IgnoredFilesPattern.str() + "$)"); + } + + bool isAutoGenerated(const CloneDetector::CloneGroup &Group); + + void constrain(std::vector &CloneGroups) { + CloneConstraint::filterGroups( + CloneGroups, [this](const CloneDetector::CloneGroup &Group) { + return isAutoGenerated(Group); + }); + } }; /// Analyzes the pattern of the referenced variables in a statement. Modified: vendor/clang/dist/include/clang/Basic/Builtins.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/Builtins.def Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/Basic/Builtins.def Mon Jun 26 20:33:12 2017 (r320376) @@ -52,6 +52,7 @@ // LL -> long long // LLL -> __int128_t (e.g. LLLi) // W -> int64_t +// N -> 'int' size if target is LP64, 'L' otherwise. // S -> signed // U -> unsigned // I -> Required to constant fold to an integer constant expression. @@ -718,11 +719,11 @@ BUILTIN(__builtin_rindex, "c*cC*i", "Fn") LANGBUILTIN(_alloca, "v*z", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__assume, "vb", "n", ALL_MS_LANGUAGES) LIBBUILTIN(_byteswap_ushort, "UsUs", "fnc", "stdlib.h", ALL_MS_LANGUAGES) -LIBBUILTIN(_byteswap_ulong, "ULiULi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) +LIBBUILTIN(_byteswap_ulong, "UNiUNi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) LIBBUILTIN(_byteswap_uint64, "ULLiULLi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) LANGBUILTIN(__debugbreak, "v", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(__exception_code, "ULi", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_exception_code, "ULi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(__exception_code, "UNi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_exception_code, "UNi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__exception_info, "v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_exception_info, "v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__abnormal_termination, "i", "n", ALL_MS_LANGUAGES) @@ -730,33 +731,33 @@ LANGBUILTIN(_abnormal_termination, "i", "n", ALL_MS_L LANGBUILTIN(__GetExceptionInfo, "v*.", "ntu", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedAnd8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedAnd16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedAnd, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedAnd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange8, "ccD*cc", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange16, "ssD*ss", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedCompareExchange, "LiLiD*LiLi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedCompareExchange, "NiNiD*NiNi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange64, "LLiLLiD*LLiLLi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchangePointer, "v*v*D*v*v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedDecrement16, "ssD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedDecrement, "LiLiD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchange, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedDecrement, "NiNiD*", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchange, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchange8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchange16, "ssD*s", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeAdd8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeAdd16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchangeAdd, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchangeAdd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangePointer, "v*v*D*v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeSub8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeSub16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchangeSub, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchangeSub, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedIncrement16, "ssD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedIncrement, "LiLiD*", "n", ALL_MS_LANGUAGES) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:20 2017 Return-Path: Delivered-To: svn-src-all@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 40BEAD91353; Mon, 26 Jun 2017 20:33:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 EAF7164D94; Mon, 26 Jun 2017 20:33:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXJRS098835; Mon, 26 Jun 2017 20:33:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXJXn098834; Mon, 26 Jun 2017 20:33:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXJXn098834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320377 - vendor/clang/clang-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:20 -0000 Author: dim Date: Mon Jun 26 20:33:18 2017 New Revision: 320377 URL: https://svnweb.freebsd.org/changeset/base/320377 Log: Tag clang trunk r306325. Added: vendor/clang/clang-trunk-r306325/ - copied from r320376, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:26 2017 Return-Path: Delivered-To: svn-src-all@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 25EC7D913A8; Mon, 26 Jun 2017 20:33:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AB12F64E23; Mon, 26 Jun 2017 20:33:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXOG0098912; Mon, 26 Jun 2017 20:33:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXMpm098882; Mon, 26 Jun 2017 20:33:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXMpm098882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320378 - in vendor/compiler-rt/dist: . cmake include/xray lib/asan lib/asan/scripts lib/interception lib/interception/tests lib/lsan lib/msan lib/sanitizer_common lib/sanitizer_common/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:26 -0000 Author: dim Date: Mon Jun 26 20:33:22 2017 New Revision: 320378 URL: https://svnweb.freebsd.org/changeset/base/320378 Log: Vendor import of compiler-rt trunk r306325: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306325 Added: vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/pr33372.cc (contents, props changed) vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/ vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/dispatch.mm vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/lit.local.cfg vendor/compiler-rt/dist/test/profile/Linux/counter_promo_for.c (contents, props changed) vendor/compiler-rt/dist/test/profile/Linux/counter_promo_while.c (contents, props changed) vendor/compiler-rt/dist/test/xray/TestCases/Linux/arg1-arg0-logging.cc (contents, props changed) Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/include/xray/xray_interface.h vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist/lib/asan/weak_symbols.txt vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt vendor/compiler-rt/dist/lib/lsan/lsan.h vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc vendor/compiler-rt/dist/lib/lsan/lsan_thread.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang_other.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h vendor/compiler-rt/dist/lib/scudo/scudo_allocator_secondary.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc vendor/compiler-rt/dist/lib/xray/xray_interface.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/allocator_oom_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/preinstalled_signal.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/oom.cc vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/esan/TestCases/workingset-midreport.cpp vendor/compiler-rt/dist/test/esan/TestCases/workingset-samples.cpp vendor/compiler-rt/dist/test/esan/TestCases/workingset-simple.cpp vendor/compiler-rt/dist/test/lsan/lit.common.cfg vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc vendor/compiler-rt/dist/test/scudo/random_shuffle.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nonnull.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nullability.c Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/CMakeLists.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -7,13 +7,13 @@ # An important constraint of the build is that it only produces libraries # based on the ability of the host toolchain to target various platforms. +cmake_minimum_required(VERSION 3.4.3) + # Check if compiler-rt is built as a standalone project. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) project(CompilerRT C CXX ASM) set(COMPILER_RT_STANDALONE_BUILD TRUE) endif() - -cmake_minimum_required(VERSION 3.4.3) # Add path for custom compiler-rt modules. list(INSERT CMAKE_MODULE_PATH 0 Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Mon Jun 26 20:33:22 2017 (r320378) @@ -179,7 +179,7 @@ set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64}) set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64}) -set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}) +set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} powerpc64le) if(APPLE) Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/xray/xray_interface.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/include/xray/xray_interface.h Mon Jun 26 20:33:22 2017 (r320378) @@ -60,7 +60,8 @@ extern int __xray_remove_handler(); /// start logging their subsequent affected function calls (if patched). /// /// Returns 1 on success, 0 on error. -extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t)); +extern int __xray_set_handler_arg1(void (*entry)(int32_t, XRayEntryType, + uint64_t)); /// Disables the XRay handler used to log first arguments of function calls. /// Returns 1 on success, 0 on error. Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -160,7 +160,7 @@ struct QuarantineCallback { } void *Allocate(uptr size) { - return get_allocator().Allocate(cache_, size, 1, false); + return get_allocator().Allocate(cache_, size, 1); } void Deallocate(void *p) { @@ -266,7 +266,8 @@ struct Allocator { } void Initialize(const AllocatorOptions &options) { - allocator.Init(options.may_return_null, options.release_to_os_interval_ms); + SetAllocatorMayReturnNull(options.may_return_null); + allocator.Init(options.release_to_os_interval_ms); SharedInitCode(options); } @@ -302,7 +303,7 @@ struct Allocator { } void ReInitialize(const AllocatorOptions &options) { - allocator.SetMayReturnNull(options.may_return_null); + SetAllocatorMayReturnNull(options.may_return_null); allocator.SetReleaseToOSIntervalMs(options.release_to_os_interval_ms); SharedInitCode(options); @@ -323,7 +324,7 @@ struct Allocator { options->thread_local_quarantine_size_kb = quarantine.GetCacheSize() >> 10; options->min_redzone = atomic_load(&min_redzone, memory_order_acquire); options->max_redzone = atomic_load(&max_redzone, memory_order_acquire); - options->may_return_null = allocator.MayReturnNull(); + options->may_return_null = AllocatorMayReturnNull(); options->alloc_dealloc_mismatch = atomic_load(&alloc_dealloc_mismatch, memory_order_acquire); options->release_to_os_interval_ms = allocator.ReleaseToOSIntervalMs(); @@ -374,7 +375,7 @@ struct Allocator { if (UNLIKELY(!asan_inited)) AsanInitFromRtl(); if (RssLimitExceeded()) - return allocator.ReturnNullOrDieOnOOM(); + return AsanAllocator::FailureHandler::OnOOM(); Flags &fl = *flags(); CHECK(stack); const uptr min_alignment = SHADOW_GRANULARITY; @@ -407,24 +408,22 @@ struct Allocator { if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize) { Report("WARNING: AddressSanitizer failed to allocate 0x%zx bytes\n", (void*)size); - return allocator.ReturnNullOrDieOnBadRequest(); + return AsanAllocator::FailureHandler::OnBadRequest(); } AsanThread *t = GetCurrentThread(); void *allocated; if (t) { AllocatorCache *cache = GetAllocatorCache(&t->malloc_storage()); - allocated = - allocator.Allocate(cache, needed_size, 8, false); + allocated = allocator.Allocate(cache, needed_size, 8); } else { SpinMutexLock l(&fallback_mutex); AllocatorCache *cache = &fallback_allocator_cache; - allocated = - allocator.Allocate(cache, needed_size, 8, false); + allocated = allocator.Allocate(cache, needed_size, 8); } + if (!allocated) + return nullptr; - if (!allocated) return allocator.ReturnNullOrDieOnOOM(); - if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) { // Heap poisoning is enabled, but the allocator provides an unpoisoned // chunk. This is possible if CanPoisonMemory() was false for some @@ -634,7 +633,7 @@ struct Allocator { void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) { if (CallocShouldReturnNullDueToOverflow(size, nmemb)) - return allocator.ReturnNullOrDieOnBadRequest(); + return AsanAllocator::FailureHandler::OnBadRequest(); void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false); // If the memory comes from the secondary allocator no need to clear it // as it comes directly from mmap. Modified: vendor/compiler-rt/dist/lib/asan/asan_report.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -204,6 +204,14 @@ class ScopedInErrorReport { error_report_callback(buffer_copy.data()); } + if (halt_on_error_ && common_flags()->abort_on_error) { + // On Android the message is truncated to 512 characters. + // FIXME: implement "compact" error format, possibly without, or with + // highly compressed stack traces? + // FIXME: or just use the summary line as abort message? + SetAbortMessage(buffer_copy.data()); + } + // In halt_on_error = false mode, reset the current error object (before // unlocking). if (!halt_on_error_) Modified: vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup ============================================================================== --- vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon Jun 26 20:33:22 2017 (r320378) @@ -410,15 +410,15 @@ if ! ( cd "$TMPDIRBASE" && diff -qr old/ new/ ) ; then install "$TMPDIR/asanwrapper" /system/bin 755 install "$TMPDIR/asanwrapper64" /system/bin 755 - adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK - adb_shell ln -s $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK else install "$TMPDIR/$ASAN_RT" /system/lib 644 install "$TMPDIR/app_process32" /system/bin 755 $CTX install "$TMPDIR/app_process.wrap" /system/bin 755 $CTX install "$TMPDIR/asanwrapper" /system/bin 755 $CTX - adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK adb_shell rm /system/bin/app_process adb_shell ln -s /system/bin/app_process.wrap /system/bin/app_process Modified: vendor/compiler-rt/dist/lib/asan/weak_symbols.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/weak_symbols.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/weak_symbols.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -1,3 +1,12 @@ ___asan_default_options ___asan_default_suppressions ___asan_on_error +___asan_set_shadow_00 +___asan_set_shadow_f1 +___asan_set_shadow_f2 +___asan_set_shadow_f3 +___asan_set_shadow_f4 +___asan_set_shadow_f5 +___asan_set_shadow_f6 +___asan_set_shadow_f7 +___asan_set_shadow_f8 Modified: vendor/compiler-rt/dist/lib/interception/interception_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/interception/interception_win.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/interception/interception_win.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -477,7 +477,7 @@ static size_t GetInstructionSize(uptr address, size_t* switch (*(u8*)address) { case 0xA1: // A1 XX XX XX XX XX XX XX XX : // movabs eax, dword ptr ds:[XXXXXXXX] - return 8; + return 9; } switch (*(u16*)address) { @@ -495,6 +495,11 @@ static size_t GetInstructionSize(uptr address, size_t* case 0x5741: // push r15 case 0x9066: // Two-byte NOP return 2; + + case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX] + if (rel_offset) + *rel_offset = 2; + return 6; } switch (0x00FFFFFF & *(u32*)address) { Modified: vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -170,6 +170,13 @@ const u8 kPatchableCode5[] = { 0x54, // push esp }; +#if SANITIZER_WINDOWS64 +u8 kLoadGlobalCode[] = { + 0x8B, 0x05, 0x00, 0x00, 0x00, 0x00, // mov eax [rip + global] + 0xC3, // ret +}; +#endif + const u8 kUnpatchableCode1[] = { 0xC3, // ret }; @@ -501,6 +508,10 @@ TEST(Interception, PatchableFunction) { #endif EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override)); EXPECT_TRUE(TestFunctionPatching(kPatchableCode5, override)); + +#if SANITIZER_WINDOWS64 + EXPECT_TRUE(TestFunctionPatching(kLoadGlobalCode, override)); +#endif EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override)); EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override)); Modified: vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -13,6 +13,7 @@ set(LSAN_SOURCES lsan_allocator.cc lsan_linux.cc lsan_interceptors.cc + lsan_mac.cc lsan_malloc_mac.cc lsan_preinit.cc lsan_thread.cc) Modified: vendor/compiler-rt/dist/lib/lsan/lsan.h ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan.h Mon Jun 26 20:33:22 2017 (r320378) @@ -38,6 +38,8 @@ GET_STACK_TRACE(__sanitizer::common_flags()->malloc_context_size, \ common_flags()->fast_unwind_on_malloc) +#define GET_STACK_TRACE_THREAD GET_STACK_TRACE(kStackTraceMax, true) + namespace __lsan { void InitializeInterceptors(); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -38,8 +38,8 @@ typedef CombinedAllocatorallocator_may_return_null); allocator.InitLinkerInitialized( - common_flags()->allocator_may_return_null, common_flags()->allocator_release_to_os_interval_ms); } @@ -76,7 +76,7 @@ void *Allocate(const StackTrace &stack, uptr size, upt Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", size); return nullptr; } - void *p = allocator.Allocate(GetAllocatorCache(), size, alignment, false); + void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); // Do not rely on the allocator to clear the memory (it's slow). if (cleared && allocator.FromPrimary(p)) memset(p, 0, size); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -79,8 +79,7 @@ void EnableInThisThread() { u32 GetCurrentThread() { thread_local_data_t *data = get_tls_val(false); - CHECK(data); - return data->current_thread_id; + return data ? data->current_thread_id : kInvalidTid; } void SetCurrentThread(u32 tid) { get_tls_val(true)->current_thread_id = tid; } Added: vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -0,0 +1,192 @@ +//===-- lsan_mac.cc -------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of LeakSanitizer, a memory leak checker. +// +// Mac-specific details. +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_platform.h" +#if SANITIZER_MAC + +#include "interception/interception.h" +#include "lsan.h" +#include "lsan_allocator.h" +#include "lsan_thread.h" + +#include + +namespace __lsan { +// Support for the following functions from libdispatch on Mac OS: +// dispatch_async_f() +// dispatch_async() +// dispatch_sync_f() +// dispatch_sync() +// dispatch_after_f() +// dispatch_after() +// dispatch_group_async_f() +// dispatch_group_async() +// TODO(glider): libdispatch API contains other functions that we don't support +// yet. +// +// dispatch_sync() and dispatch_sync_f() are synchronous, although chances are +// they can cause jobs to run on a thread different from the current one. +// TODO(glider): if so, we need a test for this (otherwise we should remove +// them). +// +// The following functions use dispatch_barrier_async_f() (which isn't a library +// function but is exported) and are thus supported: +// dispatch_source_set_cancel_handler_f() +// dispatch_source_set_cancel_handler() +// dispatch_source_set_event_handler_f() +// dispatch_source_set_event_handler() +// +// The reference manual for Grand Central Dispatch is available at +// http://developer.apple.com/library/mac/#documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html +// The implementation details are at +// http://libdispatch.macosforge.org/trac/browser/trunk/src/queue.c + +typedef void *dispatch_group_t; +typedef void *dispatch_queue_t; +typedef void *dispatch_source_t; +typedef u64 dispatch_time_t; +typedef void (*dispatch_function_t)(void *block); +typedef void *(*worker_t)(void *block); + +// A wrapper for the ObjC blocks used to support libdispatch. +typedef struct { + void *block; + dispatch_function_t func; + u32 parent_tid; +} lsan_block_context_t; + +ALWAYS_INLINE +void lsan_register_worker_thread(int parent_tid) { + if (GetCurrentThread() == kInvalidTid) { + u32 tid = ThreadCreate(parent_tid, 0, true); + ThreadStart(tid, GetTid()); + SetCurrentThread(tid); + } +} + +// For use by only those functions that allocated the context via +// alloc_lsan_context(). +extern "C" void lsan_dispatch_call_block_and_release(void *block) { + lsan_block_context_t *context = (lsan_block_context_t *)block; + VReport(2, + "lsan_dispatch_call_block_and_release(): " + "context: %p, pthread_self: %p\n", + block, pthread_self()); + lsan_register_worker_thread(context->parent_tid); + // Call the original dispatcher for the block. + context->func(context->block); + lsan_free(context); +} + +} // namespace __lsan + +using namespace __lsan; // NOLINT + +// Wrap |ctxt| and |func| into an lsan_block_context_t. +// The caller retains control of the allocated context. +extern "C" lsan_block_context_t *alloc_lsan_context(void *ctxt, + dispatch_function_t func) { + GET_STACK_TRACE_THREAD; + lsan_block_context_t *lsan_ctxt = + (lsan_block_context_t *)lsan_malloc(sizeof(lsan_block_context_t), stack); + lsan_ctxt->block = ctxt; + lsan_ctxt->func = func; + lsan_ctxt->parent_tid = GetCurrentThread(); + return lsan_ctxt; +} + +// Define interceptor for dispatch_*_f function with the three most common +// parameters: dispatch_queue_t, context, dispatch_function_t. +#define INTERCEPT_DISPATCH_X_F_3(dispatch_x_f) \ + INTERCEPTOR(void, dispatch_x_f, dispatch_queue_t dq, void *ctxt, \ + dispatch_function_t func) { \ + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); \ + return REAL(dispatch_x_f)(dq, (void *)lsan_ctxt, \ + lsan_dispatch_call_block_and_release); \ + } + +INTERCEPT_DISPATCH_X_F_3(dispatch_async_f) +INTERCEPT_DISPATCH_X_F_3(dispatch_sync_f) +INTERCEPT_DISPATCH_X_F_3(dispatch_barrier_async_f) + +INTERCEPTOR(void, dispatch_after_f, dispatch_time_t when, dispatch_queue_t dq, + void *ctxt, dispatch_function_t func) { + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); + return REAL(dispatch_after_f)(when, dq, (void *)lsan_ctxt, + lsan_dispatch_call_block_and_release); +} + +INTERCEPTOR(void, dispatch_group_async_f, dispatch_group_t group, + dispatch_queue_t dq, void *ctxt, dispatch_function_t func) { + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); + REAL(dispatch_group_async_f) + (group, dq, (void *)lsan_ctxt, lsan_dispatch_call_block_and_release); +} + +#if !defined(MISSING_BLOCKS_SUPPORT) +extern "C" { +void dispatch_async(dispatch_queue_t dq, void (^work)(void)); +void dispatch_group_async(dispatch_group_t dg, dispatch_queue_t dq, + void (^work)(void)); +void dispatch_after(dispatch_time_t when, dispatch_queue_t queue, + void (^work)(void)); +void dispatch_source_set_cancel_handler(dispatch_source_t ds, + void (^work)(void)); +void dispatch_source_set_event_handler(dispatch_source_t ds, + void (^work)(void)); +} + +#define GET_LSAN_BLOCK(work) \ + void (^lsan_block)(void); \ + int parent_tid = GetCurrentThread(); \ + lsan_block = ^(void) { \ + lsan_register_worker_thread(parent_tid); \ + work(); \ + } + +INTERCEPTOR(void, dispatch_async, dispatch_queue_t dq, void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_async)(dq, lsan_block); +} + +INTERCEPTOR(void, dispatch_group_async, dispatch_group_t dg, + dispatch_queue_t dq, void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_group_async)(dg, dq, lsan_block); +} + +INTERCEPTOR(void, dispatch_after, dispatch_time_t when, dispatch_queue_t queue, + void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_after)(when, queue, lsan_block); +} + +INTERCEPTOR(void, dispatch_source_set_cancel_handler, dispatch_source_t ds, + void (^work)(void)) { + if (!work) { + REAL(dispatch_source_set_cancel_handler)(ds, work); + return; + } + GET_LSAN_BLOCK(work); + REAL(dispatch_source_set_cancel_handler)(ds, lsan_block); +} + +INTERCEPTOR(void, dispatch_source_set_event_handler, dispatch_source_t ds, + void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_source_set_event_handler)(ds, lsan_block); +} +#endif + +#endif // SANITIZER_MAC Modified: vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -77,7 +77,7 @@ u32 ThreadCreate(u32 parent_tid, uptr user_id, bool de /* arg */ nullptr); } -void ThreadStart(u32 tid, tid_t os_id) { +void ThreadStart(u32 tid, tid_t os_id, bool workerthread) { OnStartedArgs args; uptr stack_size = 0; uptr tls_size = 0; @@ -87,7 +87,7 @@ void ThreadStart(u32 tid, tid_t os_id) { args.tls_end = args.tls_begin + tls_size; GetAllocatorCacheRange(&args.cache_begin, &args.cache_end); args.dtls = DTLS_Get(); - thread_registry->StartThread(tid, os_id, /*workerthread*/ false, &args); + thread_registry->StartThread(tid, os_id, workerthread, &args); } void ThreadFinish() { Modified: vendor/compiler-rt/dist/lib/lsan/lsan_thread.h ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_thread.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_thread.h Mon Jun 26 20:33:22 2017 (r320378) @@ -45,7 +45,7 @@ class ThreadContext : public ThreadContextBase { void InitializeThreadRegistry(); -void ThreadStart(u32 tid, tid_t os_id); +void ThreadStart(u32 tid, tid_t os_id, bool workerthread = false); void ThreadFinish(); u32 ThreadCreate(u32 tid, uptr uid, bool detached); void ThreadJoin(u32 tid); Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -119,9 +119,8 @@ static AllocatorCache fallback_allocator_cache; static SpinMutex fallback_mutex; void MsanAllocatorInit() { - allocator.Init( - common_flags()->allocator_may_return_null, - common_flags()->allocator_release_to_os_interval_ms); + SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null); + allocator.Init(common_flags()->allocator_release_to_os_interval_ms); } AllocatorCache *GetAllocatorCache(MsanThreadLocalMallocStorage *ms) { @@ -139,17 +138,17 @@ static void *MsanAllocate(StackTrace *stack, uptr size if (size > kMaxAllowedMallocSize) { Report("WARNING: MemorySanitizer failed to allocate %p bytes\n", (void *)size); - return allocator.ReturnNullOrDieOnBadRequest(); + return Allocator::FailureHandler::OnBadRequest(); } MsanThread *t = GetCurrentThread(); void *allocated; if (t) { AllocatorCache *cache = GetAllocatorCache(&t->malloc_storage()); - allocated = allocator.Allocate(cache, size, alignment, false); + allocated = allocator.Allocate(cache, size, alignment); } else { SpinMutexLock l(&fallback_mutex); AllocatorCache *cache = &fallback_allocator_cache; - allocated = allocator.Allocate(cache, size, alignment, false); + allocated = allocator.Allocate(cache, size, alignment); } Metadata *meta = reinterpret_cast(allocator.GetMetaData(allocated)); @@ -197,7 +196,7 @@ void MsanDeallocate(StackTrace *stack, void *p) { void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { if (CallocShouldReturnNullDueToOverflow(size, nmemb)) - return allocator.ReturnNullOrDieOnBadRequest(); + return Allocator::FailureHandler::OnBadRequest(); return MsanReallocate(stack, nullptr, nmemb * size, sizeof(u64), true); } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -94,8 +94,7 @@ InternalAllocator *internal_allocator() { SpinMutexLock l(&internal_alloc_init_mu); if (atomic_load(&internal_allocator_initialized, memory_order_relaxed) == 0) { - internal_allocator_instance->Init( - /* may_return_null */ false, kReleaseToOSIntervalNever); + internal_allocator_instance->Init(kReleaseToOSIntervalNever); atomic_store(&internal_allocator_initialized, 1, memory_order_release); } } @@ -108,9 +107,9 @@ static void *RawInternalAlloc(uptr size, InternalAlloc if (cache == 0) { SpinMutexLock l(&internal_allocator_cache_mu); return internal_allocator()->Allocate(&internal_allocator_cache, size, - alignment, false); + alignment); } - return internal_allocator()->Allocate(cache, size, alignment, false); + return internal_allocator()->Allocate(cache, size, alignment); } static void *RawInternalRealloc(void *ptr, uptr size, @@ -162,7 +161,7 @@ void *InternalRealloc(void *addr, uptr size, InternalA void *InternalCalloc(uptr count, uptr size, InternalAllocatorCache *cache) { if (CallocShouldReturnNullDueToOverflow(count, size)) - return internal_allocator()->ReturnNullOrDieOnBadRequest(); + return InternalAllocator::FailureHandler::OnBadRequest(); void *p = InternalAlloc(count * size, cache); if (p) internal_memset(p, 0, count * size); return p; @@ -209,17 +208,51 @@ bool CallocShouldReturnNullDueToOverflow(uptr size, up return (max / size) < n; } -static atomic_uint8_t reporting_out_of_memory = {0}; +static atomic_uint8_t allocator_out_of_memory = {0}; +static atomic_uint8_t allocator_may_return_null = {0}; -bool IsReportingOOM() { return atomic_load_relaxed(&reporting_out_of_memory); } +bool IsAllocatorOutOfMemory() { + return atomic_load_relaxed(&allocator_out_of_memory); +} -void NORETURN ReportAllocatorCannotReturnNull(bool out_of_memory) { - if (out_of_memory) atomic_store_relaxed(&reporting_out_of_memory, 1); +// Prints error message and kills the program. +void NORETURN ReportAllocatorCannotReturnNull() { Report("%s's allocator is terminating the process instead of returning 0\n", SanitizerToolName); Report("If you don't like this behavior set allocator_may_return_null=1\n"); CHECK(0); Die(); +} + +bool AllocatorMayReturnNull() { + return atomic_load(&allocator_may_return_null, memory_order_relaxed); +} + +void SetAllocatorMayReturnNull(bool may_return_null) { + atomic_store(&allocator_may_return_null, may_return_null, + memory_order_relaxed); +} + +void *ReturnNullOrDieOnFailure::OnBadRequest() { + if (AllocatorMayReturnNull()) + return nullptr; + ReportAllocatorCannotReturnNull(); +} + +void *ReturnNullOrDieOnFailure::OnOOM() { + atomic_store_relaxed(&allocator_out_of_memory, 1); + if (AllocatorMayReturnNull()) + return nullptr; + ReportAllocatorCannotReturnNull(); +} + +void *DieOnFailure::OnBadRequest() { + ReportAllocatorCannotReturnNull(); +} + +void *DieOnFailure::OnOOM() { + atomic_store_relaxed(&allocator_out_of_memory, 1); + ReportAllocatorCannotReturnNull(); } } // namespace __sanitizer Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,12 +24,28 @@ namespace __sanitizer { -// Returns true if ReportAllocatorCannotReturnNull(true) was called. -// Can be use to avoid memory hungry operations. -bool IsReportingOOM(); +// Since flags are immutable and allocator behavior can be changed at runtime +// (unit tests or ASan on Android are some examples), allocator_may_return_null +// flag value is cached here and can be altered later. +bool AllocatorMayReturnNull(); +void SetAllocatorMayReturnNull(bool may_return_null); -// Prints error message and kills the program. -void NORETURN ReportAllocatorCannotReturnNull(bool out_of_memory); +// Allocator failure handling policies: +// Implements AllocatorMayReturnNull policy, returns null when the flag is set, +// dies otherwise. +struct ReturnNullOrDieOnFailure { + static void *OnBadRequest(); + static void *OnOOM(); +}; +// Always dies on the failure. +struct DieOnFailure { + static void *OnBadRequest(); + static void *OnOOM(); +}; + +// Returns true if allocator detected OOM condition. Can be used to avoid memory +// hungry operations. Set when AllocatorReturnNullOrDieOnOOM() is called. +bool IsAllocatorOutOfMemory(); // Allocators call these callbacks on mmap/munmap. struct NoOpMapUnmapCallback { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,31 +24,26 @@ template // NOLINT class CombinedAllocator { public: - void InitCommon(bool may_return_null, s32 release_to_os_interval_ms) { - primary_.Init(release_to_os_interval_ms); - atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); - } + typedef typename SecondaryAllocator::FailureHandler FailureHandler; - void InitLinkerInitialized( - bool may_return_null, s32 release_to_os_interval_ms) { - secondary_.InitLinkerInitialized(may_return_null); + void InitLinkerInitialized(s32 release_to_os_interval_ms) { + primary_.Init(release_to_os_interval_ms); + secondary_.InitLinkerInitialized(); stats_.InitLinkerInitialized(); - InitCommon(may_return_null, release_to_os_interval_ms); } - void Init(bool may_return_null, s32 release_to_os_interval_ms) { - secondary_.Init(may_return_null); + void Init(s32 release_to_os_interval_ms) { + primary_.Init(release_to_os_interval_ms); + secondary_.Init(); stats_.Init(); - InitCommon(may_return_null, release_to_os_interval_ms); } - void *Allocate(AllocatorCache *cache, uptr size, uptr alignment, - bool cleared = false) { + void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) { // Returning 0 on malloc(0) may break a lot of code. if (size == 0) size = 1; if (size + alignment < size) - return ReturnNullOrDieOnBadRequest(); + return FailureHandler::OnBadRequest(); uptr original_size = size; // If alignment requirements are to be fulfilled by the frontend allocator // rather than by the primary or secondary, passing an alignment lower than @@ -56,49 +51,24 @@ class CombinedAllocator { // alignment check. if (alignment > 8) size = RoundUpTo(size, alignment); - void *res; - bool from_primary = primary_.CanAllocate(size, alignment); // The primary allocator should return a 2^x aligned allocation when // requested 2^x bytes, hence using the rounded up 'size' when being // serviced by the primary (this is no longer true when the primary is // using a non-fixed base address). The secondary takes care of the // alignment without such requirement, and allocating 'size' would use // extraneous memory, so we employ 'original_size'. - if (from_primary) + void *res; + if (primary_.CanAllocate(size, alignment)) res = cache->Allocate(&primary_, primary_.ClassID(size)); else res = secondary_.Allocate(&stats_, original_size, alignment); + if (!res) + return FailureHandler::OnOOM(); if (alignment > 8) CHECK_EQ(reinterpret_cast(res) & (alignment - 1), 0); - // When serviced by the secondary, the chunk comes from a mmap allocation - // and will be zero'd out anyway. We only need to clear our the chunk if - // it was serviced by the primary, hence using the rounded up 'size'. - if (cleared && res && from_primary) - internal_bzero_aligned16(res, RoundUpTo(size, 16)); return res; } - bool MayReturnNull() const { - return atomic_load(&may_return_null_, memory_order_acquire); - } - - void *ReturnNullOrDieOnBadRequest() { - if (MayReturnNull()) - return nullptr; - ReportAllocatorCannotReturnNull(false); - } - - void *ReturnNullOrDieOnOOM() { - if (MayReturnNull()) - return nullptr; - ReportAllocatorCannotReturnNull(true); - } - - void SetMayReturnNull(bool may_return_null) { - secondary_.SetMayReturnNull(may_return_null); - atomic_store(&may_return_null_, may_return_null, memory_order_release); - } - s32 ReleaseToOSIntervalMs() const { return primary_.ReleaseToOSIntervalMs(); } @@ -219,6 +189,5 @@ class CombinedAllocator { PrimaryAllocator primary_; SecondaryAllocator secondary_; AllocatorGlobalStats stats_; - atomic_uint8_t may_return_null_; }; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h Mon Jun 26 20:33:22 2017 (r320378) @@ -47,7 +47,8 @@ typedef SizeClassAllocatorLocalCache > InternalAllocator; + LargeMmapAllocator + > InternalAllocator; void *InternalAlloc(uptr size, InternalAllocatorCache *cache = nullptr, uptr alignment = 0); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h Mon Jun 26 20:33:22 2017 (r320378) @@ -144,8 +144,10 @@ struct SizeClassAllocator32LocalCache { CHECK_NE(class_id, 0UL); CHECK_LT(class_id, kNumClasses); PerClass *c = &per_class_[class_id]; - if (UNLIKELY(c->count == 0)) - Refill(allocator, class_id); + if (UNLIKELY(c->count == 0)) { + if (UNLIKELY(!Refill(allocator, class_id))) + return nullptr; + } stats_.Add(AllocatorStatAllocated, c->class_size); void *res = c->batch[--c->count]; PREFETCH(c->batch[c->count - 1]); @@ -227,14 +229,17 @@ struct SizeClassAllocator32LocalCache { Deallocate(allocator, batch_class_id, b); } - NOINLINE void Refill(SizeClassAllocator *allocator, uptr class_id) { + NOINLINE bool Refill(SizeClassAllocator *allocator, uptr class_id) { InitCache(); PerClass *c = &per_class_[class_id]; TransferBatch *b = allocator->AllocateBatch(&stats_, this, class_id); + if (UNLIKELY(!b)) + return false; CHECK_GT(b->Count(), 0); b->CopyToArray(c->batch); c->count = b->Count(); DestroyBatch(class_id, allocator, b); + return true; } NOINLINE void Drain(SizeClassAllocator *allocator, uptr class_id) { @@ -244,6 +249,10 @@ struct SizeClassAllocator32LocalCache { uptr first_idx_to_drain = c->count - cnt; TransferBatch *b = CreateBatch( class_id, allocator, (TransferBatch *)c->batch[first_idx_to_drain]); + // Failure to allocate a batch while releasing memory is non recoverable. + // TODO(alekseys): Figure out how to do it without allocating a new batch. + if (UNLIKELY(!b)) + DieOnFailure::OnOOM(); b->SetFromArray(allocator->GetRegionBeginBySizeClass(class_id), &c->batch[first_idx_to_drain], cnt); c->count -= cnt; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,7 +24,8 @@ template struct SizeClassAll // be returned by MmapOrDie(). // // Region: -// a result of a single call to MmapAlignedOrDie(kRegionSize, kRegionSize). +// a result of a single call to MmapAlignedOrDieOnFatalError(kRegionSize, +// kRegionSize). // Since the regions are aligned by kRegionSize, there are exactly // kNumPossibleRegions possible regions in the address space and so we keep // a ByteMap possible_regions to store the size classes of each Region. @@ -149,8 +150,9 @@ class SizeClassAllocator32 { CHECK_LT(class_id, kNumClasses); SizeClassInfo *sci = GetSizeClassInfo(class_id); SpinMutexLock l(&sci->mutex); - if (sci->free_list.empty()) - PopulateFreeList(stat, c, sci, class_id); + if (sci->free_list.empty() && + UNLIKELY(!PopulateFreeList(stat, c, sci, class_id))) + return nullptr; CHECK(!sci->free_list.empty()); TransferBatch *b = sci->free_list.front(); sci->free_list.pop_front(); @@ -277,8 +279,10 @@ class SizeClassAllocator32 { uptr AllocateRegion(AllocatorStats *stat, uptr class_id) { CHECK_LT(class_id, kNumClasses); - uptr res = reinterpret_cast(MmapAlignedOrDie(kRegionSize, kRegionSize, - "SizeClassAllocator32")); + uptr res = reinterpret_cast(MmapAlignedOrDieOnFatalError( + kRegionSize, kRegionSize, "SizeClassAllocator32")); + if (UNLIKELY(!res)) + return 0; MapUnmapCallback().OnMap(res, kRegionSize); stat->Add(AllocatorStatMapped, kRegionSize); CHECK_EQ(0U, (res & (kRegionSize - 1))); @@ -291,16 +295,20 @@ class SizeClassAllocator32 { return &size_class_info_array[class_id]; } - void PopulateFreeList(AllocatorStats *stat, AllocatorCache *c, + bool PopulateFreeList(AllocatorStats *stat, AllocatorCache *c, SizeClassInfo *sci, uptr class_id) { uptr size = ClassIdToSize(class_id); uptr reg = AllocateRegion(stat, class_id); + if (UNLIKELY(!reg)) + return false; uptr n_chunks = kRegionSize / (size + kMetadataSize); uptr max_count = TransferBatch::MaxCached(class_id); TransferBatch *b = nullptr; for (uptr i = reg; i < reg + n_chunks * size; i += size) { if (!b) { b = c->CreateBatch(class_id, this, (TransferBatch*)i); + if (!b) + return false; b->Clear(); } b->Add((void*)i); @@ -314,6 +322,7 @@ class SizeClassAllocator32 { CHECK_GT(b->Count(), 0); sci->free_list.push_back(b); } + return true; } ByteMap possible_regions; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h Mon Jun 26 20:33:22 2017 (r320378) @@ -17,17 +17,19 @@ // This class can (de)allocate only large chunks of memory using mmap/unmap. // The main purpose of this allocator is to cover large and rare allocation // sizes not covered by more efficient allocators (e.g. SizeClassAllocator64). -template +template class LargeMmapAllocator { public: - void InitLinkerInitialized(bool may_return_null) { + typedef FailureHandlerT FailureHandler; + + void InitLinkerInitialized() { page_size_ = GetPageSizeCached(); - atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); } - void Init(bool may_return_null) { + void Init() { internal_memset(this, 0, sizeof(*this)); - InitLinkerInitialized(may_return_null); + InitLinkerInitialized(); } void *Allocate(AllocatorStats *stat, uptr size, uptr alignment) { @@ -37,11 +39,11 @@ class LargeMmapAllocator { map_size += alignment; // Overflow. if (map_size < size) - return ReturnNullOrDieOnBadRequest(); + return FailureHandler::OnBadRequest(); uptr map_beg = reinterpret_cast( MmapOrDieOnFatalError(map_size, "LargeMmapAllocator")); if (!map_beg) - return ReturnNullOrDieOnOOM(); + return FailureHandler::OnOOM(); CHECK(IsAligned(map_beg, page_size_)); MapUnmapCallback().OnMap(map_beg, map_size); uptr map_end = map_beg + map_size; @@ -75,24 +77,6 @@ class LargeMmapAllocator { return reinterpret_cast(res); } - bool MayReturnNull() const { - return atomic_load(&may_return_null_, memory_order_acquire); - } - - void *ReturnNullOrDieOnBadRequest() { - if (MayReturnNull()) return nullptr; - ReportAllocatorCannotReturnNull(false); - } - - void *ReturnNullOrDieOnOOM() { - if (MayReturnNull()) return nullptr; - ReportAllocatorCannotReturnNull(true); - } - - void SetMayReturnNull(bool may_return_null) { - atomic_store(&may_return_null_, may_return_null, memory_order_release); - } - void Deallocate(AllocatorStats *stat, void *p) { Header *h = GetHeader(p); { @@ -278,7 +262,6 @@ class LargeMmapAllocator { struct Stats { uptr n_allocs, n_frees, currently_allocated, max_allocated, by_size_log[64]; } stats; - atomic_uint8_t may_return_null_; SpinMutex mutex_; }; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h Mon Jun 26 20:33:22 2017 (r320378) @@ -71,16 +71,25 @@ INLINE typename T::Type atomic_exchange(volatile T *a, return v; } -template -INLINE bool atomic_compare_exchange_strong(volatile T *a, - typename T::Type *cmp, +template +INLINE bool atomic_compare_exchange_strong(volatile T *a, typename T::Type *cmp, typename T::Type xchg, memory_order mo) { typedef typename T::Type Type; Type cmpv = *cmp; - Type prev = __sync_val_compare_and_swap(&a->val_dont_use, cmpv, xchg); - if (prev == cmpv) - return true; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:30 2017 Return-Path: Delivered-To: svn-src-all@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 0923ED91415; Mon, 26 Jun 2017 20:33:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A2BA664E9F; Mon, 26 Jun 2017 20:33:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXSmD098960; Mon, 26 Jun 2017 20:33:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXSjC098959; Mon, 26 Jun 2017 20:33:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXSjC098959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320379 - vendor/compiler-rt/compiler-rt-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:30 -0000 Author: dim Date: Mon Jun 26 20:33:28 2017 New Revision: 320379 URL: https://svnweb.freebsd.org/changeset/base/320379 Log: Tag compiler-rt trunk r306325. Added: vendor/compiler-rt/compiler-rt-trunk-r306325/ - copied from r320378, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:42 2017 Return-Path: Delivered-To: svn-src-all@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 AD2D4D914B9; Mon, 26 Jun 2017 20:33:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 55AC664FBD; Mon, 26 Jun 2017 20:33:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXfCN099090; Mon, 26 Jun 2017 20:33:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXfNO099089; Mon, 26 Jun 2017 20:33:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXfNO099089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320381 - vendor/libc++/libc++-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:42 -0000 Author: dim Date: Mon Jun 26 20:33:41 2017 New Revision: 320381 URL: https://svnweb.freebsd.org/changeset/base/320381 Log: Tag libc++ trunk r306325. Added: vendor/libc++/libc++-trunk-r306325/ - copied from r320380, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:38 2017 Return-Path: Delivered-To: svn-src-all@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 98117D914A2; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 427EC64F5D; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXbAI099041; Mon, 26 Jun 2017 20:33:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXYkv099011; Mon, 26 Jun 2017 20:33:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXYkv099011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320380 - in vendor/libc++/dist: . include include/experimental src/experimental/filesystem test/std/algorithms/alg.nonmodifying/alg.foreach test/std/experimental/any/any.class/any.assi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:38 -0000 Author: dim Date: Mon Jun 26 20:33:34 2017 New Revision: 320380 URL: https://svnweb.freebsd.org/changeset/base/320380 Log: Vendor import of libc++ trunk r306325: https://llvm.org/svn/llvm-project/libcxx/trunk@306325 Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/include/__config vendor/libc++/dist/include/experimental/any vendor/libc++/dist/include/new vendor/libc++/dist/include/numeric vendor/libc++/dist/include/variant vendor/libc++/dist/src/experimental/filesystem/path.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp vendor/libc++/dist/test/support/count_new.hpp vendor/libc++/dist/test/support/experimental_any_helpers.h vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:34 2017 (r320380) @@ -118,6 +118,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default") cxxabi.h PATHS ${LLVM_MAIN_SRC_DIR}/projects/libcxxabi/include ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include + ${LLVM_MAIN_SRC_DIR}/../libcxxabi/include NO_DEFAULT_PATH ) if (LIBCXX_TARGETING_MSVC) Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/__config Mon Jun 26 20:33:34 2017 (r320380) @@ -1154,6 +1154,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ __attribute__((availability(watchos,strict,introduced=3.0))) #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ __attribute__((availability(macosx,strict,introduced=10.12))) \ __attribute__((availability(ios,strict,introduced=10.0))) \ @@ -1175,25 +1176,35 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION \ + __attribute__((availability(macosx,strict,introduced=10.13))) \ + __attribute__((availability(ios,strict,introduced=11.0))) \ + __attribute__((availability(tvos,strict,introduced=11.0))) \ + __attribute__((availability(watchos,strict,introduced=4.0))) #else #define _LIBCPP_AVAILABILITY_SHARED_MUTEX #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS #define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE #define _LIBCPP_AVAILABILITY_FUTURE_ERROR #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION #endif // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. #ifdef _LIBCPP_NO_EXCEPTIONS #define _LIBCPP_AVAILABILITY_DYNARRAY #define _LIBCPP_AVAILABILITY_FUTURE +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST #else #define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH #define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST \ + _LIBCPP_AVAILABILITY_BAD_ANY_CAST #endif // Availability of stream API in the dylib got dropped and re-added. The @@ -1202,9 +1213,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ // availability(ios,introduced=7.0) #if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ <= 1090) || \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) || \ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)) #define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE #endif Modified: vendor/libc++/dist/include/experimental/any ============================================================================== --- vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:34 2017 (r320380) @@ -89,7 +89,7 @@ inline namespace fundamentals_v1 { _LIBCPP_BEGIN_NAMESPACE_LFTS -class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_cast +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast { public: virtual const char* what() const _NOEXCEPT; @@ -98,6 +98,7 @@ class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_ #if _LIBCPP_STD_VER > 11 // C++ > 11 _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST void __throw_bad_any_cast() { #ifndef _LIBCPP_NO_EXCEPTIONS @@ -506,7 +507,7 @@ void swap(any & __lhs, any & __rhs) _NOEXCEPT } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any const & __v) { static_assert( @@ -522,7 +523,7 @@ _ValueType any_cast(any const & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any & __v) { static_assert( @@ -537,7 +538,7 @@ _ValueType any_cast(any & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any && __v) { static_assert( Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/new Mon Jun 26 20:33:34 2017 (r320380) @@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE #endif #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif #endif Modified: vendor/libc++/dist/include/numeric ============================================================================== --- vendor/libc++/dist/include/numeric Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/numeric Mon Jun 26 20:33:34 2017 (r320380) @@ -81,6 +81,20 @@ template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, OutputIterator result); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op, T init); // C++17 + template OutputIterator @@ -88,6 +102,21 @@ template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op); // C++17 + +template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op, + T init); // C++17 + template OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); @@ -295,6 +324,38 @@ exclusive_scan(_InputIterator __first, _InputIterator return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>()); } +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, *__first); + *__result = __init; + } + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = *__first; + *__result++ = __init; + if (++__first != __last) + return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); + } + + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) +{ + return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); +} + template inline _LIBCPP_INLINE_VISIBILITY @@ -314,6 +375,32 @@ transform_exclusive_scan(_InputIterator __first, _Inpu ++__result; } while (++__first != __last); } + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, __u(*__first)); + *__result = __init; + } + + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = __u(*__first); + *__result++ = __init; + if (++__first != __last) + return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); + } + return __result; } #endif Modified: vendor/libc++/dist/include/variant ============================================================================== --- vendor/libc++/dist/include/variant Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/variant Mon Jun 26 20:33:34 2017 (r320380) @@ -1116,6 +1116,8 @@ class _LIBCPP_TEMPLATE_VIS variant (public) template < class _Arg, enable_if_t, variant>, int> = 0, + enable_if_t>::value, int> = 0, + enable_if_t>::value, int> = 0, class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>, size_t _Ip = __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value, Modified: vendor/libc++/dist/src/experimental/filesystem/path.cpp ============================================================================== --- vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -261,7 +261,8 @@ struct PathParser { (private) string_view_pair separate_filename(string_view_t const & s) { if (s == "." || s == ".." || s.empty()) return string_view_pair{s, ""}; auto pos = s.find_last_of('.'); - if (pos == string_view_t::npos) return string_view_pair{s, string_view{}}; + if (pos == string_view_t::npos) + return string_view_pair{s, string_view_t{}}; return string_view_pair{s.substr(0, pos), s.substr(pos)}; } @@ -396,7 +397,7 @@ int path::__compare(string_view_t __s) const { size_t hash_value(const path& __p) noexcept { auto PP = PathParser::CreateBegin(__p.native()); size_t hash_value = 0; - std::hash hasher; + std::hash hasher; while (PP) { hash_value = __hash_combine(hash_value, hasher(*PP)); ++PP; Modified: vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -36,15 +36,15 @@ int main() auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 0, std::ref(f)); assert(it == Iter(ia)); - assert(f.count == 0); + assert(f.count == 0); } { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), s, std::ref(f)); - + assert(it == Iter(ia+s)); - assert(f.count == s); + assert(f.count == s); for (unsigned i = 0; i < s; ++i) assert(ia[i] == static_cast(i+1)); } @@ -52,9 +52,9 @@ int main() { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 1, std::ref(f)); - + assert(it == Iter(ia+1)); - assert(f.count == 1); + assert(f.count == 1); for (unsigned i = 0; i < 1; ++i) assert(ia[i] == static_cast(i+2)); } Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -35,7 +35,7 @@ test(It i, typename std::iterator_traits::differen #if TEST_STD_VER > 14 template -constexpr bool +constexpr bool constepxr_test(It i, typename std::iterator_traits::difference_type n, It x) { std::advance(i, n); Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -71,5 +71,5 @@ int main() static_assert( constexpr_test(s+1, s), "" ); } #endif - + } Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 +// REQUIRES: availability=macosx10.12 + +// test availability of new/delete operators introduced in c++17. + +#include + +int main () { + int *p0 = new ((std::align_val_t)16) int(1); + (void)p0; + int *p1 = new ((std::align_val_t)16) int[1]; + (void)p1; + // expected-error@-4 {{call to unavailable function 'operator new': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + + // expected-error@-9 {{call to unavailable function 'operator new[]': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + return 0; +} Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init); -// +// #include #include @@ -26,7 +26,7 @@ void test(Iter1 first, Iter1 last, T init, Iter2 rFirst, Iter2 rLast) { std::vector::value_type> v; - + // Not in place std::exclusive_scan(first, last, std::back_inserter(v), init); assert(std::equal(v.begin(), v.end(), rFirst, rLast)); @@ -35,7 +35,7 @@ test(Iter1 first, Iter1 last, T init, Iter2 rFirst, It v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator // exclusive_scan(InputIterator first, InputIterator last, -// OutputIterator result, +// OutputIterator result, // T init, BinaryOperation binary_op); // C++17 #include @@ -36,7 +36,7 @@ test(Iter1 first, Iter1 last, T init, Op op, Iter2 rFi v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init, op); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } @@ -84,4 +84,3 @@ int main() } } } - \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,102 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, T init); +// + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) + test(Iter(ia), Iter(ia + i), pRes, pRes + i); +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res)); + assert(res.empty()); + } +} + +int main() +{ + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); +} Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,112 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op); // C++17 + +#include +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>()); + assert(res.empty()); + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories +// test >(); +// test >(); +// test >(); +// test >(); +// test(); +// test< int*>(); + +} + \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,128 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, T init); // C++17 + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, T init, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), 0, pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), 1, mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 50); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 50 + (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 40); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 40 + triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 30); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 30 + triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), 40); + assert(res.empty()); + } + +// Make sure that the calculations are done using the init typedef + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::vector res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), 1); + + assert(res.size() == 10); + int j = 1; + assert(res[0] == 1); + for (size_t i = 1; i < v.size(); ++i) + { + j *= i + 1; + assert(res[i] == j); + } + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); + +} + \ No newline at end of file Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -12,7 +12,7 @@ // template // T reduce(InputIterator first, InputIterator last, T init, BinaryOperation op); - + #include #include Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -10,7 +10,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// template // OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init, @@ -64,11 +64,11 @@ test() { int ia[] = { 1, 3, 5, 7, 9}; const int pResI0[] = { 0, 1, 4, 9, 16}; // with identity - const int mResI0[] = { 0, 0, 0, 0, 0}; + const int mResI0[] = { 0, 0, 0, 0, 0}; const int pResN0[] = { 0, -1, -4, -9, -16}; // with negate const int mResN0[] = { 0, 0, 0, 0, 0}; const int pResI2[] = { 2, 3, 6, 11, 18}; // with identity - const int mResI2[] = { 2, 2, 6, 30, 210}; + const int mResI2[] = { 2, 2, 6, 30, 210}; const int pResN2[] = { 2, 1, -2, -7, -14}; // with negate const int mResN2[] = { 2, -2, 6, -30, 210}; const unsigned sa = sizeof(ia) / sizeof(ia[0]); @@ -149,7 +149,7 @@ void basic_tests() int main() { basic_tests(); - + // All the iterator categories test >(); test >(); Added: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,133 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, +// UnaryOperation unary_op); + + +#include +#include +#include +#include + +#include "test_iterators.h" + +template *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:53 2017 Return-Path: Delivered-To: svn-src-all@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 0059ED9152C; Mon, 26 Jun 2017 20:33:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A0FA76509A; Mon, 26 Jun 2017 20:33:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXpOJ099200; Mon, 26 Jun 2017 20:33:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXpAb099199; Mon, 26 Jun 2017 20:33:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXpAb099199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320383 - vendor/lld/lld-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:53 -0000 Author: dim Date: Mon Jun 26 20:33:51 2017 New Revision: 320383 URL: https://svnweb.freebsd.org/changeset/base/320383 Log: Tag lld trunk r306325. Added: vendor/lld/lld-trunk-r306325/ - copied from r320382, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 20:33:48 2017 Return-Path: Delivered-To: svn-src-all@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 589FFD914F1; Mon, 26 Jun 2017 20:33:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D830365032; Mon, 26 Jun 2017 20:33:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXlO2099152; Mon, 26 Jun 2017 20:33:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXj8a099136; Mon, 26 Jun 2017 20:33:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXj8a099136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320382 - in vendor/lld/dist: . COFF ELF ELF/Arch docs lib/Driver lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript test/ELF/lto test... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:48 -0000 Author: dim Date: Mon Jun 26 20:33:45 2017 New Revision: 320382 URL: https://svnweb.freebsd.org/changeset/base/320382 Log: Vendor import of lld trunk r306325: https://llvm.org/svn/llvm-project/lld/trunk@306325 Added: vendor/lld/dist/ELF/Arch/MipsArchTree.cpp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/associative-comdat-2.s (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb_comdat_bar.yaml vendor/lld/dist/test/COFF/Inputs/pdb_comdat_main.yaml vendor/lld/dist/test/COFF/Inputs/pdb_lines_1.yaml vendor/lld/dist/test/COFF/Inputs/pdb_lines_2.yaml vendor/lld/dist/test/COFF/associative-comdat.s (contents, props changed) vendor/lld/dist/test/COFF/guardcf.test vendor/lld/dist/test/COFF/pdb-comdat.test vendor/lld/dist/test/COFF/pdb-safeseh.yaml vendor/lld/dist/test/COFF/pdb-secrel-absolute.yaml vendor/lld/dist/test/COFF/pdb-source-lines.test vendor/lld/dist/test/COFF/pdb-symbol-types.yaml vendor/lld/dist/test/COFF/safeseh-diag-feat.test vendor/lld/dist/test/COFF/safeseh.s (contents, props changed) vendor/lld/dist/test/COFF/secidx-absolute.s (contents, props changed) vendor/lld/dist/test/COFF/secrel-absolute.s (contents, props changed) vendor/lld/dist/test/COFF/secrel-common.s (contents, props changed) vendor/lld/dist/test/ELF/Inputs/exclude-libs.s (contents, props changed) vendor/lld/dist/test/ELF/exclude-libs.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-aarch64.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-arm.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-i386.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-mips.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position.s (contents, props changed) vendor/lld/dist/test/ELF/invalid-z.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/discard-section-err.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/segment-none.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/ttext-script.s (contents, props changed) Deleted: vendor/lld/dist/ELF/Mips.cpp vendor/lld/dist/test/COFF/safeseh.test Modified: vendor/lld/dist/COFF/Chunks.cpp vendor/lld/dist/COFF/Chunks.h vendor/lld/dist/COFF/Config.h vendor/lld/dist/COFF/Driver.cpp vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/DriverUtils.cpp vendor/lld/dist/COFF/InputFiles.cpp vendor/lld/dist/COFF/Options.td vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/COFF/Strings.cpp vendor/lld/dist/COFF/SymbolTable.cpp vendor/lld/dist/COFF/SymbolTable.h vendor/lld/dist/COFF/Symbols.cpp vendor/lld/dist/COFF/Symbols.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/Arch/AArch64.cpp vendor/lld/dist/ELF/Arch/AMDGPU.cpp vendor/lld/dist/ELF/Arch/ARM.cpp vendor/lld/dist/ELF/Arch/AVR.cpp vendor/lld/dist/ELF/Arch/Mips.cpp vendor/lld/dist/ELF/Arch/PPC.cpp vendor/lld/dist/ELF/Arch/PPC64.cpp vendor/lld/dist/ELF/Arch/X86.cpp vendor/lld/dist/ELF/Arch/X86_64.cpp vendor/lld/dist/ELF/CMakeLists.txt vendor/lld/dist/ELF/Config.h vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/Driver.h vendor/lld/dist/ELF/DriverUtils.cpp vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/InputFiles.h vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/MarkLive.cpp vendor/lld/dist/ELF/Options.td vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/SymbolTable.cpp vendor/lld/dist/ELF/SymbolTable.h vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/Symbols.h vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Target.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/README.md vendor/lld/dist/docs/windows_support.rst vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp vendor/lld/dist/test/COFF/Inputs/pdb1.yaml vendor/lld/dist/test/COFF/def-name.test vendor/lld/dist/test/COFF/dll.test vendor/lld/dist/test/COFF/dllimport-gc.test vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/icf-associative.test vendor/lld/dist/test/COFF/manifestinput.test vendor/lld/dist/test/COFF/noentry.test vendor/lld/dist/test/COFF/out.test vendor/lld/dist/test/COFF/pdb-lib.s vendor/lld/dist/test/COFF/pdb.test vendor/lld/dist/test/COFF/resource.test vendor/lld/dist/test/ELF/arm-gnu-ifunc-plt.s vendor/lld/dist/test/ELF/arm-got-relative.s vendor/lld/dist/test/ELF/arm-thumb-branch.s vendor/lld/dist/test/ELF/arm-thumb-plt-reloc.s vendor/lld/dist/test/ELF/defsym.s vendor/lld/dist/test/ELF/global_offset_table_shared.s vendor/lld/dist/test/ELF/linkerscript/sections.s vendor/lld/dist/test/ELF/lto/cache.ll vendor/lld/dist/test/ELF/lto/wrap-2.ll vendor/lld/dist/test/ELF/mips-got16-relocatable.s vendor/lld/dist/test/ELF/mips-npic-call-pic-os.s vendor/lld/dist/test/ELF/mips-npic-call-pic-script.s vendor/lld/dist/test/ELF/mips-npic-call-pic.s vendor/lld/dist/test/ELF/mips-plt-r6.s vendor/lld/dist/test/ELF/wrap.s vendor/lld/dist/test/lit.cfg vendor/lld/dist/test/mach-o/executable-exports.yaml Modified: vendor/lld/dist/COFF/Chunks.cpp ============================================================================== --- vendor/lld/dist/COFF/Chunks.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Chunks.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -37,8 +37,14 @@ SectionChunk::SectionChunk(ObjectFile *F, const coff_s Align = Header->getAlignment(); - // Only COMDAT sections are subject of dead-stripping. - Live = !isCOMDAT(); + // Chunks may be discarded during comdat merging. + Discarded = false; + + // If linker GC is disabled, every chunk starts out alive. If linker GC is + // enabled, treat non-comdat sections as roots. Generally optimized object + // files will be built with -ffunction-sections or /Gy, so most things worth + // stripping will be in a comdat. + Live = !Config->DoGC || !isCOMDAT(); } static void add16(uint8_t *P, int16_t V) { write16le(P, read16le(P) + V); } @@ -46,6 +52,15 @@ static void add32(uint8_t *P, int32_t V) { write32le(P static void add64(uint8_t *P, int64_t V) { write64le(P, read64le(P) + V); } static void or16(uint8_t *P, uint16_t V) { write16le(P, read16le(P) | V); } +static void applySecRel(const SectionChunk *Sec, uint8_t *Off, Defined *Sym) { + // Don't apply section relative relocations to absolute symbols in codeview + // debug info sections. MSVC does not treat such relocations as fatal errors, + // and they can be found in the standard library for linker-provided symbols + // like __guard_fids_table and __safe_se_handler_table. + if (!(isa(Sym) && Sec->isCodeView())) + add32(Off, Sym->getSecrel()); +} + void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const { uint64_t S = Sym->getRVA(); @@ -60,7 +75,7 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t case IMAGE_REL_AMD64_REL32_4: add32(Off, S - P - 8); break; case IMAGE_REL_AMD64_REL32_5: add32(Off, S - P - 9); break; case IMAGE_REL_AMD64_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_AMD64_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -75,7 +90,7 @@ void SectionChunk::applyRelX86(uint8_t *Off, uint16_t case IMAGE_REL_I386_DIR32NB: add32(Off, S); break; case IMAGE_REL_I386_REL32: add32(Off, S - P - 4); break; case IMAGE_REL_I386_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_I386_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_I386_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -135,7 +150,7 @@ void SectionChunk::applyRelARM(uint8_t *Off, uint16_t case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break; case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break; case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -226,8 +241,12 @@ bool SectionChunk::isCOMDAT() const { void SectionChunk::printDiscardedMessage() const { // Removed by dead-stripping. If it's removed by ICF, ICF already // printed out the name, so don't repeat that here. - if (Sym && this == Repl) - message("Discarded " + Sym->getName()); + if (Sym && this == Repl) { + if (Discarded) + message("Discarded comdat symbol " + Sym->getName()); + else if (!Live) + message("Discarded " + Sym->getName()); + } } StringRef SectionChunk::getDebugName() { Modified: vendor/lld/dist/COFF/Chunks.h ============================================================================== --- vendor/lld/dist/COFF/Chunks.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Chunks.h Mon Jun 26 20:33:45 2017 (r320382) @@ -64,7 +64,6 @@ class Chunk { (public) uint64_t getRVA() const { return RVA; } uint32_t getAlign() const { return Align; } void setRVA(uint64_t V) { RVA = V; } - void setOutputSectionOff(uint64_t V) { OutputSectionOff = V; } // Returns true if this has non-zero data. BSS chunks return // false. If false is returned, the space occupied by this chunk @@ -97,17 +96,19 @@ class Chunk { (public) Chunk(Kind K = OtherKind) : ChunkKind(K) {} const Kind ChunkKind; + // The alignment of this chunk. The writer uses the value. + uint32_t Align = 1; + // The RVA of this chunk in the output. The writer sets a value. uint64_t RVA = 0; +public: // The offset from beginning of the output section. The writer sets a value. uint64_t OutputSectionOff = 0; +protected: // The output section for this chunk. OutputSection *Out = nullptr; - - // The alignment of this chunk. The writer uses the value. - uint32_t Align = 1; }; // A chunk corresponding a section of an input file. @@ -159,13 +160,29 @@ class SectionChunk : public Chunk { (public) StringRef getDebugName() override; void setSymbol(DefinedRegular *S) { if (!Sym) Sym = S; } + // Returns true if the chunk was not dropped by GC or COMDAT deduplication. + bool isLive() { return Live && !Discarded; } + // Used by the garbage collector. - bool isLive() { return !Config->DoGC || Live; } void markLive() { + assert(Config->DoGC && "should only mark things live from GC"); assert(!isLive() && "Cannot mark an already live section!"); Live = true; } + // Returns true if this chunk was dropped by COMDAT deduplication. + bool isDiscarded() const { return Discarded; } + + // Used by the SymbolTable when discarding unused comdat sections. This is + // redundant when GC is enabled, as all comdat sections will start out dead. + void markDiscarded() { Discarded = true; } + + // True if this is a codeview debug info chunk. These will not be laid out in + // the image. Instead they will end up in the PDB, if one is requested. + bool isCodeView() const { + return SectionName == ".debug" || SectionName.startswith(".debug$"); + } + // Allow iteration over the bodies of this chunk's relocated symbols. llvm::iterator_range symbols() const { return llvm::make_range(symbol_iterator(File, Relocs.begin()), @@ -195,6 +212,9 @@ class SectionChunk : public Chunk { (public) std::vector AssocChildren; llvm::iterator_range Relocs; size_t NumRelocs; + + // True if this chunk was discarded because it was a duplicate comdat section. + bool Discarded; // Used by the garbage collector. bool Live; Modified: vendor/lld/dist/COFF/Config.h ============================================================================== --- vendor/lld/dist/COFF/Config.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Config.h Mon Jun 26 20:33:45 2017 (r320382) @@ -161,9 +161,6 @@ struct Configuration { bool LargeAddressAware = false; bool HighEntropyVA = false; bool AppContainer = false; - - // This is for debugging. - bool DumpPdb = false; }; extern Configuration *Config; Modified: vendor/lld/dist/COFF/Driver.cpp ============================================================================== --- vendor/lld/dist/COFF/Driver.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Driver.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -905,7 +905,6 @@ void LinkerDriver::link(ArrayRef ArgsArr Config->TerminalServerAware = false; if (Args.hasArg(OPT_nosymtab)) Config->WriteSymtab = false; - Config->DumpPdb = Args.hasArg(OPT_dumppdb); Config->MapFile = getMapFile(Args); @@ -936,9 +935,9 @@ void LinkerDriver::link(ArrayRef ArgsArr Config->Machine = AMD64; } - // Windows specific -- Input files can be Windows resource files (.res files). - // We invoke cvtres.exe to convert resource files to a regular COFF file - // then link the result file normally. + // Input files can be Windows resource files (.res files). We use + // WindowsResource to convert resource files to a regular COFF file, + // then link the resulting file normally. if (!Resources.empty()) addBuffer(convertResToCOFF(Resources)); @@ -1027,17 +1026,21 @@ void LinkerDriver::link(ArrayRef ArgsArr if (Config->ImageBase == uint64_t(-1)) Config->ImageBase = getDefaultImageBase(); - Symtab.addRelative(mangle("__ImageBase"), 0); + Symtab.addSynthetic(mangle("__ImageBase"), nullptr); if (Config->Machine == I386) { - Config->SEHTable = Symtab.addRelative("___safe_se_handler_table", 0); - Config->SEHCount = Symtab.addAbsolute("___safe_se_handler_count", 0); + Symtab.addAbsolute("___safe_se_handler_table", 0); + Symtab.addAbsolute("___safe_se_handler_count", 0); } // We do not support /guard:cf (control flow protection) yet. // Define CFG symbols anyway so that we can link MSVC 2015 CRT. - Symtab.addAbsolute(mangle("__guard_fids_table"), 0); Symtab.addAbsolute(mangle("__guard_fids_count"), 0); + Symtab.addAbsolute(mangle("__guard_fids_table"), 0); Symtab.addAbsolute(mangle("__guard_flags"), 0x100); + Symtab.addAbsolute(mangle("__guard_iat_count"), 0); + Symtab.addAbsolute(mangle("__guard_iat_table"), 0); + Symtab.addAbsolute(mangle("__guard_longjmp_count"), 0); + Symtab.addAbsolute(mangle("__guard_longjmp_table"), 0); // This code may add new undefined symbols to the link, which may enqueue more // symbol resolution tasks, so we need to continue executing tasks until we Modified: vendor/lld/dist/COFF/Driver.h ============================================================================== --- vendor/lld/dist/COFF/Driver.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Driver.h Mon Jun 26 20:33:45 2017 (r320382) @@ -178,7 +178,7 @@ void runMSVCLinker(std::string Rsp, ArrayRef +createMemoryBufferForManifestRes(size_t ManifestSize) { + size_t ResSize = alignTo(object::WIN_RES_MAGIC_SIZE + + object::WIN_RES_NULL_ENTRY_SIZE + + sizeof(object::WinResHeaderPrefix) + + sizeof(object::WinResIDs) + + sizeof(object::WinResHeaderSuffix) + + ManifestSize, + object::WIN_RES_DATA_ALIGNMENT); + return MemoryBuffer::getNewMemBuffer(ResSize); +} + +static void writeResFileHeader(char *&Buf) { + memcpy(Buf, COFF::WinResMagic, sizeof(COFF::WinResMagic)); + Buf += sizeof(COFF::WinResMagic); + memset(Buf, 0, object::WIN_RES_NULL_ENTRY_SIZE); + Buf += object::WIN_RES_NULL_ENTRY_SIZE; +} + +static void writeResEntryHeader(char *&Buf, size_t ManifestSize) { + // Write the prefix. + auto *Prefix = reinterpret_cast(Buf); + Prefix->DataSize = ManifestSize; + Prefix->HeaderSize = sizeof(object::WinResHeaderPrefix) + + sizeof(object::WinResIDs) + + sizeof(object::WinResHeaderSuffix); + Buf += sizeof(object::WinResHeaderPrefix); + + // Write the Type/Name IDs. + auto *IDs = reinterpret_cast(Buf); + IDs->setType(RT_MANIFEST); + IDs->setName(Config->ManifestID); + Buf += sizeof(object::WinResIDs); + + // Write the suffix. + auto *Suffix = reinterpret_cast(Buf); + Suffix->DataVersion = 0; + Suffix->MemoryFlags = object::WIN_RES_PURE_MOVEABLE; + Suffix->Language = SUBLANG_ENGLISH_US; + Suffix->Version = 0; + Suffix->Characteristics = 0; + Buf += sizeof(object::WinResHeaderSuffix); +} + // Create a resource file containing a manifest XML. std::unique_ptr createManifestRes() { - // Create a temporary file for the resource script file. - TemporaryFile RCFile("manifest", "rc"); + std::string Manifest = createManifestXml(); - // Open the temporary file for writing. - std::error_code EC; - raw_fd_ostream Out(RCFile.Path, EC, sys::fs::F_Text); - if (EC) - fatal(EC, "failed to open " + RCFile.Path); + std::unique_ptr Res = + createMemoryBufferForManifestRes(Manifest.size()); - // Write resource script to the RC file. - Out << "#define LANG_ENGLISH 9\n" - << "#define SUBLANG_DEFAULT 1\n" - << "#define APP_MANIFEST " << Config->ManifestID << "\n" - << "#define RT_MANIFEST 24\n" - << "LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT\n" - << "APP_MANIFEST RT_MANIFEST {\n"; - quoteAndPrint(Out, createManifestXml()); - Out << "}\n"; - Out.close(); + char *Buf = const_cast(Res->getBufferStart()); + writeResFileHeader(Buf); + writeResEntryHeader(Buf, Manifest.size()); - // Create output resource file. - TemporaryFile ResFile("output-resource", "res"); - - Executor E("rc.exe"); - E.add("/fo"); - E.add(ResFile.Path); - E.add("/nologo"); - E.add(RCFile.Path); - E.run(); - return ResFile.getMemoryBuffer(); + // Copy the manifest data into the .res file. + std::copy(Manifest.begin(), Manifest.end(), Buf); + return Res; } void createSideBySideManifest() { @@ -592,40 +604,22 @@ void checkFailIfMismatch(StringRef Arg) { // using cvtres.exe. std::unique_ptr convertResToCOFF(const std::vector &MBs) { - // Create an output file path. - TemporaryFile File("resource-file", "obj"); + object::WindowsResourceParser Parser; - // Execute cvtres.exe. - Executor E("cvtres.exe"); - E.add("/machine:" + machineToStr(Config->Machine)); - E.add("/readonly"); - E.add("/nologo"); - E.add("/out:" + Twine(File.Path)); - - // We must create new files because the memory buffers we have may have no - // underlying file still existing on the disk. - // It happens if it was created from a TemporaryFile, which usually delete - // the file just after creating the MemoryBuffer. - std::vector ResFiles; - ResFiles.reserve(MBs.size()); for (MemoryBufferRef MB : MBs) { - // We store the temporary file in a vector to avoid deletion - // before running cvtres - ResFiles.emplace_back("resource-file", "res"); - TemporaryFile& ResFile = ResFiles.back(); - // Write the content of the resource in a temporary file - std::error_code EC; - raw_fd_ostream OS(ResFile.Path, EC, sys::fs::F_None); - if (EC) - fatal(EC, "failed to open " + ResFile.Path); - OS << MB.getBuffer(); - OS.close(); - - E.add(ResFile.Path); + std::unique_ptr Bin = check(object::createBinary(MB)); + object::WindowsResource *RF = dyn_cast(Bin.get()); + if (!RF) + fatal("cannot compile non-resource file as resource"); + if (auto EC = Parser.parse(RF)) + fatal(EC, "failed to parse .res file"); } - E.run(); - return File.getMemoryBuffer(); + Expected> E = + llvm::object::writeWindowsResourceCOFF(Config->Machine, Parser); + if (!E) + fatal(errorToErrorCode(E.takeError()), "failed to write .res to COFF"); + return std::move(E.get()); } // Run MSVC link.exe for given in-memory object files. @@ -657,11 +651,9 @@ void runMSVCLinker(std::string Rsp, ArrayRefDebug && Name.startswith(".debug")) continue; - // CodeView sections are stored to a different vector because they are - // not linked in the regular manner. - if (Name == ".debug" || Name.startswith(".debug$")) { - DebugChunks.push_back(make(this, Sec)); - continue; - } - if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE) continue; auto *C = make(this, Sec); - Chunks.push_back(C); + + // CodeView sections are stored to a different vector because they are not + // linked in the regular manner. + if (C->isCodeView()) + DebugChunks.push_back(C); + else + Chunks.push_back(C); + SparseChunks[I] = C; } } @@ -249,8 +249,12 @@ SymbolBody *ObjectFile::createDefined(COFFSymbolRef Sy auto *Aux = reinterpret_cast(AuxP); if (Aux->Selection == IMAGE_COMDAT_SELECT_ASSOCIATIVE) if (auto *ParentSC = cast_or_null( - SparseChunks[Aux->getNumber(Sym.isBigObj())])) + SparseChunks[Aux->getNumber(Sym.isBigObj())])) { ParentSC->addAssociative(SC); + // If we already discarded the parent, discard the child. + if (ParentSC->isDiscarded()) + SC->markDiscarded(); + } SC->Checksum = Aux->CheckSum; } Modified: vendor/lld/dist/COFF/Options.td ============================================================================== --- vendor/lld/dist/COFF/Options.td Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Options.td Mon Jun 26 20:33:45 2017 (r320382) @@ -102,7 +102,6 @@ def nosymtab : F<"nosymtab">; def msvclto : F<"msvclto">; // Flags for debugging -def dumppdb : Joined<["/", "-"], "dumppdb">; def lldmap : F<"lldmap">; def lldmap_file : Joined<["/", "-"], "lldmap:">; Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/PDB.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -15,10 +15,11 @@ #include "Symbols.h" #include "llvm/DebugInfo/CodeView/CVDebugRecord.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" -#include "llvm/DebugInfo/CodeView/SymbolDumper.h" -#include "llvm/DebugInfo/CodeView/TypeDatabase.h" #include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h" +#include "llvm/DebugInfo/CodeView/TypeIndexDiscovery.h" #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" #include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" @@ -46,8 +47,6 @@ using namespace lld; using namespace lld::coff; using namespace llvm; using namespace llvm::codeview; -using namespace llvm::support; -using namespace llvm::support::endian; using llvm::object::coff_section; @@ -68,22 +67,24 @@ static SectionChunk *findByName(std::vector getDebugSection(ObjectFile *File, StringRef SecName) { - SectionChunk *Sec = findByName(File->getDebugChunks(), SecName); - if (!Sec) - return {}; - +static ArrayRef consumeDebugMagic(ArrayRef Data, + StringRef SecName) { // First 4 bytes are section magic. - ArrayRef Data = Sec->getContents(); if (Data.size() < 4) fatal(SecName + " too short"); - if (read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) + if (support::endian::read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) fatal(SecName + " has an invalid magic"); return Data.slice(4); } +static ArrayRef getDebugSection(ObjectFile *File, StringRef SecName) { + if (SectionChunk *Sec = findByName(File->getDebugChunks(), SecName)) + return consumeDebugMagic(Sec->getContents(), SecName); + return {}; +} + static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuilder, - codeview::TypeTableBuilder &TypeTable) { + TypeTableBuilder &TypeTable) { // Start the TPI or IPI stream header. TpiBuilder.setVersionHeader(pdb::PdbTpiV80); @@ -94,17 +95,148 @@ static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuil }); } +static void mergeDebugT(ObjectFile *File, + TypeTableBuilder &IDTable, + TypeTableBuilder &TypeTable, + SmallVectorImpl &TypeIndexMap, + pdb::PDBTypeServerHandler &Handler) { + ArrayRef Data = getDebugSection(File, ".debug$T"); + if (Data.empty()) + return; + + BinaryByteStream Stream(Data, support::little); + CVTypeArray Types; + BinaryStreamReader Reader(Stream); + Handler.addSearchPath(sys::path::parent_path(File->getName())); + if (auto EC = Reader.readArray(Types, Reader.getLength())) + fatal(EC, "Reader::readArray failed"); + if (auto Err = mergeTypeAndIdRecords(IDTable, TypeTable, + TypeIndexMap, &Handler, Types)) + fatal(Err, "codeview::mergeTypeStreams failed"); +} + +static bool remapTypeIndex(TypeIndex &TI, ArrayRef TypeIndexMap) { + if (TI.isSimple()) + return true; + if (TI.toArrayIndex() >= TypeIndexMap.size()) + return false; + TI = TypeIndexMap[TI.toArrayIndex()]; + return true; +} + +static bool remapTypesInSymbolRecord(ObjectFile *File, + MutableArrayRef Contents, + ArrayRef TypeIndexMap, + ArrayRef TypeRefs) { + for (const TiReference &Ref : TypeRefs) { + unsigned ByteSize = Ref.Count * sizeof(TypeIndex); + if (Contents.size() < Ref.Offset + ByteSize) { + log("ignoring short symbol record"); + return false; + } + MutableArrayRef TIs( + reinterpret_cast(Contents.data() + Ref.Offset), Ref.Count); + for (TypeIndex &TI : TIs) + if (!remapTypeIndex(TI, TypeIndexMap)) { + log("ignoring symbol record in " + File->getName() + + " with bad type index 0x" + utohexstr(TI.getIndex())); + return false; + } + } + return true; +} + +/// MSVC translates S_PROC_ID_END to S_END. +uint16_t canonicalizeSymbolKind(SymbolKind Kind) { + if (Kind == SymbolKind::S_PROC_ID_END) + return SymbolKind::S_END; + return Kind; +} + +/// Copy the symbol record. In a PDB, symbol records must be 4 byte aligned. +/// The object file may not be aligned. +static MutableArrayRef copySymbolForPdb(const CVSymbol &Sym, + BumpPtrAllocator &Alloc) { + size_t Size = alignTo(Sym.length(), alignOf(CodeViewContainer::Pdb)); + assert(Size >= 4 && "record too short"); + assert(Size <= MaxRecordLength && "record too long"); + void *Mem = Alloc.Allocate(Size, 4); + + // Copy the symbol record and zero out any padding bytes. + MutableArrayRef NewData(reinterpret_cast(Mem), Size); + memcpy(NewData.data(), Sym.data().data(), Sym.length()); + memset(NewData.data() + Sym.length(), 0, Size - Sym.length()); + + // Update the record prefix length. It should point to the beginning of the + // next record. MSVC does some canonicalization of the record kind, so we do + // that as well. + auto *Prefix = reinterpret_cast(Mem); + Prefix->RecordKind = canonicalizeSymbolKind(Sym.kind()); + Prefix->RecordLen = Size - 2; + return NewData; +} + +static void mergeSymbolRecords(BumpPtrAllocator &Alloc, ObjectFile *File, + ArrayRef TypeIndexMap, + BinaryStreamRef SymData) { + // FIXME: Improve error recovery by warning and skipping records when + // possible. + CVSymbolArray Syms; + BinaryStreamReader Reader(SymData); + ExitOnErr(Reader.readArray(Syms, Reader.getLength())); + for (const CVSymbol &Sym : Syms) { + // Discover type index references in the record. Skip it if we don't know + // where they are. + SmallVector TypeRefs; + if (!discoverTypeIndices(Sym, TypeRefs)) { + log("ignoring unknown symbol record with kind 0x" + utohexstr(Sym.kind())); + continue; + } + + // Copy the symbol record so we can mutate it. + MutableArrayRef NewData = copySymbolForPdb(Sym, Alloc); + + // Re-map all the type index references. + MutableArrayRef Contents = + NewData.drop_front(sizeof(RecordPrefix)); + if (!remapTypesInSymbolRecord(File, Contents, TypeIndexMap, TypeRefs)) + continue; + + // FIXME: Fill in "Parent" and "End" fields by maintaining a stack of + // scopes. + + // Add the symbol to the module. + File->ModuleDBI->addSymbol(CVSymbol(Sym.kind(), NewData)); + } +} + +// Allocate memory for a .debug$S section and relocate it. +static ArrayRef relocateDebugChunk(BumpPtrAllocator &Alloc, + SectionChunk *DebugChunk) { + uint8_t *Buffer = Alloc.Allocate(DebugChunk->getSize()); + assert(DebugChunk->OutputSectionOff == 0 && + "debug sections should not be in output sections"); + DebugChunk->writeTo(Buffer); + return consumeDebugMagic(makeArrayRef(Buffer, DebugChunk->getSize()), + ".debug$S"); +} + // Add all object files to the PDB. Merge .debug$T sections into IpiData and // TpiData. -static void addObjectsToPDB(SymbolTable *Symtab, pdb::PDBFileBuilder &Builder, - codeview::TypeTableBuilder &TypeTable, - codeview::TypeTableBuilder &IDTable) { +static void addObjectsToPDB(BumpPtrAllocator &Alloc, SymbolTable *Symtab, + pdb::PDBFileBuilder &Builder, + TypeTableBuilder &TypeTable, + TypeTableBuilder &IDTable) { // Follow type servers. If the same type server is encountered more than // once for this instance of `PDBTypeServerHandler` (for example if many // object files reference the same TypeServer), the types from the // TypeServer will only be visited once. pdb::PDBTypeServerHandler Handler; + // PDBs use a single global string table for filenames in the file checksum + // table. + auto PDBStrTab = std::make_shared(); + // Visit all .debug$T sections to add them to Builder. for (ObjectFile *File : Symtab->ObjectFiles) { // Add a module descriptor for every object file. We need to put an absolute @@ -118,25 +250,74 @@ static void addObjectsToPDB(SymbolTable *Symtab, pdb:: File->ModuleDBI = &ExitOnErr(Builder.getDbiBuilder().addModuleInfo(Name)); File->ModuleDBI->setObjFileName(Path); - // FIXME: Walk the .debug$S sections and add them. Do things like recording - // source files. + // Before we can process symbol substreams from .debug$S, we need to process + // type information, file checksums, and the string table. Add type info to + // the PDB first, so that we can get the map from object file type and item + // indices to PDB type and item indices. + SmallVector TypeIndexMap; + mergeDebugT(File, IDTable, TypeTable, TypeIndexMap, Handler); - ArrayRef Data = getDebugSection(File, ".debug$T"); - if (Data.empty()) - continue; + // Now do all line info. + for (SectionChunk *DebugChunk : File->getDebugChunks()) { + if (!DebugChunk->isLive() || DebugChunk->getSectionName() != ".debug$S") + continue; - BinaryByteStream Stream(Data, support::little); - codeview::CVTypeArray Types; - BinaryStreamReader Reader(Stream); - SmallVector SourceToDest; - Handler.addSearchPath(llvm::sys::path::parent_path(File->getName())); - if (auto EC = Reader.readArray(Types, Reader.getLength())) - fatal(EC, "Reader::readArray failed"); - if (auto Err = codeview::mergeTypeAndIdRecords( - IDTable, TypeTable, SourceToDest, &Handler, Types)) - fatal(Err, "codeview::mergeTypeStreams failed"); + ArrayRef RelocatedDebugContents = + relocateDebugChunk(Alloc, DebugChunk); + if (RelocatedDebugContents.empty()) + continue; + + DebugSubsectionArray Subsections; + BinaryStreamReader Reader(RelocatedDebugContents, support::little); + ExitOnErr(Reader.readArray(Subsections, RelocatedDebugContents.size())); + + DebugStringTableSubsectionRef CVStrTab; + DebugChecksumsSubsectionRef Checksums; + for (const DebugSubsectionRecord &SS : Subsections) { + switch (SS.kind()) { + case DebugSubsectionKind::StringTable: + ExitOnErr(CVStrTab.initialize(SS.getRecordData())); + break; + case DebugSubsectionKind::FileChecksums: + ExitOnErr(Checksums.initialize(SS.getRecordData())); + break; + case DebugSubsectionKind::Lines: + // We can add the relocated line table directly to the PDB without + // modification because the file checksum offsets will stay the same. + File->ModuleDBI->addDebugSubsection(SS); + break; + case DebugSubsectionKind::Symbols: + mergeSymbolRecords(Alloc, File, TypeIndexMap, SS.getRecordData()); + break; + default: + // FIXME: Process the rest of the subsections. + break; + } + } + + if (Checksums.valid()) { + // Make a new file checksum table that refers to offsets in the PDB-wide + // string table. Generally the string table subsection appears after the + // checksum table, so we have to do this after looping over all the + // subsections. + if (!CVStrTab.valid()) + fatal(".debug$S sections must have both a string table subsection " + "and a checksum subsection table or neither"); + auto NewChecksums = + make_unique(*PDBStrTab); + for (FileChecksumEntry &FC : Checksums) { + StringRef FileName = ExitOnErr(CVStrTab.getString(FC.FileNameOffset)); + ExitOnErr(Builder.getDbiBuilder().addModuleSourceFile( + *File->ModuleDBI, FileName)); + NewChecksums->addChecksum(FileName, FC.Kind, FC.Checksum); + } + File->ModuleDBI->addDebugSubsection(std::move(NewChecksums)); + } + } } + Builder.getStringTableBuilder().setStrings(*PDBStrTab); + // Construct TPI stream contents. addTypeInfo(Builder.getTpiBuilder(), TypeTable); @@ -144,56 +325,10 @@ static void addObjectsToPDB(SymbolTable *Symtab, pdb:: addTypeInfo(Builder.getIpiBuilder(), IDTable); } -static void dumpDebugT(ScopedPrinter &W, ObjectFile *File) { - ListScope LS(W, "DebugT"); - ArrayRef Data = getDebugSection(File, ".debug$T"); - if (Data.empty()) - return; - - LazyRandomTypeCollection Types(Data, 100); - TypeDumpVisitor TDV(Types, &W, false); - // Use a default implementation that does not follow type servers and instead - // just dumps the contents of the TypeServer2 record. - if (auto EC = codeview::visitTypeStream(Types, TDV)) - fatal(EC, "CVTypeDumper::dump failed"); -} - -static void dumpDebugS(ScopedPrinter &W, ObjectFile *File) { - ListScope LS(W, "DebugS"); - ArrayRef Data = getDebugSection(File, ".debug$S"); - if (Data.empty()) - return; - - BinaryByteStream Stream(Data, llvm::support::little); - CVSymbolArray Symbols; - BinaryStreamReader Reader(Stream); - if (auto EC = Reader.readArray(Symbols, Reader.getLength())) - fatal(EC, "StreamReader.readArray failed"); - - TypeDatabase TDB(0); - CVSymbolDumper SymbolDumper(W, TDB, CodeViewContainer::ObjectFile, nullptr, - false); - if (auto EC = SymbolDumper.dump(Symbols)) - fatal(EC, "CVSymbolDumper::dump failed"); -} - -// Dump CodeView debug info. This is for debugging. -static void dumpCodeView(SymbolTable *Symtab) { - ScopedPrinter W(outs()); - - for (ObjectFile *File : Symtab->ObjectFiles) { - dumpDebugT(W, File); - dumpDebugS(W, File); - } -} - // Creates a PDB file. void coff::createPDB(StringRef Path, SymbolTable *Symtab, ArrayRef SectionTable, const llvm::codeview::DebugInfo *DI) { - if (Config->DumpPdb) - dumpCodeView(Symtab); - BumpPtrAllocator Alloc; pdb::PDBFileBuilder Builder(Alloc); ExitOnErr(Builder.initialize(4096)); // 4096 is blocksize @@ -219,9 +354,9 @@ void coff::createPDB(StringRef Path, SymbolTable *Symt pdb::DbiStreamBuilder &DbiBuilder = Builder.getDbiBuilder(); DbiBuilder.setVersionHeader(pdb::PdbDbiV110); - codeview::TypeTableBuilder TypeTable(BAlloc); - codeview::TypeTableBuilder IDTable(BAlloc); - addObjectsToPDB(Symtab, Builder, TypeTable, IDTable); + TypeTableBuilder TypeTable(BAlloc); + TypeTableBuilder IDTable(BAlloc); + addObjectsToPDB(Alloc, Symtab, Builder, TypeTable, IDTable); // Add Section Contributions. addSectionContribs(Symtab, DbiBuilder); Modified: vendor/lld/dist/COFF/Strings.cpp ============================================================================== --- vendor/lld/dist/COFF/Strings.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Strings.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "Strings.h" +#include #if defined(_MSC_VER) #include @@ -21,6 +22,10 @@ using namespace llvm; Optional coff::demangle(StringRef S) { #if defined(_MSC_VER) + // UnDecorateSymbolName is not thread-safe, so we need a mutex. + static std::mutex Mu; + std::lock_guard Lock(Mu); + char Buf[4096]; if (S.startswith("?")) if (size_t Len = UnDecorateSymbolName(S.str().c_str(), Buf, sizeof(Buf), 0)) Modified: vendor/lld/dist/COFF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/COFF/SymbolTable.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/SymbolTable.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -219,13 +219,13 @@ Symbol *SymbolTable::addAbsolute(StringRef N, uint64_t return S; } -Symbol *SymbolTable::addRelative(StringRef N, uint64_t VA) { +Symbol *SymbolTable::addSynthetic(StringRef N, Chunk *C) { Symbol *S; bool WasInserted; std::tie(S, WasInserted) = insert(N); S->IsUsedInRegularObj = true; if (WasInserted || isa(S->body()) || isa(S->body())) - replaceBody(S, N, VA); + replaceBody(S, N, C); else if (!isa(S->body())) reportDuplicate(S, nullptr); return S; @@ -244,6 +244,12 @@ Symbol *SymbolTable::addRegular(InputFile *F, StringRe reportDuplicate(S, F); } else if (SP == SP_NEW) { replaceBody(S, F, N, IsCOMDAT, /*IsExternal*/ true, Sym, C); + } else if (SP == SP_EXISTING && IsCOMDAT && C) { + C->markDiscarded(); + // Discard associative chunks that we've parsed so far. No need to recurse + // because an associative section cannot have children. + for (SectionChunk *Child : C->children()) + Child->markDiscarded(); } return S; } Modified: vendor/lld/dist/COFF/SymbolTable.h ============================================================================== --- vendor/lld/dist/COFF/SymbolTable.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/SymbolTable.h Mon Jun 26 20:33:45 2017 (r320382) @@ -85,7 +85,7 @@ class SymbolTable { (public) // Creates an Undefined symbol for a given name. SymbolBody *addUndefined(StringRef Name); - Symbol *addRelative(StringRef N, uint64_t VA); + Symbol *addSynthetic(StringRef N, Chunk *C); Symbol *addAbsolute(StringRef N, uint64_t VA); Symbol *addUndefined(StringRef Name, InputFile *F, bool IsWeakAlias); Modified: vendor/lld/dist/COFF/Symbols.cpp ============================================================================== --- vendor/lld/dist/COFF/Symbols.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Symbols.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -61,6 +61,8 @@ COFFSymbolRef DefinedCOFF::getCOFFSymbol() { return COFFSymbolRef(reinterpret_cast(Sym)); } +uint16_t DefinedAbsolute::OutputSectionIndex = 0; + static Chunk *makeImportThunk(DefinedImportData *S, uint16_t Machine) { if (Machine == AMD64) return make(S); Modified: vendor/lld/dist/COFF/Symbols.h ============================================================================== --- vendor/lld/dist/COFF/Symbols.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Symbols.h Mon Jun 26 20:33:45 2017 (r320382) @@ -50,13 +50,13 @@ class SymbolBody { (public) DefinedImportThunkKind, DefinedImportDataKind, DefinedAbsoluteKind, - DefinedRelativeKind, + DefinedSyntheticKind, UndefinedKind, LazyKind, LastDefinedCOFFKind = DefinedCommonKind, - LastDefinedKind = DefinedRelativeKind, + LastDefinedKind = DefinedSyntheticKind, }; Kind kind() const { return static_cast(SymbolKind); } @@ -112,11 +112,11 @@ class Defined : public SymbolBody { (public) // Returns the RVA relative to the beginning of the output section. // Used to implement SECREL relocation type. - uint64_t getSecrel(); + uint32_t getSecrel(); // Returns the output section index. // Used to implement SECTION relocation type. - uint64_t getSectionIndex(); + uint16_t getSectionIndex(); // Returns true if this symbol points to an executable (e.g. .text) section. // Used to implement ARM relocations. @@ -167,6 +167,7 @@ class DefinedRegular : public DefinedCOFF { (public) bool isCOMDAT() { return IsCOMDAT; } SectionChunk *getChunk() { return *Data; } uint32_t getValue() { return Sym->Value; } + uint32_t getSecrel(); private: SectionChunk **Data; @@ -186,6 +187,8 @@ class DefinedCommon : public DefinedCOFF { (public) } uint64_t getRVA() { return Data->getRVA(); } + uint32_t getSecrel() { return Data->OutputSectionOff; } + uint16_t getSectionIndex(); private: friend SymbolTable; @@ -212,28 +215,34 @@ class DefinedAbsolute : public Defined { (public) uint64_t getRVA() { return VA - Config->ImageBase; } void setVA(uint64_t V) { VA = V; } + // The sentinel absolute symbol section index. Section index relocations + // against absolute symbols resolve to this 16 bit number, and it is the + // largest valid section index plus one. This is written by the Writer. + static uint16_t OutputSectionIndex; + private: uint64_t VA; }; -// This is a kind of absolute symbol but relative to the image base. -// Unlike absolute symbols, relocations referring this kind of symbols -// are subject of the base relocation. This type is used rarely -- -// mainly for __ImageBase. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:34:01 2017 Return-Path: Delivered-To: svn-src-all@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 776E5D91583; Mon, 26 Jun 2017 20:34:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7476D6513D; Mon, 26 Jun 2017 20:33:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXwcZ099270; Mon, 26 Jun 2017 20:33:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXuLd099248; Mon, 26 Jun 2017 20:33:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXuLd099248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320384 - in vendor/lldb/dist: include/lldb include/lldb/Host include/lldb/Host/common include/lldb/Host/posix lldb.xcodeproj packages/Python/lldbsuite/test packages/Python/lldbsuite/te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:34:01 -0000 Author: dim Date: Mon Jun 26 20:33:56 2017 New Revision: 320384 URL: https://svnweb.freebsd.org/changeset/base/320384 Log: Vendor import of lldb trunk r306325: https://llvm.org/svn/llvm-project/lldb/trunk@306325 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/ vendor/lldb/dist/unittests/Host/HostTest.cpp (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Host/posix/ProcessLauncherPosix.h vendor/lldb/dist/source/Host/posix/ProcessLauncherPosix.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/CMakeLists.txt vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h vendor/lldb/dist/test/android/ vendor/lldb/dist/test/api/ vendor/lldb/dist/test/arm_emulation/ vendor/lldb/dist/test/attic/ vendor/lldb/dist/test/benchmarks/ vendor/lldb/dist/test/c++/ vendor/lldb/dist/test/driver/ vendor/lldb/dist/test/example/ vendor/lldb/dist/test/expression_command/ vendor/lldb/dist/test/functionalities/ vendor/lldb/dist/test/help/ vendor/lldb/dist/test/lang/ vendor/lldb/dist/test/linux/ vendor/lldb/dist/test/logging/ vendor/lldb/dist/test/macosx/ vendor/lldb/dist/test/make/ vendor/lldb/dist/test/pexpect-2.4/ vendor/lldb/dist/test/plugins/ vendor/lldb/dist/test/python_api/ vendor/lldb/dist/test/settings/ vendor/lldb/dist/test/source-manager/ vendor/lldb/dist/test/terminal/ vendor/lldb/dist/test/tools/ vendor/lldb/dist/test/types/ vendor/lldb/dist/test/unittest2/ vendor/lldb/dist/test/warnings/ Modified: vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-private-enumerations.h vendor/lldb/dist/lldb.xcodeproj/project.pbxproj vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py vendor/lldb/dist/scripts/Python/python-wrapper.swig vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SystemInitializerFull.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Timer.cpp vendor/lldb/dist/source/Host/CMakeLists.txt vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp vendor/lldb/dist/source/Host/macosx/Host.mm vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp vendor/lldb/dist/source/Host/windows/Host.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/CMakeLists.txt vendor/lldb/dist/source/Plugins/Language/ObjC/Cocoa.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSArray.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSDictionary.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h vendor/lldb/dist/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.h vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/unittests/Host/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.h vendor/lldb/dist/unittests/tools/lldb-server/tests/TestClient.cpp Modified: vendor/lldb/dist/include/lldb/Host/Host.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Host.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/Host/Host.h Mon Jun 26 20:33:56 2017 (r320384) @@ -29,6 +29,27 @@ class FileAction; class ProcessLaunchInfo; //---------------------------------------------------------------------- +// Exit Type for inferior processes +//---------------------------------------------------------------------- +struct WaitStatus { + enum Type : uint8_t { + Exit, // The status represents the return code from normal + // program exit (i.e. WIFEXITED() was true) + Signal, // The status represents the signal number that caused + // the program to exit (i.e. WIFSIGNALED() was true) + Stop, // The status represents the signal number that caused the + // program to stop (i.e. WIFSTOPPED() was true) + }; + + Type type; + uint8_t status; + + WaitStatus(Type type, uint8_t status) : type(type), status(status) {} + + static WaitStatus Decode(int wstatus); +}; + +//---------------------------------------------------------------------- /// @class Host Host.h "lldb/Host/Host.h" /// @brief A class that provides host computer information. /// @@ -111,15 +132,6 @@ class Host { (public) static const char *GetSignalAsCString(int signo); - typedef void (*ThreadLocalStorageCleanupCallback)(void *p); - - static lldb::thread_key_t - ThreadLocalStorageCreate(ThreadLocalStorageCleanupCallback callback); - - static void *ThreadLocalStorageGet(lldb::thread_key_t key); - - static void ThreadLocalStorageSet(lldb::thread_key_t key, void *value); - //------------------------------------------------------------------ /// Given an address in the current process (the process that /// is running the LLDB code), return the name of the module that @@ -184,22 +196,6 @@ class Host { (public) static bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info); -#if (defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || \ - defined(__GLIBC__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ - !defined(__ANDROID__) - - static short GetPosixspawnFlags(const ProcessLaunchInfo &launch_info); - - static Status LaunchProcessPosixSpawn(const char *exe_path, - const ProcessLaunchInfo &launch_info, - lldb::pid_t &pid); - - static bool AddPosixSpawnFileAction(void *file_actions, - const FileAction *info, Log *log, - Status &error); - -#endif - static const lldb::UnixSignalsSP &GetUnixSignals(); static Status LaunchProcess(ProcessLaunchInfo &launch_info); @@ -245,6 +241,15 @@ class Host { (public) }; } // namespace lldb_private + +namespace llvm { +template <> struct format_provider { + /// Options = "" gives a human readable description of the status + /// Options = "g" gives a gdb-remote protocol status (e.g., X09) + static void format(const lldb_private::WaitStatus &WS, raw_ostream &OS, + llvm::StringRef Options); +}; +} // namespace llvm #endif // #if defined(__cplusplus) #endif // liblldb_Host_h_ Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon Jun 26 20:33:56 2017 (r320384) @@ -11,6 +11,7 @@ #define liblldb_NativeProcessProtocol_h_ #include "lldb/Core/TraceOptions.h" +#include "lldb/Host/Host.h" #include "lldb/Host/MainLoop.h" #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" @@ -158,12 +159,9 @@ class NativeProcessProtocol (public) //---------------------------------------------------------------------- // Exit Status //---------------------------------------------------------------------- - virtual bool GetExitStatus(lldb_private::ExitType *exit_type, int *status, - std::string &exit_description); + virtual llvm::Optional GetExitStatus(); - virtual bool SetExitStatus(lldb_private::ExitType exit_type, int status, - const char *exit_description, - bool bNotifyStateChange); + virtual bool SetExitStatus(WaitStatus status, bool bNotifyStateChange); //---------------------------------------------------------------------- // Access to threads @@ -421,9 +419,8 @@ class NativeProcessProtocol (public) lldb::StateType m_state; mutable std::recursive_mutex m_state_mutex; - lldb_private::ExitType m_exit_type; - int m_exit_status; - std::string m_exit_description; + llvm::Optional m_exit_status; + std::recursive_mutex m_delegates_mutex; std::vector m_delegates; NativeBreakpointList m_breakpoint_list; Modified: vendor/lldb/dist/include/lldb/lldb-enumerations.h ============================================================================== --- vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon Jun 26 20:33:56 2017 (r320384) @@ -454,6 +454,8 @@ enum LanguageType { enum InstrumentationRuntimeType { eInstrumentationRuntimeTypeAddressSanitizer = 0x0000, eInstrumentationRuntimeTypeThreadSanitizer = 0x0001, + eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002, + eInstrumentationRuntimeTypeMainThreadChecker = 0x0003, eNumInstrumentationRuntimeTypes }; Modified: vendor/lldb/dist/include/lldb/lldb-private-enumerations.h ============================================================================== --- vendor/lldb/dist/include/lldb/lldb-private-enumerations.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/lldb-private-enumerations.h Mon Jun 26 20:33:56 2017 (r320384) @@ -212,19 +212,6 @@ enum class LineStatus { }; //---------------------------------------------------------------------- -// Exit Type for inferior processes -//---------------------------------------------------------------------- -typedef enum ExitType { - eExitTypeInvalid, - eExitTypeExit, // The exit status represents the return code from normal - // program exit (i.e. WIFEXITED() was true) - eExitTypeSignal, // The exit status represents the signal number that caused - // the program to exit (i.e. WIFSIGNALED() was true) - eExitTypeStop, // The exit status represents the stop signal that caused the - // program to exit (i.e. WIFSTOPPED() was true) -} ExitType; - -//---------------------------------------------------------------------- // Boolean result of running a Type Validator //---------------------------------------------------------------------- enum class TypeValidatorResult : bool { Success = true, Failure = false }; Modified: vendor/lldb/dist/lldb.xcodeproj/project.pbxproj ============================================================================== --- vendor/lldb/dist/lldb.xcodeproj/project.pbxproj Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/lldb.xcodeproj/project.pbxproj Mon Jun 26 20:33:56 2017 (r320384) @@ -744,6 +744,7 @@ 4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; }; 4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; }; + 54067BF11DF2041B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */; }; 6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */; }; 6D0F61481C80AAD600A4ECEE /* DWARFASTParserJava.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */; }; 6D0F614E1C80AB0700A4ECEE /* JavaLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */; }; @@ -766,6 +767,7 @@ 8C26C4261C3EA5F90031DF7C /* ThreadSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* ThreadSanitizerRuntime.cpp */; }; 8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */; }; 8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */; }; + 8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */; }; 8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; }; 8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; }; @@ -2576,6 +2578,8 @@ 4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepUntil.h; path = include/lldb/Target/ThreadPlanStepUntil.h; sourceTree = ""; }; 4CF52AF41428291E0051E832 /* SBFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpecList.h; path = include/lldb/API/SBFileSpecList.h; sourceTree = ""; }; 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpecList.cpp; path = source/API/SBFileSpecList.cpp; sourceTree = ""; }; + 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = UndefinedBehaviorSanitizerRuntime.cpp; path = UndefinedBehaviorSanitizer/UndefinedBehaviorSanitizerRuntime.cpp; sourceTree = ""; }; + 54067BED1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UndefinedBehaviorSanitizerRuntime.h; path = UndefinedBehaviorSanitizer/UndefinedBehaviorSanitizerRuntime.h; sourceTree = ""; }; 69A01E1C1236C5D400C660B5 /* Host.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = ""; }; 69A01E1F1236C5D400C660B5 /* Symbols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbols.cpp; sourceTree = ""; }; 6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugMacros.h; path = include/lldb/Symbol/DebugMacros.h; sourceTree = ""; }; @@ -2624,6 +2628,8 @@ 8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; path = include/lldb/Target/MemoryHistory.h; sourceTree = ""; }; 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHistoryASan.cpp; sourceTree = ""; }; 8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHistoryASan.h; sourceTree = ""; }; + 8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainThreadCheckerRuntime.h; sourceTree = ""; }; + 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MainThreadCheckerRuntime.cpp; sourceTree = ""; }; 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadCollection.cpp; path = source/Target/ThreadCollection.cpp; sourceTree = ""; }; 8CCB017C19BA289B0009FD44 /* ThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadCollection.h; path = include/lldb/Target/ThreadCollection.h; sourceTree = ""; }; 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadCollection.cpp; path = source/API/SBThreadCollection.cpp; sourceTree = ""; }; @@ -5912,6 +5918,15 @@ path = "gdb-remote"; sourceTree = ""; }; + 54067BEA1DF2033700749AA5 /* UndefinedBehaviorSanitizer */ = { + isa = PBXGroup; + children = ( + 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */, + 54067BED1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.h */, + ); + name = UndefinedBehaviorSanitizer; + sourceTree = ""; + }; 69A01E1A1236C5D400C660B5 /* common */ = { isa = PBXGroup; children = ( @@ -6011,11 +6026,22 @@ path = asan; sourceTree = ""; }; + 8C3BD9911EF45D9B0016C343 /* MainThreadChecker */ = { + isa = PBXGroup; + children = ( + 8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */, + 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */, + ); + path = MainThreadChecker; + sourceTree = ""; + }; 8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */ = { isa = PBXGroup; children = ( + 54067BEA1DF2033700749AA5 /* UndefinedBehaviorSanitizer */, 8C26C4221C3EA4050031DF7C /* ThreadSanitizer */, 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */, + 8C3BD9911EF45D9B0016C343 /* MainThreadChecker */, ); path = InstrumentationRuntime; sourceTree = ""; @@ -7133,6 +7159,7 @@ 2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */, 4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */, AE44FB4C1BB4BB540033EB62 /* GoFormatterFunctions.cpp in Sources */, + 8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */, 23042D121976CA1D00621B2C /* PlatformKalimba.cpp in Sources */, 2689001313353DDE00698AC0 /* CommandObjectArgs.cpp in Sources */, 2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */, @@ -7623,6 +7650,7 @@ 26954EBE1401EE8B00294D09 /* DynamicRegisterInfo.cpp in Sources */, 6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */, 255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */, + 54067BF11DF2041B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp in Sources */, 3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */, 26274FA714030F79006BA130 /* DynamicLoaderDarwinKernel.cpp in Sources */, 94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */, Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py Mon Jun 26 20:33:56 2017 (r320384) @@ -681,6 +681,53 @@ def skipUnlessThreadSanitizer(func): return None return skipTestIfFn(is_compiler_clang_with_thread_sanitizer)(func) +def skipUnlessUndefinedBehaviorSanitizer(func): + """Decorate the item to skip test unless -fsanitize=undefined is supported.""" + + def is_compiler_clang_with_ubsan(self): + # Write out a temp file which exhibits UB. + inputf = tempfile.NamedTemporaryFile(suffix='.c') + inputf.write('int main() { int x = 0; return x / x; }\n') + inputf.flush() + + # We need to write out the object into a named temp file for inspection. + outputf = tempfile.NamedTemporaryFile() + + # Try to compile with ubsan turned on. + cmd = '%s -fsanitize=undefined %s -o %s' % (self.getCompiler(), inputf.name, outputf.name) + if os.popen(cmd).close() is not None: + return "Compiler cannot compile with -fsanitize=undefined" + + # Check that we actually see ubsan instrumentation in the binary. + cmd = 'nm %s' % outputf.name + with os.popen(cmd) as nm_output: + if '___ubsan_handle_divrem_overflow' not in nm_output.read(): + return "Division by zero instrumentation is missing" + + # Find the ubsan dylib. + # FIXME: This check should go away once compiler-rt gains support for __ubsan_on_report. + cmd = '%s -fsanitize=undefined -x c - -o - -### 2>&1' % self.getCompiler() + with os.popen(cmd) as cc_output: + driver_jobs = cc_output.read() + m = re.search(r'"([^"]+libclang_rt.ubsan_osx_dynamic.dylib)"', driver_jobs) + if not m: + return "Could not find the ubsan dylib used by the driver" + ubsan_dylib = m.group(1) + + # Check that the ubsan dylib has special monitor hooks. + cmd = 'nm -gU %s' % ubsan_dylib + with os.popen(cmd) as nm_output: + syms = nm_output.read() + if '___ubsan_on_report' not in syms: + return "Missing ___ubsan_on_report" + if '___ubsan_get_current_report_data' not in syms: + return "Missing ___ubsan_get_current_report_data" + + # OK, this dylib + compiler works for us. + return None + + return skipTestIfFn(is_compiler_clang_with_ubsan)(func) + def skipUnlessAddressSanitizer(func): """Decorate the item to skip test unless Clang -fsanitize=thread is supported.""" Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Mon Jun 26 20:33:56 2017 (r320384) @@ -186,15 +186,26 @@ class ObjCDataFormatterTestCase(TestBase): def nsnumber_data_formatter_commands(self): # Now enable AppKit and check we are displaying Cocoa classes correctly - self.expect('frame variable num1 num2 num3 num4 num5 num6 num7 num9', + self.expect('frame variable num1 num2 num3 num5 num6 num7 num9', substrs=['(NSNumber *) num1 = ', ' (int)5', '(NSNumber *) num2 = ', ' (float)3.1', '(NSNumber *) num3 = ', ' (double)3.14', - '(NSNumber *) num4 = ', ' (long)-2', '(NSNumber *) num5 = ', ' (char)65', '(NSNumber *) num6 = ', ' (long)255', '(NSNumber *) num7 = ', '2000000', '(NSNumber *) num9 = ', ' (short)-31616']) + + + self.runCmd('frame variable num4', check=True) + output = self.res.GetOutput() + i128_handled_correctly = False + + if output.find('long') >= 0: + i128_handled_correctly = (output.find('(long)-2') >= 0) + if output.find('int128_t') >= 0: + i128_handled_correctly = (output.find('(int128_t)18446744073709551614') >= 0) # deliberately broken, should be ..14 + + self.assertTrue(i128_handled_correctly, "Expected valid output for int128_t; got " + output) self.expect('frame variable num_at1 num_at2 num_at3 num_at4', substrs=['(NSNumber *) num_at1 = ', ' (int)12', Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,6 @@ +LEVEL = ../../../make + +C_SOURCES := main.c +CFLAGS_EXTRAS := -fsanitize=undefined -g + +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,90 @@ +""" +Tests basic UndefinedBehaviorSanitizer support (detecting an alignment error). +""" + +import os +import time +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +import lldbsuite.test.lldbutil as lldbutil +import json + + +class UbsanBasicTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @skipUnlessUndefinedBehaviorSanitizer + def test(self): + self.build() + self.ubsan_tests() + + def setUp(self): + # Call super's setUp(). + TestBase.setUp(self) + self.line_align = line_number('main.c', '// align line') + + def ubsan_tests(self): + # Load the test + exe = os.path.join(os.getcwd(), "a.out") + self.expect( + "file " + exe, + patterns=["Current executable set to .*a.out"]) + + self.runCmd("run") + + process = self.dbg.GetSelectedTarget().process + thread = process.GetSelectedThread() + frame = thread.GetSelectedFrame() + + # the stop reason of the thread should be breakpoint. + self.expect("thread list", "A ubsan issue should be detected", + substrs=['stopped', 'stop reason =']) + + stop_reason = thread.GetStopReason() + self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation) + + # test that the UBSan dylib is present + self.expect( + "image lookup -n __ubsan_on_report", + "__ubsan_on_report should be present", + substrs=['1 match found']) + + # We should be stopped in __ubsan_on_report + self.assertTrue("__ubsan_on_report" in frame.GetFunctionName()) + + # The stopped thread backtrace should contain either 'align line' + found = False + for i in range(thread.GetNumFrames()): + frame = thread.GetFrameAtIndex(i) + if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c": + if frame.GetLineEntry().GetLine() == self.line_align: + found = True + self.assertTrue(found) + + backtraces = thread.GetStopReasonExtendedBacktraces( + lldb.eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer) + self.assertTrue(backtraces.GetSize() == 1) + + self.expect( + "thread info -s", + "The extended stop info should contain the UBSan provided fields", + substrs=[ + "instrumentation_class", + "memory_address", + "description", + "filename", + "line", + "col"]) + + output_lines = self.res.GetOutput().split('\n') + json_line = '\n'.join(output_lines[2:]) + data = json.loads(json_line) + + self.assertEqual(data["instrumentation_class"], "UndefinedBehaviorSanitizer") + self.assertEqual(data["description"], "misaligned-pointer-use") + self.assertEqual(data["filename"], "main.c") + self.assertEqual(data["line"], self.line_align) + + self.runCmd("continue") Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,4 @@ +int main() { + int data[4]; + return *(int *)(((char *)&data[0]) + 2); // align line +} Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Mon Jun 26 20:33:56 2017 (r320384) @@ -121,8 +121,6 @@ class ObjCNewSyntaxTestCase(TestBase): '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) - @expectedFailureAll( - bugnumber="rdar://32777981") def test_update_dictionary(self): self.runToBreakpoint() @@ -165,8 +163,6 @@ class ObjCNewSyntaxTestCase(TestBase): '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) - @expectedFailureAll( - bugnumber="rdar://32777981") def test_dictionary_literal(self): self.runToBreakpoint() Modified: vendor/lldb/dist/scripts/Python/python-wrapper.swig ============================================================================== --- vendor/lldb/dist/scripts/Python/python-wrapper.swig Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/scripts/Python/python-wrapper.swig Mon Jun 26 20:33:56 2017 (r320384) @@ -929,7 +929,8 @@ void LLDBSwigPythonCallPythonLogOutputCallback(const c void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton) { if (baton != Py_None) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyObject_CallFunction(reinterpret_cast(baton), const_cast("s"), str); + PyObject *result = PyObject_CallFunction(reinterpret_cast(baton), const_cast("s"), str); + Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } } Modified: vendor/lldb/dist/source/API/SBThread.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBThread.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/API/SBThread.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -293,10 +293,6 @@ SBThread::GetStopReasonExtendedBacktraces(Instrumentat ThreadCollectionSP threads; threads.reset(new ThreadCollection()); - // We currently only support ThreadSanitizer. - if (type != eInstrumentationRuntimeTypeThreadSanitizer) - return threads; - std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); Modified: vendor/lldb/dist/source/API/SystemInitializerFull.cpp ============================================================================== --- vendor/lldb/dist/source/API/SystemInitializerFull.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/API/SystemInitializerFull.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -49,8 +49,10 @@ #include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h" #include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h" #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" -#include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h" -#include "Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h" +#include "Plugins/InstrumentationRuntime/ASan/ASanRuntime.h" +#include "Plugins/InstrumentationRuntime/TSan/TSanRuntime.h" +#include "Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h" +#include "Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h" #include "Plugins/JITLoader/GDB/JITLoaderGDB.h" #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/Go/GoLanguage.h" @@ -310,6 +312,8 @@ void SystemInitializerFull::Initialize() { MemoryHistoryASan::Initialize(); AddressSanitizerRuntime::Initialize(); ThreadSanitizerRuntime::Initialize(); + UndefinedBehaviorSanitizerRuntime::Initialize(); + MainThreadCheckerRuntime::Initialize(); SymbolVendorELF::Initialize(); SymbolFileDWARF::Initialize(); @@ -434,6 +438,8 @@ void SystemInitializerFull::Terminate() { MemoryHistoryASan::Terminate(); AddressSanitizerRuntime::Terminate(); ThreadSanitizerRuntime::Terminate(); + UndefinedBehaviorSanitizerRuntime::Terminate(); + MainThreadCheckerRuntime::Terminate(); SymbolVendorELF::Terminate(); SymbolFileDWARF::Terminate(); SymbolFilePDB::Terminate(); Modified: vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp ============================================================================== --- vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -655,32 +655,30 @@ class CommandObjectFrameVariable : public CommandObjec if (num_variables > 0) { for (size_t i = 0; i < num_variables; i++) { var_sp = variable_list->GetVariableAtIndex(i); - switch (var_sp->GetScope()) - { - case eValueTypeVariableGlobal: - if (!m_option_variable.show_globals) - continue; - break; - case eValueTypeVariableStatic: - if (!m_option_variable.show_globals) - continue; - break; - case eValueTypeVariableArgument: - if (!m_option_variable.show_args) - continue; - break; - case eValueTypeVariableLocal: - if (!m_option_variable.show_locals) - continue; - break; - default: + switch (var_sp->GetScope()) { + case eValueTypeVariableGlobal: + if (!m_option_variable.show_globals) continue; - break; - + break; + case eValueTypeVariableStatic: + if (!m_option_variable.show_globals) + continue; + break; + case eValueTypeVariableArgument: + if (!m_option_variable.show_args) + continue; + break; + case eValueTypeVariableLocal: + if (!m_option_variable.show_locals) + continue; + break; + default: + continue; + break; } - std::string scope_string; - if (m_option_variable.show_scope) - scope_string = GetScopeString(var_sp).str(); + std::string scope_string; + if (m_option_variable.show_scope) + scope_string = GetScopeString(var_sp).str(); // Use the variable object code to make sure we are // using the same APIs as the public API will be Modified: vendor/lldb/dist/source/Core/IOHandler.cpp ============================================================================== --- vendor/lldb/dist/source/Core/IOHandler.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/IOHandler.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -58,7 +58,7 @@ #include "llvm/ADT/StringRef.h" // for StringRef #ifdef _MSC_VER -#include +#include "lldb/Host/windows/windows.h" #endif #include // for shared_ptr Modified: vendor/lldb/dist/source/Core/Mangled.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Mangled.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/Mangled.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -10,7 +10,7 @@ #include "lldb/Core/Mangled.h" #if defined(_WIN32) -#include +#include "lldb/Host/windows/windows.h" #include #pragma comment(lib, "dbghelp.lib") Modified: vendor/lldb/dist/source/Core/Timer.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Timer.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/Timer.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -38,22 +38,11 @@ static std::mutex &GetFileMutex() { return *g_file_mutex_ptr; } -static void ThreadSpecificCleanup(void *p) { - delete static_cast(p); +static TimerStack &GetTimerStackForCurrentThread() { + static thread_local TimerStack g_stack; + return g_stack; } -static TimerStack *GetTimerStackForCurrentThread() { - static lldb::thread_key_t g_key = - Host::ThreadLocalStorageCreate(ThreadSpecificCleanup); - - void *timer_stack = Host::ThreadLocalStorageGet(g_key); - if (timer_stack == NULL) { - Host::ThreadLocalStorageSet(g_key, new TimerStack); - timer_stack = Host::ThreadLocalStorageGet(g_key); - } - return (TimerStack *)timer_stack; -} - Timer::Category::Category(const char *cat) : m_name(cat) { m_nanos.store(0, std::memory_order_release); Category *expected = g_categories; @@ -66,16 +55,14 @@ void Timer::SetQuiet(bool value) { g_quiet = value; } Timer::Timer(Timer::Category &category, const char *format, ...) : m_category(category), m_total_start(std::chrono::steady_clock::now()) { - TimerStack *stack = GetTimerStackForCurrentThread(); - if (!stack) - return; + TimerStack &stack = GetTimerStackForCurrentThread(); - stack->push_back(this); - if (g_quiet && stack->size() <= g_display_depth) { + stack.push_back(this); + if (g_quiet && stack.size() <= g_display_depth) { std::lock_guard lock(GetFileMutex()); // Indent - ::fprintf(stdout, "%*s", int(stack->size() - 1) * TIMER_INDENT_AMOUNT, ""); + ::fprintf(stdout, "%*s", int(stack.size() - 1) * TIMER_INDENT_AMOUNT, ""); // Print formatted string va_list args; va_start(args, format); @@ -90,26 +77,23 @@ Timer::Timer(Timer::Category &category, const char *fo Timer::~Timer() { using namespace std::chrono; - TimerStack *stack = GetTimerStackForCurrentThread(); - if (!stack) - return; - auto stop_time = steady_clock::now(); auto total_dur = stop_time - m_total_start; auto timer_dur = total_dur - m_child_duration; - if (g_quiet && stack->size() <= g_display_depth) { + TimerStack &stack = GetTimerStackForCurrentThread(); + if (g_quiet && stack.size() <= g_display_depth) { std::lock_guard lock(GetFileMutex()); ::fprintf(stdout, "%*s%.9f sec (%.9f sec)\n", - int(stack->size() - 1) * TIMER_INDENT_AMOUNT, "", + int(stack.size() - 1) * TIMER_INDENT_AMOUNT, "", duration(total_dur).count(), duration(timer_dur).count()); } - assert(stack->back() == this); - stack->pop_back(); - if (!stack->empty()) - stack->back()->ChildDuration(total_dur); + assert(stack.back() == this); + stack.pop_back(); + if (!stack.empty()) + stack.back()->ChildDuration(total_dur); // Keep total results for each category so we can dump results. m_category.m_nanos += std::chrono::nanoseconds(timer_dur).count(); Modified: vendor/lldb/dist/source/Host/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Host/CMakeLists.txt Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Host/CMakeLists.txt Mon Jun 26 20:33:56 2017 (r320384) @@ -90,12 +90,6 @@ else() posix/ProcessLauncherPosixFork.cpp ) - if (NOT (CMAKE_SYSTEM_NAME MATCHES "Android")) - add_host_subdirectory(posix - posix/ProcessLauncherPosix.cpp - ) - endif() - if (CMAKE_SYSTEM_NAME MATCHES "Darwin") include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) add_host_subdirectory(macosx Modified: vendor/lldb/dist/source/Host/common/Host.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/Host.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Host/common/Host.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -68,15 +68,14 @@ #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" #include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Errno.h" #include "llvm/Support/FileSystem.h" #if defined(_WIN32) #include "lldb/Host/windows/ProcessLauncherWindows.h" -#elif defined(__linux__) || defined(__NetBSD__) -#include "lldb/Host/posix/ProcessLauncherPosixFork.h" #else -#include "lldb/Host/posix/ProcessLauncherPosix.h" +#include "lldb/Host/posix/ProcessLauncherPosixFork.h" #endif #if defined(__APPLE__) @@ -407,25 +406,6 @@ const char *Host::GetSignalAsCString(int signo) { #endif -#ifndef _WIN32 - -lldb::thread_key_t -Host::ThreadLocalStorageCreate(ThreadLocalStorageCleanupCallback callback) { - pthread_key_t key; - ::pthread_key_create(&key, callback); - return key; -} - -void *Host::ThreadLocalStorageGet(lldb::thread_key_t key) { - return ::pthread_getspecific(key); -} - -void Host::ThreadLocalStorageSet(lldb::thread_key_t key, void *value) { - ::pthread_setspecific(key, value); -} - -#endif - #if !defined(__APPLE__) // see Host.mm bool Host::GetBundleDirectory(const FileSpec &file, FileSpec &bundle) { @@ -602,359 +582,14 @@ Status Host::RunShellCommand(const Args &args, const F return error; } -// LaunchProcessPosixSpawn for Apple, Linux, FreeBSD, NetBSD and other GLIBC -// systems - -#if defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || \ - defined(__GLIBC__) || defined(__NetBSD__) -#if !defined(__ANDROID__) -// this method needs to be visible to macosx/Host.cpp and -// common/Host.cpp. - -short Host::GetPosixspawnFlags(const ProcessLaunchInfo &launch_info) { - short flags = POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK; - -#if defined(__APPLE__) - if (launch_info.GetFlags().Test(eLaunchFlagExec)) - flags |= POSIX_SPAWN_SETEXEC; // Darwin specific posix_spawn flag - - if (launch_info.GetFlags().Test(eLaunchFlagDebug)) - flags |= POSIX_SPAWN_START_SUSPENDED; // Darwin specific posix_spawn flag - - if (launch_info.GetFlags().Test(eLaunchFlagDisableASLR)) - flags |= _POSIX_SPAWN_DISABLE_ASLR; // Darwin specific posix_spawn flag - - if (launch_info.GetLaunchInSeparateProcessGroup()) - flags |= POSIX_SPAWN_SETPGROUP; - -#ifdef POSIX_SPAWN_CLOEXEC_DEFAULT -#if defined(__APPLE__) && (defined(__x86_64__) || defined(__i386__)) - static LazyBool g_use_close_on_exec_flag = eLazyBoolCalculate; - if (g_use_close_on_exec_flag == eLazyBoolCalculate) { - g_use_close_on_exec_flag = eLazyBoolNo; - - uint32_t major, minor, update; - if (HostInfo::GetOSVersion(major, minor, update)) { - // Kernel panic if we use the POSIX_SPAWN_CLOEXEC_DEFAULT on 10.7 or - // earlier - if (major > 10 || (major == 10 && minor > 7)) { - // Only enable for 10.8 and later OS versions - g_use_close_on_exec_flag = eLazyBoolYes; - } - } - } -#else - static LazyBool g_use_close_on_exec_flag = eLazyBoolYes; -#endif - // Close all files exception those with file actions if this is supported. - if (g_use_close_on_exec_flag == eLazyBoolYes) - flags |= POSIX_SPAWN_CLOEXEC_DEFAULT; -#endif -#endif // #if defined (__APPLE__) - return flags; -} - -Status Host::LaunchProcessPosixSpawn(const char *exe_path, - const ProcessLaunchInfo &launch_info, - lldb::pid_t &pid) { - Status error; - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST | - LIBLLDB_LOG_PROCESS)); - - posix_spawnattr_t attr; - error.SetError(::posix_spawnattr_init(&attr), eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnattr_init ( &attr )", error); - return error; - } - - // Make a quick class that will cleanup the posix spawn attributes in case - // we return in the middle of this function. - lldb_utility::CleanUp posix_spawnattr_cleanup( - &attr, posix_spawnattr_destroy); - - sigset_t no_signals; - sigset_t all_signals; - sigemptyset(&no_signals); - sigfillset(&all_signals); - ::posix_spawnattr_setsigmask(&attr, &no_signals); -#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) - ::posix_spawnattr_setsigdefault(&attr, &no_signals); -#else - ::posix_spawnattr_setsigdefault(&attr, &all_signals); -#endif - - short flags = GetPosixspawnFlags(launch_info); - - error.SetError(::posix_spawnattr_setflags(&attr, flags), eErrorTypePOSIX); - if (error.Fail()) { - LLDB_LOG(log, - "error: {0}, ::posix_spawnattr_setflags ( &attr, flags={1:x} )", - error, flags); - return error; - } - -// posix_spawnattr_setbinpref_np appears to be an Apple extension per: -// http://www.unix.com/man-page/OSX/3/posix_spawnattr_setbinpref_np/ -#if defined(__APPLE__) && !defined(__arm__) - - // Don't set the binpref if a shell was provided. After all, that's only - // going to affect what version of the shell - // is launched, not what fork of the binary is launched. We insert "arch - // --arch as part of the shell invocation - // to do that job on OSX. - - if (launch_info.GetShell() == nullptr) { - // We don't need to do this for ARM, and we really shouldn't now that we - // have multiple CPU subtypes and no posix_spawnattr call that allows us - // to set which CPU subtype to launch... - const ArchSpec &arch_spec = launch_info.GetArchitecture(); - cpu_type_t cpu = arch_spec.GetMachOCPUType(); - cpu_type_t sub = arch_spec.GetMachOCPUSubType(); - if (cpu != 0 && cpu != static_cast(UINT32_MAX) && - cpu != static_cast(LLDB_INVALID_CPUTYPE) && - !(cpu == 0x01000007 && sub == 8)) // If haswell is specified, don't try - // to set the CPU type or we will fail - { - size_t ocount = 0; - error.SetError(::posix_spawnattr_setbinpref_np(&attr, 1, &cpu, &ocount), - eErrorTypePOSIX); - if (error.Fail()) - LLDB_LOG(log, "error: {0}, ::posix_spawnattr_setbinpref_np ( &attr, 1, " - "cpu_type = {1:x}, count => {2} )", - error, cpu, ocount); - - if (error.Fail() || ocount != 1) - return error; - } - } - -#endif - - const char *tmp_argv[2]; - char *const *argv = const_cast( - launch_info.GetArguments().GetConstArgumentVector()); - char *const *envp = const_cast( - launch_info.GetEnvironmentEntries().GetConstArgumentVector()); - if (argv == NULL) { - // posix_spawn gets very unhappy if it doesn't have at least the program - // name in argv[0]. One of the side affects I have noticed is the - // environment - // variables don't make it into the child process if "argv == NULL"!!! - tmp_argv[0] = exe_path; - tmp_argv[1] = NULL; - argv = const_cast(tmp_argv); - } - +// The functions below implement process launching for non-Apple-based platforms #if !defined(__APPLE__) - // manage the working directory - char current_dir[PATH_MAX]; - current_dir[0] = '\0'; -#endif - - FileSpec working_dir{launch_info.GetWorkingDirectory()}; - if (working_dir) { -#if defined(__APPLE__) - // Set the working directory on this thread only - if (__pthread_chdir(working_dir.GetCString()) < 0) { - if (errno == ENOENT) { - error.SetErrorStringWithFormat("No such file or directory: %s", - working_dir.GetCString()); - } else if (errno == ENOTDIR) { - error.SetErrorStringWithFormat("Path doesn't name a directory: %s", - working_dir.GetCString()); - } else { - error.SetErrorStringWithFormat("An unknown error occurred when " - "changing directory for process " - "execution."); - } - return error; - } -#else - if (::getcwd(current_dir, sizeof(current_dir)) == NULL) { - error.SetError(errno, eErrorTypePOSIX); - LLDB_LOG(log, "error: {0}, unable to save the current directory", error); - return error; - } - - if (::chdir(working_dir.GetCString()) == -1) { - error.SetError(errno, eErrorTypePOSIX); - LLDB_LOG(log, "error: {0}, unable to change working directory to {1}", - error, working_dir); - return error; - } -#endif - } - - ::pid_t result_pid = LLDB_INVALID_PROCESS_ID; - const size_t num_file_actions = launch_info.GetNumFileActions(); - if (num_file_actions > 0) { - posix_spawn_file_actions_t file_actions; - error.SetError(::posix_spawn_file_actions_init(&file_actions), - eErrorTypePOSIX); - if (error.Fail()) { - LLDB_LOG(log, - "error: {0}, ::posix_spawn_file_actions_init ( &file_actions )", - error); - return error; - } - - // Make a quick class that will cleanup the posix spawn attributes in case - // we return in the middle of this function. - lldb_utility::CleanUp - posix_spawn_file_actions_cleanup(&file_actions, - posix_spawn_file_actions_destroy); - - for (size_t i = 0; i < num_file_actions; ++i) { - const FileAction *launch_file_action = - launch_info.GetFileActionAtIndex(i); - if (launch_file_action) { - if (!AddPosixSpawnFileAction(&file_actions, launch_file_action, log, - error)) - return error; - } - } - - error.SetError( - ::posix_spawnp(&result_pid, exe_path, &file_actions, &attr, argv, envp), - eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnp(pid => {1}, path = '{2}', " - "file_actions = {3}, " - "attr = {4}, argv = {5}, envp = {6} )", - error, result_pid, exe_path, &file_actions, &attr, argv, envp); - if (log) { - for (int ii = 0; argv[ii]; ++ii) - LLDB_LOG(log, "argv[{0}] = '{1}'", ii, argv[ii]); - } - } - - } else { - error.SetError( - ::posix_spawnp(&result_pid, exe_path, NULL, &attr, argv, envp), - eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnp ( pid => {1}, path = '{2}', " - "file_actions = NULL, attr = {3}, argv = {4}, envp = {5} )", - error, result_pid, exe_path, &attr, argv, envp); - if (log) { - for (int ii = 0; argv[ii]; ++ii) - LLDB_LOG(log, "argv[{0}] = '{1}'", ii, argv[ii]); - } - } - } - pid = result_pid; - - if (working_dir) { -#if defined(__APPLE__) - // No more thread specific current working directory - __pthread_fchdir(-1); -#else - if (::chdir(current_dir) == -1 && error.Success()) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 26 20:34:04 2017 Return-Path: Delivered-To: svn-src-all@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 537E5D9159F; Mon, 26 Jun 2017 20:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B7CFD65189; Mon, 26 Jun 2017 20:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKY2WM099320; Mon, 26 Jun 2017 20:34:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKY291099319; Mon, 26 Jun 2017 20:34:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262034.v5QKY291099319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320385 - vendor/lldb/lldb-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:34:04 -0000 Author: dim Date: Mon Jun 26 20:34:02 2017 New Revision: 320385 URL: https://svnweb.freebsd.org/changeset/base/320385 Log: Tag lldb trunk r306325. Added: vendor/lldb/lldb-trunk-r306325/ - copied from r320384, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Mon Jun 26 21:14:34 2017 Return-Path: Delivered-To: svn-src-all@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 5E79FD920A8; Mon, 26 Jun 2017 21:14:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 218DB66A6F; Mon, 26 Jun 2017 21:14:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QLEXeg015533; Mon, 26 Jun 2017 21:14:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QLEXTq015532; Mon, 26 Jun 2017 21:14:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706262114.v5QLEXTq015532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 26 Jun 2017 21:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320386 - head/sys/modules/linuxkpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 21:14:34 -0000 Author: markj Date: Mon Jun 26 21:14:33 2017 New Revision: 320386 URL: https://svnweb.freebsd.org/changeset/base/320386 Log: Sort SRCS. MFC after: 1 week Modified: head/sys/modules/linuxkpi/Makefile Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Mon Jun 26 20:34:02 2017 (r320385) +++ head/sys/modules/linuxkpi/Makefile Mon Jun 26 21:14:33 2017 (r320386) @@ -2,10 +2,11 @@ .PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src KMOD= linuxkpi -SRCS= linux_kmod.c \ - linux_compat.c \ +SRCS= linux_compat.c \ linux_current.c \ linux_hrtimer.c \ + linux_idr.c \ + linux_kmod.c \ linux_kthread.c \ linux_lock.c \ linux_page.c \ @@ -15,7 +16,6 @@ SRCS= linux_kmod.c \ linux_schedule.c \ linux_slab.c \ linux_tasklet.c \ - linux_idr.c \ linux_usb.c \ linux_work.c From owner-svn-src-all@freebsd.org Mon Jun 26 21:45:34 2017 Return-Path: Delivered-To: svn-src-all@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 97A26D92876; Mon, 26 Jun 2017 21:45:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 629E267783; Mon, 26 Jun 2017 21:45:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QLjXN1027753; Mon, 26 Jun 2017 21:45:33 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QLjXvc027752; Mon, 26 Jun 2017 21:45:33 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201706262145.v5QLjXvc027752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 26 Jun 2017 21:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320387 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 21:45:34 -0000 Author: gonzo Date: Mon Jun 26 21:45:33 2017 New Revision: 320387 URL: https://svnweb.freebsd.org/changeset/base/320387 Log: [arm] Use correct index value when checking range validity Reviewed by: andrew MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D9145 Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Mon Jun 26 21:14:33 2017 (r320386) +++ head/sys/arm/arm/gic.c Mon Jun 26 21:45:33 2017 (r320387) @@ -1445,11 +1445,11 @@ arm_gicv2m_alloc_msi(device_t dev, device_t child, int break; } - KASSERT((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI)!= 0, + KASSERT((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI)!= 0, ("%s: Non-MSI interrupt found", __func__)); /* This is already used */ - if ((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI_USED) == + if ((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED) { found = false; break; From owner-svn-src-all@freebsd.org Mon Jun 26 22:32:54 2017 Return-Path: Delivered-To: svn-src-all@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 1504AD93185; Mon, 26 Jun 2017 22:32:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D47E068D92; Mon, 26 Jun 2017 22:32:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QMWrJw048497; Mon, 26 Jun 2017 22:32:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QMWrBs048496; Mon, 26 Jun 2017 22:32:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706262232.v5QMWrBs048496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 26 Jun 2017 22:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320388 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 22:32:54 -0000 Author: andrew Date: Mon Jun 26 22:32:52 2017 New Revision: 320388 URL: https://svnweb.freebsd.org/changeset/base/320388 Log: In _bswap16 and _bswap32 cast constant values to the appropriate type. This is similar to what is done in the x86 code. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/endian.h Modified: head/sys/arm64/include/endian.h ============================================================================== --- head/sys/arm64/include/endian.h Mon Jun 26 21:45:33 2017 (r320387) +++ head/sys/arm64/include/endian.h Mon Jun 26 22:32:52 2017 (r320388) @@ -106,12 +106,12 @@ __bswap16_var(__uint16_t v) #define __bswap16(x) \ ((__uint16_t)(__builtin_constant_p(x) ? \ - __bswap16_constant(x) : \ + __bswap16_constant((__uint16_t)x) : \ __bswap16_var(x))) #define __bswap32(x) \ ((__uint32_t)(__builtin_constant_p(x) ? \ - __bswap32_constant(x) : \ + __bswap32_constant((__uint32_t)x) : \ __bswap32_var(x))) #else From owner-svn-src-all@freebsd.org Mon Jun 26 22:34:23 2017 Return-Path: Delivered-To: svn-src-all@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 ABE83D9322B; Mon, 26 Jun 2017 22:34:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (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 6698368F7D; Mon, 26 Jun 2017 22:34:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x231.google.com with SMTP id i2so12518225qta.3; Mon, 26 Jun 2017 15:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=k40X7k6xkxpd1xMvWYAuw/ZzkyDyefD7hz0ppAk9j6c=; b=dzXYaHmzWpj6qWy9JJD7m4FpnDhyBBtCDd1SeP/wHNLbhB6gi7HeqkRQWlxBHx4oVf AbcaxQPEwRn4TT5j9QsQmHfEQi7G1AAIzWmy20lmNn3JZPDa9lk45NRtj1Xq6Jjmb9BU pLoEsKagL+H+PyFo9KNPh39wqGXRnrtaSfeLi9uV+7JGRYq2OVhaujJLErLlZmJVLUOP bzE0lWWnsn176g8jyFwyi3819o8XIyrP27BEYWGcZ6Jevr/b1FRPHNJ0wDsRx9AIBTsD 2/myWONkDYVl2duuD0Z6ptyHHRVbInj5p69tu3ZTt+UKv22pimviGj6M6l3YWxzcZJ0N FblA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=k40X7k6xkxpd1xMvWYAuw/ZzkyDyefD7hz0ppAk9j6c=; b=Yva3MT5FWmC4c4u6uyjwpo+Yto7ujmCmdNWvJlhcyx4lg0+BjQEjoBILIBMzgGqJB0 vaPxSRUFOrFCZHTsN/39m2uJoUk5RWC96Z+G2fIyvoA9DlO+D2AuixoGn4W/iBqfS/xZ FiJ6etO+n4EKAdub3npmJX0qb97cDDBFGGstFdL9z/hX6SMkOp/gT2J8u3D+y+QXdZ/R Zx/s/KS12BWKXYY4cfvmgd5T2JFEKBjz5T5i2OVefJikB8I2vhzzBn3jmo+6o8B8Wo28 3dsskn5c4kksvWvuJ2wCVZXwcTkGGpsmmX90LzjTrFglKgeWzIw2DZET9SrXRoe9ptRg 2noQ== X-Gm-Message-State: AKS2vOw4I9Vzz2FP0bmx8M69VuV3DruZFiJi70k27Qtez0z8K3C49zo0 OmjI8r/lKDHLi2cubHHjA+jAkLtUjBFQ X-Received: by 10.200.40.73 with SMTP id 9mr1156033qtr.37.1498516462577; Mon, 26 Jun 2017 15:34:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.92.142 with HTTP; Mon, 26 Jun 2017 15:34:22 -0700 (PDT) In-Reply-To: References: <201706231826.v5NIQvYa060882@repo.freebsd.org> From: Ngie Cooper Date: Mon, 26 Jun 2017 15:34:22 -0700 Message-ID: Subject: Re: svn commit: r320284 - head To: Kyle Evans Cc: Bryan Drewery , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 22:34:23 -0000 On Mon, Jun 26, 2017 at 12:37 PM, Kyle Evans wrote: > Hi, > > This broke my setup that builds my 7 different kernels due to duplicate > target errors. This seems to do what I want: > https://files.kyle-evans.net/freebsd/fix-packages.diff =) :ShipIt:! From owner-svn-src-all@freebsd.org Mon Jun 26 22:48:05 2017 Return-Path: Delivered-To: svn-src-all@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 475D3D9352D; Mon, 26 Jun 2017 22:48:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 15BE16A686; Mon, 26 Jun 2017 22:48:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QMm4hR052947; Mon, 26 Jun 2017 22:48:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QMm4al052946; Mon, 26 Jun 2017 22:48:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706262248.v5QMm4al052946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 26 Jun 2017 22:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320389 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 22:48:05 -0000 Author: imp Date: Mon Jun 26 22:48:04 2017 New Revision: 320389 URL: https://svnweb.freebsd.org/changeset/base/320389 Log: Sort the compat11.* syscalls I added. Remove duplicate compat11.stat. Submitted by: jhb@ Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Mon Jun 26 22:32:52 2017 (r320388) +++ head/usr.bin/truss/syscalls.c Mon Jun 26 22:48:04 2017 (r320389) @@ -146,6 +146,12 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Timespec | OUT, 1 } } }, { .name = "close", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "compat11.fstat", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Stat11 | OUT, 1 } } }, + { .name = "compat11.lstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, + { .name = "compat11.stat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, { .name = "connect", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Socklent, 2 } } }, { .name = "connectat", .ret_type = 1, .nargs = 4, @@ -216,14 +222,6 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, { .name = "flock", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Flockop, 1 } } }, - { .name = "compat11.fstat", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Stat11 | OUT, 1 } } }, - { .name = "compat11.lstat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, - { .name = "compat11.stat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, - { .name = "compat11.stat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, From owner-svn-src-all@freebsd.org Tue Jun 27 01:22:29 2017 Return-Path: Delivered-To: svn-src-all@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 3AAF2D9714B; Tue, 27 Jun 2017 01:22:29 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0B30C726CB; Tue, 27 Jun 2017 01:22:28 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R1MSpE019346; Tue, 27 Jun 2017 01:22:28 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R1MSec019345; Tue, 27 Jun 2017 01:22:28 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201706270122.v5R1MSec019345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 27 Jun 2017 01:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320390 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 01:22:29 -0000 Author: araujo Date: Tue Jun 27 01:22:27 2017 New Revision: 320390 URL: https://svnweb.freebsd.org/changeset/base/320390 Log: With r318394 seems it breaks gpart(8) in some embedded systems such like PCEngines, RPI1-B, Alix and APU2 boards as well as NanoBSD with the following message: vnode_pager_generic_getpages_done: I/O read error 5 Seems the breakage was because it was missed to include acr in glabel update. Reported by: Peter Blok , madpilot, imp and trasz. Reviewed by: trasz Tested by: Peter Blok and madpilot. MFC after: 3 days. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D11365 Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Mon Jun 26 22:48:04 2017 (r320389) +++ head/sys/geom/part/g_part.c Tue Jun 27 01:22:27 2017 (r320390) @@ -890,7 +890,8 @@ g_part_ctl_commit(struct gctl_req *req, struct g_part_ if (!entry->gpe_deleted) { /* Notify consumers that provider might be changed. */ if (entry->gpe_modified && ( - entry->gpe_pp->acw + entry->gpe_pp->ace) == 0) + entry->gpe_pp->acw + entry->gpe_pp->ace + + entry->gpe_pp->acr) == 0) g_media_changed(entry->gpe_pp, M_NOWAIT); entry->gpe_created = 0; entry->gpe_modified = 0; From owner-svn-src-all@freebsd.org Tue Jun 27 01:29:11 2017 Return-Path: Delivered-To: svn-src-all@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 D92D6D97A09; Tue, 27 Jun 2017 01:29:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B473972D13; Tue, 27 Jun 2017 01:29:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R1TADV019605; Tue, 27 Jun 2017 01:29:10 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R1TAuG019602; Tue, 27 Jun 2017 01:29:10 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706270129.v5R1TAuG019602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 27 Jun 2017 01:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320391 - in head/sys: compat/freebsd32 net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 01:29:12 -0000 Author: jhibbits Date: Tue Jun 27 01:29:10 2017 New Revision: 320391 URL: https://svnweb.freebsd.org/changeset/base/320391 Log: Update comments and simplify conditionals for compat32 Only amd64 (because of i386) needs 32-bit time_t compat now, everything else is 64-bit time_t. Rather than checking on all 64-bit time_t archs, only check the oddball amd64/i386. Reviewed By: emaste, kib, andrew Differential Revision: https://reviews.freebsd.org/D11364 Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/net/bpf.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Tue Jun 27 01:22:27 2017 (r320390) +++ head/sys/compat/freebsd32/freebsd32.h Tue Jun 27 01:29:10 2017 (r320391) @@ -43,12 +43,12 @@ do { (dst).fld = PTROUT((src).fld); } while (0) /* - * Being a newer port, 32-bit FreeBSD/MIPS uses 64-bit time_t. + * i386 is the only arch with a 32-bit time_t */ -#if defined (__mips__) || defined(__powerpc__) -typedef int64_t time32_t; -#else +#ifdef __amd64__ typedef int32_t time32_t; +#else +typedef int64_t time32_t; #endif struct timeval32 { Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jun 27 01:22:27 2017 (r320390) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jun 27 01:29:10 2017 (r320391) @@ -109,13 +109,13 @@ __FBSDID("$FreeBSD$"); FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); -#if !defined(__mips__) && !defined(__powerpc__) +#ifdef __amd64__ CTASSERT(sizeof(struct timeval32) == 8); CTASSERT(sizeof(struct timespec32) == 8); CTASSERT(sizeof(struct itimerval32) == 16); #endif CTASSERT(sizeof(struct statfs32) == 256); -#if !defined(__mips__) && !defined(__powerpc__) +#ifdef __amd64__ CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); @@ -124,8 +124,6 @@ CTASSERT(sizeof(struct iovec32) == 8); CTASSERT(sizeof(struct msghdr32) == 28); #ifdef __amd64__ CTASSERT(sizeof(struct stat32) == 208); -#endif -#if !defined(__mips__) && !defined(__powerpc__) CTASSERT(sizeof(struct freebsd11_stat32) == 96); #endif CTASSERT(sizeof(struct sigaction32) == 24); Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Jun 27 01:22:27 2017 (r320390) +++ head/sys/net/bpf.c Tue Jun 27 01:29:10 2017 (r320391) @@ -1283,7 +1283,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i #endif case BIOCGETIF: case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) case BIOCGRTIMEOUT32: #endif case BIOCGSTATS: @@ -1295,7 +1295,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i case FIONREAD: case BIOCLOCK: case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) case BIOCSRTIMEOUT32: #endif case BIOCIMMEDIATE: @@ -1519,7 +1519,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i * Set read timeout. */ case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) case BIOCSRTIMEOUT32: #endif { @@ -1550,12 +1550,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i * Get read timeout. */ case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) case BIOCGRTIMEOUT32: #endif { struct timeval *tv; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) struct timeval32 *tv32; struct timeval tv64; @@ -1567,7 +1567,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i tv->tv_sec = d->bd_rtout / hz; tv->tv_usec = (d->bd_rtout % hz) * tick; -#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__) +#if defined(COMPAT_FREEBSD32) && defined(__amd64__) if (cmd == BIOCGRTIMEOUT32) { tv32 = (struct timeval32 *)addr; tv32->tv_sec = tv->tv_sec; From owner-svn-src-all@freebsd.org Tue Jun 27 01:57:23 2017 Return-Path: Delivered-To: svn-src-all@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 D8201D992FC; Tue, 27 Jun 2017 01:57:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A60E574160; Tue, 27 Jun 2017 01:57:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R1vMV3031748; Tue, 27 Jun 2017 01:57:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R1vMDr031747; Tue, 27 Jun 2017 01:57:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706270157.v5R1vMDr031747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 27 Jun 2017 01:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320392 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 01:57:23 -0000 Author: jhibbits Date: Tue Jun 27 01:57:22 2017 New Revision: 320392 URL: https://svnweb.freebsd.org/changeset/base/320392 Log: Disable interrupts when updating the TLB Without disabling interrupts it's possible for another thread to preempt and update the registers post-read (tlb1_read_entry) or pre-write (tlb1_write_entry), and confuse the kernel with mixed register states. MFC after: 2 weeks Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Jun 27 01:29:10 2017 (r320391) +++ head/sys/powerpc/booke/pmap.c Tue Jun 27 01:57:22 2017 (r320392) @@ -3812,10 +3812,14 @@ tlb0_print_tlbentries(void) void tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) { + register_t msr; uint32_t mas0; KASSERT((entry != NULL), ("%s(): Entry is NULL!", __func__)); + msr = mfmsr(); + mtmsr(msr & ~PSL_EE); + mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(slot); mtspr(SPR_MAS0, mas0); __asm __volatile("isync; tlbre"); @@ -3835,6 +3839,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) entry->mas7 = 0; break; } + mtmsr(msr); entry->virt = entry->mas2 & MAS2_EPN_MASK; entry->phys = ((vm_paddr_t)(entry->mas7 & MAS7_RPN) << 32) | @@ -3850,6 +3855,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) static void tlb1_write_entry(tlb_entry_t *e, unsigned int idx) { + register_t msr; uint32_t mas0; //debugf("tlb1_write_entry: s\n"); @@ -3858,6 +3864,9 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx) mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(idx); //debugf("tlb1_write_entry: mas0 = 0x%08x\n", mas0); + msr = mfmsr(); + mtmsr(msr & ~PSL_EE); + mtspr(SPR_MAS0, mas0); __asm __volatile("isync"); mtspr(SPR_MAS1, e->mas1); @@ -3882,6 +3891,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx) } __asm __volatile("tlbwe; isync; msync"); + mtmsr(msr); //debugf("tlb1_write_entry: e\n"); } From owner-svn-src-all@freebsd.org Tue Jun 27 03:45:10 2017 Return-Path: Delivered-To: svn-src-all@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 853CFD9D947; Tue, 27 Jun 2017 03:45:10 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 53813780A6; Tue, 27 Jun 2017 03:45:10 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R3j9fS076736; Tue, 27 Jun 2017 03:45:09 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R3j9UP076735; Tue, 27 Jun 2017 03:45:09 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201706270345.v5R3j9UP076735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 27 Jun 2017 03:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320393 - head/sys/dev/bktr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 03:45:10 -0000 Author: jpaetzel Date: Tue Jun 27 03:45:09 2017 New Revision: 320393 URL: https://svnweb.freebsd.org/changeset/base/320393 Log: driver incorrectly handles the setting of frame rates PR: 36415 Submitted by: brandt@fokus.gmd.de Modified: head/sys/dev/bktr/bktr_core.c Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Tue Jun 27 01:57:22 2017 (r320392) +++ head/sys/dev/bktr/bktr_core.c Tue Jun 27 03:45:09 2017 (r320393) @@ -972,7 +972,7 @@ video_open( bktr_ptr_t bktr ) bktr->flags |= METEOR_OPEN; #ifdef BT848_DUMP - dump_bt848( bt848 ); + dump_bt848(bktr); #endif bktr->clr_on_start = FALSE; @@ -1688,7 +1688,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cm BT848_INT_VSYNC | BT848_INT_FMTCHG); #ifdef BT848_DUMP - dump_bt848( bt848 ); + dump_bt848(bktr); #endif break; @@ -2522,7 +2522,7 @@ common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_ /* * */ -#ifdef BT848_DEBUG +#if defined(BT848_DEBUG) || defined(BT848_DUMP) static int dump_bt848( bktr_ptr_t bktr ) { @@ -2542,7 +2542,7 @@ dump_bt848( bktr_ptr_t bktr ) r[i], INL(bktr, r[i]), r[i+1], INL(bktr, r[i+1]), r[i+2], INL(bktr, r[i+2]), - r[i+3], INL(bktr, r[i+3]])); + r[i+3], INL(bktr, r[i+3])); } printf("%s: INT STAT %x \n", bktr_name(bktr), @@ -3705,28 +3705,26 @@ start_capture( bktr_ptr_t bktr, unsigned type ) /* - * + * Set the temporal decimation register to get the desired frame rate. + * We use the 'skip frame' modus always and always start dropping on an + * odd field. */ static void set_fps( bktr_ptr_t bktr, u_short fps ) { struct format_params *fp; - int i_flag; fp = &format_params[bktr->format_params]; switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) { case METEOR_ONLY_EVEN_FIELDS: bktr->flags |= METEOR_WANT_EVEN; - i_flag = 1; break; case METEOR_ONLY_ODD_FIELDS: bktr->flags |= METEOR_WANT_ODD; - i_flag = 1; break; default: bktr->flags |= METEOR_WANT_MASK; - i_flag = 2; break; } @@ -3737,7 +3735,7 @@ set_fps( bktr_ptr_t bktr, u_short fps ) OUTB(bktr, BKTR_TDEC, 0); if (fps < fp->frame_rate) - OUTB(bktr, BKTR_TDEC, i_flag*(fp->frame_rate - fps) & 0x3f); + OUTB(bktr, BKTR_TDEC, (fp->frame_rate - fps) & 0x3f); else OUTB(bktr, BKTR_TDEC, 0); return; From owner-svn-src-all@freebsd.org Tue Jun 27 03:50:17 2017 Return-Path: Delivered-To: svn-src-all@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 3821FD9DC73; Tue, 27 Jun 2017 03:50:17 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D484C78480; Tue, 27 Jun 2017 03:50:16 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id PhW0dYnaRETFpPhW2ddwUv; Mon, 26 Jun 2017 21:50:15 -0600 X-Authority-Analysis: v=2.2 cv=dZbw5Tfe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=WcqYV7MEc-6UHiXGb_MA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B62041688; Mon, 26 Jun 2017 20:50:12 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5R3mvkV076055; Mon, 26 Jun 2017 20:48:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706270348.v5R3mvkV076055@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.cschubert.com/ To: Sean Bruno cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320362 - head/share/zoneinfo In-Reply-To: Message from Sean Bruno of "Mon, 26 Jun 2017 12:21:15 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 26 Jun 2017 20:48:57 -0700 X-CMAE-Envelope: MS4wfC0nmHwTKRWMzy4L7QmqA54zacCHXYevR/gqinECkZct03Eb9JrYLJkmdGfQHIwBDv/uawOEKv2yWGd310HZrdyeVyMa+p3ag9FXv9LwozRqE2RBKhx9 fnBnaZPcV19NPRj06yonGmIm7HA4+yhbdLa42NSMef3DPlu9shbidTn2FgZbW6QmW/qCNtRPvg9Q9kk0+kaHI6TiPTZWFTTfngmKdbTQ0m1h3r845dkzoSm0 2rwxeM/ysenc92+wzfHhTIRkXk15XpbvE0l6UCgMTvPiR+F168kWLtVXXZp26d4spSIVz4FDvifa0SEbzoqZhw== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 03:50:17 -0000 (since we're top posting.... ) Hi Sean, Do you want to give this a spin? Index: share/zoneinfo/Makefile =================================================================== --- share/zoneinfo/Makefile (revision 320389) +++ share/zoneinfo/Makefile (working copy) @@ -94,7 +94,7 @@ .for f in ${TZS} ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} .endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ ~cy In message , Sean Bruno write s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > Content-Type: multipart/mixed; boundary="VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ"; > protected-headers="v1" > From: Sean Bruno > To: Edward Tomasz Napierala , src-committers@freebsd.org, > svn-src-all@freebsd.org, svn-src-head@freebsd.org > Message-ID: > Subject: Re: svn commit: r320362 - head/share/zoneinfo > References: <201706261540.v5QFeOTj072841@repo.freebsd.org> > In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > Hmmm ... This seems to break 'poudriere jail -c jailname -m src=3D/usr/sr= > c > -v head" > > --- realinstall_subdir_share/zoneinfo --- > install: builddir/Africa/Abidjan: No such file or directory > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Mon Jun 26 15:40:24 2017 > > New Revision: 320362 > > URL: https://svnweb.freebsd.org/changeset/base/320362 > >=20 > > Log: > > Provide visual feedback when timezone files are installed. > > After r320003 it wasn't being shown in any way. > > =20 > > Submitted by: bdrewery > > MFC after: 1 month > > Differential Revision: https://reviews.freebsd.org/D11154 > >=20 > > Modified: > > head/share/zoneinfo/Makefile > >=20 > > Modified: head/share/zoneinfo/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D > > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 (r32036 > 1) > > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 (r32036 > 2) > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > > =20 > > +.if make(*install*) > > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > > +.endif > > + > > beforeinstall: install-zoneinfo > > install-zoneinfo: > > mkdir -p ${DESTDIR}/usr/share/zoneinfo > > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > - cd ${TZBUILDDIR} && \ > > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > > +.for f in ${TZS} > > + ${INSTALL} ${TAG_ARGS} \ > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo= > /${f} > > +.endfor > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > =20 > >=20 > >=20 > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > Content-Type: application/pgp-signature; name="signature.asc" > Content-Description: OpenPGP digital signature > Content-Disposition: attachment; filename="signature.asc" > > -----BEGIN PGP SIGNATURE----- > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== > =9Mia > -----END PGP SIGNATURE----- > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Tue Jun 27 03:57:32 2017 Return-Path: Delivered-To: svn-src-all@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 E0FABD9E0C4; Tue, 27 Jun 2017 03:57:32 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AFE4378A9D; Tue, 27 Jun 2017 03:57:32 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R3vVrG081099; Tue, 27 Jun 2017 03:57:31 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R3vVUH081098; Tue, 27 Jun 2017 03:57:31 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201706270357.v5R3vVUH081098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 27 Jun 2017 03:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320394 - head/sys/dev/bktr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 03:57:33 -0000 Author: jpaetzel Date: Tue Jun 27 03:57:31 2017 New Revision: 320394 URL: https://svnweb.freebsd.org/changeset/base/320394 Log: ioctl METEORGBRIG in bktr_core.c forgets to add 128 to value PR: 59289 Submitted by: Danovitsch@Vitsch.net Modified: head/sys/dev/bktr/bktr_core.c Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Tue Jun 27 03:45:09 2017 (r320393) +++ head/sys/dev/bktr/bktr_core.c Tue Jun 27 03:57:31 2017 (r320394) @@ -1545,7 +1545,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cm break; case METEORGBRIG: /* get brightness */ - *(u_char *)arg = INB(bktr, BKTR_BRIGHT); + *(u_char *)arg = INB(bktr, BKTR_BRIGHT) + 128; break; case METEORSCSAT: /* set chroma saturation */ From owner-svn-src-all@freebsd.org Tue Jun 27 04:39:45 2017 Return-Path: Delivered-To: svn-src-all@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 1830AD9FED4; Tue, 27 Jun 2017 04:39:45 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EACE87A7A2; Tue, 27 Jun 2017 04:39:44 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D4DB41ED7E; Tue, 27 Jun 2017 04:39:43 +0000 (UTC) Date: Tue, 27 Jun 2017 04:39:43 +0000 From: Alexey Dokuchaev To: Doug Ambrisko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r307326 - head/sys/boot/efi/loader Message-ID: <20170627043943.GA55141@FreeBSD.org> References: <201610141710.u9EHArlL089412@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610141710.u9EHArlL089412@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 04:39:45 -0000 On Fri, Oct 14, 2016 at 05:10:53PM +0000, Doug Ambrisko wrote: > New Revision: 307326 > URL: https://svnweb.freebsd.org/changeset/base/307326 > > Log: > In UEFI mode expose the SMBIOS anchor base address via kenv so the kernel > etc. can find out where the SMBIOS entry point is located. In pure > UEFI mode the BIOS is not mapped into the standard address space so the > SMBIOS table might not appear between 0xf0000 and 0xfffff. The > UEFI environment can report this the location of the anchor. If it is > reported then expose it as hint.smbios.0.mem. [...] > > Linux exposes this information via the /sys/firmware/efi/systab file > which dmidecode looks at. We should update dmidecode to do this the > FreeBSD way when we determine what that is! We just did: https://svnweb.freebsd.org/changeset/ports/444412 (sorry it took us eight months). ./danfe From owner-svn-src-all@freebsd.org Tue Jun 27 04:54:59 2017 Return-Path: Delivered-To: svn-src-all@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 CB3E9DA0922; Tue, 27 Jun 2017 04:54:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9651E7B43A; Tue, 27 Jun 2017 04:54:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R4swxP006077; Tue, 27 Jun 2017 04:54:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R4swP0006076; Tue, 27 Jun 2017 04:54:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706270454.v5R4swP0006076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 27 Jun 2017 04:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320395 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 04:54:59 -0000 Author: cy Date: Tue Jun 27 04:54:58 2017 New Revision: 320395 URL: https://svnweb.freebsd.org/changeset/base/320395 Log: Replace AF_INET6 ifdefs with USE_INET6 to be consistent with the rest of the ipfilter souce tree. Modified: head/contrib/ipfilter/tools/ippool_y.y Modified: head/contrib/ipfilter/tools/ippool_y.y ============================================================================== --- head/contrib/ipfilter/tools/ippool_y.y Tue Jun 27 03:57:31 2017 (r320394) +++ head/contrib/ipfilter/tools/ippool_y.y Tue Jun 27 04:54:58 2017 (r320395) @@ -273,7 +273,7 @@ grouplist: | addrmask next { $$ = calloc(1, sizeof(iphtent_t)); $$->ipe_addr = $1[0].adf_addr; $$->ipe_mask = $1[1].adf_addr; -#ifdef AF_INET6 +#ifdef USE_INET6 if (use_inet6) $$->ipe_family = AF_INET6; else @@ -297,7 +297,7 @@ groupentry: $$->ipe_mask = $1[1].adf_addr; strncpy($$->ipe_group, $3, FR_GROUPLEN); -#ifdef AF_INET6 +#ifdef USE_INET6 if (use_inet6) $$->ipe_family = AF_INET6; else From owner-svn-src-all@freebsd.org Tue Jun 27 05:02:13 2017 Return-Path: Delivered-To: svn-src-all@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 01B94DA0C4F; Tue, 27 Jun 2017 05:02:13 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D76C07B7BF; Tue, 27 Jun 2017 05:02:12 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 29CAB1F3DE; Tue, 27 Jun 2017 05:02:12 +0000 (UTC) From: Jan Beich To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320240 - head/include References: <201706221839.v5MIdqK3065947@repo.freebsd.org> Date: Tue, 27 Jun 2017 07:02:07 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 05:02:13 -0000 Ed Schouten writes: > Author: ed > Date: Thu Jun 22 18:39:52 2017 > New Revision: 320240 > URL: https://svnweb.freebsd.org/changeset/base/320240 > > Log: > Use __ISO_C_VISIBLE, as opposed to testing __STDC_VERSION__. > > FreeBSD's C library uses __STDC_VERSION__ to determine whether the > compiler provides language features specific to a certain version of the > C standard. __ISO_C_VISIBLE is used to specify which library features > need to be exposed. > > max_align_t currently uses __STDC_VERSION__, even though it should be > using __ISO_C_VISIBLE to remain consistent with the rest of the headers > in include/. > > Reviewed by: dim > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D11303 > > Modified: > head/include/stddef.h > > Modified: head/include/stddef.h > ============================================================================== > --- head/include/stddef.h Thu Jun 22 17:10:34 2017 (r320239) > +++ head/include/stddef.h Thu Jun 22 18:39:52 2017 (r320240) > @@ -62,7 +62,7 @@ typedef ___wchar_t wchar_t; > #endif > #endif > > -#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L > +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L > #ifndef __CLANG_MAX_ALIGN_T_DEFINED > typedef __max_align_t max_align_t; > #define __CLANG_MAX_ALIGN_T_DEFINED max_align_t is now exposed even without -std=c11. #+begin_src c $ cat a.c #include /* * a type with the most strict alignment requirements */ union max_align { char c; short s; long l; int i; float f; double d; void * v; void (*q)(void); }; typedef union max_align max_align_t; int main(int argc, char *argv[]) { return 0; } $ cc -std=gnu89 a.c a.c:18:14: error: typedef redefinition with different types ('void' vs '__max_align_t') typedef void max_align_t; ^ /usr/include/stddef.h:67:23: note: previous definition is here typedef __max_align_t max_align_t; ^ 1 error generated. #+end_src c thus regressing some ports e.g., #+begin_src c cc -o Unified_c_media_libnestegg_src0.o -c ... -std=gnu99 ... Unified_c_media_libnestegg_src0.c In file included from obj-i386-unknown-freebsd12.0/media/libnestegg/src/Unified_c_media_libnestegg_src0.c:2: In file included from media/libnestegg/src/halloc.c:19: media/libnestegg/src/align.h:42:25: error: typedef redefinition with different types ('union max_align' vs '__max_align_t') typedef union max_align max_align_t; ^ /usr/include/stddef.h:67:23: note: previous definition is here typedef __max_align_t max_align_t; ^ 1 error generated. #+end_src c https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html From owner-svn-src-all@freebsd.org Tue Jun 27 08:18:09 2017 Return-Path: Delivered-To: svn-src-all@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 B4F09DA462B; Tue, 27 Jun 2017 08:18:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 857848104B; Tue, 27 Jun 2017 08:18:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R8I8QE088185; Tue, 27 Jun 2017 08:18:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R8I8kb088184; Tue, 27 Jun 2017 08:18:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706270818.v5R8I8kb088184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 27 Jun 2017 08:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320399 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 08:18:09 -0000 Author: ngie Date: Tue Jun 27 08:18:08 2017 New Revision: 320399 URL: https://svnweb.freebsd.org/changeset/base/320399 Log: procstat_getptlwpinfo(..): clarify the fact that KVM/SYSCTL support isn't supported This will make the error message reported in bug 220023 a bit more intuitive for end-users that don't have access to the source code to decode the procstat->type argument. MFC after: 1 month MFC with: r316286 PR: 220023 Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Tue Jun 27 06:44:32 2017 (r320398) +++ head/lib/libprocstat/libprocstat.c Tue Jun 27 08:18:08 2017 (r320399) @@ -2510,6 +2510,12 @@ struct ptrace_lwpinfo * procstat_getptlwpinfo(struct procstat *procstat, unsigned int *cntp) { switch (procstat->type) { + case PROCSTAT_KVM: + warnx("kvm method is not supported"); + return (NULL); + case PROCSTAT_SYSCTL: + warnx("sysctl method is not supported"); + return (NULL); case PROCSTAT_CORE: return (procstat_getptlwpinfo_core(procstat->core, cntp)); default: From owner-svn-src-all@freebsd.org Tue Jun 27 08:49:48 2017 Return-Path: Delivered-To: svn-src-all@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 A419BDA50F0; Tue, 27 Jun 2017 08:49:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6F3E88221C; Tue, 27 Jun 2017 08:49:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R8nlqk000672; Tue, 27 Jun 2017 08:49:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R8nlWb000671; Tue, 27 Jun 2017 08:49:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706270849.v5R8nlWb000671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 27 Jun 2017 08:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320400 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 08:49:48 -0000 Author: ngie Date: Tue Jun 27 08:49:47 2017 New Revision: 320400 URL: https://svnweb.freebsd.org/changeset/base/320400 Log: Add initial documentation for procstat_freeptlwpinfo and procstat_getptlwpinfo MFC after: 1 month MFC with: r316286 Modified: head/lib/libprocstat/libprocstat.3 Modified: head/lib/libprocstat/libprocstat.3 ============================================================================== --- head/lib/libprocstat/libprocstat.3 Tue Jun 27 08:18:08 2017 (r320399) +++ head/lib/libprocstat/libprocstat.3 Tue Jun 27 08:49:47 2017 (r320400) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2015 +.Dd June 27, 2017 .Dt LIBPROCSTAT 3 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nm procstat_freegroups , .Nm procstat_freekstack , .Nm procstat_freeprocs , +.Nm procstat_freeptlwpinfo , .Nm procstat_freevmmap , .Nm procstat_get_pipe_info , .Nm procstat_get_pts_info , @@ -52,6 +53,7 @@ .Nm procstat_getosrel , .Nm procstat_getpathname , .Nm procstat_getprocs , +.Nm procstat_getptlwpinfo , .Nm procstat_getrlimit , .Nm procstat_getumask , .Nm procstat_getvmmap , @@ -102,6 +104,11 @@ .Fa "struct procstat *procstat" .Fa "struct kinfo_vmentry *vmmap" .Fc +.Ft void +.Fo procstat_freeptlwpinfo +.Fa "struct procstat *procstat" +.Fa "struct ptrace_lwpinfo *pl" +.Fc .Ft int .Fo procstat_get_pipe_info .Fa "struct procstat *procstat" @@ -202,6 +209,11 @@ .Fa "int arg" .Fa "unsigned int *count" .Fc +.Ft "struct ptrace_lwpinfo *" +.Fo procstat_getptlwpinfo +.Fa "struct procstat *procstat" +.Fa "unsigned int *count" +.Fc .Ft "int" .Fo procstat_getrlimit .Fa "struct procstat *procstat" @@ -309,6 +321,20 @@ The number of processes found is returned in the refer .Fa cnt . The caller is responsible to free the allocated memory with a subsequent .Fn procstat_freeprocs +function call. +.Pp +The +.Fn procstat_getptlwpinfo +function gets a pointer to the +.Vt procstat +structure from the +.Fn procstat_open_core +function and returns a dynamically allocated set of signals intercepted by a +process in the process's core file. +The number of processes found is returned in the reference parameter +.Fa cnt . +The caller is responsible to free the allocated memory with a subsequent +.Fn procstat_freeptlwpinfo function call. .Pp The From owner-svn-src-all@freebsd.org Tue Jun 27 09:42:58 2017 Return-Path: Delivered-To: svn-src-all@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 04578DA5D67; Tue, 27 Jun 2017 09:42:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C133D837E6; Tue, 27 Jun 2017 09:42:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5R9guDx024904; Tue, 27 Jun 2017 09:42:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5R9gusL024903; Tue, 27 Jun 2017 09:42:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706270942.v5R9gusL024903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jun 2017 09:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320401 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 09:42:58 -0000 Author: kib Date: Tue Jun 27 09:42:56 2017 New Revision: 320401 URL: https://svnweb.freebsd.org/changeset/base/320401 Log: MFC r320313: Fix typo. Approved by: re (marius) Modified: stable/11/lib/libc/sys/mmap.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mmap.2 ============================================================================== --- stable/11/lib/libc/sys/mmap.2 Tue Jun 27 08:49:47 2017 (r320400) +++ stable/11/lib/libc/sys/mmap.2 Tue Jun 27 09:42:56 2017 (r320401) @@ -69,7 +69,7 @@ current) offsets in the object. In particular, the .Fa offset value cannot be negative. -If the object is truncated and the process later accesses a pages that +If the object is truncated and the process later accesses a page that is wholly within the truncated region, the access is aborted and a .Dv SIGBUS signal is delivered to the process. From owner-svn-src-all@freebsd.org Tue Jun 27 10:09:02 2017 Return-Path: Delivered-To: svn-src-all@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 3CA83DA640A; Tue, 27 Jun 2017 10:09:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0B19084439; Tue, 27 Jun 2017 10:09:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RA91td033769; Tue, 27 Jun 2017 10:09:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RA91lr033768; Tue, 27 Jun 2017 10:09:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706271009.v5RA91lr033768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jun 2017 10:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320402 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 10:09:02 -0000 Author: kib Date: Tue Jun 27 10:09:00 2017 New Revision: 320402 URL: https://svnweb.freebsd.org/changeset/base/320402 Log: MFC r320314: Remove the description of MAP_HASSEMAPHORE. Approved by: re (marius) Modified: stable/11/lib/libc/sys/mmap.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mmap.2 ============================================================================== --- stable/11/lib/libc/sys/mmap.2 Tue Jun 27 09:42:56 2017 (r320401) +++ stable/11/lib/libc/sys/mmap.2 Tue Jun 27 10:09:00 2017 (r320402) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 4, 2017 +.Dd June 22, 2017 .Dt MMAP 2 .Os .Sh NAME @@ -199,9 +199,6 @@ In contrast, if .Dv MAP_EXCL is specified, the request will fail if a mapping already exists within the range. -.It Dv MAP_HASSEMAPHORE -Notify the kernel that the region may contain semaphores and that special -handling may be necessary. .It Dv MAP_NOCORE Region is not included in a core file. .It Dv MAP_NOSYNC From owner-svn-src-all@freebsd.org Tue Jun 27 10:34:16 2017 Return-Path: Delivered-To: svn-src-all@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 4D5F7DA6AB2 for ; Tue, 27 Jun 2017 10:34:16 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22f.google.com (mail-yb0-x22f.google.com [IPv6:2607:f8b0:4002:c09::22f]) (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 07B02D7 for ; Tue, 27 Jun 2017 10:34:16 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22f.google.com with SMTP id b81so8013776yba.2 for ; Tue, 27 Jun 2017 03:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VSjBcmFsGPeiPAQ1p4NQkpthv0RRVnkElDSqSdEkrW0=; b=aO/0X2D4ca1RYb9KsUHiOLeHQR4NmvWH4Y+FZtuf8JokYwkcjLRV+oe/9dTwo6fBq2 IQWDcP6XwR4zqSbJ7We8FWIX3RiaXD90PlaxR1G3fu0jTzqLdNhF/8ycGR0EeSrENtmG BwFO+XJUVGNEHbPqJ6qVscXL7Ij9A8JyckN3g/yqJz7IQ3oS/2o3HqSFySiI7lj4jGjj x5dKD+GYWE8d4EpImjBuE9SvlSIBruyJpn1LysGOp+H2SvUPE2XxH+ZoW4VYj1njeVdx dbqhTczKjWMU61419ObWzwh1v5P7uX+2NXaaR06gzSckl4tDETpE8zzilXbBPyfPq5mm lUMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VSjBcmFsGPeiPAQ1p4NQkpthv0RRVnkElDSqSdEkrW0=; b=Dmm7tSlMkxqSh1dtpj94Wp8cTw7znY3qmqmnVQvmI8UDuNzKcgnGao+YwpXhxMiM/r HRmlzJSzbyvrz06y8cG8SSGA3tb2Zp/ryp3VSNvU5Xz6G+TlZGoZa9qsJRMGi2VzMXgh VIzmr9XR4zHVBLx6rboVdKSmGE+bssXYyG0DroSojDO74/JS79B69mcnLlxpehX64myH 2Mb56XwwiFuelHd4W/Yjgv2ldsPghtUZ+fbK9QnfmGnzKYtx7+MrJ8uWq9AmAjjKocpa Zo8+nJ2bfjhd7aWshZGo384CuPI0JiG7GXsIwrd09lkqwYU++VfEBlPRkpRWG8BzhwkD ZMFA== X-Gm-Message-State: AKS2vOx1pCJkz0vCSiXwTfGpwtZRII4DbCbOoXRHnVUiuJvhnC/ZraAU sKhUf8Rc/jacLN32Hr0E4i4EEjecBcAX X-Received: by 10.37.51.67 with SMTP id z64mr3405386ybz.145.1498559655196; Tue, 27 Jun 2017 03:34:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.216.142 with HTTP; Tue, 27 Jun 2017 03:33:44 -0700 (PDT) In-Reply-To: References: <201706221839.v5MIdqK3065947@repo.freebsd.org> From: Ed Schouten Date: Tue, 27 Jun 2017 12:33:44 +0200 Message-ID: Subject: Re: svn commit: r320240 - head/include To: Jan Beich Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 10:34:16 -0000 2017-06-27 7:02 GMT+02:00 Jan Beich : > max_align_t is now exposed even without -std=c11. Which is now consistent with the rest of the C library, as this is also the case for other C11 features, like 's quick_exit(). > thus regressing some ports e.g., > > [...] > > https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html Would there be an easy way for me to extract a list of ports that are affected? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Tue Jun 27 10:43:58 2017 Return-Path: Delivered-To: svn-src-all@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 804A3DA6D23 for ; Tue, 27 Jun 2017 10:43:58 +0000 (UTC) (envelope-from robin@proprofs.com) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (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 3452D8BC for ; Tue, 27 Jun 2017 10:43:58 +0000 (UTC) (envelope-from robin@proprofs.com) Received: by mail-qt0-x231.google.com with SMTP id r30so21055556qtc.0 for ; Tue, 27 Jun 2017 03:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proprofs-com.20150623.gappssmtp.com; s=20150623; h=date:from:reply-to:to:message-id:subject:mime-version; bh=9lHzxl4QSsgZxM3r3TS5hmCuMKjJQAuJ513kXwXSm+A=; b=pjEnA/mO3/WNbCJUcuMlKNwihQto+6az/k+BGmSCql7pyP8KiveuXLt/A8MwT6aASe 0wjIZo1KNFNKLNTFiD7s8QNUc9E2bqNgwIeNKAFW9myrxtlrXloJNzff5xxHwCQe187P ovCnG+iiJFsohcun0BZAl705/P2vOTYpfLVxlRzhwiFB6XFqmXyJUbV0P+YXD7XmPQtZ q9Kf07k/Q6O0Lkk9lPxbUBUBDnf0xvEVoMfPUv6X4bW1bQyQF63pfQCuK3KPbN0kt/vt 1cWAmkng5SeWlv4V5rdVQTRqjYYlb1HVPut7qdX0Mywhkv9ZFNE6L3GOqxtWlqAS/bnN 5H8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:reply-to:to:message-id:subject :mime-version; bh=9lHzxl4QSsgZxM3r3TS5hmCuMKjJQAuJ513kXwXSm+A=; b=VA8bPILc4c93tFtLs65nWucfn25N2K4kUAcz7JKw28uUdJ0xRMncPJGBg6XxlvER/S sDwjv29EzwT5G/r92C0AQesAEVOtRboupA9Am51vneosx0grgHj3anwKbHNwQz3OB4Qz HgnKomChkqkggQoJA1Ym/Cq9r49xk/KkghzqbPaPwe9jo5PG0g6M+oZCTIYJ+U6Dfbdt bq5F8D7SNZeMrca3g0GLJ9fwmSXCQjeFC6uv+Lhv12nrzXQnvyhJZKRBgUV82os+dvhF CXlTzFFjh36ybtuV24k36R2naAaacqxC+yJPf9zd7DaVVcvdhpxGaSCzhkx93eNDbNMj o4Pw== X-Gm-Message-State: AKS2vOw19Ccp4gq8Ru3zg6a9lg67fBM89d/jFeBkHH3IlLDkobCLacR4 AoEnD/eWTY3xh6D/faBgaA== X-Received: by 10.237.49.67 with SMTP id 61mr5920574qtg.30.1498560236888; Tue, 27 Jun 2017 03:43:56 -0700 (PDT) Received: from ip-10-1-0-82.ec2.internal (ec2-54-225-68-137.compute-1.amazonaws.com. [54.225.68.137]) by smtp.gmail.com with ESMTPSA id l207sm1926365qke.36.2017.06.27.03.43.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 03:43:56 -0700 (PDT) Date: Tue, 27 Jun 2017 10:43:55 +0000 (UTC) From: Robin Reply-To: Robin To: svn-src-all@freebsd.org Message-ID: <1726366250.7590.1498560235789@ip-10-1-0-82.ec2.internal> Subject: Editorial Ideas for your consideration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 10:43:58 -0000 Hello Editor,=20 =20 My name is Robin; I am an educational researcher at ProProfs.com, a website= for building and testing knowledge. ProProfs tools are used by millions of= users each month including companies like Sony, Dell and even Harvard & Ya= le. I have recently contributed articles to sites like biznology.com ( http= ://www.biznology.com/2016/12/why-online-software-documentation-is-a-necessi= ty-in-businesses/ ) , capterra.com ( http://blog.capterra.com/how-to-reduce= -customer-service-costs-and-generate-leads-with-a-self-service-knowledge-ba= se/ ) , Toolbox.com ( http://it.toolbox.com/blogs/itmanagement/tactics-for-= growth-hacking-with-cloudbased-knowledge-management-software-74632 ) , famo= usbloggers ( http://famousbloggers.net/social-media-sales-smart-business.ht= ml ) , Att.com ( https://bizcircle.att.com/circle-solutions/satisfying/how-= to-delight-customers-while-reducing-support-costs? ) and I was wondering wh= ether you would be interested in having me contribute some articles to your= website. For example, here are a couple of story ideas that I have for you= :=20 5 Reasons for Knowledge Management Fails in the Marketing Team=20 =20 5 Features Businesses Should Look for in Help Authoring Software=20 =20 Why Knowledge Base Is Different From Its Customer Support Tools Family=20 =20 5 Reasons Why Online User Manuals Are Cost Effective=20 =20 What Can Group Discussions and Mock Practices Teach Your Live Chat Agents?= =20 =20 Why a Knowledge Base Is Such a Giant Leap in the Arena of Customer Service= Are you interested? Let me know and I=E2=80=99ll send across what I wrote f= or you.=20 Best,=20 Robin From owner-svn-src-all@freebsd.org Tue Jun 27 10:45:14 2017 Return-Path: Delivered-To: svn-src-all@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 EBB7EDA6D71; Tue, 27 Jun 2017 10:45:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B764A923; Tue, 27 Jun 2017 10:45:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RAjD4i049826; Tue, 27 Jun 2017 10:45:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RAjDsR049825; Tue, 27 Jun 2017 10:45:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706271045.v5RAjDsR049825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 27 Jun 2017 10:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320403 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 10:45:15 -0000 Author: andrew Date: Tue Jun 27 10:45:13 2017 New Revision: 320403 URL: https://svnweb.freebsd.org/changeset/base/320403 Log: Some of the atomic_clear_* functions were incorrectly defined to be an atomic add. Correct these, fixing a NULL-pointer dereference in netgraph. PR: 220273 MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Tue Jun 27 10:09:00 2017 (r320402) +++ head/sys/arm64/include/atomic.h Tue Jun 27 10:45:13 2017 (r320403) @@ -385,7 +385,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_rel_int atomic_add_rel_32 #define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 -#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_clear_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 #define atomic_subtract_rel_int atomic_subtract_rel_32 @@ -413,7 +413,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_acq_long atomic_add_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 -#define atomic_clear_acq_long atomic_add_acq_64 +#define atomic_clear_acq_long atomic_clear_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 #define atomic_set_acq_long atomic_set_acq_64 @@ -421,7 +421,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_acq_ptr atomic_add_acq_64 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 -#define atomic_clear_acq_ptr atomic_add_acq_64 +#define atomic_clear_acq_ptr atomic_clear_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64 #define atomic_set_acq_ptr atomic_set_acq_64 @@ -448,6 +448,7 @@ atomic_thread_fence_acq(void) { dmb(ld); + } static __inline void From owner-svn-src-all@freebsd.org Tue Jun 27 10:50:50 2017 Return-Path: Delivered-To: svn-src-all@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 22583DA6E99; Tue, 27 Jun 2017 10:50:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E6711B98; Tue, 27 Jun 2017 10:50:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RAonUa050160; Tue, 27 Jun 2017 10:50:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RAonNV050159; Tue, 27 Jun 2017 10:50:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706271050.v5RAonNV050159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jun 2017 10:50:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320404 - stable/11/sys/i386/isa X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 10:50:50 -0000 Author: kib Date: Tue Jun 27 10:50:48 2017 New Revision: 320404 URL: https://svnweb.freebsd.org/changeset/base/320404 Log: MFC r320307: Fix indent. Approved by: re (marius) Modified: stable/11/sys/i386/isa/npx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/isa/npx.c ============================================================================== --- stable/11/sys/i386/isa/npx.c Tue Jun 27 10:45:13 2017 (r320403) +++ stable/11/sys/i386/isa/npx.c Tue Jun 27 10:50:48 2017 (r320404) @@ -1157,7 +1157,7 @@ npx_set_fpregs_xmm(struct save87 *sv_87, struct savexm for (i = 0; i < 8; ++i) { sv_xmm->sv_fp[i].fp_acc = sv_87->sv_ac[i]; if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) - penv_xmm->en_tw |= 1 << i; + penv_xmm->en_tw |= 1 << i; } } From owner-svn-src-all@freebsd.org Tue Jun 27 11:17:29 2017 Return-Path: Delivered-To: svn-src-all@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 AAB41DA78E2; Tue, 27 Jun 2017 11:17:29 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E3A81CD6; Tue, 27 Jun 2017 11:17:29 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id B56BB374F; Tue, 27 Jun 2017 11:17:28 +0000 (UTC) From: Jan Beich To: Ed Schouten Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320240 - head/include References: <201706221839.v5MIdqK3065947@repo.freebsd.org> Date: Tue, 27 Jun 2017 13:17:25 +0200 In-Reply-To: (Ed Schouten's message of "Tue, 27 Jun 2017 12:33:44 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 11:17:29 -0000 Ed Schouten writes: > 2017-06-27 7:02 GMT+02:00 Jan Beich : >> thus regressing some ports e.g., >> >> [...] >> >> https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html > > Would there be an easy way for me to extract a list of ports that are affected? "fgrep -r max_align" over error logs[1] from a complete build suggests only www/libxul is busted which was fixed upstream[2]. I'll backport it shortly. False alarm. Sorry. [1] http://beefy11.nyi.freebsd.org/data/head-i386-default/p444252_s320323/logs/errors/ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p444252_s320323/logs/errors/ [2] https://github.com/kinetiknz/nestegg/pull/31 From owner-svn-src-all@freebsd.org Tue Jun 27 11:23:09 2017 Return-Path: Delivered-To: svn-src-all@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 12A5CDA7C25 for ; Tue, 27 Jun 2017 11:23:09 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 C45A02249 for ; Tue, 27 Jun 2017 11:23:08 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22a.google.com with SMTP id l21so2077773ywb.1 for ; Tue, 27 Jun 2017 04:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BOHYHi0SJvOzV/fdCdrC3qrJzGk2CiE1Ocrd/uYoj9I=; b=2Gfo/GwuhSqNAebtkjiYRBiTfi2BpW32S4Tf7u5uA6q8iQLoWgCB7kYalkPCYV6wwz KiVgAO1vDAqwOiQLXrynnBJmVukiJBoHmciZJNaPe/LUzwdR2+MLERK0cUyjU+mj6rkr J87S9H1pv3SkBRynpFg77cS1BXizOgNSdI0iVmpXi6VtPBInUlVECr8Y6AqSdsCuKOqM ZAh8hS5IIJ0hHF3xXIKjiewYLWOLlrqfTcbD3rLiLMtScKfvd0DwLQRhafN/KoZdPMx7 Dh5fF+xrP2wY4L62lKmZUfn3wCLNYrvTN5j8WJwiELp99tw5HtI3pvE6F1z4lrB9ORjR Jexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BOHYHi0SJvOzV/fdCdrC3qrJzGk2CiE1Ocrd/uYoj9I=; b=iUW8s65rcQlN6YQqGepQMcTo3fBK2UleZn3a0nOn5uxzxQj95MRwZ89PWu6jBViXvE 1LhM32Zve+yhBxrs5AMcwsgNIyGOwz7WCbbvzTFN1wnpghtA7xmwGnzE5MTOSiCW3vVV klYtWh7lSfNXn8KAWR/AuXhCurmqvdCLCAIXXFthUIMawhF2W6++kBxs7q5OWiN6rZoD krEGpS+5asg2KmK53io1pOvaERxLSkePNWKrM/mtYnZCdn/pJYSibaQITColJHKi4YKl UYxHnSM2ARhfdcujJvcZgjUm/8wGRjeC+ZxRxEVNVk5IyQJH5xjrOJypBkchYeY751ie HmCw== X-Gm-Message-State: AKS2vOylyJWYZHwrfKteYO0TRCq+rkEa7CRsWxUjADyZwhBn7lFBtuit JhDqpgd3PtHJttFW3OQ5FPBPWsczjoaW X-Received: by 10.13.209.194 with SMTP id t185mr3327325ywd.167.1498562587875; Tue, 27 Jun 2017 04:23:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.216.142 with HTTP; Tue, 27 Jun 2017 04:22:37 -0700 (PDT) In-Reply-To: References: <201706221839.v5MIdqK3065947@repo.freebsd.org> From: Ed Schouten Date: Tue, 27 Jun 2017 13:22:37 +0200 Message-ID: Subject: Re: svn commit: r320240 - head/include To: Jan Beich Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 11:23:09 -0000 2017-06-27 13:17 GMT+02:00 Jan Beich : > False alarm. Sorry. No problem. Thanks for bringing it to my attention, regardless! \o/ -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Tue Jun 27 12:31:17 2017 Return-Path: Delivered-To: svn-src-all@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 47BD1DA9683; Tue, 27 Jun 2017 12:31:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 255A464534; Tue, 27 Jun 2017 12:31:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 80C274346; Tue, 27 Jun 2017 12:31:16 +0000 (UTC) Date: Tue, 27 Jun 2017 14:31:16 +0200 From: Baptiste Daroussin To: Ed Schouten Cc: Jan Beich , Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320240 - head/include Message-ID: <20170627123116.ubrvsr63zkklugdg@ivaldir.net> References: <201706221839.v5MIdqK3065947@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3wymphlhsmaqwvg4" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 12:31:17 -0000 --3wymphlhsmaqwvg4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 27, 2017 at 12:33:44PM +0200, Ed Schouten wrote: > 2017-06-27 7:02 GMT+02:00 Jan Beich : > > max_align_t is now exposed even without -std=3Dc11. >=20 > Which is now consistent with the rest of the C library, as this is > also the case for other C11 features, like 's quick_exit(). >=20 > > thus regressing some ports e.g., > > > > [...] > > > > https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-201= 70626/493679.html >=20 > Would there be an easy way for me to extract a list of ports that are aff= ected? >=20 An exp-run would have shown you the list, that is what they are made for :) Bapt --3wymphlhsmaqwvg4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAllSUBEACgkQY4mL3PG3 PloNZxAAlOQwpH5eAHNhm+8VEpkY/DykjjfE9z/VrNvq0BHV9rJKOkOzG42f3S92 VwUQfVNFkHAmGvp6tXeyZfELQ/Usx0cRBme2mbTmWL7e0DoXCxxtiludLxLYsi7w kFv1xs/DynGE1xWxXzR/68mebcTKlqjhKkRzn1MI3HU4qV9bXho1kGMB84SpeWP1 QudWK/5B/uRRRgVg8PMsYAir8G/NKnTK+/HeB1RKfnvmUxPxJ4u0ZaxWaTsvNmAy D4XrvodHzsThN68JTMAc8VWl87YomCnwf5OZCvLqVW9DGUr6flopBSnO/yL/3TqW DulqQjN1JS2P/lin2eGb9gLjLb1l/OA7DHbd3Dcnai1sIjQ/EbINbkrD7xot2kv0 OuFe0aA9rubOl4p2pYDRIcL9hXjUYRp6M0Cvm+DTW7XPBReToyzwukHhXs/dFYH6 uVs1H7vkxStrUK6UyApGWaSK5lEVaOZqI4nHfSQ/uW6RsraaiJWfLJixVS6XAPce JIDrsTINPSpTpZ5/qKB/97bOurKOXzl/0jEFjqp8vTNhhJZlIxH44qgVlkAmr3ei dQIZaUyEkAODVkWzS3sggjZeB4hrMaE1desJ0n4gEm6CVzwDRF7ssA05j1/h7dsV SCOJDQ1WYQ2w6S01GUG3OUnXQMt3Unh/3rOzFUHKnQY7ojRRrYs= =pwTE -----END PGP SIGNATURE----- --3wymphlhsmaqwvg4-- From owner-svn-src-all@freebsd.org Tue Jun 27 12:56:38 2017 Return-Path: Delivered-To: svn-src-all@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 0A75FDA9FC8; Tue, 27 Jun 2017 12:56:38 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C4327651EF; Tue, 27 Jun 2017 12:56:37 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RCuaBP002746; Tue, 27 Jun 2017 12:56:36 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RCuaBj002745; Tue, 27 Jun 2017 12:56:36 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201706271256.v5RCuaBj002745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 27 Jun 2017 12:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320405 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 12:56:38 -0000 Author: ken Date: Tue Jun 27 12:56:36 2017 New Revision: 320405 URL: https://svnweb.freebsd.org/changeset/base/320405 Log: MFC r320123: Fix a potential sleep while holding a mutex in the sa(4) driver. If the user issues a MTIOCEXTGET ioctl, and the tape drive in question has a serial number that is longer than 80 characters, we malloc a buffer in saextget() to hold the output of cam_strvis(). Since a mutex is held in that codepath, doing a M_WAITOK malloc could lead to sleeping while holding a mutex. Change it to a M_NOWAIT malloc and bail out if we fail to allocate the memory. Devices with serial numbers longer than 80 bytes are very rare (I don't recall seeing one), so this should be a very unusual case to hit. But it is a bug that should be fixed. sys/cam/scsi/scsi_sa.c: In saextget(), if we need to malloc a buffer to hold the output of cam_strvis(), don't wait for the memory. Fail and return an error if we can't allocate the memory immediately. PR: kern/220094 Submitted by: Jia-Ju Bai Sponsored by: Spectra Logic Approved by: re (gjb) Modified: stable/11/sys/cam/scsi/scsi_sa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_sa.c Tue Jun 27 10:50:48 2017 (r320404) +++ stable/11/sys/cam/scsi/scsi_sa.c Tue Jun 27 12:56:36 2017 (r320405) @@ -4465,7 +4465,18 @@ saextget(struct cdev *dev, struct cam_periph *periph, if (cgd.serial_num_len > sizeof(tmpstr)) { ts2_len = cgd.serial_num_len + 1; ts2_malloc = 1; - tmpstr2 = malloc(ts2_len, M_SCSISA, M_WAITOK | M_ZERO); + tmpstr2 = malloc(ts2_len, M_SCSISA, M_NOWAIT | M_ZERO); + /* + * The 80 characters allocated on the stack above + * will handle the vast majority of serial numbers. + * If we run into one that is larger than that, and + * we can't malloc the length without blocking, + * bail out with an out of memory error. + */ + if (tmpstr2 == NULL) { + error = ENOMEM; + goto extget_bailout; + } } else { ts2_len = sizeof(tmpstr); ts2_malloc = 0; From owner-svn-src-all@freebsd.org Tue Jun 27 13:24:07 2017 Return-Path: Delivered-To: svn-src-all@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 4AF48DAA8E5; Tue, 27 Jun 2017 13:24:07 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1BB51660C9; Tue, 27 Jun 2017 13:24:07 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RDO61V014744; Tue, 27 Jun 2017 13:24:06 GMT (envelope-from jwd@FreeBSD.org) Received: (from jwd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RDO63A014743; Tue, 27 Jun 2017 13:24:06 GMT (envelope-from jwd@FreeBSD.org) Message-Id: <201706271324.v5RDO63A014743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jwd set sender to jwd@FreeBSD.org using -f From: "John W. De Boskey" Date: Tue, 27 Jun 2017 13:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320406 - head/libexec/rshd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 13:24:07 -0000 Author: jwd Date: Tue Jun 27 13:24:06 2017 New Revision: 320406 URL: https://svnweb.freebsd.org/changeset/base/320406 Log: A little tweak for performance Reviewed by: adrian Approved by: rmacklem (mentor) MFC after: 3 weeks Modified: head/libexec/rshd/rshd.c Modified: head/libexec/rshd/rshd.c ============================================================================== --- head/libexec/rshd/rshd.c Tue Jun 27 12:56:36 2017 (r320405) +++ head/libexec/rshd/rshd.c Tue Jun 27 13:24:06 2017 (r320406) @@ -191,7 +191,7 @@ doit(struct sockaddr *fromp) struct passwd *pwd; u_short port; fd_set ready, readfrom; - int cc, fd, nfd, pv[2], pid, s; + int cc, nfd, pv[2], pid, s; int one = 1; const char *cp, *errorstr; char sig, buf[BUFSIZ]; @@ -496,8 +496,7 @@ doit(struct sockaddr *fromp) #ifdef USE_BLACKLIST blacklist(0, STDIN_FILENO, "success"); #endif - for (fd = getdtablesize(); fd > 2; fd--) - (void) close(fd); + closefrom(3); if (setsid() == -1) syslog(LOG_ERR, "setsid() failed: %m"); if (setlogin(pwd->pw_name) < 0) From owner-svn-src-all@freebsd.org Tue Jun 27 14:39:01 2017 Return-Path: Delivered-To: svn-src-all@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 C0584D872DA; Tue, 27 Jun 2017 14:39:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8F45068E48; Tue, 27 Jun 2017 14:39:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5REd07l049481; Tue, 27 Jun 2017 14:39:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5REd0AX049480; Tue, 27 Jun 2017 14:39:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706271439.v5REd0AX049480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 27 Jun 2017 14:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320407 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 14:39:01 -0000 Author: gjb Date: Tue Jun 27 14:39:00 2017 New Revision: 320407 URL: https://svnweb.freebsd.org/changeset/base/320407 Log: Remove CHROOT_MAKEENV from the RPI3 configuration file, to avoid assuming the build host is amd64. MFC after: 3 days X-MFC-With: r320252, r320253, r320254 X-MFC-Note: maybe Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Tue Jun 27 13:24:06 2017 (r320406) +++ head/release/arm64/RPI3.conf Tue Jun 27 14:39:00 2017 (r320407) @@ -3,7 +3,6 @@ # $FreeBSD$ # -CHROOT_MAKEENV="TARGET=amd64 TARGET_ARCH=amd64" SRCBRANCH="base/head@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm64" From owner-svn-src-all@freebsd.org Tue Jun 27 15:07:20 2017 Return-Path: Delivered-To: svn-src-all@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 9B2F3D879F2; Tue, 27 Jun 2017 15:07:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 69C6E6AE05; Tue, 27 Jun 2017 15:07:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RF7J3u062199; Tue, 27 Jun 2017 15:07:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RF7Jsq062198; Tue, 27 Jun 2017 15:07:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706271507.v5RF7Jsq062198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 27 Jun 2017 15:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320408 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 15:07:20 -0000 Author: pfg Date: Tue Jun 27 15:07:19 2017 New Revision: 320408 URL: https://svnweb.freebsd.org/changeset/base/320408 Log: ext2fs: Support e2di_uid_high and e2di_gid_high. The fields exist on all versions of the filesystem and using them is a mount option on linux. For FreeBSD, the corresponding i_uid and i_gid are always long enough so use them by default. Reviewed by: Fedor Uporov MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D11354 Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Jun 27 14:39:00 2017 (r320407) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Jun 27 15:07:19 2017 (r320408) @@ -124,6 +124,8 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) ip->i_gen = ei->e2di_gen; ip->i_uid = ei->e2di_uid; ip->i_gid = ei->e2di_gid; + ip->i_uid |= (uint32_t)ei->e2di_uid_high << 16; + ip->i_gid |= (uint32_t)ei->e2di_gid_high << 16; /* XXX use memcpy */ for (i = 0; i < EXT2_NDADDR; i++) ip->i_db[i] = ei->e2di_blocks[i]; @@ -170,8 +172,10 @@ ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei) ei->e2di_facl = ip->i_facl & 0xffffffff; ei->e2di_facl_high = ip->i_facl >> 32 & 0xffff; ei->e2di_gen = ip->i_gen; - ei->e2di_uid = ip->i_uid; - ei->e2di_gid = ip->i_gid; + ei->e2di_uid = ip->i_uid & 0xffff; + ei->e2di_uid_high = ip->i_uid >> 16 & 0xffff; + ei->e2di_gid = ip->i_gid & 0xffff; + ei->e2di_gid_high = ip->i_gid >> 16 & 0xffff; /* XXX use memcpy */ for (i = 0; i < EXT2_NDADDR; i++) ei->e2di_blocks[i] = ip->i_db[i]; From owner-svn-src-all@freebsd.org Tue Jun 27 15:14:08 2017 Return-Path: Delivered-To: svn-src-all@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 2828DD87C82; Tue, 27 Jun 2017 15:14:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 EC8656E2F2; Tue, 27 Jun 2017 15:14:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RFE7N5066165; Tue, 27 Jun 2017 15:14:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RFE7rT066164; Tue, 27 Jun 2017 15:14:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706271514.v5RFE7rT066164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 27 Jun 2017 15:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320409 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 15:14:08 -0000 Author: trasz Date: Tue Jun 27 15:14:06 2017 New Revision: 320409 URL: https://svnweb.freebsd.org/changeset/base/320409 Log: Revert part of r320359, as suggested by rmacklem@. That case is only used for nfsuserd -manage-gids and shouldn't depend on sysctl. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Tue Jun 27 15:07:19 2017 (r320408) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Jun 27 15:14:06 2017 (r320409) @@ -2672,7 +2672,7 @@ nfsrv_getgrpscred(struct ucred *oldcred) cnt = 0; uid = oldcred->cr_uid; tryagain: - if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { + if (nfsrv_dnsnamelen > 0) { hp = NFSUSERHASH(uid); mtx_lock(&hp->mtx); TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { From owner-svn-src-all@freebsd.org Tue Jun 27 16:05:12 2017 Return-Path: Delivered-To: svn-src-all@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 BADD8D88B3E; Tue, 27 Jun 2017 16:05:12 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8727C6FA6C; Tue, 27 Jun 2017 16:05:12 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RG5Bmo087951; Tue, 27 Jun 2017 16:05:11 GMT (envelope-from zi@FreeBSD.org) Received: (from zi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RG5B8O087950; Tue, 27 Jun 2017 16:05:11 GMT (envelope-from zi@FreeBSD.org) Message-Id: <201706271605.v5RG5B8O087950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zi set sender to zi@FreeBSD.org using -f From: Ryan Steinmetz Date: Tue, 27 Jun 2017 16:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r320410 - svnadmin/hooks/scripts X-SVN-Group: svnadmin X-SVN-Commit-Author: zi X-SVN-Commit-Paths: svnadmin/hooks/scripts X-SVN-Commit-Revision: 320410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:05:12 -0000 Author: zi (ports committer) Date: Tue Jun 27 16:05:11 2017 New Revision: 320410 URL: https://svnweb.freebsd.org/changeset/base/320410 Log: - Add in additional X-SVN-* headers to assist with mail sorting PR: 200484 Requested by: emaste Modified: svnadmin/hooks/scripts/mailer.py Modified: svnadmin/hooks/scripts/mailer.py ============================================================================== --- svnadmin/hooks/scripts/mailer.py Tue Jun 27 15:14:06 2017 (r320409) +++ svnadmin/hooks/scripts/mailer.py Tue Jun 27 16:05:11 2017 (r320410) @@ -235,6 +235,8 @@ class MailedOutput(OutputBase): def mail_headers(self, group, params): subject = self.make_subject(group, params) + dirlist_limit = 200 + dirlist = self.dirlist[:dirlist_limit] + bool(self.dirlist[dirlist_limit:]) * '...' try: subject.encode('ascii') except UnicodeError: @@ -244,10 +246,15 @@ class MailedOutput(OutputBase): # hdrs = 'To: %s\n' \ hdrs = 'Subject: %s\n' \ 'X-SVN-Group: %s\n' \ + 'X-SVN-Commit-Author: %s\n' \ + 'X-SVN-Commit-Paths: %s\n' \ + 'X-SVN-Commit-Revision: %d\n' \ + 'X-SVN-Commit-Repository: %s\n' \ 'MIME-Version: 1.0\n' \ 'Content-Type: text/plain; charset=UTF-8\n' \ 'Content-Transfer-Encoding: 8bit\n' \ - % (subject, group or "defaults") + % (subject, group or "defaults", self.repos.author or 'no_author', + dirlist, self.repos.rev, os.path.basename(self.repos.repos_dir)) # % (self.from_addr, string.join(self.to_addrs, ', '), subject) if self.reply_to: hdrs = '%sReply-To: %s\n' % (hdrs, self.reply_to) @@ -397,8 +404,10 @@ class Commit(Messenger): dirlist = string.join(dirlist) if commondir: self.output.subject = 'r%d - in %s: %s' % (repos.rev, commondir, dirlist) + self.output.dirlist = 'in %s: %s' % (commondir, dirlist) else: self.output.subject = 'r%d - %s' % (repos.rev, dirlist) + self.output.dirlist = '%s' % (dirlist) def generate(self): "Generate email for the various groups and option-params." From owner-svn-src-all@freebsd.org Tue Jun 27 16:30:03 2017 Return-Path: Delivered-To: svn-src-all@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 13573D8A040; Tue, 27 Jun 2017 16:30:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D14E072D96; Tue, 27 Jun 2017 16:30:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RGU1QA001067; Tue, 27 Jun 2017 16:30:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RGU1Xp001066; Tue, 27 Jun 2017 16:30:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706271630.v5RGU1Xp001066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 27 Jun 2017 16:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320411 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 320411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:30:03 -0000 Author: andrew Date: Tue Jun 27 16:30:01 2017 New Revision: 320411 URL: https://svnweb.freebsd.org/changeset/base/320411 Log: Add parentheses missed in r320388 Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/endian.h Modified: head/sys/arm64/include/endian.h ============================================================================== --- head/sys/arm64/include/endian.h Tue Jun 27 16:05:11 2017 (r320410) +++ head/sys/arm64/include/endian.h Tue Jun 27 16:30:01 2017 (r320411) @@ -106,12 +106,12 @@ __bswap16_var(__uint16_t v) #define __bswap16(x) \ ((__uint16_t)(__builtin_constant_p(x) ? \ - __bswap16_constant((__uint16_t)x) : \ + __bswap16_constant((__uint16_t)(x)) : \ __bswap16_var(x))) #define __bswap32(x) \ ((__uint32_t)(__builtin_constant_p(x) ? \ - __bswap32_constant((__uint32_t)x) : \ + __bswap32_constant((__uint32_t)(x)) : \ __bswap32_var(x))) #else From owner-svn-src-all@freebsd.org Tue Jun 27 16:48:06 2017 Return-Path: Delivered-To: svn-src-all@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 7C05BD8A593; Tue, 27 Jun 2017 16:48:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4A3E97370E; Tue, 27 Jun 2017 16:48:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RGm57P009346; Tue, 27 Jun 2017 16:48:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RGm5q1009345; Tue, 27 Jun 2017 16:48:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706271648.v5RGm5q1009345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 27 Jun 2017 16:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320412 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 320412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:48:06 -0000 Author: imp Date: Tue Jun 27 16:48:05 2017 New Revision: 320412 URL: https://svnweb.freebsd.org/changeset/base/320412 Log: Namespace is 32-bits, don't cast it to 16 here Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Tue Jun 27 16:30:01 2017 (r320411) +++ head/sys/cam/nvme/nvme_da.c Tue Jun 27 16:48:05 2017 (r320412) @@ -743,7 +743,7 @@ ndaregister(struct cam_periph *periph, void *arg) /* * The name space ID is the lun, save it for later I/O */ - softc->nsid = (uint16_t)xpt_path_lun_id(periph->path); + softc->nsid = (uint32_t)xpt_path_lun_id(periph->path); /* * Register this media as a disk From owner-svn-src-all@freebsd.org Tue Jun 27 17:01:47 2017 Return-Path: Delivered-To: svn-src-all@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 49778D8AD91; Tue, 27 Jun 2017 17:01:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 16E307416B; Tue, 27 Jun 2017 17:01:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RH1kYq014958; Tue, 27 Jun 2017 17:01:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RH1kIx014957; Tue, 27 Jun 2017 17:01:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706271701.v5RH1kIx014957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 27 Jun 2017 17:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320413 - head/sys/fs/pseudofs X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/sys/fs/pseudofs X-SVN-Commit-Revision: 320413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:01:47 -0000 Author: ngie Date: Tue Jun 27 17:01:46 2017 New Revision: 320413 URL: https://svnweb.freebsd.org/changeset/base/320413 Log: Fix LINT, broken by a -Wformat warning in r320329 with PFS_DELEN being changed from %d to a long-width type. Use uintmax_t casting and %ju to futureproof the format string against potential changes with either the #define or the implementation-specific definition for offsetof(..). Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Tue Jun 27 16:48:05 2017 (r320412) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Tue Jun 27 17:01:46 2017 (r320413) @@ -866,7 +866,7 @@ pfs_readdir(struct vop_readdir_args *va) free(pfsent, M_IOV); i++; } - PFS_TRACE(("%d bytes", i * PFS_DELEN)); + PFS_TRACE(("%ju bytes", (uintmax_t)(i * PFS_DELEN))); PFS_RETURN (error); } From owner-svn-src-all@freebsd.org Tue Jun 27 17:04:59 2017 Return-Path: Delivered-To: svn-src-all@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 B313ED8AFCE; Tue, 27 Jun 2017 17:04:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (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 877D57445A; Tue, 27 Jun 2017 17:04:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id u62so5003331pgb.0; Tue, 27 Jun 2017 10:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=27BovzpmIwLNDVqbffE/JEQigaVRtwW12ATNZza9s5w=; b=T3la3a5j2Fokw41S7N7qGlSlB5Q5SnE1pHn8xFbKeANZd/Wf2vMxbHZhIm2QqeVljx 8WDSEarMd6jATOVOgWLvMtTOUNCLQQ2Gz012p/A1CNBe8o1oUmCJmiLqa80o7VztERse El2Ljq7Y8HMT/G/XauMerjqBOKNi5Bgl0ON1Q/PtTZAs9INeIRWt6nkpQnYr6jpolEyx GV5WvTf8K7aiIWoc/2qKpZaeHsQthcxhWiJEsvDovJF9V7spTvJc8bV8GqDDzzkvvI+N H+/h4nf9p++SI+kmTkKCnuhuLCaWSVEbEKEDR5cW/UvYHEHp4UpYRrxF4da93zximFq0 B43w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=27BovzpmIwLNDVqbffE/JEQigaVRtwW12ATNZza9s5w=; b=p2V7GPAEl11qkRT7dDHpaPE0h39CUnjEJU/qhQ1h6ZcyB6jcknntgMYZFFQIG6S/iQ toDN1pYuTRh6dxnFLLweb3p9Px5xhscf4p9MKawMznm55PMrekvc18JirCQWQLgUoi3K E9t29jhqRXaH5UDEfb4QS1ZKuq/HCaSUjwI2sbSUXJhOe9LrIaPr/940Rc1SeFI3WHkk MNTQr8NpJzfrN/ViESTgE97hEhvs9GRz/0/I4fk/mJlyQK4PkWzJD+wVooGFX0J/1VBa IuNe2BxafPliNEgvu/Lwj1cxBirjWTY/rcVTWtoRMIlJXuTVA63VqkWo88VBJDBmOuWW NBZQ== X-Gm-Message-State: AKS2vOy2uN8+j+0H9l54gFw7ZnFShd41+H9R+eQ4xz/5MGGAafOHCdSU xWwPtePAH5G2pgmWUac= X-Received: by 10.84.197.129 with SMTP id n1mr6773859pld.179.1498583098810; Tue, 27 Jun 2017 10:04:58 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s62sm4114572pfi.36.2017.06.27.10.04.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Jun 2017 10:04:58 -0700 (PDT) Subject: Re: svn commit: r320388 - head/sys/arm64/include Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2E7BAFC2-741A-47D3-84A6-F564065BB6BB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201706262232.v5QMWrBs048496@repo.freebsd.org> Date: Tue, 27 Jun 2017 10:04:56 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <61D9C30C-BB98-484E-B817-6FE369A77453@gmail.com> References: <201706262232.v5QMWrBs048496@repo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:04:59 -0000 --Apple-Mail=_2E7BAFC2-741A-47D3-84A6-F564065BB6BB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 26, 2017, at 15:32, Andrew Turner wrote: >=20 > Author: andrew > Date: Mon Jun 26 22:32:52 2017 > New Revision: 320388 > URL: https://svnweb.freebsd.org/changeset/base/320388 >=20 > Log: > In _bswap16 and _bswap32 cast constant values to the appropriate = type. This is > similar to what is done in the x86 code. >=20 > Sponsored by: DARPA, AFRL Hi Andrew, This change broke htons use in libsdp on arm64. =46rom = https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/2932/console : 16:08:38 --- all_subdir_lib/libsdp --- 16:08:38 /usr/src/lib/libsdp/search.c:160:31: error: invalid operands to = binary expression ('int' and 'uint8_t *' (aka 'unsigned char *')) 16:08:38 xpdu.pdu.len =3D htons(req_cs - ss->req); 16:08:38 ~~~~~~~~~~~~~^~~~~~~~~~ It might be a good idea to revert the change, fix the fallout, = then recommit the change. Thanks, -Ngie --Apple-Mail=_2E7BAFC2-741A-47D3-84A6-F564065BB6BB 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZUpA5AAoJEPWDqSZpMIYVQYEP/RHtfeSBgrpOTzoL9+zAQv9Q 1zXGqr/jsLgVGwdZ6lD1HhqIsFUEhkFwGPiqUxXdQ81Ik+XJ7cqGZqmKF012kfCy U0OS+Vguuhnu0teBuyeYayGotVeN2Lo0zTPIxrUhctQxU59Zcd2YfgNcZsU3iuP0 WYUAjFN+gI7lgXJ6LshTbz762XjVFyZeuReGOwbljXqltWXgKg6I+26mMd1+/GD0 SMfOiOAU/g7D2D45YiNHLwyWaDYLidUtlAPGq/hWmJ0SbblOj6qj+aypQbTEBPnQ l5D/sv1obNjbn1lBkicsXD9WYuMCD9I44F05IwMgj4+2OqaHf/MXISyPTeNp/z/T OEuFLVSLNkTlA3CbI48sSNlT8bAaFwNaq0sLp02THQqCxjStz4WM3r9sFTlbXYup VvZQGMsr0YB/+kojYgXsdJ497lDyOCJlPslEFLMAy5hB2EdOsBmYTOoXic9wMy7a jlIMb5wL535QLXfyiUpjoKzDgV191OtWHs86GmmQlTtUkGmZzokKtYtPCJWDRjC0 UpVt0G997hnJUIDwRyTN5EzJq0LXfWhJD0HCaZ9L9FU1zrmQ+zmKyOgtP5RE6f0v 0Jto7YRiuceIo/EPCzRFrCUbhTpS8DQhvjdJtv7xax9JP/bh298s4swKW9ss0RFZ fXajTEJWYnAe1tUPf4iy =PXLf -----END PGP SIGNATURE----- --Apple-Mail=_2E7BAFC2-741A-47D3-84A6-F564065BB6BB-- From owner-svn-src-all@freebsd.org Tue Jun 27 17:06:24 2017 Return-Path: Delivered-To: svn-src-all@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 6C62FD8B0E9; Tue, 27 Jun 2017 17:06:24 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 34D63746E9; Tue, 27 Jun 2017 17:06:23 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [IPv6:2a02:c7f:1e13:cf00:4d7f:57c8:60b0:eb3d] (unknown [IPv6:2a02:c7f:1e13:cf00:4d7f:57c8:60b0:eb3d]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 4336D4E698; Tue, 27 Jun 2017 17:06:17 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320388 - head/sys/arm64/include From: Andrew Turner In-Reply-To: <61D9C30C-BB98-484E-B817-6FE369A77453@gmail.com> Date: Tue, 27 Jun 2017 18:06:16 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0842F153-8120-4D7C-B6B3-E2499CD05286@freebsd.org> References: <201706262232.v5QMWrBs048496@repo.freebsd.org> <61D9C30C-BB98-484E-B817-6FE369A77453@gmail.com> To: "Ngie Cooper (yaneurabeya)" X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:06:24 -0000 > On 27 Jun 2017, at 18:04, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Jun 26, 2017, at 15:32, Andrew Turner wrote: >>=20 >> Author: andrew >> Date: Mon Jun 26 22:32:52 2017 >> New Revision: 320388 >> URL: https://svnweb.freebsd.org/changeset/base/320388 >>=20 >> Log: >> In _bswap16 and _bswap32 cast constant values to the appropriate = type. This is >> similar to what is done in the x86 code. >>=20 >> Sponsored by: DARPA, AFRL >=20 > Hi Andrew, > This change broke htons use in libsdp on arm64. =46rom = https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/2932/console : >=20 > 16:08:38 --- all_subdir_lib/libsdp --- > 16:08:38 /usr/src/lib/libsdp/search.c:160:31: error: invalid operands = to binary expression ('int' and 'uint8_t *' (aka 'unsigned char *')) > 16:08:38 xpdu.pdu.len =3D htons(req_cs - ss->req); >=20 > 16:08:38 ~~~~~~~~~~~~~^~~~~~~~~~ >=20 > It might be a good idea to revert the change, fix the fallout, = then recommit the change. > Thanks, > -Ngie I already fixed it in r320411. Andrew= From owner-svn-src-all@freebsd.org Tue Jun 27 17:08:10 2017 Return-Path: Delivered-To: svn-src-all@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 5F2CED8B2B0; Tue, 27 Jun 2017 17:08:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (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 298FF74A06; Tue, 27 Jun 2017 17:08:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id e199so5521618pfh.0; Tue, 27 Jun 2017 10:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=lrGNd3ZOUJSCsbvQYusUaAadUZ8TLlBQ8vEzx3HTIn4=; b=hPe3RxVVNbKpi82YbmSB5x4BNn3HIgL0j6NQtTJLSGfF6JUYaegTLM05GthL1HBK/h 7vRLB8RytDmI10Pu+OIyCCdGBG3HVqygBwcYHuJdUe4Qssk11c5zgWZja4Y8PLJg6hFZ FVHsb8jk42N9SdTPeja0hgK2tE7XtQN8p4iBnL4fJQDOnuNCHyN3dMu7g3SNcvkBrT84 3UiKLcPhgNzWKZuW4tvfdCX4Gwp/SmBo6BYAJgLhW/e5IgG0CAOpQf3wysych2Q4aG4s 3206xCDv+M0BW/dI1HkzyBvWGoXTCwt8JkMAY20SYCzOn69nOj2uSQeh7CtAEtF/kpBZ lvOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=lrGNd3ZOUJSCsbvQYusUaAadUZ8TLlBQ8vEzx3HTIn4=; b=YV10H1GTqPU2zI0ZrVZ/umW/w9Igcph7yZlhQg9kI9+xcio23kobAOfzT4R7JM/NYQ kHJhu8K8lQmeg75VLWtI4e2cuKlPgfwvj7+7CQA9A0bb02V8rVX/cLoYt90dX/bG3A5m 2LIhTO3UBpkW3XGaJykhfom2ed0169wrESBOLtfUZ1/ugUkvOC3gffksPv/I6S/QH5hu aZYHcwusQ8enubFkubGV6g2Pv6/6RZO2wZ0N2TucDTfHGRwcjzG9yPhiJOLHIr9srKjc jWNsFJezlx2hw1vfZKhK329WZAUzu2+dCysVHXYS0NO0235kLR+01Ov3MZS3fJ0guwhn FpCw== X-Gm-Message-State: AKS2vOzaVw4jzEL/ooNu0Wsy5YqOlY1eRtdsN4UXkUrOufljTFVYBQK4 MQa5qouKL9RYVbNyqf0= X-Received: by 10.99.120.132 with SMTP id t126mr6346908pgc.276.1498583289330; Tue, 27 Jun 2017 10:08:09 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 189sm5917529pgj.67.2017.06.27.10.08.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Jun 2017 10:08:08 -0700 (PDT) Subject: Re: svn commit: r320388 - head/sys/arm64/include Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CF44BCFD-1316-4346-ADD8-632469855558"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <0842F153-8120-4D7C-B6B3-E2499CD05286@freebsd.org> Date: Tue, 27 Jun 2017 10:08:07 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <01FDA201-206A-485B-946C-3985258C8331@gmail.com> References: <201706262232.v5QMWrBs048496@repo.freebsd.org> <61D9C30C-BB98-484E-B817-6FE369A77453@gmail.com> <0842F153-8120-4D7C-B6B3-E2499CD05286@freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:08:10 -0000 --Apple-Mail=_CF44BCFD-1316-4346-ADD8-632469855558 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 27, 2017, at 10:06, Andrew Turner wrote: ... > I already fixed it in r320411. Ok! The CI build is currently running, so *crosses fingers* = hopefully everything will be fixed after this build on amd64/arm64. Thanks! -Ngie --Apple-Mail=_CF44BCFD-1316-4346-ADD8-632469855558 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZUpD3AAoJEPWDqSZpMIYVXRkP/iWpgyFTHfUcMbUG10fqenUi V8NvNKa6hJVFxAmMFfZW733Bhj3LyFCYYalfKl7Y2ZFYHf5rwsNZmToow+prfceS 4ySNqNJ5NTbpBb337cmbNkAWYSJgPpPku+mfXhC0dytUokLCNsm7WgOJuSgPeaX4 hkdQyIpPTKjp8N+ODDNZa5p7FgzUaB9ESb48dl8nMBujTTCCSC2CirJWNFtJZbFS ESn4qPRp8gAvifOJJaieD+jH9RIanFIYgZEQ7ItdLJ17nLorAYU3QSo2tNfvAY6X ZuDe0oD0F1JmMh3lmw7VzV6OXTXXA2TXGBCqz73cOftYEkr05T7yw6q8wrhKceYb a046Ya7X+C67L826lzkM735fGdUaudg8O2blUN34TmtHeKb+cKm95IqRCcx0TcTk pSNoxTrv6w3WlEVWma0YGxUSn7mnKmxRg3mTLztZIHvcJWe5OLw4tQ/1CbxJ+q8l JcDxRYO5p0e6LT8BcGIoduFFvuP31Cdk7i7Gu8ajSNa8NKfNZEiAdAsd+kSiIzZi WXddK7t8L0IOg5i9Ac5VcWOtJV3aXDcd97Oa2pFKKjmyx1DnjmhjR3xSPMOa9j5s RamoZ+X4fdLYvrqUWfMS6cmb9jPrTaNoRM3VGx9GlkccT/AsSSs+FVFmrU9zliE0 wHoJGmnkNeD9hIrE49EW =BBhQ -----END PGP SIGNATURE----- --Apple-Mail=_CF44BCFD-1316-4346-ADD8-632469855558-- From owner-svn-src-all@freebsd.org Tue Jun 27 17:22:05 2017 Return-Path: Delivered-To: svn-src-all@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 48C85D8B6CD; Tue, 27 Jun 2017 17:22:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 12B2B751A4; Tue, 27 Jun 2017 17:22:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHM4H5025582; Tue, 27 Jun 2017 17:22:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHM4o8025581; Tue, 27 Jun 2017 17:22:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706271722.v5RHM4o8025581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 27 Jun 2017 17:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320414 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/netbsd-tests/usr.bin/grep X-SVN-Commit-Revision: 320414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:22:05 -0000 Author: ngie Date: Tue Jun 27 17:22:03 2017 New Revision: 320414 URL: https://svnweb.freebsd.org/changeset/base/320414 Log: Expect :mmap_eof_not_eol to fail It relies on a jemalloc feature (opt.redzone) no longer available after r319971. MFC with: r318908, r319971 PR: 220309 Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue Jun 27 17:01:46 2017 (r320413) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue Jun 27 17:22:03 2017 (r320414) @@ -658,6 +658,8 @@ mmap_eof_not_eol_body() atf_expect_fail "gnu grep from ports has no --mmap option" fi + atf_expect_fail "relies on jemalloc feature no longer available; needs to be rewritten - bug 220309" + printf "ABC" > test1 jot -b " " -s "" 4096 >> test2 From owner-svn-src-all@freebsd.org Tue Jun 27 17:23:21 2017 Return-Path: Delivered-To: svn-src-all@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 7683ED8B7A0; Tue, 27 Jun 2017 17:23:21 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 45FBB75420; Tue, 27 Jun 2017 17:23:21 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHNKcN025677; Tue, 27 Jun 2017 17:23:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHNKbU025676; Tue, 27 Jun 2017 17:23:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706271723.v5RHNKbU025676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 27 Jun 2017 17:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320415 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:23:21 -0000 Author: cem Date: Tue Jun 27 17:23:20 2017 New Revision: 320415 URL: https://svnweb.freebsd.org/changeset/base/320415 Log: Fix one more place uio_resid is truncated to int A follow-up to r231949 and r194990. Reported by: pho@ Reviewed by: kib@, markj@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11373 Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Jun 27 17:22:03 2017 (r320414) +++ head/sys/kern/uipc_mbuf.c Tue Jun 27 17:23:20 2017 (r320415) @@ -1517,7 +1517,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int ali * the total data supplied by the uio. */ if (len > 0) - total = min(uio->uio_resid, len); + total = (uio->uio_resid < len) ? uio->uio_resid : len; else total = uio->uio_resid; From owner-svn-src-all@freebsd.org Tue Jun 27 17:43:30 2017 Return-Path: Delivered-To: svn-src-all@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 2354FD8C206; Tue, 27 Jun 2017 17:43:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E3DAE763F6; Tue, 27 Jun 2017 17:43:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHhTRO033674; Tue, 27 Jun 2017 17:43:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHhTt1033673; Tue, 27 Jun 2017 17:43:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706271743.v5RHhTt1033673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 27 Jun 2017 17:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320416 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 320416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:43:30 -0000 Author: np Date: Tue Jun 27 17:43:28 2017 New Revision: 320416 URL: https://svnweb.freebsd.org/changeset/base/320416 Log: cxgbe/t4_tom: sbspace on listening sockets is no longer supported (as of r319722), use sol_sbrcv_hiwat instead. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Jun 27 17:23:20 2017 (r320415) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Jun 27 17:43:28 2017 (r320416) @@ -1185,6 +1185,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss struct synq_entry *synqe = NULL; int reject_reason, v, ntids; uint16_t vid; + u_int wnd; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif @@ -1326,10 +1327,10 @@ found: mtu_idx = find_best_mtu_idx(sc, &inc, be16toh(cpl->tcpopt.mss)); rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0; - SOCKBUF_LOCK(&so->so_rcv); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ - rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); - SOCKBUF_UNLOCK(&so->so_rcv); + wnd = max(so->sol_sbrcv_hiwat, MIN_RCV_WND); + wnd = min(wnd, MAX_RCV_WND); + rx_credits = min(wnd >> 10, M_RCV_BUFSIZ); save_qids_in_mbuf(m, vi); get_qids_from_mbuf(m, NULL, &rxqid); From owner-svn-src-all@freebsd.org Tue Jun 27 17:45:27 2017 Return-Path: Delivered-To: svn-src-all@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 DB2EFD8C3A6; Tue, 27 Jun 2017 17:45:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B572A76694; Tue, 27 Jun 2017 17:45:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHjQTN033813; Tue, 27 Jun 2017 17:45:26 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHjQ0i033812; Tue, 27 Jun 2017 17:45:26 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706271745.v5RHjQ0i033812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 27 Jun 2017 17:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320417 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:45:28 -0000 Author: alc Date: Tue Jun 27 17:45:26 2017 New Revision: 320417 URL: https://svnweb.freebsd.org/changeset/base/320417 Log: Address the remaining integer overflow issues with the "skip" parameters and "next_skip" variables. The "skip" value in struct blist has long been a 64-bit quantity but various functions have implicitly truncated this value to 32 bits. Now, all arithmetic involving the "skip" value is 64 bits wide. (This should allow us to relax the size limit on a swap device in the swap pager.) Maintain the ability to test this allocator as a user-space application by including . Remove an unused variable from blst_radix_print(). Reviewed by: kib, markj MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D11358 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Tue Jun 27 17:43:28 2017 (r320416) +++ head/sys/kern/subr_blist.c Tue Jun 27 17:45:26 2017 (r320417) @@ -105,6 +105,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) @@ -125,17 +126,17 @@ static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t daddr_t radix, daddr_t skip, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, - daddr_t radix, int skip, daddr_t blk); + daddr_t radix, daddr_t skip, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, - daddr_t radix, int skip, daddr_t blk); -static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, - int skip, daddr_t count); + daddr_t radix, daddr_t skip, daddr_t blk); +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, + daddr_t count); #ifndef _KERNEL -static void blst_radix_print(blmeta_t *scan, daddr_t blk, - daddr_t radix, int skip, int tab); +static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, + daddr_t skip, int tab); #endif #ifdef _KERNEL @@ -157,18 +158,18 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - daddr_t nodes, radix; - int skip = 0; + daddr_t nodes, radix, skip; /* * Calculate radix and skip field used for scanning. */ radix = BLIST_BMAP_RADIX; - + skip = 0; while (radix < blocks) { radix *= BLIST_META_RADIX; skip = (skip + 1) * BLIST_META_RADIX; } + nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); bl = malloc(sizeof(struct blist), M_SWAP, flags); if (bl == NULL) @@ -178,13 +179,12 @@ blist_create(daddr_t blocks, int flags) bl->bl_radix = radix; bl->bl_skip = skip; bl->bl_cursor = 0; - nodes = 1 + blst_radix_init(NULL, radix, bl->bl_skip, blocks); bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { free(bl, M_SWAP); return (NULL); } - blst_radix_init(bl->bl_root, radix, bl->bl_skip, blocks); + blst_radix_init(bl->bl_root, radix, skip, blocks); #if defined(BLIST_DEBUG) printf( @@ -569,16 +569,11 @@ blst_leaf_free( */ static void -blst_meta_free( - blmeta_t *scan, - daddr_t freeBlk, - daddr_t count, - daddr_t radix, - int skip, - daddr_t blk -) { - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); +blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t blk) +{ + daddr_t i, next_skip, v; + int child; #if 0 printf("free (%llx,%lld) FROM (%llx,%lld)\n", @@ -586,6 +581,7 @@ blst_meta_free( (long long)blk, (long long)radix ); #endif + next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { /* @@ -630,13 +626,10 @@ blst_meta_free( radix /= BLIST_META_RADIX; - i = (freeBlk - blk) / radix; - blk += i * radix; - i = i * next_skip + 1; - + child = (freeBlk - blk) / radix; + blk += child * radix; + i = 1 + child * next_skip; while (i <= skip && blk < freeBlk + count) { - daddr_t v; - v = blk + radix - freeBlk; if (v > count) v = count; @@ -673,8 +666,7 @@ static void blst_copy( blist_t dest, daddr_t count ) { - int next_skip; - int i; + daddr_t i, next_skip; /* * Leaf node @@ -719,7 +711,7 @@ static void blst_copy( radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; for (i = 1; count && i <= skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) @@ -786,17 +778,11 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) * number of blocks allocated by the call. */ static daddr_t -blst_meta_fill( - blmeta_t *scan, - daddr_t allocBlk, - daddr_t count, - daddr_t radix, - int skip, - daddr_t blk -) { - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); - daddr_t nblks = 0; +blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t blk) +{ + daddr_t i, nblks, next_skip, v; + int child; if (count > radix) { /* @@ -814,6 +800,7 @@ blst_meta_fill( scan->bm_bighint = 0; return nblks; } + next_skip = skip / BLIST_META_RADIX; /* * An ALL-FREE meta node requires special handling before allocating @@ -839,13 +826,11 @@ blst_meta_fill( radix /= BLIST_META_RADIX; } - i = (allocBlk - blk) / radix; - blk += i * radix; - i = i * next_skip + 1; - + nblks = 0; + child = (allocBlk - blk) / radix; + blk += child * radix; + i = 1 + child * next_skip; while (i <= skip && blk < allocBlk + count) { - daddr_t v; - v = blk + radix - allocBlk; if (v > count) v = count; @@ -878,12 +863,12 @@ blst_meta_fill( */ static daddr_t -blst_radix_init(blmeta_t *scan, daddr_t radix, int skip, daddr_t count) +blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) { - int i; - int next_skip; - daddr_t memindex = 0; + daddr_t i, memindex, next_skip; + memindex = 0; + /* * Leaf node */ @@ -908,7 +893,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, int ski } radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; for (i = 1; i <= skip; i += next_skip) { if (count >= radix) { @@ -950,11 +935,10 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, int ski #ifdef BLIST_DEBUG static void -blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab) +blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, + int tab) { - int i; - int next_skip; - int lastState = 0; + daddr_t i, next_skip; if (radix == BLIST_BMAP_RADIX) { printf( @@ -996,7 +980,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; tab += 4; for (i = 1; i <= skip; i += next_skip) { @@ -1006,7 +990,6 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t tab, tab, "", (long long)blk, (long long)radix ); - lastState = 0; break; } blst_radix_print( From owner-svn-src-all@freebsd.org Tue Jun 27 17:45:48 2017 Return-Path: Delivered-To: svn-src-all@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 DA1B6D8C42B; Tue, 27 Jun 2017 17:45:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A86537681D; Tue, 27 Jun 2017 17:45:48 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHjldS033872; Tue, 27 Jun 2017 17:45:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHjls0033871; Tue, 27 Jun 2017 17:45:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706271745.v5RHjls0033871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 27 Jun 2017 17:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320418 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 320418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:45:49 -0000 Author: np Date: Tue Jun 27 17:45:47 2017 New Revision: 320418 URL: https://svnweb.freebsd.org/changeset/base/320418 Log: cxgbe/iw_cxgbe: Catch up with r319722. The socket lock is not the same as the lock for the receive buffer any more. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 27 17:45:26 2017 (r320417) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 27 17:45:47 2017 (r320418) @@ -622,11 +622,10 @@ init_iwarp_socket(struct socket *so, void *arg) struct sockopt sopt; int on = 1; - /* Note that SOCK_LOCK(so) is same as SOCKBUF_LOCK(&so->so_rcv) */ - SOCK_LOCK(so); + SOCKBUF_LOCK(&so->so_rcv); soupcall_set(so, SO_RCV, c4iw_so_upcall, arg); so->so_state |= SS_NBIO; - SOCK_UNLOCK(so); + SOCKBUF_UNLOCK(&so->so_rcv); sopt.sopt_dir = SOPT_SET; sopt.sopt_level = IPPROTO_TCP; sopt.sopt_name = TCP_NODELAY; From owner-svn-src-all@freebsd.org Tue Jun 27 17:48:12 2017 Return-Path: Delivered-To: svn-src-all@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 BA373D8C663; Tue, 27 Jun 2017 17:48:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 89A0D76C17; Tue, 27 Jun 2017 17:48:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHmBnA034106; Tue, 27 Jun 2017 17:48:11 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHmBR3034105; Tue, 27 Jun 2017 17:48:11 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706271748.v5RHmBR3034105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 27 Jun 2017 17:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320419 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 320419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:48:12 -0000 Author: np Date: Tue Jun 27 17:48:11 2017 New Revision: 320419 URL: https://svnweb.freebsd.org/changeset/base/320419 Log: cxgbe/iw_cxgbe: Disable debug output by default. The help text for the sysctl already says that the default is 0. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 27 17:45:47 2017 (r320418) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 27 17:48:11 2017 (r320419) @@ -881,7 +881,7 @@ static int enable_tcp_window_scaling = 1; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, enable_tcp_window_scaling, CTLFLAG_RWTUN, &enable_tcp_window_scaling, 0, "Enable tcp window scaling (default = 1)"); -int c4iw_debug = 1; +int c4iw_debug = 0; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, c4iw_debug, CTLFLAG_RWTUN, &c4iw_debug, 0, "Enable debug logging (default = 0)"); From owner-svn-src-all@freebsd.org Tue Jun 27 17:55:27 2017 Return-Path: Delivered-To: svn-src-all@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 3175AD8C918; Tue, 27 Jun 2017 17:55:27 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 F28B3771AB; Tue, 27 Jun 2017 17:55:26 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RHtQxt038310; Tue, 27 Jun 2017 17:55:26 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RHtQ51038309; Tue, 27 Jun 2017 17:55:26 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201706271755.v5RHtQ51038309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 27 Jun 2017 17:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320420 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 320420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 17:55:27 -0000 Author: ken Date: Tue Jun 27 17:55:25 2017 New Revision: 320420 URL: https://svnweb.freebsd.org/changeset/base/320420 Log: In scsi_zbc_in(), fill in the length in the ZBC IN CDB. Without the allocation length set, the target will either reject the command or complete it without transferring any data. This fixes the REPORT ZONES command for SCSI ZBC protocol devices, as well as ATA ZAC protocol devices that are behind a SCSI to ATA translation layer. (LSI/Broadcom's 12Gb SAS adapters translate ZBC commands to ZAC commands.) Those are Host Aware and Host Managed SMR drives. This will fix REPORT ZONE commands sent to the da(4) driver via the GEOM bio interface and zonectl, and REPORT ZONE commands sent from camcontrol(8). Note that in the case of camcontrol(8), we currently only send SCSI ZBC commands to native SCSI protocol devices, not ATA devices behind a SAT layer. sys/cam/scsi/scsi_da.c: Fill in the length field in scsi_zbc_in(). MFC after: 3 days Sponsored by: Spectra Logic Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jun 27 17:48:11 2017 (r320419) +++ head/sys/cam/scsi/scsi_da.c Tue Jun 27 17:55:25 2017 (r320420) @@ -5804,6 +5804,7 @@ scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries, scsi_cmd = (struct scsi_zbc_in *)&csio->cdb_io.cdb_bytes; scsi_cmd->opcode = ZBC_IN; scsi_cmd->service_action = service_action; + scsi_ulto4b(dxfer_len, scsi_cmd->length); scsi_u64to8b(zone_start_lba, scsi_cmd->zone_start_lba); scsi_cmd->zone_options = zone_options; From owner-svn-src-all@freebsd.org Tue Jun 27 19:26:03 2017 Return-Path: Delivered-To: svn-src-all@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 F0BCDD8E770; Tue, 27 Jun 2017 19:26:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BFD0879F9A; Tue, 27 Jun 2017 19:26:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RJQ278074735; Tue, 27 Jun 2017 19:26:02 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RJQ25Y074734; Tue, 27 Jun 2017 19:26:02 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201706271926.v5RJQ25Y074734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 27 Jun 2017 19:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320421 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 320421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 19:26:04 -0000 Author: ken Date: Tue Jun 27 19:26:02 2017 New Revision: 320421 URL: https://svnweb.freebsd.org/changeset/base/320421 Log: Fix a panic in camperiphfree(). If a peripheral driver (e.g. da, sa, cd) is added or removed from the peripheral driver list while an unrelated peripheral driver instance (e.g. da0, sa5, cd2) is going away and is inside camperiphfree(), we could dereference an invalid pointer. When peripheral drivers are added or removed (see periphdriver_register() and periphdriver_unregister()), the peripheral driver array is resized and existing entries are moved. Although we hold the topology lock while we traverse the peripheral driver list, we retain a pointer to the location of the peripheral driver pointer and then drop the topology lock. So we are still vulnerable to the list getting moved around while the lock is dropped. To solve the problem, cache a copy of the peripheral driver pointer. If its storage location in the list changes while we have the lock dropped, it won't have any effect. This doesn't solve the issue that peripheral drivers ("da", "cd", as opposed to individual instances like "da0", "cd0") are not generally part of a reference counting scheme to guard against deregistering them while there are instances active. The caller (generally the person unloading a module) has to be aware of active drivers and not unload something that is in use. sys/cam/cam_periph.c: In camperiphfree(), cache a pointer to the peripheral driver instance to avoid holding a pointer to an invalid memory location in the event that the peripheral driver list changes while we have the topology lock dropped. PR: kern/219701 Submitted by: avg MFC after: 3 days Sponsored by: Spectra Logic Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Jun 27 17:55:25 2017 (r320420) +++ head/sys/cam/cam_periph.c Tue Jun 27 19:26:02 2017 (r320421) @@ -661,6 +661,7 @@ static void camperiphfree(struct cam_periph *periph) { struct periph_driver **p_drv; + struct periph_driver *drv; cam_periph_assert(periph, MA_OWNED); KASSERT(periph->periph_allocating == 0, ("%s%d: freed while allocating", @@ -673,6 +674,15 @@ camperiphfree(struct cam_periph *periph) printf("camperiphfree: attempt to free non-existant periph\n"); return; } + /* + * Cache a pointer to the periph_driver structure. If a + * periph_driver is added or removed from the array (see + * periphdriver_register()) while we drop the toplogy lock + * below, p_drv may change. This doesn't protect against this + * particular periph_driver going away. That will require full + * reference counting in the periph_driver infrastructure. + */ + drv = *p_drv; /* * We need to set this flag before dropping the topology lock, to @@ -708,8 +718,8 @@ camperiphfree(struct cam_periph *periph) */ xpt_lock_buses(); - TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links); - (*p_drv)->generation++; + TAILQ_REMOVE(&drv->units, periph, unit_links); + drv->generation++; xpt_remove_periph(periph); From owner-svn-src-all@freebsd.org Tue Jun 27 20:12:15 2017 Return-Path: Delivered-To: svn-src-all@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 634CBD8F4E1; Tue, 27 Jun 2017 20:12:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2DD427B56F; Tue, 27 Jun 2017 20:12:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RKCE8W094834; Tue, 27 Jun 2017 20:12:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RKCE6b094833; Tue, 27 Jun 2017 20:12:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706272012.v5RKCE6b094833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 27 Jun 2017 20:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320422 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:12:15 -0000 Author: kib Date: Tue Jun 27 20:12:13 2017 New Revision: 320422 URL: https://svnweb.freebsd.org/changeset/base/320422 Log: Do not ignore an error from vm_mmap_object(). Found and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Tue Jun 27 19:26:02 2017 (r320421) +++ head/sys/kern/uipc_shm.c Tue Jun 27 20:12:13 2017 (r320422) @@ -926,7 +926,7 @@ shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *a shmfd->shm_object, foff, FALSE, td); if (error != 0) vm_object_deallocate(shmfd->shm_object); - return (0); + return (error); } static int From owner-svn-src-all@freebsd.org Tue Jun 27 20:21:24 2017 Return-Path: Delivered-To: svn-src-all@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 7F0D0D8F9D9; Tue, 27 Jun 2017 20:21:24 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (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 44D8F7BC86; Tue, 27 Jun 2017 20:21:24 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 11C10D1F65; Tue, 27 Jun 2017 22:21:12 +0200 (CEST) Subject: Re: svn commit: r320043 - in head: contrib/netbsd-tests/kernel/kqueue lib/libc/include lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kqueue/libkqueue usr.bin/truss To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706170057.v5H0vQq5057383@repo.freebsd.org> From: Andreas Tobler Message-ID: Date: Tue, 27 Jun 2017 22:21:42 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706170057.v5H0vQq5057383@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:21:24 -0000 Hi Kib, On 17.06.17 02:57, Konstantin Belousov wrote: > Author: kib > Date: Sat Jun 17 00:57:26 2017 > New Revision: 320043 > URL: https://svnweb.freebsd.org/changeset/base/320043 > > Log: > Add abstime kqueue(2) timers and expand struct kevent members. > > This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which > specifies that the data field contains absolute time to fire the > event. > > To make this useful, data member of the struct kevent must be extended > to 64bit. Using the opportunity, I also added ext members. This > changes struct kevent almost to Apple struct kevent64, except I did > not changed type of ident and udata, the later would cause serious API > incompatibilities. > > The type of ident was kept uintptr_t since EVFILT_AIO returns a > pointer in this field, and e.g. CHERI is sensitive to the type > (discussed with brooks, jhb). > > Unlike Apple kevent64, symbol versioning allows us to claim ABI > compatibility and still name the new syscall kevent(2). Compat shims > are provided for both host native and compat32. > > Requested by: bapt > Reviewed by: bapt, brooks, ngie (previous version) > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D11025 This, or one of the following commits breaks my nfs mounts on powerpc64. With the following I mean, 320044-46. The last working revision is 320038. With this revision I get this error: RPCPROG_NFS: RPC: Port mapper failure - RPC: Unable to receive Boot is ok beside not having nfs. Right now I build the latest trunk to be sure to test against jhibbit's latest commit in this area. But I do not expect a change. Any idea where to look for suspects? TIA, Andreas From owner-svn-src-all@freebsd.org Tue Jun 27 20:24:27 2017 Return-Path: Delivered-To: svn-src-all@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 487A0D8FBC1; Tue, 27 Jun 2017 20:24:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 095FF7BEA7; Tue, 27 Jun 2017 20:24:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RKOQDo099084; Tue, 27 Jun 2017 20:24:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RKOPXc099080; Tue, 27 Jun 2017 20:24:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706272024.v5RKOPXc099080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 27 Jun 2017 20:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320423 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 320423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:24:27 -0000 Author: imp Date: Tue Jun 27 20:24:25 2017 New Revision: 320423 URL: https://svnweb.freebsd.org/changeset/base/320423 Log: Move 128-bit integer routines to util.c so they can be used by more than just the log page code. Sponsored by: Netflix, Inc Submitted by: Matt Williams (via D11330) Added: head/sbin/nvmecontrol/util.c (contents, props changed) Modified: head/sbin/nvmecontrol/Makefile head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.h Modified: head/sbin/nvmecontrol/Makefile ============================================================================== --- head/sbin/nvmecontrol/Makefile Tue Jun 27 20:12:13 2017 (r320422) +++ head/sbin/nvmecontrol/Makefile Tue Jun 27 20:24:25 2017 (r320423) @@ -3,7 +3,7 @@ PACKAGE=runtime PROG= nvmecontrol SRCS= nvmecontrol.c devlist.c firmware.c identify.c logpage.c \ - perftest.c reset.c nvme_util.c power.c wdc.c + perftest.c reset.c nvme_util.c power.c util.c wdc.c MAN= nvmecontrol.8 .PATH: ${SRCTOP}/sys/dev/nvme Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Tue Jun 27 20:12:13 2017 (r320422) +++ head/sbin/nvmecontrol/logpage.c Tue Jun 27 20:24:25 2017 (r320423) @@ -80,54 +80,6 @@ print_bin(void *data, uint32_t length) write(STDOUT_FILENO, data, length); } -/* - * 128-bit integer augments to standard values. On i386 this - * doesn't exist, so we use 64-bit values. The 128-bit counters - * are crazy anyway, since for this purpose, you'd need a - * billion IOPs for billions of seconds to overflow them. - * So, on 32-bit i386, you'll get truncated values. - */ -#define UINT128_DIG 39 -#ifdef __i386__ -typedef uint64_t uint128_t; -#else -typedef __uint128_t uint128_t; -#endif - -static inline uint128_t -to128(void *p) -{ - return *(uint128_t *)p; -} - -static char * -uint128_to_str(uint128_t u, char *buf, size_t buflen) -{ - char *end = buf + buflen - 1; - - *end-- = '\0'; - if (u == 0) - *end-- = '0'; - while (u && end >= buf) { - *end-- = u % 10 + '0'; - u /= 10; - } - end++; - if (u != 0) - return NULL; - - return end; -} - -/* "Missing" from endian.h */ -static __inline uint64_t -le48dec(const void *pp) -{ - uint8_t const *p = (uint8_t const *)pp; - - return (((uint64_t)le16dec(p + 4) << 32) | le32dec(p)); -} - static void * get_log_buffer(uint32_t size) { Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Tue Jun 27 20:12:13 2017 (r320422) +++ head/sbin/nvmecontrol/nvmecontrol.h Tue Jun 27 20:24:25 2017 (r320423) @@ -88,5 +88,27 @@ void read_logpage(int fd, uint8_t log_page, int nsid, void gen_usage(struct nvme_function *); void dispatch(int argc, char *argv[], struct nvme_function *f); +/* Utility Routines */ +/* + * 128-bit integer augments to standard values. On i386 this + * doesn't exist, so we use 64-bit values. So, on 32-bit i386, + * you'll get truncated values until someone implement 128bit + * ints in sofware. + */ +#define UINT128_DIG 39 +#ifdef __i386__ +typedef uint64_t uint128_t; +#else +typedef __uint128_t uint128_t; #endif +static __inline uint128_t +to128(void *p) +{ + return *(uint128_t *)p; +} + +uint64_t le48dec(const void *pp); +char * uint128_to_str(uint128_t u, char *buf, size_t buflen); + +#endif Added: head/sbin/nvmecontrol/util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/nvmecontrol/util.c Tue Jun 27 20:24:25 2017 (r320423) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2017 Netflix, Inc + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "nvmecontrol.h" + +char * +uint128_to_str(uint128_t u, char *buf, size_t buflen) +{ + char *end = buf + buflen - 1; + + *end-- = '\0'; + if (u == 0) + *end-- = '0'; + while (u && end >= buf) { + *end-- = u % 10 + '0'; + u /= 10; + } + end++; + if (u != 0) + return NULL; + + return end; +} + +/* "Missing" from endian.h */ +uint64_t +le48dec(const void *pp) +{ + uint8_t const *p = (uint8_t const *)pp; + + return (((uint64_t)le16dec(p + 4) << 32) | le32dec(p)); +} From owner-svn-src-all@freebsd.org Tue Jun 27 20:24:40 2017 Return-Path: Delivered-To: svn-src-all@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 B7D11D8FC00; Tue, 27 Jun 2017 20:24:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 81C657BF67; Tue, 27 Jun 2017 20:24:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RKOdZv099141; Tue, 27 Jun 2017 20:24:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RKOdVJ099140; Tue, 27 Jun 2017 20:24:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706272024.v5RKOdVJ099140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 27 Jun 2017 20:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320424 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 320424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:24:40 -0000 Author: imp Date: Tue Jun 27 20:24:39 2017 New Revision: 320424 URL: https://svnweb.freebsd.org/changeset/base/320424 Log: Add new definitions for namespaces. Sponsored by: Netflix Submitted by: Matt Williams (via D11330) Modified: head/sys/dev/nvme/nvme.h Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Tue Jun 27 20:24:25 2017 (r320423) +++ head/sys/dev/nvme/nvme.h Tue Jun 27 20:24:39 2017 (r320424) @@ -341,9 +341,11 @@ enum nvme_admin_opcode { NVME_OPC_GET_FEATURES = 0x0a, /* 0x0b - reserved */ NVME_OPC_ASYNC_EVENT_REQUEST = 0x0c, - /* 0x0d-0x0f - reserved */ + NVME_OPC_NAMESPACE_MANAGEMENT = 0x0d, + /* 0x0e-0x0f - reserved */ NVME_OPC_FIRMWARE_ACTIVATE = 0x10, NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD = 0x11, + NVME_OPC_NAMESPACE_ATTACHMENT = 0x15, NVME_OPC_FORMAT_NVM = 0x80, NVME_OPC_SECURITY_SEND = 0x81, @@ -456,8 +458,11 @@ struct nvme_controller_data { /** maximum data transfer size */ uint8_t mdts; - uint8_t reserved1[178]; + /** Controller ID */ + uint16_t ctrlr_id; + uint8_t reserved1[176]; + /* bytes 256-511: admin command set attributes */ /** optional admin command support */ @@ -471,7 +476,10 @@ struct nvme_controller_data { /* supports firmware activate/download commands */ uint16_t firmware : 1; - uint16_t oacs_rsvd : 13; + /* supports namespace management commands */ + uint16_t nsmgmt : 1; + + uint16_t oacs_rsvd : 12; } __packed oacs; /** abort command limit */ @@ -513,8 +521,16 @@ struct nvme_controller_data { uint8_t avscc_rsvd : 7; } __packed avscc; - uint8_t reserved2[247]; + uint8_t reserved2[15]; + /** Name space capabilities */ + struct { + /* if nsmgmt, report tnvmcap and unvmcap */ + uint8_t tnvmcap[16]; + uint8_t unvmcap[16]; + } __packed untncap; + + uint8_t reserved3[200]; /* bytes 512-703: nvm command set attributes */ /** submission queue entry size */ @@ -529,7 +545,7 @@ struct nvme_controller_data { uint8_t max : 4; } __packed cqes; - uint8_t reserved3[2]; + uint8_t reserved4[2]; /** number of namespaces */ uint32_t nn; @@ -555,10 +571,10 @@ struct nvme_controller_data { } __packed vwc; /* TODO: flesh out remaining nvm command set attributes */ - uint8_t reserved4[178]; + uint8_t reserved5[178]; /* bytes 704-2047: i/o command set attributes */ - uint8_t reserved5[1344]; + uint8_t reserved6[1344]; /* bytes 2048-3071: power state descriptors */ struct nvme_power_state power_state[32]; From owner-svn-src-all@freebsd.org Tue Jun 27 20:24:45 2017 Return-Path: Delivered-To: svn-src-all@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 C5782D8FC2C; Tue, 27 Jun 2017 20:24:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7951A7BFDB; Tue, 27 Jun 2017 20:24:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RKOiYU099193; Tue, 27 Jun 2017 20:24:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RKOiZa099192; Tue, 27 Jun 2017 20:24:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706272024.v5RKOiZa099192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 27 Jun 2017 20:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320425 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 320425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:24:45 -0000 Author: imp Date: Tue Jun 27 20:24:44 2017 New Revision: 320425 URL: https://svnweb.freebsd.org/changeset/base/320425 Log: Report some aspects of namespaces and namespace support in identify command. Sponsored by: Netflix Submitted by: Matt Williams (via D11330) Modified: head/sbin/nvmecontrol/identify.c Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Tue Jun 27 20:24:39 2017 (r320424) +++ head/sbin/nvmecontrol/identify.c Tue Jun 27 20:24:44 2017 (r320425) @@ -44,6 +44,7 @@ static void print_controller(struct nvme_controller_data *cdata) { uint8_t str[128]; + char cbuf[UINT128_DIG + 1]; printf("Controller Capabilities/Features\n"); printf("================================\n"); @@ -65,8 +66,8 @@ print_controller(struct nvme_controller_data *cdata) printf("Unlimited\n"); else printf("%d\n", PAGE_SIZE * (1 << cdata->mdts)); - printf("\n"); + printf("\n"); printf("Admin Command Set Attributes\n"); printf("============================\n"); printf("Security Send/Receive: %s\n", @@ -75,6 +76,8 @@ print_controller(struct nvme_controller_data *cdata) cdata->oacs.format ? "Supported" : "Not Supported"); printf("Firmware Activate/Download: %s\n", cdata->oacs.firmware ? "Supported" : "Not Supported"); + printf("Namespace Managment: %s\n", + cdata->oacs.nsmgmt ? "Supported" : "Not Supported"); printf("Abort Command Limit: %d\n", cdata->acl+1); printf("Async Event Request Limit: %d\n", cdata->aerl+1); printf("Number of Firmware Slots: "); @@ -91,8 +94,8 @@ print_controller(struct nvme_controller_data *cdata) cdata->lpa.ns_smart ? "Yes" : "No"); printf("Error Log Page Entries: %d\n", cdata->elpe+1); printf("Number of Power States: %d\n", cdata->npss+1); - printf("\n"); + printf("\n"); printf("NVM Command Set Attributes\n"); printf("==========================\n"); printf("Submission Queue Entry Size\n"); @@ -110,6 +113,16 @@ print_controller(struct nvme_controller_data *cdata) cdata->oncs.dsm ? "Supported" : "Not Supported"); printf("Volatile Write Cache: %s\n", cdata->vwc.present ? "Present" : "Not Present"); + + if (cdata->oacs.nsmgmt) { + printf("\n"); + printf("Namespace Drive Attributes\n"); + printf("==========================\n"); + printf("NVM total cap: %s\n", + uint128_to_str(to128(cdata->untncap.tnvmcap), cbuf, sizeof(cbuf))); + printf("NVM unallocated cap: %s\n", + uint128_to_str(to128(cdata->untncap.unvmcap), cbuf, sizeof(cbuf))); + } } static void From owner-svn-src-all@freebsd.org Tue Jun 27 20:43:37 2017 Return-Path: Delivered-To: svn-src-all@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 62FAAD9010E; Tue, 27 Jun 2017 20:43:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 01E947C8F9; Tue, 27 Jun 2017 20:43:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5RKhUgg068432 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Jun 2017 23:43:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5RKhUgg068432 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5RKhUZV068431; Tue, 27 Jun 2017 23:43:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Jun 2017 23:43:30 +0300 From: Konstantin Belousov To: Andreas Tobler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320043 - in head: contrib/netbsd-tests/kernel/kqueue lib/libc/include lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kqueue/libkqueue usr.bin/truss Message-ID: <20170627204330.GI3437@kib.kiev.ua> References: <201706170057.v5H0vQq5057383@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:43:37 -0000 On Tue, Jun 27, 2017 at 10:21:42PM +0200, Andreas Tobler wrote: > Hi Kib, > > On 17.06.17 02:57, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Jun 17 00:57:26 2017 > > New Revision: 320043 > > URL: https://svnweb.freebsd.org/changeset/base/320043 > > > > Log: > > Add abstime kqueue(2) timers and expand struct kevent members. > > > > This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which > > specifies that the data field contains absolute time to fire the > > event. > > > > To make this useful, data member of the struct kevent must be extended > > to 64bit. Using the opportunity, I also added ext members. This > > changes struct kevent almost to Apple struct kevent64, except I did > > not changed type of ident and udata, the later would cause serious API > > incompatibilities. > > > > The type of ident was kept uintptr_t since EVFILT_AIO returns a > > pointer in this field, and e.g. CHERI is sensitive to the type > > (discussed with brooks, jhb). > > > > Unlike Apple kevent64, symbol versioning allows us to claim ABI > > compatibility and still name the new syscall kevent(2). Compat shims > > are provided for both host native and compat32. > > > > Requested by: bapt > > Reviewed by: bapt, brooks, ngie (previous version) > > Sponsored by: The FreeBSD Foundation > > Differential revision: https://reviews.freebsd.org/D11025 > > This, or one of the following commits breaks my nfs mounts on powerpc64. > With the following I mean, 320044-46. The last working revision is 320038. > > With this revision I get this error: > > RPCPROG_NFS: RPC: Port mapper failure - RPC: Unable to receive > > Boot is ok beside not having nfs. > > Right now I build the latest trunk to be sure to test against jhibbit's > latest commit in this area. But I do not expect a change. > > Any idea where to look for suspects? Start with ktrace-ing the mount command, assuming the direct invocation of mount_nfs(8) fails. Did you rebuilt the world after the update ? It should work both ways, but knowing the answer trims half of the change for suspect. Can you run the ktrace tests on ppc ? cd tests/sys/kqueue/libkqueue/ make ./kqtest From owner-svn-src-all@freebsd.org Tue Jun 27 20:54:42 2017 Return-Path: Delivered-To: svn-src-all@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 08595D90330; Tue, 27 Jun 2017 20:54:42 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (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 9CEC17CDEE; Tue, 27 Jun 2017 20:54:41 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id BABEED246C; Tue, 27 Jun 2017 22:54:39 +0200 (CEST) Subject: Re: svn commit: r320043 - in head: contrib/netbsd-tests/kernel/kqueue lib/libc/include lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kqueue/libkqueue usr.bin/truss To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706170057.v5H0vQq5057383@repo.freebsd.org> <20170627204330.GI3437@kib.kiev.ua> From: Andreas Tobler Message-ID: <9d6198ea-d0a3-8553-a2ef-a0f2824a4315@FreeBSD.org> Date: Tue, 27 Jun 2017 22:55:10 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170627204330.GI3437@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 20:54:42 -0000 On 27.06.17 22:43, Konstantin Belousov wrote: > On Tue, Jun 27, 2017 at 10:21:42PM +0200, Andreas Tobler wrote: >> Hi Kib, >> >> On 17.06.17 02:57, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sat Jun 17 00:57:26 2017 >>> New Revision: 320043 >>> URL: https://svnweb.freebsd.org/changeset/base/320043 >>> >>> Log: >>> Add abstime kqueue(2) timers and expand struct kevent members. >>> >>> This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which >>> specifies that the data field contains absolute time to fire the >>> event. >>> >>> To make this useful, data member of the struct kevent must be extended >>> to 64bit. Using the opportunity, I also added ext members. This >>> changes struct kevent almost to Apple struct kevent64, except I did >>> not changed type of ident and udata, the later would cause serious API >>> incompatibilities. >>> >>> The type of ident was kept uintptr_t since EVFILT_AIO returns a >>> pointer in this field, and e.g. CHERI is sensitive to the type >>> (discussed with brooks, jhb). >>> >>> Unlike Apple kevent64, symbol versioning allows us to claim ABI >>> compatibility and still name the new syscall kevent(2). Compat shims >>> are provided for both host native and compat32. >>> >>> Requested by: bapt >>> Reviewed by: bapt, brooks, ngie (previous version) >>> Sponsored by: The FreeBSD Foundation >>> Differential revision: https://reviews.freebsd.org/D11025 >> >> This, or one of the following commits breaks my nfs mounts on powerpc64. >> With the following I mean, 320044-46. The last working revision is 320038. >> >> With this revision I get this error: >> >> RPCPROG_NFS: RPC: Port mapper failure - RPC: Unable to receive >> >> Boot is ok beside not having nfs. >> >> Right now I build the latest trunk to be sure to test against jhibbit's >> latest commit in this area. But I do not expect a change. >> >> Any idea where to look for suspects? > > Start with ktrace-ing the mount command, assuming the direct invocation of > mount_nfs(8) fails. Hm, if you could give me some hands-on? How do I do that? > Did you rebuilt the world after the update ? It should work both ways, > but knowing the answer trims half of the change for suspect. I built world and kernel in a clean env. rm -rf the obj part. The whole boot is done via nfs. I do boot the tree via netboot, crossbuilt on amd64. The machine is shot I can not boot from disk atm. With the r320421, the picture is the same, as expected. > Can you run the ktrace tests on ppc ? > cd tests/sys/kqueue/libkqueue/ > make > ./kqtest This is chicken and egg, my src is on the nfs drive :( I'll check-out a src tree on this machine tomorrow and do test build/run. Thx for the feedback! Andreas From owner-svn-src-all@freebsd.org Tue Jun 27 22:05:08 2017 Return-Path: Delivered-To: svn-src-all@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 0C1B3D9150B; Tue, 27 Jun 2017 22:05:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C00747EC59; Tue, 27 Jun 2017 22:05:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RM569G039727; Tue, 27 Jun 2017 22:05:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RM56cc039726; Tue, 27 Jun 2017 22:05:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706272205.v5RM56cc039726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 27 Jun 2017 22:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320426 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 320426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 22:05:08 -0000 Author: np Date: Tue Jun 27 22:05:06 2017 New Revision: 320426 URL: https://svnweb.freebsd.org/changeset/base/320426 Log: cxgbe/t4_tom: Do not include space taken by the TCP timestamp option in the "effective MSS" for the connection. The chip expects it this way. Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 27 20:24:44 2017 (r320425) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 27 22:05:06 2017 (r320426) @@ -332,6 +332,8 @@ assign_rxopt(struct tcpcb *tp, unsigned int opt) n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); else n = sizeof(struct ip) + sizeof(struct tcphdr); + if (V_tcp_do_rfc1323) + n += TCPOLEN_TSTAMP_APPA; tp->t_maxseg = sc->params.mtus[G_TCPOPT_MSS(opt)] - n; CTR4(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u)", __func__, toep->tid, From owner-svn-src-all@freebsd.org Wed Jun 28 00:50:53 2017 Return-Path: Delivered-To: svn-src-all@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 00182D940E3; Wed, 28 Jun 2017 00:50:52 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B98D583A0C; Wed, 28 Jun 2017 00:50:52 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S0opVn007151; Wed, 28 Jun 2017 00:50:51 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S0opjD007150; Wed, 28 Jun 2017 00:50:51 GMT (envelope-from grog@FreeBSD.org) Message-Id: <201706280050.v5S0opjD007150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Wed, 28 Jun 2017 00:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320427 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 320427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 00:50:53 -0000 Author: grog Date: Wed Jun 28 00:50:51 2017 New Revision: 320427 URL: https://svnweb.freebsd.org/changeset/base/320427 Log: Spelling. Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Tue Jun 27 22:05:06 2017 (r320426) +++ head/usr.bin/calendar/calendars/calendar.history Wed Jun 28 00:50:51 2017 (r320427) @@ -190,7 +190,7 @@ 06/26 Toothbrush invented, 1498 06/27 100 degrees, Fort Yukon, 1915 06/27 Bill Graham closes the Fillmore East, 1971 -06/28 Supreme Court decides in favor of Alan Bakke, 1978 +06/28 Supreme Court decides in favor of Allan Bakke, 1978 06/30 "That" explosion in Siberia, 1908 06/30 China and Soviet Union announce split over ideology, 1960 07/01 Battle of Gettysburg begins, 1863 From owner-svn-src-all@freebsd.org Wed Jun 28 02:30:33 2017 Return-Path: Delivered-To: svn-src-all@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 EADD1D959C7; Wed, 28 Jun 2017 02:30:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A820613D4; Wed, 28 Jun 2017 02:30:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S2UWFt046957; Wed, 28 Jun 2017 02:30:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S2UWWL046956; Wed, 28 Jun 2017 02:30:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706280230.v5S2UWWL046956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 28 Jun 2017 02:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320428 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 320428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 02:30:34 -0000 Author: cy Date: Wed Jun 28 02:30:32 2017 New Revision: 320428 URL: https://svnweb.freebsd.org/changeset/base/320428 Log: In poolnodecommand() (ippool -a and ippool -r) -m (pool name) is not optional. Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Wed Jun 28 00:50:51 2017 (r320427) +++ head/contrib/ipfilter/tools/ippool.c Wed Jun 28 02:30:32 2017 (r320428) @@ -75,7 +75,7 @@ usage(prog) char *prog; { fprintf(stderr, "Usage:\t%s\n", prog); - fprintf(stderr, "\t-a [-dnv] [-m ] [-o ] [-t type] [-T ttl] -i [/netmask]\n"); + fprintf(stderr, "\t-a [-dnv] -m [-o ] [-t type] [-T ttl] -i [/netmask]\n"); fprintf(stderr, "\t-A [-dnv] [-m ] [-o ] [-S ] [-t ]\n"); fprintf(stderr, "\t-f [-dnuv]\n"); fprintf(stderr, "\t-F [-dv] [-o ] [-t ]\n"); From owner-svn-src-all@freebsd.org Wed Jun 28 03:47:09 2017 Return-Path: Delivered-To: svn-src-all@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 2F240D96FDE; Wed, 28 Jun 2017 03:47:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 BBEB03B67; Wed, 28 Jun 2017 03:47:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5S3l2DF062641 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 28 Jun 2017 06:47:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5S3l2DF062641 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5S3l2FP062640; Wed, 28 Jun 2017 06:47:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 28 Jun 2017 06:47:02 +0300 From: Konstantin Belousov To: Andreas Tobler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320043 - in head: contrib/netbsd-tests/kernel/kqueue lib/libc/include lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/kqueue/libkqueue usr.bin/truss Message-ID: <20170628034702.GK3437@kib.kiev.ua> References: <201706170057.v5H0vQq5057383@repo.freebsd.org> <20170627204330.GI3437@kib.kiev.ua> <9d6198ea-d0a3-8553-a2ef-a0f2824a4315@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d6198ea-d0a3-8553-a2ef-a0f2824a4315@FreeBSD.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 03:47:09 -0000 On Tue, Jun 27, 2017 at 10:55:10PM +0200, Andreas Tobler wrote: > On 27.06.17 22:43, Konstantin Belousov wrote: > > On Tue, Jun 27, 2017 at 10:21:42PM +0200, Andreas Tobler wrote: > >> Hi Kib, > >> > >> On 17.06.17 02:57, Konstantin Belousov wrote: > >>> Author: kib > >>> Date: Sat Jun 17 00:57:26 2017 > >>> New Revision: 320043 > >>> URL: https://svnweb.freebsd.org/changeset/base/320043 > >>> > >>> Log: > >>> Add abstime kqueue(2) timers and expand struct kevent members. > >>> > >>> This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which > >>> specifies that the data field contains absolute time to fire the > >>> event. > >>> > >>> To make this useful, data member of the struct kevent must be extended > >>> to 64bit. Using the opportunity, I also added ext members. This > >>> changes struct kevent almost to Apple struct kevent64, except I did > >>> not changed type of ident and udata, the later would cause serious API > >>> incompatibilities. > >>> > >>> The type of ident was kept uintptr_t since EVFILT_AIO returns a > >>> pointer in this field, and e.g. CHERI is sensitive to the type > >>> (discussed with brooks, jhb). > >>> > >>> Unlike Apple kevent64, symbol versioning allows us to claim ABI > >>> compatibility and still name the new syscall kevent(2). Compat shims > >>> are provided for both host native and compat32. > >>> > >>> Requested by: bapt > >>> Reviewed by: bapt, brooks, ngie (previous version) > >>> Sponsored by: The FreeBSD Foundation > >>> Differential revision: https://reviews.freebsd.org/D11025 > >> > >> This, or one of the following commits breaks my nfs mounts on powerpc64. > >> With the following I mean, 320044-46. The last working revision is 320038. > >> > >> With this revision I get this error: > >> > >> RPCPROG_NFS: RPC: Port mapper failure - RPC: Unable to receive > >> > >> Boot is ok beside not having nfs. > >> > >> Right now I build the latest trunk to be sure to test against jhibbit's > >> latest commit in this area. But I do not expect a change. > >> > >> Any idea where to look for suspects? > > > > Start with ktrace-ing the mount command, assuming the direct invocation of > > mount_nfs(8) fails. > > Hm, if you could give me some hands-on? How do I do that? mount_nfs server:/path /mnt If this fails with an RPC error, run it under ktrace and then show me kdump. Right now I do not undestand where does your error occur. Are you able to boot single-user ? > > > Did you rebuilt the world after the update ? It should work both ways, > > but knowing the answer trims half of the change for suspect. > > I built world and kernel in a clean env. rm -rf the obj part. > The whole boot is done via nfs. I do boot the tree via netboot, > crossbuilt on amd64. The machine is shot I can not boot from disk atm. > > With the r320421, the picture is the same, as expected. > > > Can you run the ktrace tests on ppc ? > > cd tests/sys/kqueue/libkqueue/ > > make > > ./kqtest > > This is chicken and egg, my src is on the nfs drive :( It is enough to checkout the libkqueue directory alone for this test to build and run. You can probably squeeze it into your boot nfs mount. From owner-svn-src-all@freebsd.org Wed Jun 28 04:01:30 2017 Return-Path: Delivered-To: svn-src-all@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 98D52D97486; Wed, 28 Jun 2017 04:01:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 730CF64498; Wed, 28 Jun 2017 04:01:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S41T6x086139; Wed, 28 Jun 2017 04:01:29 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S41TkD086135; Wed, 28 Jun 2017 04:01:29 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706280401.v5S41TkD086135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 28 Jun 2017 04:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320429 - in stable/11/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Commit-Revision: 320429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:01:30 -0000 Author: alc Date: Wed Jun 28 04:01:29 2017 New Revision: 320429 URL: https://svnweb.freebsd.org/changeset/base/320429 Log: MFC r314310 Refine the fix from r312954. Specifically, add a new PDE-only flag, PG_PROMOTED, that indicates whether lingering 4KB page mappings might need to be flushed on a PDE change that restricts or destroys a 2MB page mapping. This flag allows the pmap to avoid range invalidations that are both unnecessary and costly. Approved by: re (kib) Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/include/pmap.h stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/include/pmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Wed Jun 28 02:30:32 2017 (r320428) +++ stable/11/sys/amd64/amd64/pmap.c Wed Jun 28 04:01:29 2017 (r320429) @@ -613,6 +613,8 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, + pd_entry_t pde); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, @@ -1838,6 +1840,27 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_ } #endif /* !SMP */ +static void +pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde) +{ + + /* + * When the PDE has PG_PROMOTED set, the 2MB page mapping was created + * by a promotion that did not invalidate the 512 4KB page mappings + * that might exist in the TLB. Consequently, at this point, the TLB + * may hold both 4KB and 2MB page mappings for the address range [va, + * va + NBPDR). Therefore, the entire range must be invalidated here. + * In contrast, when PG_PROMOTED is clear, the TLB will not hold any + * 4KB page mappings for the address range [va, va + NBPDR), and so a + * single INVLPG suffices to invalidate the 2MB page mapping from the + * TLB. + */ + if ((pde & PG_PROMOTED) != 0) + pmap_invalidate_range(pmap, va, va + NBPDR - 1); + else + pmap_invalidate_page(pmap, va); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) void @@ -3472,7 +3495,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v SLIST_INIT(&free); sva = trunc_2mpage(va); pmap_remove_pde(pmap, pde, sva, &free, lockp); - pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); + if ((oldpde & PG_G) == 0) + pmap_invalidate_pde_page(pmap, sva, oldpde); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -3612,25 +3636,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse oldpde = pte_load_clear(pdq); if (oldpde & PG_W) pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; - - /* - * When workaround_erratum383 is false, a promotion to a 2M - * page mapping does not invalidate the 512 4K page mappings - * from the TLB. Consequently, at this point, the TLB may - * hold both 4K and 2M page mappings. Therefore, the entire - * range of addresses must be invalidated here. In contrast, - * when workaround_erratum383 is true, a promotion does - * invalidate the 512 4K page mappings, and so a single INVLPG - * suffices to invalidate the 2M page mapping. - */ - if ((oldpde & PG_G) != 0) { - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } - + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); @@ -4010,16 +4017,16 @@ retry: if ((prot & VM_PROT_EXECUTE) == 0) newpde |= pg_nx; if (newpde != oldpde) { - if (!atomic_cmpset_long(pde, oldpde, newpde)) + /* + * As an optimization to future operations on this PDE, clear + * PG_PROMOTED. The impending invalidation will remove any + * lingering 4KB page mappings from the TLB. + */ + if (!atomic_cmpset_long(pde, oldpde, newpde & ~PG_PROMOTED)) goto retry; - if (oldpde & PG_G) { - /* See pmap_remove_pde() for explanation. */ - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } else + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); + else anychanged = TRUE; } return (anychanged); @@ -4272,7 +4279,7 @@ setpte: if (workaround_erratum383) pmap_update_pde(pmap, va, pde, PG_PS | newpde); else - pde_store(pde, PG_PS | newpde); + pde_store(pde, PG_PROMOTED | PG_PS | newpde); atomic_add_long(&pmap_pde_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" @@ -4585,7 +4592,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); /* - * Map the superpage. + * Map the superpage. (This is not a promoted mapping; there will not + * be any lingering 4KB page mappings in the TLB.) */ pde_store(pde, newpde); Modified: stable/11/sys/amd64/include/pmap.h ============================================================================== --- stable/11/sys/amd64/include/pmap.h Wed Jun 28 02:30:32 2017 (r320428) +++ stable/11/sys/amd64/include/pmap.h Wed Jun 28 04:01:29 2017 (r320429) @@ -109,6 +109,7 @@ #define PG_MANAGED X86_PG_AVAIL2 #define EPT_PG_EMUL_V X86_PG_AVAIL(52) #define EPT_PG_EMUL_RW X86_PG_AVAIL(53) +#define PG_PROMOTED X86_PG_AVAIL(54) /* PDE only */ #define PG_FRAME (0x000ffffffffff000ul) #define PG_PS_FRAME (0x000fffffffe00000ul) Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Wed Jun 28 02:30:32 2017 (r320428) +++ stable/11/sys/i386/i386/pmap.c Wed Jun 28 04:01:29 2017 (r320429) @@ -301,6 +301,8 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_flush_page(vm_page_t m); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, + pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); @@ -1259,6 +1261,27 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_ } #endif /* !SMP */ +static void +pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde) +{ + + /* + * When the PDE has PG_PROMOTED set, the 2- or 4MB page mapping was + * created by a promotion that did not invalidate the 512 or 1024 4KB + * page mappings that might exist in the TLB. Consequently, at this + * point, the TLB may hold both 4KB and 2- or 4MB page mappings for + * the address range [va, va + NBPDR). Therefore, the entire range + * must be invalidated here. In contrast, when PG_PROMOTED is clear, + * the TLB will not hold any 4KB page mappings for the address range + * [va, va + NBPDR), and so a single INVLPG suffices to invalidate the + * 2- or 4MB page mapping from the TLB. + */ + if ((pde & PG_PROMOTED) != 0) + pmap_invalidate_range(pmap, va, va + NBPDR - 1); + else + pmap_invalidate_page(pmap, va); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) void @@ -2649,7 +2672,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse SLIST_INIT(&free); sva = trunc_4mpage(va); pmap_remove_pde(pmap, pde, sva, &free); - pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); + if ((oldpde & PG_G) == 0) + pmap_invalidate_pde_page(pmap, sva, oldpde); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); @@ -2819,23 +2843,9 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse /* * Machines that don't support invlpg, also don't support * PG_G. - * - * When workaround_erratum383 is false, a promotion to a 2M/4M - * page mapping does not invalidate the 512/1024 4K page mappings - * from the TLB. Consequently, at this point, the TLB may - * hold both 4K and 2M/4M page mappings. Therefore, the entire - * range of addresses must be invalidated here. In contrast, - * when workaround_erratum383 is true, a promotion does - * invalidate the 512/1024 4K page mappings, and so a single INVLPG - * suffices to invalidate the 2M/4M page mapping. */ - if ((oldpde & PG_G) != 0) { - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; if (oldpde & PG_MANAGED) { @@ -3143,16 +3153,16 @@ retry: newpde |= pg_nx; #endif if (newpde != oldpde) { - if (!pde_cmpset(pde, oldpde, newpde)) + /* + * As an optimization to future operations on this PDE, clear + * PG_PROMOTED. The impending invalidation will remove any + * lingering 4KB page mappings from the TLB. + */ + if (!pde_cmpset(pde, oldpde, newpde & ~PG_PROMOTED)) goto retry; - if (oldpde & PG_G) { - /* See pmap_remove_pde() for explanation. */ - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } else + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); + else anychanged = TRUE; } return (anychanged); @@ -3437,9 +3447,9 @@ setpte: if (workaround_erratum383) pmap_update_pde(pmap, va, pde, PG_PS | newpde); else if (pmap == kernel_pmap) - pmap_kenter_pde(va, PG_PS | newpde); + pmap_kenter_pde(va, PG_PROMOTED | PG_PS | newpde); else - pde_store(pde, PG_PS | newpde); + pde_store(pde, PG_PROMOTED | PG_PS | newpde); pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#x" @@ -3722,7 +3732,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; /* - * Map the superpage. + * Map the superpage. (This is not a promoted mapping; there will not + * be any lingering 4KB page mappings in the TLB.) */ pde_store(pde, newpde); Modified: stable/11/sys/i386/include/pmap.h ============================================================================== --- stable/11/sys/i386/include/pmap.h Wed Jun 28 02:30:32 2017 (r320428) +++ stable/11/sys/i386/include/pmap.h Wed Jun 28 04:01:29 2017 (r320429) @@ -71,6 +71,7 @@ /* Our various interpretations of the above */ #define PG_W PG_AVAIL1 /* "Wired" pseudoflag */ #define PG_MANAGED PG_AVAIL2 +#define PG_PROMOTED PG_AVAIL3 /* PDE only */ #if defined(PAE) || defined(PAE_TABLES) #define PG_FRAME (0x000ffffffffff000ull) #define PG_PS_FRAME (0x000fffffffe00000ull) From owner-svn-src-all@freebsd.org Wed Jun 28 04:02:38 2017 Return-Path: Delivered-To: svn-src-all@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 25380D97568; Wed, 28 Jun 2017 04:02:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 00DEC646BE; Wed, 28 Jun 2017 04:02:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S42bVK089190; Wed, 28 Jun 2017 04:02:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S42bQx089187; Wed, 28 Jun 2017 04:02:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706280402.v5S42bQx089187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jun 2017 04:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320430 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 320430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:02:38 -0000 Author: kib Date: Wed Jun 28 04:02:36 2017 New Revision: 320430 URL: https://svnweb.freebsd.org/changeset/base/320430 Log: Treat the addr argument for mmap(2) request without MAP_FIXED flag as a hint. Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted as the absolute minimal address of the range where the mapping is created. The VA allocator only allocates in the range [addr, VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call might unduly fail if there is no free addresses above addr but a lot of usable space below it. Lift this implementation limitation by allocating VA in two passes. First, try to allocate above addr, as before. If that fails, do the second pass with less restrictive constraints for the start of allocation by specifying minimal allocation address at the max bss end, if this limit is less than addr. One important case where this change makes a difference is the allocation of the stacks for new threads in libthr. Under some configuration conditions, libthr tries to hint kernel to reuse the main thread stack grow area for the new stacks. This cannot work by design now after grow area is converted to stack, and there is no unallocated VA above the main stack. Interpreting requested stack base address as the hint provides compatibility with old libthr and with (mis-)configured current libthr. Reviewed by: alc Tested by: dim (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jun 28 04:01:29 2017 (r320429) +++ head/sys/vm/vm_map.c Wed Jun 28 04:02:36 2017 (r320430) @@ -1556,6 +1556,25 @@ again: return (result); } +int +vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, + vm_offset_t *addr, vm_size_t length, vm_offset_t min_addr, + vm_offset_t max_addr, int find_space, vm_prot_t prot, vm_prot_t max, + int cow) +{ + vm_offset_t hint; + int rv; + + hint = *addr; + for (;;) { + rv = vm_map_find(map, object, offset, addr, length, max_addr, + find_space, prot, max, cow); + if (rv == KERN_SUCCESS || min_addr >= hint) + return (rv); + *addr = min_addr; + } +} + /* * vm_map_simplify_entry: * Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Wed Jun 28 04:01:29 2017 (r320429) +++ head/sys/vm/vm_map.h Wed Jun 28 04:02:36 2017 (r320430) @@ -372,6 +372,8 @@ vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_ int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, + vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); int vm_map_findspace (vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Jun 28 04:01:29 2017 (r320429) +++ head/sys/vm/vm_mmap.c Wed Jun 28 04:02:36 2017 (r320430) @@ -1438,10 +1438,12 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz vm_prot_t maxprot, int flags, vm_object_t object, vm_ooffset_t foff, boolean_t writecounted, struct thread *td) { - boolean_t fitit; + boolean_t curmap, fitit; + vm_offset_t max_addr; int docow, error, findspace, rv; - if (map == &td->td_proc->p_vmspace->vm_map) { + curmap = map == &td->td_proc->p_vmspace->vm_map; + if (curmap) { PROC_LOCK(td->td_proc); if (map->size + size > lim_cur_proc(td->td_proc, RLIMIT_VMEM)) { PROC_UNLOCK(td->td_proc); @@ -1529,11 +1531,20 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz MAP_ALIGNMENT_SHIFT); else findspace = VMFS_OPTIMAL_SPACE; - rv = vm_map_find(map, object, foff, addr, size, + max_addr = 0; #ifdef MAP_32BIT - flags & MAP_32BIT ? MAP_32BIT_MAX_ADDR : + if ((flags & MAP_32BIT) != 0) + max_addr = MAP_32BIT_MAX_ADDR; #endif - 0, findspace, prot, maxprot, docow); + if (curmap) { + rv = vm_map_find_min(map, object, foff, addr, size, + round_page((vm_offset_t)td->td_proc->p_vmspace-> + vm_daddr + lim_max(td, RLIMIT_DATA)), max_addr, + findspace, prot, maxprot, docow); + } else { + rv = vm_map_find(map, object, foff, addr, size, + max_addr, findspace, prot, maxprot, docow); + } } else { rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); From owner-svn-src-all@freebsd.org Wed Jun 28 04:19:56 2017 Return-Path: Delivered-To: svn-src-all@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 36B4FD97874; Wed, 28 Jun 2017 04:19:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 015D664B75; Wed, 28 Jun 2017 04:19:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S4JtAu093362; Wed, 28 Jun 2017 04:19:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S4JtbE093361; Wed, 28 Jun 2017 04:19:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706280419.v5S4JtbE093361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Jun 2017 04:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320431 - head/usr.sbin/watchdogd X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.sbin/watchdogd X-SVN-Commit-Revision: 320431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:19:56 -0000 Author: delphij Date: Wed Jun 28 04:19:54 2017 New Revision: 320431 URL: https://svnweb.freebsd.org/changeset/base/320431 Log: Chase malloc() change by removing lg_chunk malloc_conf settings. In jemalloc 5, there are no longer chunks, and as configured on FreeBSD (the "retain" option defaults to false), the mmap() requests are precisely sized for the specific needs, which means the virtual memory overhead should be lower for small applications. Reviewed by: jasone, ian Differential Revision: https://reviews.freebsd.org/D11366 Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Wed Jun 28 04:02:36 2017 (r320430) +++ head/usr.sbin/watchdogd/watchdogd.c Wed Jun 28 04:19:54 2017 (r320431) @@ -112,14 +112,6 @@ static struct option longopts[] = { }; /* - * Ask malloc() to map minimum-sized chunks of virtual address space at a time, - * so that mlockall() won't needlessly wire megabytes of unused memory into the - * process. This must be done using the malloc_conf string so that it gets set - * up before the first allocation, which happens before entry to main(). - */ -const char * malloc_conf = "lg_chunk:0"; - -/* * Periodically pat the watchdog, preventing it from firing. */ int From owner-svn-src-all@freebsd.org Wed Jun 28 04:23:22 2017 Return-Path: Delivered-To: svn-src-all@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 792C2D97A58; Wed, 28 Jun 2017 04:23:22 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3CE6664F19; Wed, 28 Jun 2017 04:23:22 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S4NLkA097074; Wed, 28 Jun 2017 04:23:21 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S4NLQA097070; Wed, 28 Jun 2017 04:23:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706280423.v5S4NLQA097070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 28 Jun 2017 04:23: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: r320432 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Commit-Revision: 320432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:23:22 -0000 Author: alc Date: Wed Jun 28 04:23:20 2017 New Revision: 320432 URL: https://svnweb.freebsd.org/changeset/base/320432 Log: MFC r314310 Refine the fix from r312954. Specifically, add a new PDE-only flag, PG_PROMOTED, that indicates whether lingering 4KB page mappings might need to be flushed on a PDE change that restricts or destroys a 2MB page mapping. This flag allows the pmap to avoid range invalidations that are both unnecessary and costly. Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/include/pmap.h stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Wed Jun 28 04:19:54 2017 (r320431) +++ stable/10/sys/amd64/amd64/pmap.c Wed Jun 28 04:23:20 2017 (r320432) @@ -455,6 +455,8 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, + pd_entry_t pde); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); @@ -1777,6 +1779,27 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_ } #endif /* !SMP */ +static void +pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde) +{ + + /* + * When the PDE has PG_PROMOTED set, the 2MB page mapping was created + * by a promotion that did not invalidate the 512 4KB page mappings + * that might exist in the TLB. Consequently, at this point, the TLB + * may hold both 4KB and 2MB page mappings for the address range [va, + * va + NBPDR). Therefore, the entire range must be invalidated here. + * In contrast, when PG_PROMOTED is clear, the TLB will not hold any + * 4KB page mappings for the address range [va, va + NBPDR), and so a + * single INVLPG suffices to invalidate the 2MB page mapping from the + * TLB. + */ + if ((pde & PG_PROMOTED) != 0) + pmap_invalidate_range(pmap, va, va + NBPDR - 1); + else + pmap_invalidate_page(pmap, va); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) void @@ -3418,7 +3441,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v SLIST_INIT(&free); sva = trunc_2mpage(va); pmap_remove_pde(pmap, pde, sva, &free, lockp); - pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); + if ((oldpde & PG_G) == 0) + pmap_invalidate_pde_page(pmap, sva, oldpde); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -3559,25 +3583,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse oldpde = pte_load_clear(pdq); if (oldpde & PG_W) pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; - - /* - * When workaround_erratum383 is false, a promotion to a 2M - * page mapping does not invalidate the 512 4K page mappings - * from the TLB. Consequently, at this point, the TLB may - * hold both 4K and 2M page mappings. Therefore, the entire - * range of addresses must be invalidated here. In contrast, - * when workaround_erratum383 is true, a promotion does - * invalidate the 512 4K page mappings, and so a single INVLPG - * suffices to invalidate the 2M page mapping. - */ - if ((oldpde & PG_G) != 0) { - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } - + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); @@ -3930,16 +3937,16 @@ retry: if ((prot & VM_PROT_EXECUTE) == 0) newpde |= pg_nx; if (newpde != oldpde) { - if (!atomic_cmpset_long(pde, oldpde, newpde)) + /* + * As an optimization to future operations on this PDE, clear + * PG_PROMOTED. The impending invalidation will remove any + * lingering 4KB page mappings from the TLB. + */ + if (!atomic_cmpset_long(pde, oldpde, newpde & ~PG_PROMOTED)) goto retry; - if (oldpde & PG_G) { - /* See pmap_remove_pde() for explanation. */ - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } else + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); + else anychanged = TRUE; } return (anychanged); @@ -4210,7 +4217,7 @@ setpte: if (workaround_erratum383) pmap_update_pde(pmap, va, pde, PG_PS | newpde); else - pde_store(pde, PG_PS | newpde); + pde_store(pde, PG_PROMOTED | PG_PS | newpde); atomic_add_long(&pmap_pde_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" @@ -4519,7 +4526,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); /* - * Map the superpage. + * Map the superpage. (This is not a promoted mapping; there will not + * be any lingering 4KB page mappings in the TLB.) */ pde_store(pde, newpde); Modified: stable/10/sys/amd64/include/pmap.h ============================================================================== --- stable/10/sys/amd64/include/pmap.h Wed Jun 28 04:19:54 2017 (r320431) +++ stable/10/sys/amd64/include/pmap.h Wed Jun 28 04:23:20 2017 (r320432) @@ -109,6 +109,7 @@ #define PG_MANAGED X86_PG_AVAIL2 #define EPT_PG_EMUL_V X86_PG_AVAIL(52) #define EPT_PG_EMUL_RW X86_PG_AVAIL(53) +#define PG_PROMOTED X86_PG_AVAIL(54) /* PDE only */ #define PG_FRAME (0x000ffffffffff000ul) #define PG_PS_FRAME (0x000fffffffe00000ul) Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Wed Jun 28 04:19:54 2017 (r320431) +++ stable/10/sys/i386/i386/pmap.c Wed Jun 28 04:23:20 2017 (r320432) @@ -317,6 +317,8 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_flush_page(vm_page_t m); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, + pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); @@ -1215,6 +1217,27 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_ } #endif /* !SMP */ +static void +pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde) +{ + + /* + * When the PDE has PG_PROMOTED set, the 2- or 4MB page mapping was + * created by a promotion that did not invalidate the 512 or 1024 4KB + * page mappings that might exist in the TLB. Consequently, at this + * point, the TLB may hold both 4KB and 2- or 4MB page mappings for + * the address range [va, va + NBPDR). Therefore, the entire range + * must be invalidated here. In contrast, when PG_PROMOTED is clear, + * the TLB will not hold any 4KB page mappings for the address range + * [va, va + NBPDR), and so a single INVLPG suffices to invalidate the + * 2- or 4MB page mapping from the TLB. + */ + if ((pde & PG_PROMOTED) != 0) + pmap_invalidate_range(pmap, va, va + NBPDR - 1); + else + pmap_invalidate_page(pmap, va); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) void @@ -2724,7 +2747,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse SLIST_INIT(&free); sva = trunc_4mpage(va); pmap_remove_pde(pmap, pde, sva, &free); - pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); + if ((oldpde & PG_G) == 0) + pmap_invalidate_pde_page(pmap, sva, oldpde); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); @@ -2895,23 +2919,9 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse /* * Machines that don't support invlpg, also don't support * PG_G. - * - * When workaround_erratum383 is false, a promotion to a 2M/4M - * page mapping does not invalidate the 512/1024 4K page mappings - * from the TLB. Consequently, at this point, the TLB may - * hold both 4K and 2M/4M page mappings. Therefore, the entire - * range of addresses must be invalidated here. In contrast, - * when workaround_erratum383 is true, a promotion does - * invalidate the 512/1024 4K page mappings, and so a single INVLPG - * suffices to invalidate the 2M/4M page mapping. */ - if ((oldpde & PG_G) != 0) { - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; if (oldpde & PG_MANAGED) { @@ -3220,16 +3230,16 @@ retry: newpde |= pg_nx; #endif if (newpde != oldpde) { - if (!pde_cmpset(pde, oldpde, newpde)) + /* + * As an optimization to future operations on this PDE, clear + * PG_PROMOTED. The impending invalidation will remove any + * lingering 4KB page mappings from the TLB. + */ + if (!pde_cmpset(pde, oldpde, newpde & ~PG_PROMOTED)) goto retry; - if (oldpde & PG_G) { - /* See pmap_remove_pde() for explanation. */ - if (workaround_erratum383) - pmap_invalidate_page(kernel_pmap, sva); - else - pmap_invalidate_range(kernel_pmap, sva, - sva + NBPDR - 1); - } else + if ((oldpde & PG_G) != 0) + pmap_invalidate_pde_page(kernel_pmap, sva, oldpde); + else anychanged = TRUE; } return (anychanged); @@ -3514,9 +3524,9 @@ setpte: if (workaround_erratum383) pmap_update_pde(pmap, va, pde, PG_PS | newpde); else if (pmap == kernel_pmap) - pmap_kenter_pde(va, PG_PS | newpde); + pmap_kenter_pde(va, PG_PROMOTED | PG_PS | newpde); else - pde_store(pde, PG_PS | newpde); + pde_store(pde, PG_PROMOTED | PG_PS | newpde); pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#x" @@ -3787,7 +3797,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; /* - * Map the superpage. + * Map the superpage. (This is not a promoted mapping; there will not + * be any lingering 4KB page mappings in the TLB.) */ pde_store(pde, newpde); Modified: stable/10/sys/i386/include/pmap.h ============================================================================== --- stable/10/sys/i386/include/pmap.h Wed Jun 28 04:19:54 2017 (r320431) +++ stable/10/sys/i386/include/pmap.h Wed Jun 28 04:23:20 2017 (r320432) @@ -71,6 +71,7 @@ /* Our various interpretations of the above */ #define PG_W PG_AVAIL1 /* "Wired" pseudoflag */ #define PG_MANAGED PG_AVAIL2 +#define PG_PROMOTED PG_AVAIL3 /* PDE only */ #if defined(PAE) || defined(PAE_TABLES) #define PG_FRAME (0x000ffffffffff000ull) #define PG_PS_FRAME (0x000fffffffe00000ull) From owner-svn-src-all@freebsd.org Wed Jun 28 04:24:11 2017 Return-Path: Delivered-To: svn-src-all@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 99916D97ACF; Wed, 28 Jun 2017 04:24:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 640B865040; Wed, 28 Jun 2017 04:24:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S4OAel097145; Wed, 28 Jun 2017 04:24:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S4OAE3097144; Wed, 28 Jun 2017 04:24:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706280424.v5S4OAE3097144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 28 Jun 2017 04:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320433 - head/libexec/rshd X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/libexec/rshd X-SVN-Commit-Revision: 320433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:24:11 -0000 Author: delphij Date: Wed Jun 28 04:24:10 2017 New Revision: 320433 URL: https://svnweb.freebsd.org/changeset/base/320433 Log: Use strlcpy() instead of strncpy() and nul-terminating. MFC after: 2 weeks Modified: head/libexec/rshd/rshd.c Modified: head/libexec/rshd/rshd.c ============================================================================== --- head/libexec/rshd/rshd.c Wed Jun 28 04:23:20 2017 (r320432) +++ head/libexec/rshd/rshd.c Wed Jun 28 04:24:10 2017 (r320433) @@ -338,8 +338,7 @@ doit(struct sockaddr *fromp) pam_err = pam_authenticate(pamh, 0); if (pam_err == PAM_SUCCESS) { if ((pam_err = pam_get_user(pamh, &cp, NULL)) == PAM_SUCCESS) { - strncpy(luser, cp, sizeof(luser)); - luser[sizeof(luser) - 1] = '\0'; + strlcpy(luser, cp, sizeof(luser)); /* XXX truncation! */ } pam_err = pam_acct_mgmt(pamh, 0); @@ -386,9 +385,7 @@ doit(struct sockaddr *fromp) if (lc != NULL && fromp->sa_family == AF_INET) { /*XXX*/ char remote_ip[MAXHOSTNAMELEN]; - strncpy(remote_ip, numericname, - sizeof(remote_ip) - 1); - remote_ip[sizeof(remote_ip) - 1] = 0; + strlcpy(remote_ip, numericname, sizeof(remote_ip)); /* XXX truncation! */ if (!auth_hostok(lc, rhost, remote_ip)) { syslog(LOG_INFO|LOG_AUTH, From owner-svn-src-all@freebsd.org Wed Jun 28 04:25:22 2017 Return-Path: Delivered-To: svn-src-all@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 1BE0ED97B6B; Wed, 28 Jun 2017 04:25:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DEE0B651B2; Wed, 28 Jun 2017 04:25:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S4PLLb097237; Wed, 28 Jun 2017 04:25:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S4PL5d097236; Wed, 28 Jun 2017 04:25:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706280425.v5S4PL5d097236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jun 2017 04:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320434 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:25:22 -0000 Author: kib Date: Wed Jun 28 04:25:20 2017 New Revision: 320434 URL: https://svnweb.freebsd.org/changeset/base/320434 Log: MFC r320201: Assert that the protection of a new map entry is a subset of the max protection. Approved by: re (delphij) Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Wed Jun 28 04:24:10 2017 (r320433) +++ stable/11/sys/vm/vm_map.c Wed Jun 28 04:25:20 2017 (r320434) @@ -1190,6 +1190,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof ("vm_map_insert: kmem or kernel object and COW")); KASSERT(object == NULL || (cow & MAP_NOFAULT) == 0, ("vm_map_insert: paradoxical MAP_NOFAULT request")); + KASSERT((prot & ~max) == 0, + ("prot %#x is not subset of max_prot %#x", prot, max)); /* * Check that the start and end points are not bogus. From owner-svn-src-all@freebsd.org Wed Jun 28 04:53:08 2017 Return-Path: Delivered-To: svn-src-all@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 572AFD980D8; Wed, 28 Jun 2017 04:53:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 246CD65BDA; Wed, 28 Jun 2017 04:53:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S4r7gL009508; Wed, 28 Jun 2017 04:53:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S4r7cf009507; Wed, 28 Jun 2017 04:53:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706280453.v5S4r7cf009507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jun 2017 04:53:07 +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: r320435 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 04:53:08 -0000 Author: kib Date: Wed Jun 28 04:53:06 2017 New Revision: 320435 URL: https://svnweb.freebsd.org/changeset/base/320435 Log: MFC r320201: Assert that the protection of a new map entry is a subset of the max protection. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Wed Jun 28 04:25:20 2017 (r320434) +++ stable/10/sys/vm/vm_map.c Wed Jun 28 04:53:06 2017 (r320435) @@ -1143,6 +1143,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof ("vm_map_insert: kmem or kernel object and COW")); KASSERT(object == NULL || (cow & MAP_NOFAULT) == 0, ("vm_map_insert: paradoxical MAP_NOFAULT request")); + KASSERT((prot & ~max) == 0, + ("prot %#x is not subset of max_prot %#x", prot, max)); /* * Check that the start and end points are not bogus. From owner-svn-src-all@freebsd.org Wed Jun 28 05:20:29 2017 Return-Path: Delivered-To: svn-src-all@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 A08B2D98419; Wed, 28 Jun 2017 05:20:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6CAF066563; Wed, 28 Jun 2017 05:20:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S5KSk7018233; Wed, 28 Jun 2017 05:20:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S5KSFJ018232; Wed, 28 Jun 2017 05:20:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706280520.v5S5KSFJ018232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jun 2017 05:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320436 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 05:20:29 -0000 Author: kib Date: Wed Jun 28 05:20:28 2017 New Revision: 320436 URL: https://svnweb.freebsd.org/changeset/base/320436 Log: MFC r320202: Call pmap_copy() only for map entries which have the backing object instantiated. Approved by: re (delphij) Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Wed Jun 28 04:53:06 2017 (r320435) +++ stable/11/sys/vm/vm_map.c Wed Jun 28 05:20:28 2017 (r320436) @@ -3239,6 +3239,10 @@ vm_map_copy_entry( fake_entry->next = curthread->td_map_def_user; curthread->td_map_def_user = fake_entry; } + + pmap_copy(dst_map->pmap, src_map->pmap, + dst_entry->start, dst_entry->end - dst_entry->start, + src_entry->start); } else { dst_entry->object.vm_object = NULL; dst_entry->offset = 0; @@ -3248,9 +3252,6 @@ vm_map_copy_entry( *fork_charge += size; } } - - pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start, - dst_entry->end - dst_entry->start, src_entry->start); } else { /* * We don't want to make writeable wired pages copy-on-write. From owner-svn-src-all@freebsd.org Wed Jun 28 05:21:01 2017 Return-Path: Delivered-To: svn-src-all@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 69251D984A7; Wed, 28 Jun 2017 05:21:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 380F3666CD; Wed, 28 Jun 2017 05:21:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S5L08o021242; Wed, 28 Jun 2017 05:21:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S5L0xl021241; Wed, 28 Jun 2017 05:21:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706280521.v5S5L0xl021241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Jun 2017 05:21:00 +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: r320437 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 05:21:01 -0000 Author: kib Date: Wed Jun 28 05:21:00 2017 New Revision: 320437 URL: https://svnweb.freebsd.org/changeset/base/320437 Log: MFC r320202: Call pmap_copy() only for map entries which have the backing object instantiated. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Wed Jun 28 05:20:28 2017 (r320436) +++ stable/10/sys/vm/vm_map.c Wed Jun 28 05:21:00 2017 (r320437) @@ -3185,6 +3185,10 @@ vm_map_copy_entry( fake_entry->next = curthread->td_map_def_user; curthread->td_map_def_user = fake_entry; } + + pmap_copy(dst_map->pmap, src_map->pmap, + dst_entry->start, dst_entry->end - dst_entry->start, + src_entry->start); } else { dst_entry->object.vm_object = NULL; dst_entry->offset = 0; @@ -3194,9 +3198,6 @@ vm_map_copy_entry( *fork_charge += size; } } - - pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start, - dst_entry->end - dst_entry->start, src_entry->start); } else { /* * We don't want to make writeable wired pages copy-on-write. From owner-svn-src-all@freebsd.org Wed Jun 28 05:28:17 2017 Return-Path: Delivered-To: svn-src-all@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 325BAD986FE; Wed, 28 Jun 2017 05:28:17 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 F417366AB0; Wed, 28 Jun 2017 05:28:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S5SGwl022197; Wed, 28 Jun 2017 05:28:16 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S5SGkP022196; Wed, 28 Jun 2017 05:28:16 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706280528.v5S5SGkP022196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 28 Jun 2017 05:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320438 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 320438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 05:28:17 -0000 Author: alc Date: Wed Jun 28 05:28:15 2017 New Revision: 320438 URL: https://svnweb.freebsd.org/changeset/base/320438 Log: MFC r315518 Avoid unnecessary calls to vm_map_protect() in elf_load_section(). Typically, when elf_load_section() unconditionally passed VM_PROT_ALL to elf_map_insert(), it was needlessly enabling execute access on the mapping, and it would later have to call vm_map_protect() to correct the mapping's access rights. Now, instead, elf_load_section() always passes its parameter "prot" to elf_map_insert(). So, elf_load_section() must only call vm_map_protect() if it needs to remove the write access that was temporarily granted to perform a copyout(). Approved by: re (kib) Modified: stable/11/sys/kern/imgact_elf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Wed Jun 28 05:21:00 2017 (r320437) +++ stable/11/sys/kern/imgact_elf.c Wed Jun 28 05:28:15 2017 (r320438) @@ -596,7 +596,7 @@ __elfN(load_section)(struct image_params *imgp, vm_oof /* This had damn well better be true! */ if (map_len != 0) { rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr, - map_addr + map_len, VM_PROT_ALL, 0); + map_addr + map_len, prot, 0); if (rv != KERN_SUCCESS) return (EINVAL); } @@ -617,10 +617,12 @@ __elfN(load_section)(struct image_params *imgp, vm_oof } /* - * set it to the specified protection. + * Remove write access to the page if it was only granted by map_insert + * to allow copyout. */ - vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + - map_len), prot, FALSE); + if ((prot & VM_PROT_WRITE) == 0) + vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + + map_len), prot, FALSE); return (0); } From owner-svn-src-all@freebsd.org Wed Jun 28 06:13:59 2017 Return-Path: Delivered-To: svn-src-all@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 923D1D99248; Wed, 28 Jun 2017 06:13:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 525B667E38; Wed, 28 Jun 2017 06:13:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S6Dwus042446; Wed, 28 Jun 2017 06:13:58 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S6Dw69042445; Wed, 28 Jun 2017 06:13:58 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706280613.v5S6Dw69042445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 28 Jun 2017 06:13: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: r320439 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 06:13:59 -0000 Author: alc Date: Wed Jun 28 06:13:58 2017 New Revision: 320439 URL: https://svnweb.freebsd.org/changeset/base/320439 Log: MFC r281720 Eliminate an unused variable. Modified: stable/10/sys/vm/device_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/device_pager.c ============================================================================== --- stable/10/sys/vm/device_pager.c Wed Jun 28 05:28:15 2017 (r320438) +++ stable/10/sys/vm/device_pager.c Wed Jun 28 06:13:58 2017 (r320439) @@ -292,7 +292,6 @@ static int old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, vm_page_t *mres) { - vm_pindex_t pidx; vm_paddr_t paddr; vm_page_t m_paddr, page; struct cdev *dev; @@ -302,7 +301,6 @@ old_dev_pager_fault(vm_object_t object, vm_ooffset_t o vm_memattr_t memattr, memattr1; int ref, ret; - pidx = OFF_TO_IDX(offset); memattr = object->memattr; VM_OBJECT_WUNLOCK(object); From owner-svn-src-all@freebsd.org Wed Jun 28 06:40:14 2017 Return-Path: Delivered-To: svn-src-all@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 B9CC0D99995; Wed, 28 Jun 2017 06:40:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6AEA568818; Wed, 28 Jun 2017 06:40:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S6eDPc050884; Wed, 28 Jun 2017 06:40:13 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S6eDRk050883; Wed, 28 Jun 2017 06:40:13 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706280640.v5S6eDRk050883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 28 Jun 2017 06:40:13 +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: r320440 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 06:40:14 -0000 Author: alc Date: Wed Jun 28 06:40:13 2017 New Revision: 320440 URL: https://svnweb.freebsd.org/changeset/base/320440 Log: MFC r281771 Eliminate an unused variable. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Wed Jun 28 06:13:58 2017 (r320439) +++ stable/10/sys/vm/uma_core.c Wed Jun 28 06:40:13 2017 (r320440) @@ -308,9 +308,8 @@ bucket_init(void) { struct uma_bucket_zone *ubz; int size; - int i; - for (i = 0, ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { + for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { size = roundup(sizeof(struct uma_bucket), sizeof(void *)); size += sizeof(void *) * ubz->ubz_entries; ubz->ubz_zone = uma_zcreate(ubz->ubz_name, size, From owner-svn-src-all@freebsd.org Wed Jun 28 06:44:49 2017 Return-Path: Delivered-To: svn-src-all@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 1670BD99BA7; Wed, 28 Jun 2017 06:44:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 D59D368BB6; Wed, 28 Jun 2017 06:44:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D173E260863; Wed, 28 Jun 2017 08:44:39 +0200 (CEST) Subject: Re: svn commit: r320415 - head/sys/kern To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706271723.v5RHNKbU025676@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Jun 2017 08:42:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201706271723.v5RHNKbU025676@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 06:44:49 -0000 On 06/27/17 19:23, Conrad Meyer wrote: > Author: cem > Date: Tue Jun 27 17:23:20 2017 > New Revision: 320415 > URL: https://svnweb.freebsd.org/changeset/base/320415 > > Log: > Fix one more place uio_resid is truncated to int Hi, Should you use: sys/sys/param.h:#define MIN(a,b) (((a)<(b))?(a):(b)) Instead? --HPS > > A follow-up to r231949 and r194990. > > Reported by: pho@ > Reviewed by: kib@, markj@ > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D11373 > > Modified: > head/sys/kern/uipc_mbuf.c > > Modified: head/sys/kern/uipc_mbuf.c > ============================================================================== > --- head/sys/kern/uipc_mbuf.c Tue Jun 27 17:22:03 2017 (r320414) > +++ head/sys/kern/uipc_mbuf.c Tue Jun 27 17:23:20 2017 (r320415) > @@ -1517,7 +1517,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int ali > * the total data supplied by the uio. > */ > if (len > 0) > - total = min(uio->uio_resid, len); > + total = (uio->uio_resid < len) ? uio->uio_resid : len; > else > total = uio->uio_resid; > > > From owner-svn-src-all@freebsd.org Wed Jun 28 07:01:23 2017 Return-Path: Delivered-To: svn-src-all@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 BEDB6D9A179; Wed, 28 Jun 2017 07:01:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8DA106A3C9; Wed, 28 Jun 2017 07:01:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S71Mkg059969; Wed, 28 Jun 2017 07:01:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S71MYD059968; Wed, 28 Jun 2017 07:01:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280701.v5S71MYD059968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 07:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320441 - head/share/examples/tests/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/examples/tests/tests X-SVN-Commit-Revision: 320441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 07:01:23 -0000 Author: ngie Date: Wed Jun 28 07:01:22 2017 New Revision: 320441 URL: https://svnweb.freebsd.org/changeset/base/320441 Log: share/examples/tests/Makefile: clean up example snippets/documentation - TESTSDIR doesn't need to be specified after r289158. - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - TESTS_SUBDIRS should be written out in an append format, one entry per line, to provide a better, more conflict resistant example. MFC after: 1 month Modified: head/share/examples/tests/tests/Makefile Modified: head/share/examples/tests/tests/Makefile ============================================================================== --- head/share/examples/tests/tests/Makefile Wed Jun 28 06:40:13 2017 (r320440) +++ head/share/examples/tests/tests/Makefile Wed Jun 28 07:01:22 2017 (r320441) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -11,12 +9,16 @@ # # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR # would point at ${TESTSBASE}/bin/cp/. -TESTSDIR= ${TESTSBASE}/share/examples/tests +# +# The default path specified by bsd.test.mk is `${TESTSBASE}/${RELDIR:H}`, +# which happens to be the same as `${TESTSBASE}/share/examples/tests`. +#TESTSDIR= ${TESTSBASE}/share/examples/tests # List of subdirectories into which we want to recurse during the build # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. -TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+= atf +TESTS_SUBDIRS+= plain # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The From owner-svn-src-all@freebsd.org Wed Jun 28 08:20:52 2017 Return-Path: Delivered-To: svn-src-all@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 C248FD9BAC9; Wed, 28 Jun 2017 08:20:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8F5AE6F425; Wed, 28 Jun 2017 08:20:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8Kpqu094930; Wed, 28 Jun 2017 08:20:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8KpLx094928; Wed, 28 Jun 2017 08:20:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280820.v5S8KpLx094928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320442 - in head/share/examples/tests/tests: atf plain X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/share/examples/tests/tests: atf plain X-SVN-Commit-Revision: 320442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:20:52 -0000 Author: ngie Date: Wed Jun 28 08:20:51 2017 New Revision: 320442 URL: https://svnweb.freebsd.org/changeset/base/320442 Log: share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - Update documentation to note that ${FILES} is installed via bsd.progs.mk, not bsd.prog.mk. MFC after: 1 month Modified: head/share/examples/tests/tests/atf/Makefile head/share/examples/tests/tests/plain/Makefile Modified: head/share/examples/tests/tests/atf/Makefile ============================================================================== --- head/share/examples/tests/tests/atf/Makefile Wed Jun 28 07:01:22 2017 (r320441) +++ head/share/examples/tests/tests/atf/Makefile Wed Jun 28 08:20:51 2017 (r320442) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support @@ -33,10 +31,10 @@ ATF_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional +# Install file1 and file2 as files via bsd.progs.mk. Please note the intentional # ${PACKAGE} namespace of files. # -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the +# The basic semantics of this are the same as FILES in bsd.progs.mk, e.g. the # installation of the files can be manipulated via ${PACKAGE}FILESDIR, # ${PACKAGE}FILESMODE, etc. # Modified: head/share/examples/tests/tests/plain/Makefile ============================================================================== --- head/share/examples/tests/tests/plain/Makefile Wed Jun 28 07:01:22 2017 (r320441) +++ head/share/examples/tests/tests/plain/Makefile Wed Jun 28 08:20:51 2017 (r320442) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support @@ -33,10 +31,10 @@ PLAIN_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional +# Install file1 and file2 as files via bsd.progs.mk. Please note the intentional # ${PACKAGE} namespace of files. # -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the +# The basic semantics of this are the same as FILES in bsd.progs.mk, e.g. the # installation of the files can be manipulated via ${PACKAGE}FILESDIR, # ${PACKAGE}FILESMODE, etc. # From owner-svn-src-all@freebsd.org Wed Jun 28 08:22:06 2017 Return-Path: Delivered-To: svn-src-all@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 1BA8FD9BB62; Wed, 28 Jun 2017 08:22:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CD0DD6F729; Wed, 28 Jun 2017 08:22:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8M5Bn095883; Wed, 28 Jun 2017 08:22:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8M4P4095877; Wed, 28 Jun 2017 08:22:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280822.v5S8M4P4095877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320443 - in head/share/examples/tests/tests: . tap X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/share/examples/tests/tests: . tap X-SVN-Commit-Revision: 320443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:22:06 -0000 Author: ngie Date: Wed Jun 28 08:22:04 2017 New Revision: 320443 URL: https://svnweb.freebsd.org/changeset/base/320443 Log: Add kyua TAP test integration examples The examples are patterned loosely after the ATF examples, similar to the plain test examples. MFC after: 1 month Added: head/share/examples/tests/tests/tap/ head/share/examples/tests/tests/tap/Kyuafile - copied, changed from r320415, head/share/examples/tests/tests/plain/Kyuafile head/share/examples/tests/tests/tap/Makefile - copied, changed from r320415, head/share/examples/tests/tests/plain/Makefile head/share/examples/tests/tests/tap/Makefile.depend - copied unchanged from r320415, head/share/examples/tests/tests/plain/Makefile.depend head/share/examples/tests/tests/tap/cp_test.sh - copied, changed from r320415, head/share/examples/tests/tests/plain/cp_test.sh head/share/examples/tests/tests/tap/printf_test.c - copied, changed from r320415, head/share/examples/tests/tests/plain/printf_test.c Modified: head/share/examples/tests/tests/Makefile Modified: head/share/examples/tests/tests/Makefile ============================================================================== --- head/share/examples/tests/tests/Makefile Wed Jun 28 08:20:51 2017 (r320442) +++ head/share/examples/tests/tests/Makefile Wed Jun 28 08:22:04 2017 (r320443) @@ -19,6 +19,7 @@ # the auto-generated Kyuafile to recurse into these directories. TESTS_SUBDIRS+= atf TESTS_SUBDIRS+= plain +TESTS_SUBDIRS+= tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The Copied and modified: head/share/examples/tests/tests/tap/Kyuafile (from r320415, head/share/examples/tests/tests/plain/Kyuafile) ============================================================================== --- head/share/examples/tests/tests/plain/Kyuafile Tue Jun 27 17:23:20 2017 (r320415, copy source) +++ head/share/examples/tests/tests/tap/Kyuafile Wed Jun 28 08:22:04 2017 (r320443) @@ -43,5 +43,5 @@ test_suite('FreeBSD') -- any metadata properties in here. These have the exact same meaning as -- their ATF counterparts. These properties are often useful to define -- prerequisites for the execution of the tests. -plain_test_program{name='cp_test', required_programs='/bin/cp'} -plain_test_program{name='printf_test'} +tap_test_program{name='cp_test', required_programs='/bin/cp'} +tap_test_program{name='printf_test'} Copied and modified: head/share/examples/tests/tests/tap/Makefile (from r320415, head/share/examples/tests/tests/plain/Makefile) ============================================================================== --- head/share/examples/tests/tests/plain/Makefile Tue Jun 27 17:23:20 2017 (r320415, copy source) +++ head/share/examples/tests/tests/tap/Makefile Wed Jun 28 08:22:04 2017 (r320443) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support @@ -17,12 +15,12 @@ PACKAGE= tests # # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR # would point at ${TESTSBASE}/bin/cp/. -TESTSDIR= ${TESTSBASE}/share/examples/tests/plain +TESTSDIR= ${TESTSBASE}/share/examples/tests/tap # List of test programs to build. Note that we can build more than one # test from a single directory, and this is expected. -PLAIN_TESTS_C= printf_test -PLAIN_TESTS_SH= cp_test +TAP_TESTS_C= printf_test +TAP_TESTS_SH= cp_test # Tell bsd.test.mk that we are providing a hand-crafted Kyuafile in this # directory. We do so because the file in this directory exists for Copied: head/share/examples/tests/tests/tap/Makefile.depend (from r320415, head/share/examples/tests/tests/plain/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/tests/tests/tap/Makefile.depend Wed Jun 28 08:22:04 2017 (r320443, copy of r320415, head/share/examples/tests/tests/plain/Makefile.depend) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Copied and modified: head/share/examples/tests/tests/tap/cp_test.sh (from r320415, head/share/examples/tests/tests/plain/cp_test.sh) ============================================================================== --- head/share/examples/tests/tests/plain/cp_test.sh Tue Jun 27 17:23:20 2017 (r320415, copy source) +++ head/share/examples/tests/tests/tap/cp_test.sh Wed Jun 28 08:22:04 2017 (r320443) @@ -1,84 +1,99 @@ -#! /bin/sh -# $FreeBSD$ +#!/bin/sh # -# Copyright 2013 Google Inc. +# Copyright (c) 2017 Ngie Cooper # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Google Inc. nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# $FreeBSD$ +# # # INTRODUCTION # -# This plain test program mimics the structure and contents of its +# This TAP test program mimics the structure and contents of its # ATF-based counterpart. It attempts to represent various test cases # in different separate functions and just calls them all from main. # -# In reality, plain test programs can be much simpler. All they have -# to do is return 0 on success and non-0 otherwise. -# -set -e +test_num=1 +TEST_COUNT=4 -# Prints an error message and exits. -err() { - echo "${@}" 1>&2 - exit 1 +result() +{ + local result=$1; shift + local result_string + + result_string="$result $test_num" + if [ $# -gt 0 ]; then + result_string="$result_string - $@" + fi + echo "$result_string" + : $(( test_num += 1 )) } # Auxiliary function to compare two files for equality. verify_copy() { - if ! cmp -s "${1}" "${2}"; then + if cmp -s "${1}" "${2}"; then + result "ok" + else + result "not ok" "${1} and ${2} differ, but they should be equal" diff -u "${1}" "${2}" - err "${1} and ${2} differ, but they should be equal" fi } simple_test() { cp "$(dirname "${0}")/file1" . - cp file1 file2 || err "cp failed" - verify_copy file1 file2 + if cp file1 file2; then + result "ok" + verify_copy file1 file2 + else + result "not ok" "cp failed" + result "not ok" "# SKIP" + fi } force_test() { echo 'File 3' >file3 chmod 400 file3 - cp -f file1 file3 || err "cp failed" - verify_copy file1 file3 + if cp -f file1 file3; then + result "ok" + verify_copy file1 file3 + else + result "not ok" "cp -f failed" + result "not ok" "# SKIP" + fi } # If you have read the cp_test.sh counterpart in the atf/ directory, you # may think that the sequencing of tests below and the exposed behavior # to the user is very similar. But you'd be wrong. # -# There are two major differences with this and the ATF version. The -# first is that the code below has no provisions to detect failures in -# one test and continue running the other tests: the first failure -# causes the whole test program to exit. The second is that this -# particular "main" has no arguments: without ATF, all test programs may -# expose a different command-line interface, and this is an issue for -# consistency purposes. +# There are two major differences with this and the ATF version. First off, +# the TAP test doesn't isolate simple_test from force_test, whereas the ATF +# version does. Secondly, the test script accepts arbitrary command line +# inputs. +echo "1..$TEST_COUNT" + simple_test force_test +exit 0 Copied and modified: head/share/examples/tests/tests/tap/printf_test.c (from r320415, head/share/examples/tests/tests/plain/printf_test.c) ============================================================================== --- head/share/examples/tests/tests/plain/printf_test.c Tue Jun 27 17:23:20 2017 (r320415, copy source) +++ head/share/examples/tests/tests/tap/printf_test.c Wed Jun 28 08:22:04 2017 (r320443) @@ -40,21 +40,69 @@ */ #include +#include #include #include #include +static int failed; +static int test_num = 1; + +#define TEST_COUNT 7 + static void +fail(const char *fmt, ...) +{ + char *msg; + va_list ap; + + failed = 1; + + va_start(ap, fmt); + if (vasprintf(&msg, fmt, ap) == -1) + err(1, NULL); + va_end(ap); + printf("not ok %d - %s\n", test_num, msg); + free(msg); + + test_num++; +} + +static void +pass(void) +{ + + printf("ok %d\n", test_num); + test_num++; +} + +static void +skip(int skip_num) +{ + int i; + + for (i = 0; i < skip_num; i++) { + printf("not ok %d # SKIP\n", test_num); + test_num++; + } +} + +static void snprintf__two_formatters(void) { char buffer[128]; if (snprintf(buffer, sizeof(buffer), "%s, %s!", "Hello", - "tests") <= 0) - errx(EXIT_FAILURE, "snprintf with two formatters failed"); - - if (strcmp(buffer, "Hello, tests!") != 0) - errx(EXIT_FAILURE, "Bad formatting: got %s", buffer); + "tests") <= 0) { + fail("snprintf with two formatters failed"); + skip(1); + } else { + pass(); + if (strcmp(buffer, "Hello, tests!") != 0) + fail("Bad formatting: got %s", buffer); + else + pass(); + } } static void @@ -62,12 +110,18 @@ snprintf__overflow(void) { char buffer[10]; - if (snprintf(buffer, sizeof(buffer), "0123456789abcdef") != 16) - errx(EXIT_FAILURE, "snprintf did not return the expected " + if (snprintf(buffer, sizeof(buffer), "0123456789abcdef") != 16) { + fail("snprintf did not return the expected " "number of characters"); + skip(1); + return; + } + pass(); if (strcmp(buffer, "012345678") != 0) - errx(EXIT_FAILURE, "Bad formatting: got %s", buffer); + fail("Bad formatting: got %s", buffer); + else + pass(); } static void @@ -79,17 +133,27 @@ fprintf__simple_string(void) const char *contents = "This is a message\n"; file = fopen("test.txt", "w+"); - if (fprintf(file, "%s", contents) <= 0) - err(EXIT_FAILURE, "fprintf failed to write to file"); + if (fprintf(file, "%s", contents) <= 0) { + fail("fprintf failed to write to file"); + skip(2); + return; + } + pass(); rewind(file); length = fread(buffer, 1, sizeof(buffer) - 1, file); - if (length != strlen(contents)) - err(EXIT_FAILURE, "fread failed"); + if (length != strlen(contents)) { + fail("fread failed"); + skip(1); + return; + } + pass(); buffer[length] = '\0'; fclose(file); if (strcmp(buffer, contents) != 0) - errx(EXIT_FAILURE, "Written and read data differ"); + fail("Written and read data differ"); + else + pass(); /* Of special note here is that we are NOT deleting the temporary * files we created in this test. Kyua takes care of this cleanup @@ -111,9 +175,11 @@ main(void) * is that this particular main() has no arguments: without ATF, * all test programs may expose a different command-line interface, * and this is an issue for consistency purposes. */ + printf("1..%d\n", TEST_COUNT); + snprintf__two_formatters(); snprintf__overflow(); fprintf__simple_string(); - return EXIT_SUCCESS; + return (failed); } From owner-svn-src-all@freebsd.org Wed Jun 28 08:23:21 2017 Return-Path: Delivered-To: svn-src-all@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 5C9F4D9BCF2; Wed, 28 Jun 2017 08:23:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2C0696F8CA; Wed, 28 Jun 2017 08:23:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8NKLv095972; Wed, 28 Jun 2017 08:23:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8NKkb095971; Wed, 28 Jun 2017 08:23:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280823.v5S8NKkb095971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320444 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 320444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:23:21 -0000 Author: ngie Date: Wed Jun 28 08:23:20 2017 New Revision: 320444 URL: https://svnweb.freebsd.org/changeset/base/320444 Log: Commit the corresponding mtree file change for the TAP test examples MFC after: 1 month MFC with: r320443 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Jun 28 08:22:04 2017 (r320443) +++ head/etc/mtree/BSD.tests.dist Wed Jun 28 08:23:20 2017 (r320444) @@ -396,6 +396,8 @@ .. plain .. + tap + .. .. .. .. From owner-svn-src-all@freebsd.org Wed Jun 28 08:28:08 2017 Return-Path: Delivered-To: svn-src-all@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 92698D9BDB8; Wed, 28 Jun 2017 08:28:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6000D6FA5F; Wed, 28 Jun 2017 08:28:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8S7Nk096176; Wed, 28 Jun 2017 08:28:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8S7eE096175; Wed, 28 Jun 2017 08:28:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280828.v5S8S7eE096175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320445 - head/tests/sys/vfs X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/vfs X-SVN-Commit-Revision: 320445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:28:08 -0000 Author: ngie Date: Wed Jun 28 08:28:07 2017 New Revision: 320445 URL: https://svnweb.freebsd.org/changeset/base/320445 Log: Don't hardcode path to file in /tmp; this violates the kyua sandbox MFC after: 1 month Modified: head/tests/sys/vfs/trailing_slash.sh Modified: head/tests/sys/vfs/trailing_slash.sh ============================================================================== --- head/tests/sys/vfs/trailing_slash.sh Wed Jun 28 08:23:20 2017 (r320444) +++ head/tests/sys/vfs/trailing_slash.sh Wed Jun 28 08:28:07 2017 (r320445) @@ -6,8 +6,9 @@ # point to files. See kern/21768 for details. Fixed in r193028. # -testfile="/tmp/testfile-$$" -testlink="/tmp/testlink-$$" +: ${TMPDIR=/tmp} +testfile="$TMPDIR/testfile-$$" +testlink="$TMPDIR/testlink-$$" tests=" $testfile:$testlink:$testfile:0 From owner-svn-src-all@freebsd.org Wed Jun 28 08:29:21 2017 Return-Path: Delivered-To: svn-src-all@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 73389D9BE42; Wed, 28 Jun 2017 08:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4271D6FBB1; Wed, 28 Jun 2017 08:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8TKvS096263; Wed, 28 Jun 2017 08:29:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8TKPD096262; Wed, 28 Jun 2017 08:29:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280829.v5S8TKPD096262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320446 - head/tests/sys/vfs X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/vfs X-SVN-Commit-Revision: 320446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:29:21 -0000 Author: ngie Date: Wed Jun 28 08:29:20 2017 New Revision: 320446 URL: https://svnweb.freebsd.org/changeset/base/320446 Log: trailing_slash is a TAP-compliant testcase; mark it as such, instead of calling is a plain testcase. MFC after: 1 month Modified: head/tests/sys/vfs/Makefile Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Wed Jun 28 08:28:07 2017 (r320445) +++ head/tests/sys/vfs/Makefile Wed Jun 28 08:29:20 2017 (r320446) @@ -7,6 +7,6 @@ TESTSDIR= ${TESTSBASE}/sys/vfs ATF_TESTS_C+= lookup_cap_dotdot CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP}/tests -PLAIN_TESTS_SH+= trailing_slash +TAP_TESTS_SH+= trailing_slash .include From owner-svn-src-all@freebsd.org Wed Jun 28 08:48:12 2017 Return-Path: Delivered-To: svn-src-all@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 08461D9C34B; Wed, 28 Jun 2017 08:48:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B7CAB7044F; Wed, 28 Jun 2017 08:48:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8mA2b004537; Wed, 28 Jun 2017 08:48:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8m9bH004526; Wed, 28 Jun 2017 08:48:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280848.v5S8m9bH004526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320447 - in vendor/pjdfstest/dist: . tests tests/chflags tests/chmod tests/chown tests/ftruncate tests/granular tests/link tests/mkdir tests/mkfifo tests/mknod tests/open tests/rename ... X-SVN-Group: vendor X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in vendor/pjdfstest/dist: . tests tests/chflags tests/chmod tests/chown tests/ftruncate tests/granular tests/link tests/mkdir tests/mkfifo tests/mknod tests/open tests/rename tests/rmdir tests/symlink... X-SVN-Commit-Revision: 320447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:48:12 -0000 Author: ngie Date: Wed Jun 28 08:48:09 2017 New Revision: 320447 URL: https://svnweb.freebsd.org/changeset/base/320447 Log: Pull down pjdfstest 0.1 The summary of changes is as follows.. Generic changes:: - Added configure support [2]. - Check for lchmod filesystem support with create_file(..); for testcases that require lchmod, skip the testcase -- otherwise use chmod directly [1]. - Added Travis CI integration [2]. - Added utimensat testcases [1]. Linux support:: - Fixed Linux support to pass on later supported versions of Fedora/Ubuntu [2]. - Conditionally enable posix_fallocate(2) support [2]. OSX support:: - Fixed compilation on OSX [2]. - Added partial OSX support (the test run isn't fully green yet) [2]. Obtained from: https://github.com/pjd/pjdfstest/tree/0.1 Submitted by: asomers [1], ngie [2] Added: vendor/pjdfstest/dist/.gitignore vendor/pjdfstest/dist/.travis.yml vendor/pjdfstest/dist/AUTHORS vendor/pjdfstest/dist/COPYING vendor/pjdfstest/dist/ChangeLog vendor/pjdfstest/dist/Makefile.am (contents, props changed) vendor/pjdfstest/dist/NEWS vendor/pjdfstest/dist/configure.ac vendor/pjdfstest/dist/tests/utimensat/ vendor/pjdfstest/dist/tests/utimensat/00.t vendor/pjdfstest/dist/tests/utimensat/01.t vendor/pjdfstest/dist/tests/utimensat/02.t vendor/pjdfstest/dist/tests/utimensat/03.t vendor/pjdfstest/dist/tests/utimensat/04.t vendor/pjdfstest/dist/tests/utimensat/05.t vendor/pjdfstest/dist/tests/utimensat/06.t vendor/pjdfstest/dist/tests/utimensat/07.t vendor/pjdfstest/dist/tests/utimensat/08.t vendor/pjdfstest/dist/tests/utimensat/09.t vendor/pjdfstest/dist/travis/ vendor/pjdfstest/dist/travis/build.sh (contents, props changed) vendor/pjdfstest/dist/travis/test.sh (contents, props changed) Modified: vendor/pjdfstest/dist/README vendor/pjdfstest/dist/pjdfstest.c vendor/pjdfstest/dist/tests/chflags/00.t vendor/pjdfstest/dist/tests/chflags/01.t vendor/pjdfstest/dist/tests/chflags/02.t vendor/pjdfstest/dist/tests/chflags/03.t vendor/pjdfstest/dist/tests/chflags/04.t vendor/pjdfstest/dist/tests/chflags/05.t vendor/pjdfstest/dist/tests/chflags/06.t vendor/pjdfstest/dist/tests/chflags/07.t vendor/pjdfstest/dist/tests/chflags/08.t vendor/pjdfstest/dist/tests/chflags/09.t vendor/pjdfstest/dist/tests/chflags/10.t vendor/pjdfstest/dist/tests/chflags/11.t vendor/pjdfstest/dist/tests/chflags/12.t vendor/pjdfstest/dist/tests/chflags/13.t vendor/pjdfstest/dist/tests/chmod/00.t vendor/pjdfstest/dist/tests/chmod/01.t vendor/pjdfstest/dist/tests/chmod/02.t vendor/pjdfstest/dist/tests/chmod/03.t vendor/pjdfstest/dist/tests/chmod/04.t vendor/pjdfstest/dist/tests/chmod/05.t vendor/pjdfstest/dist/tests/chmod/06.t vendor/pjdfstest/dist/tests/chmod/07.t vendor/pjdfstest/dist/tests/chmod/08.t vendor/pjdfstest/dist/tests/chmod/09.t vendor/pjdfstest/dist/tests/chmod/10.t vendor/pjdfstest/dist/tests/chmod/11.t vendor/pjdfstest/dist/tests/chmod/12.t vendor/pjdfstest/dist/tests/chown/00.t vendor/pjdfstest/dist/tests/chown/01.t vendor/pjdfstest/dist/tests/chown/02.t vendor/pjdfstest/dist/tests/chown/03.t vendor/pjdfstest/dist/tests/chown/04.t vendor/pjdfstest/dist/tests/chown/05.t vendor/pjdfstest/dist/tests/chown/06.t vendor/pjdfstest/dist/tests/chown/07.t vendor/pjdfstest/dist/tests/chown/08.t vendor/pjdfstest/dist/tests/chown/09.t vendor/pjdfstest/dist/tests/chown/10.t vendor/pjdfstest/dist/tests/conf vendor/pjdfstest/dist/tests/ftruncate/00.t vendor/pjdfstest/dist/tests/ftruncate/01.t vendor/pjdfstest/dist/tests/ftruncate/02.t vendor/pjdfstest/dist/tests/ftruncate/03.t vendor/pjdfstest/dist/tests/ftruncate/04.t vendor/pjdfstest/dist/tests/ftruncate/05.t vendor/pjdfstest/dist/tests/ftruncate/06.t vendor/pjdfstest/dist/tests/ftruncate/07.t vendor/pjdfstest/dist/tests/ftruncate/08.t vendor/pjdfstest/dist/tests/ftruncate/09.t vendor/pjdfstest/dist/tests/ftruncate/10.t vendor/pjdfstest/dist/tests/ftruncate/11.t vendor/pjdfstest/dist/tests/ftruncate/12.t vendor/pjdfstest/dist/tests/ftruncate/13.t vendor/pjdfstest/dist/tests/ftruncate/14.t vendor/pjdfstest/dist/tests/granular/00.t vendor/pjdfstest/dist/tests/granular/01.t vendor/pjdfstest/dist/tests/granular/02.t vendor/pjdfstest/dist/tests/granular/03.t vendor/pjdfstest/dist/tests/granular/04.t vendor/pjdfstest/dist/tests/granular/05.t vendor/pjdfstest/dist/tests/link/00.t vendor/pjdfstest/dist/tests/link/01.t vendor/pjdfstest/dist/tests/link/02.t vendor/pjdfstest/dist/tests/link/03.t vendor/pjdfstest/dist/tests/link/04.t vendor/pjdfstest/dist/tests/link/05.t vendor/pjdfstest/dist/tests/link/06.t vendor/pjdfstest/dist/tests/link/07.t vendor/pjdfstest/dist/tests/link/08.t vendor/pjdfstest/dist/tests/link/09.t vendor/pjdfstest/dist/tests/link/10.t vendor/pjdfstest/dist/tests/link/11.t vendor/pjdfstest/dist/tests/link/12.t vendor/pjdfstest/dist/tests/link/13.t vendor/pjdfstest/dist/tests/link/14.t vendor/pjdfstest/dist/tests/link/15.t vendor/pjdfstest/dist/tests/link/16.t vendor/pjdfstest/dist/tests/link/17.t vendor/pjdfstest/dist/tests/misc.sh vendor/pjdfstest/dist/tests/mkdir/00.t vendor/pjdfstest/dist/tests/mkdir/01.t vendor/pjdfstest/dist/tests/mkdir/02.t vendor/pjdfstest/dist/tests/mkdir/03.t vendor/pjdfstest/dist/tests/mkdir/04.t vendor/pjdfstest/dist/tests/mkdir/05.t vendor/pjdfstest/dist/tests/mkdir/06.t vendor/pjdfstest/dist/tests/mkdir/07.t vendor/pjdfstest/dist/tests/mkdir/08.t vendor/pjdfstest/dist/tests/mkdir/09.t vendor/pjdfstest/dist/tests/mkdir/10.t vendor/pjdfstest/dist/tests/mkdir/11.t vendor/pjdfstest/dist/tests/mkdir/12.t vendor/pjdfstest/dist/tests/mkfifo/00.t vendor/pjdfstest/dist/tests/mkfifo/01.t vendor/pjdfstest/dist/tests/mkfifo/02.t vendor/pjdfstest/dist/tests/mkfifo/03.t vendor/pjdfstest/dist/tests/mkfifo/04.t vendor/pjdfstest/dist/tests/mkfifo/05.t vendor/pjdfstest/dist/tests/mkfifo/06.t vendor/pjdfstest/dist/tests/mkfifo/07.t vendor/pjdfstest/dist/tests/mkfifo/08.t vendor/pjdfstest/dist/tests/mkfifo/09.t vendor/pjdfstest/dist/tests/mkfifo/10.t vendor/pjdfstest/dist/tests/mkfifo/11.t vendor/pjdfstest/dist/tests/mkfifo/12.t vendor/pjdfstest/dist/tests/mknod/00.t vendor/pjdfstest/dist/tests/mknod/01.t vendor/pjdfstest/dist/tests/mknod/02.t vendor/pjdfstest/dist/tests/mknod/03.t vendor/pjdfstest/dist/tests/mknod/04.t vendor/pjdfstest/dist/tests/mknod/05.t vendor/pjdfstest/dist/tests/mknod/06.t vendor/pjdfstest/dist/tests/mknod/07.t vendor/pjdfstest/dist/tests/mknod/08.t vendor/pjdfstest/dist/tests/mknod/09.t vendor/pjdfstest/dist/tests/mknod/10.t vendor/pjdfstest/dist/tests/mknod/11.t vendor/pjdfstest/dist/tests/open/00.t vendor/pjdfstest/dist/tests/open/01.t vendor/pjdfstest/dist/tests/open/02.t vendor/pjdfstest/dist/tests/open/03.t vendor/pjdfstest/dist/tests/open/04.t vendor/pjdfstest/dist/tests/open/05.t vendor/pjdfstest/dist/tests/open/06.t vendor/pjdfstest/dist/tests/open/07.t vendor/pjdfstest/dist/tests/open/08.t vendor/pjdfstest/dist/tests/open/09.t vendor/pjdfstest/dist/tests/open/10.t vendor/pjdfstest/dist/tests/open/11.t vendor/pjdfstest/dist/tests/open/12.t vendor/pjdfstest/dist/tests/open/13.t vendor/pjdfstest/dist/tests/open/14.t vendor/pjdfstest/dist/tests/open/15.t vendor/pjdfstest/dist/tests/open/16.t vendor/pjdfstest/dist/tests/open/17.t vendor/pjdfstest/dist/tests/open/18.t vendor/pjdfstest/dist/tests/open/19.t vendor/pjdfstest/dist/tests/open/20.t vendor/pjdfstest/dist/tests/open/21.t vendor/pjdfstest/dist/tests/open/22.t vendor/pjdfstest/dist/tests/open/23.t vendor/pjdfstest/dist/tests/open/24.t vendor/pjdfstest/dist/tests/rename/00.t vendor/pjdfstest/dist/tests/rename/01.t vendor/pjdfstest/dist/tests/rename/02.t vendor/pjdfstest/dist/tests/rename/03.t vendor/pjdfstest/dist/tests/rename/04.t vendor/pjdfstest/dist/tests/rename/05.t vendor/pjdfstest/dist/tests/rename/06.t vendor/pjdfstest/dist/tests/rename/07.t vendor/pjdfstest/dist/tests/rename/08.t vendor/pjdfstest/dist/tests/rename/09.t vendor/pjdfstest/dist/tests/rename/10.t vendor/pjdfstest/dist/tests/rename/11.t vendor/pjdfstest/dist/tests/rename/12.t vendor/pjdfstest/dist/tests/rename/13.t vendor/pjdfstest/dist/tests/rename/14.t vendor/pjdfstest/dist/tests/rename/15.t vendor/pjdfstest/dist/tests/rename/16.t vendor/pjdfstest/dist/tests/rename/17.t vendor/pjdfstest/dist/tests/rename/18.t vendor/pjdfstest/dist/tests/rename/19.t vendor/pjdfstest/dist/tests/rename/20.t vendor/pjdfstest/dist/tests/rename/21.t vendor/pjdfstest/dist/tests/rmdir/00.t vendor/pjdfstest/dist/tests/rmdir/01.t vendor/pjdfstest/dist/tests/rmdir/02.t vendor/pjdfstest/dist/tests/rmdir/03.t vendor/pjdfstest/dist/tests/rmdir/04.t vendor/pjdfstest/dist/tests/rmdir/05.t vendor/pjdfstest/dist/tests/rmdir/06.t vendor/pjdfstest/dist/tests/rmdir/07.t vendor/pjdfstest/dist/tests/rmdir/08.t vendor/pjdfstest/dist/tests/rmdir/09.t vendor/pjdfstest/dist/tests/rmdir/10.t vendor/pjdfstest/dist/tests/rmdir/11.t vendor/pjdfstest/dist/tests/rmdir/12.t vendor/pjdfstest/dist/tests/rmdir/13.t vendor/pjdfstest/dist/tests/rmdir/14.t vendor/pjdfstest/dist/tests/rmdir/15.t vendor/pjdfstest/dist/tests/symlink/00.t vendor/pjdfstest/dist/tests/symlink/01.t vendor/pjdfstest/dist/tests/symlink/02.t vendor/pjdfstest/dist/tests/symlink/03.t vendor/pjdfstest/dist/tests/symlink/04.t vendor/pjdfstest/dist/tests/symlink/05.t vendor/pjdfstest/dist/tests/symlink/06.t vendor/pjdfstest/dist/tests/symlink/07.t vendor/pjdfstest/dist/tests/symlink/08.t vendor/pjdfstest/dist/tests/symlink/09.t vendor/pjdfstest/dist/tests/symlink/10.t vendor/pjdfstest/dist/tests/symlink/11.t vendor/pjdfstest/dist/tests/symlink/12.t vendor/pjdfstest/dist/tests/truncate/00.t vendor/pjdfstest/dist/tests/truncate/01.t vendor/pjdfstest/dist/tests/truncate/02.t vendor/pjdfstest/dist/tests/truncate/03.t vendor/pjdfstest/dist/tests/truncate/04.t vendor/pjdfstest/dist/tests/truncate/05.t vendor/pjdfstest/dist/tests/truncate/06.t vendor/pjdfstest/dist/tests/truncate/07.t vendor/pjdfstest/dist/tests/truncate/08.t vendor/pjdfstest/dist/tests/truncate/09.t vendor/pjdfstest/dist/tests/truncate/10.t vendor/pjdfstest/dist/tests/truncate/11.t vendor/pjdfstest/dist/tests/truncate/12.t vendor/pjdfstest/dist/tests/truncate/13.t vendor/pjdfstest/dist/tests/truncate/14.t vendor/pjdfstest/dist/tests/unlink/00.t vendor/pjdfstest/dist/tests/unlink/01.t vendor/pjdfstest/dist/tests/unlink/02.t vendor/pjdfstest/dist/tests/unlink/03.t vendor/pjdfstest/dist/tests/unlink/04.t vendor/pjdfstest/dist/tests/unlink/05.t vendor/pjdfstest/dist/tests/unlink/06.t vendor/pjdfstest/dist/tests/unlink/07.t vendor/pjdfstest/dist/tests/unlink/08.t vendor/pjdfstest/dist/tests/unlink/09.t vendor/pjdfstest/dist/tests/unlink/10.t vendor/pjdfstest/dist/tests/unlink/11.t vendor/pjdfstest/dist/tests/unlink/12.t vendor/pjdfstest/dist/tests/unlink/13.t Added: vendor/pjdfstest/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/.gitignore Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,19 @@ +autom4te.cache +aclocal.m4 +compile +configure +config.h* +config.guess +config.log +config.status +config.sub +depcomp +install-sh +missing +pjdfstest +stamp-h1 +INSTALL +Makefile +Makefile.in +.deps +*.o Added: vendor/pjdfstest/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/.travis.yml Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,19 @@ +language: c +sudo: required + +matrix: + include: + - os: linux + compiler: clang + dist: xenial + - os: linux + compiler: gcc + dist: xenial + - os: osx + compiler: clang + - os: osx + compiler: gcc + +script: + - ./travis/build.sh + - ./travis/test.sh Added: vendor/pjdfstest/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/AUTHORS Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,3 @@ +* Alan Somers - contributor/co-maintainer +* Ngie Cooper - contributor/co-maintainer +* Pawel Jakub Dawidek - pjdfstest author/maintainer Added: vendor/pjdfstest/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/COPYING Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,27 @@ +$FreeBSD: head/tools/regression/pjdfstest/LICENSE 211354 2010-08-15 21:29:03Z pjd $ + +License for all regression tests available with pjdfstest: + +Copyright (c) 2006-2012 Pawel Jakub Dawidek +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Added: vendor/pjdfstest/dist/ChangeLog ============================================================================== Added: vendor/pjdfstest/dist/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/Makefile.am Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,5 @@ +AM_CFLAGS= -Wall -Werror + +bin_PROGRAMS= pjdfstest + +pjdfstest_SOURCES= pjdfstest.c Added: vendor/pjdfstest/dist/NEWS ============================================================================== Modified: vendor/pjdfstest/dist/README ============================================================================== --- vendor/pjdfstest/dist/README Wed Jun 28 08:29:20 2017 (r320446) +++ vendor/pjdfstest/dist/README Wed Jun 28 08:48:09 2017 (r320447) @@ -1,22 +1,57 @@ $FreeBSD: head/tools/regression/pjdfstest/README 211354 2010-08-15 21:29:03Z pjd $ -Few notes on how to use pjdfstest in short steps: +============ +Introduction +============ - # cd pjdfstest - # vi tests/conf - Change 'fs' to file system type you want to test (UFS or ZFS). - # vi Makefile - You need to manually tweak few things by editing CFLAGS lines - at the top of the file. - # make - It will compile pjdfstest utility which is used by regression tests. - # cd /path/to/file/system/you/want/to/test/ - # prove -r /path/to/pjdfstest/tests +pjdfstest is a test suite that helps exercise POSIX system calls. -That's all. Enjoy. +pjdfstest supports the following operating systems/filesystems: -Currently supported operating systems: FreeBSD, Solaris. -Currently supported file system types: UFS, ZFS. +- Supported Operating Systems: FreeBSD, Linux, Solaris +- Supported Filesystems: ext4, UFS, ZFS --- -Pawel Jakub Dawidek +================== +Building pjdfstest +================== + +------------- +Prerequisites +------------- + +- autoconf 2.69 or newer +- automake 1.15 or newer +- cc (clang or gcc) +- make +- appropriate system headers (please install your distribution appropriate + header package) + +--------- +Procedure +--------- + + $ autoreconf -ifs + $ ./configure + $ make pjdfstest + +================= +Running pjdfstest +================= + +------------- +Prerequisites +------------- +- You must be root when running these testcases. + +---------------------- +Software Prerequisites +---------------------- +- perl +- TAP-Harness (perl package) + +--------- +Procedure +--------- + + # cd /path/to/filesystem/under/test + # prove -rv /path/to/pjdfstest/tests Added: vendor/pjdfstest/dist/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/configure.ac Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,107 @@ +AC_PREREQ(2.61) +AC_INIT([pjdfstest],[0.1],) +AC_CONFIG_AUX_DIR([.]) +AM_INIT_AUTOMAKE +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([ \ + Makefile \ +]) + +AC_CANONICAL_HOST + +AC_PROG_CC([cc]) + +# For _GNU_SOURCE on Linux, etc. +AC_USE_SYSTEM_EXTENSIONS + +AC_CHECK_HEADERS([ \ + sys/mkdev.h \ +]) + +#HAS_FREEBSD_ACL + +AC_CHECK_FUNC([bindat], + [AC_DEFINE([HAVE_BINDAT], [1], [Define if bindat exists])]) +AC_CHECK_FUNC([chflags], + [AC_DEFINE([HAVE_CHFLAGS], [1], [Define if chflags exists])]) +AC_CHECK_FUNC([chflagsat], + [AC_DEFINE([HAVE_CHFLAGSAT], [1], [Define if chflagsat exists])]) +AC_CHECK_FUNC([connectat], + [AC_DEFINE([HAVE_CONNECTAT], [1], [Define if connectat exists])]) +AC_CHECK_FUNC([faccessat], + [AC_DEFINE([HAVE_FACCESSAT], [1], [Define if faccessat exists])]) +AC_CHECK_FUNC([fchflags], + [AC_DEFINE([HAVE_FCHFLAGS], [1], [Define if fchflags exists])]) +AC_CHECK_FUNC([fchmodat], + [AC_DEFINE([HAVE_FCHMODAT], [1], [Define if fchmodat exists])]) +AC_CHECK_FUNC([fchownat], + [AC_DEFINE([HAVE_FCHOWNAT], [1], [Define if fchownat exists])]) +AC_CHECK_FUNC([fstatat], + [AC_DEFINE([HAVE_FSTATAT], [1], [Define if fstatat exists])]) +AC_CHECK_FUNC([lchflags], + [AC_DEFINE([HAVE_LCHFLAGS], [1], [Define if lchflags exists])]) +AC_CHECK_FUNC([lchmod], + [AC_DEFINE([HAVE_LCHMOD], [1], [Define if lchmod exists])]) +AC_CHECK_FUNC([linkat], + [AC_DEFINE([HAVE_LINKAT], [1], [Define if linkat exists])]) +AC_CHECK_FUNC([lpathconf], + [AC_DEFINE([HAVE_LPATHCONF], [1], [Define if lpathconf exists])]) +AC_CHECK_FUNC([mkdirat], + [AC_DEFINE([HAVE_MKDIRAT], [1], [Define if mkdirat exists])]) +AC_CHECK_FUNC([mkfifoat], + [AC_DEFINE([HAVE_MKFIFOAT], [1], [Define if mkfifoat exists])]) +AC_CHECK_FUNC([mknodat], + [AC_DEFINE([HAVE_MKNODAT], [1], [Define if mknodat exists])]) +AC_CHECK_FUNC([openat], + [AC_DEFINE([HAVE_OPENAT], [1], [Define if openat exists])]) +AC_CHECK_FUNC([posix_fallocate], + [AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define if posix_fallocate exists])]) +AC_CHECK_FUNC([readlinkat], + [AC_DEFINE([HAVE_READLINKAT], [1], [Define if readlinkat exists])]) +AC_CHECK_FUNC([renameat], + [AC_DEFINE([HAVE_RENAMEAT], [1], [Define if renameat exists])]) +AC_CHECK_FUNC([symlinkat], + [AC_DEFINE([HAVE_SYMLINKAT], [1], [Define if symlinkat exists])]) +AC_CHECK_FUNC([utimensat], + [AC_DEFINE([HAVE_UTIMENSAT], [1], [Define if utimensat exists])]) + +# ACL test battery. +AC_CHECK_HEADER([sys/acl.h], [has_sys_acl_h=yes], [has_sys_acl_h=no]) +has_acl_funcs=no +if test x$has_sys_acl_h = xyes; then + AC_DEFINE([HAVE_SYS_ACL_H], [1], + [Define to 1 if sys/acl.h is available]) + AC_CHECK_FUNCS([acl_create_entry_np acl_from_text acl_get_entry acl_get_file acl_set_file], + [has_acl_funcs=yes],[]) +fi +if test x$has_acl_funcs = xyes; then + # Check for NFSv4 ACL support. + AC_CHECK_DECL([ACL_TYPE_NFS4], + [has_nfsv4_acl_support=yes], [has_nfsv4_acl_support=no],[[#include ]]) + if test x$has_nfsv4_acl_support = xyes; then + AC_DEFINE([HAS_NFSV4_ACL_SUPPORT], [1], + [Define to 1 if NFSv4 ACL support is available]) + fi +fi + +AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_birthtim, struct stat.st_birthtime, struct stat.st_birthtimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_ctim, struct stat.st_ctimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimespec], [], [], [[ +#include +#include +]]) + +AC_OUTPUT Modified: vendor/pjdfstest/dist/pjdfstest.c ============================================================================== --- vendor/pjdfstest/dist/pjdfstest.c Wed Jun 28 08:29:20 2017 (r320446) +++ vendor/pjdfstest/dist/pjdfstest.c Wed Jun 28 08:48:09 2017 (r320447) @@ -26,14 +26,19 @@ * $FreeBSD$ */ +/* Needs to be first to twiddle appropriate system configuration/HAVE_* flags */ +#include "config.h" + #include -#include +#ifdef HAVE_SYS_ACL_H +#include +#endif +#ifdef HAVE_SYS_MKDEV_H +#include +#endif #include #include #include -#ifndef makedev -#include -#endif #include #include @@ -45,18 +50,15 @@ #include #include -#ifndef HAS_TRUNCATE64 -#define truncate64 truncate -#define ftruncate64 ftruncate +#ifdef __sun__ +#define _USE_STAT64 #endif -#ifndef HAS_STAT64 -#define stat64 stat -#define fstat64 fstat -#define lstat64 lstat + +#ifdef _USE_STAT64 +typedef struct stat64 stat_t; +#else +typedef struct stat stat_t; #endif -#ifdef HAS_FREEBSD_ACL -#include -#endif #ifndef ALLPERMS #define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) @@ -64,69 +66,91 @@ enum action { ACTION_OPEN, +#ifdef HAVE_OPENAT ACTION_OPENAT, +#endif ACTION_CREATE, ACTION_UNLINK, +#ifdef HAVE_UNLINKAT ACTION_UNLINKAT, +#endif ACTION_MKDIR, +#ifdef HAVE_MKDIRAT ACTION_MKDIRAT, +#endif ACTION_RMDIR, ACTION_LINK, +#ifdef HAVE_LINKAT ACTION_LINKAT, +#endif ACTION_SYMLINK, +#ifdef HAVE_SYMLINKAT ACTION_SYMLINKAT, +#endif ACTION_RENAME, +#ifdef HAVE_RENAMEAT ACTION_RENAMEAT, +#endif ACTION_MKFIFO, +#ifdef HAVE_MKFIFOAT ACTION_MKFIFOAT, +#endif ACTION_MKNOD, ACTION_MKNODAT, ACTION_BIND, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT ACTION_BINDAT, #endif ACTION_CONNECT, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT ACTION_CONNECTAT, #endif ACTION_CHMOD, ACTION_FCHMOD, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD ACTION_LCHMOD, #endif ACTION_FCHMODAT, ACTION_CHOWN, ACTION_FCHOWN, ACTION_LCHOWN, +#ifdef HAVE_FCHOWNAT ACTION_FCHOWNAT, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS ACTION_CHFLAGS, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS ACTION_FCHFLAGS, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT ACTION_CHFLAGSAT, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS ACTION_LCHFLAGS, #endif ACTION_TRUNCATE, ACTION_FTRUNCATE, +#ifdef HAVE_POSIX_FALLOCATE + ACTION_POSIX_FALLOCATE, +#endif ACTION_STAT, ACTION_FSTAT, ACTION_LSTAT, ACTION_FSTATAT, ACTION_PATHCONF, ACTION_FPATHCONF, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF ACTION_LPATHCONF, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT ACTION_PREPENDACL, ACTION_READACL, #endif ACTION_WRITE, +#ifdef HAVE_UTIMENSAT + ACTION_UTIMENSAT, +#endif }; #define TYPE_NONE 0x0000 @@ -147,69 +171,104 @@ struct syscall_desc { static struct syscall_desc syscalls[] = { { "open", ACTION_OPEN, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#ifdef HAVE_OPENAT { "openat", ACTION_OPENAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#endif { "create", ACTION_CREATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "unlink", ACTION_UNLINK, { TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UNLINKAT { "unlinkat", ACTION_UNLINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "mkdir", ACTION_MKDIR, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKDIRAT { "mkdirat", ACTION_MKDIRAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "rmdir", ACTION_RMDIR, { TYPE_STRING, TYPE_NONE } }, { "link", ACTION_LINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_LINKAT { "linkat", ACTION_LINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_SYMLINKAT { "symlinkat", ACTION_SYMLINKAT, { TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_RENAMEAT { "renameat", ACTION_RENAMEAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKFIFOAT { "mkfifoat", ACTION_MKFIFOAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "mknod", ACTION_MKNOD, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#ifdef HAVE_MKNODAT { "mknodat", ACTION_MKNODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#endif { "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT { "bindat", ACTION_BINDAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT { "connectat", ACTION_CONNECTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "fchmod", ACTION_FCHMOD, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD { "lchmod", ACTION_LCHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, #endif +#ifdef HAVE_FCHMODAT { "fchmodat", ACTION_FCHMODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, +#endif { "chown", ACTION_CHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "fchown", ACTION_FCHOWN, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "lchown", ACTION_LCHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_FCHOWNAT { "fchownat", ACTION_FCHOWNAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS { "chflags", ACTION_CHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS { "fchflags", ACTION_FCHFLAGS, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT { "chflagsat", ACTION_CHFLAGSAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS { "lchflags", ACTION_LCHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif { "truncate", ACTION_TRUNCATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "ftruncate", ACTION_FTRUNCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_POSIX_FALLOCATE + { "posix_fallocate", ACTION_POSIX_FALLOCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#endif { "stat", ACTION_STAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fstat", ACTION_FSTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, { "lstat", ACTION_LSTAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_FSTATAT { "fstatat", ACTION_FSTATAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "pathconf", ACTION_PATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fpathconf", ACTION_FPATHCONF, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF { "lpathconf", ACTION_LPATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT { "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } }, #endif { "write", ACTION_WRITE, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UTIMENSAT + { "utimensat", ACTION_UTIMENSAT, { + TYPE_DESCRIPTOR, /* Directory */ + TYPE_STRING, /* Relative path */ + TYPE_NUMBER, /* atime seconds */ + TYPE_STRING, /* atime nanoseconds */ + TYPE_NUMBER, /* mtime seconds */ + TYPE_STRING, /* mtime nanoseconds */ + TYPE_STRING, /* flags */}}, +#endif { NULL, -1, { TYPE_NONE } } }; @@ -219,122 +278,136 @@ struct flag { }; static struct flag open_flags[] = { -#ifdef O_RDONLY +#ifdef O_RDONLY { O_RDONLY, "O_RDONLY" }, #endif -#ifdef O_WRONLY +#ifdef O_WRONLY { O_WRONLY, "O_WRONLY" }, #endif -#ifdef O_RDWR +#ifdef O_RDWR { O_RDWR, "O_RDWR" }, #endif -#ifdef O_NONBLOCK +#ifdef O_NONBLOCK { O_NONBLOCK, "O_NONBLOCK" }, #endif -#ifdef O_APPEND +#ifdef O_APPEND { O_APPEND, "O_APPEND" }, #endif -#ifdef O_CREAT +#ifdef O_CREAT { O_CREAT, "O_CREAT" }, #endif -#ifdef O_TRUNC +#ifdef O_TRUNC { O_TRUNC, "O_TRUNC" }, #endif -#ifdef O_EXCL +#ifdef O_EXCL { O_EXCL, "O_EXCL" }, #endif -#ifdef O_SHLOCK +#ifdef O_SHLOCK { O_SHLOCK, "O_SHLOCK" }, #endif -#ifdef O_EXLOCK +#ifdef O_EXLOCK { O_EXLOCK, "O_EXLOCK" }, #endif -#ifdef O_DIRECT +#ifdef O_DIRECT { O_DIRECT, "O_DIRECT" }, #endif -#ifdef O_FSYNC +#ifdef O_FSYNC { O_FSYNC, "O_FSYNC" }, #endif -#ifdef O_SYNC +#ifdef O_SYNC { O_SYNC, "O_SYNC" }, #endif -#ifdef O_NOFOLLOW +#ifdef O_NOFOLLOW { O_NOFOLLOW, "O_NOFOLLOW" }, #endif -#ifdef O_NOCTTY +#ifdef O_NOCTTY { O_NOCTTY, "O_NOCTTY" }, #endif -#ifdef O_DIRECTORY +#ifdef O_DIRECTORY { O_DIRECTORY, "O_DIRECTORY" }, #endif { 0, NULL } }; -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static struct flag chflags_flags[] = { -#ifdef UF_NODUMP +#ifdef UF_NODUMP { UF_NODUMP, "UF_NODUMP" }, #endif -#ifdef UF_IMMUTABLE +#ifdef UF_IMMUTABLE { UF_IMMUTABLE, "UF_IMMUTABLE" }, #endif -#ifdef UF_APPEND +#ifdef UF_APPEND { UF_APPEND, "UF_APPEND" }, #endif -#ifdef UF_NOUNLINK +#ifdef UF_NOUNLINK { UF_NOUNLINK, "UF_NOUNLINK" }, #endif -#ifdef UF_OPAQUE +#ifdef UF_OPAQUE { UF_OPAQUE, "UF_OPAQUE" }, #endif -#ifdef SF_ARCHIVED +#ifdef SF_ARCHIVED { SF_ARCHIVED, "SF_ARCHIVED" }, #endif -#ifdef SF_IMMUTABLE +#ifdef SF_IMMUTABLE { SF_IMMUTABLE, "SF_IMMUTABLE" }, #endif -#ifdef SF_APPEND +#ifdef SF_APPEND { SF_APPEND, "SF_APPEND" }, #endif -#ifdef SF_NOUNLINK +#ifdef SF_NOUNLINK { SF_NOUNLINK, "SF_NOUNLINK" }, #endif -#ifdef SF_SNAPSHOT +#ifdef SF_SNAPSHOT { SF_SNAPSHOT, "SF_SNAPSHOT" }, #endif { 0, NULL } }; #endif +#ifdef HAVE_UNLINKAT static struct flag unlinkat_flags[] = { { AT_REMOVEDIR, "AT_REMOVEDIR" }, { 0, NULL } }; +#endif +#ifdef HAVE_LINKAT static struct flag linkat_flags[] = { +#ifdef AT_SYMLINK_FOLLOW { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" }, +#endif { 0, NULL } }; +#endif +#ifdef HAVE_CHFLAGSAT static struct flag chflagsat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHMODAT static struct flag fchmodat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHOWNAT static struct flag fchownat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FSTATAT static struct flag fstatat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif struct name { int n_name; @@ -342,16 +415,16 @@ struct name { }; static struct name pathconf_names[] = { -#ifdef _PC_LINK_MAX +#ifdef _PC_LINK_MAX { _PC_LINK_MAX, "_PC_LINK_MAX" }, #endif -#ifdef _PC_NAME_MAX +#ifdef _PC_NAME_MAX { _PC_NAME_MAX, "_PC_NAME_MAX" }, #endif -#ifdef _PC_PATH_MAX +#ifdef _PC_PATH_MAX { _PC_PATH_MAX, "_PC_PATH_MAX" }, #endif -#ifdef _PC_SYMLINK_MAX +#ifdef _PC_SYMLINK_MAX { _PC_SYMLINK_MAX, "_PC_SYMLINK_MAX" }, #endif { 0, NULL } @@ -394,7 +467,7 @@ str2flags(struct flag *tflags, char *sflags) return (flags); } -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static char * flags2str(struct flag *tflags, long long flags) { @@ -440,7 +513,7 @@ find_syscall(const char *name) } static void -show_stat(struct stat64 *sp, const char *what) +show_stat(stat_t *sp, const char *what) { if (strcmp(what, "mode") == 0) @@ -459,11 +532,51 @@ show_stat(struct stat64 *sp, const char *what) printf("%lld", (long long)sp->st_blocks); else if (strcmp(what, "atime") == 0) printf("%lld", (long long)sp->st_atime); - else if (strcmp(what, "mtime") == 0) - printf("%lld", (long long)sp->st_mtime); +#if defined(HAVE_STRUCT_STAT_ST_ATIM) || \ + defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) + else if (strcmp(what, "atime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_ATIMESPEC + printf("%lld", (long long)sp->st_atimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_atim.tv_nsec); +#endif +#endif /* st_atim* */ else if (strcmp(what, "ctime") == 0) printf("%lld", (long long)sp->st_ctime); -#ifdef HAS_CHFLAGS +#if defined(HAVE_STRUCT_STAT_ST_CTIM) || \ + defined(HAVE_STRUCT_STAT_ST_CTIMESPEC) + else if (strcmp(what, "ctime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_CTIMESPEC + printf("%lld", (long long)sp->st_ctimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_ctim.tv_nsec); +#endif +#endif /* st_ctim* */ + else if (strcmp(what, "mtime") == 0) + printf("%lld", (long long)sp->st_mtime); + else if (strcmp(what, "mtime_ns") == 0) +#if defined(HAVE_STRUCT_STAT_ST_MTIM) || \ + defined(HAVE_STRUCT_STAT_ST_MTIMESPEC) +#ifdef HAVE_STRUCT_STAT_ST_MTIMESPEC + printf("%lld", (long long)sp->st_mtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_mtim.tv_nsec); +#endif +#endif /* st_mtim* */ +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + else if (strcmp(what, "birthtime") == 0) + printf("%lld", (long long)sp->st_birthtime); +#endif /* st_birthtime */ +#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIM) || \ + defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC) + else if (strcmp(what, "birthtime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC + printf("%lld", (long long)sp->st_birthtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_birthtim.tv_nsec); +#endif +#endif /* st_birthtim{,espec} */ +#ifdef HAVE_CHFLAGS else if (strcmp(what, "flags") == 0) printf("%s", flags2str(chflags_flags, (long long)sp->st_flags)); #endif @@ -504,7 +617,7 @@ show_stat(struct stat64 *sp, const char *what) } static void -show_stats(struct stat64 *sp, char *what) +show_stats(stat_t *sp, char *what) { const char *s = ""; char *w; @@ -547,7 +660,11 @@ descriptor_get(int pos) static unsigned int call_syscall(struct syscall_desc *scall, char *argv[]) { - struct stat64 sb; + stat_t sb; +#ifdef HAVE_UTIMENSAT + struct timespec times[2]; + int flag; +#endif long long flags; unsigned int i; char *endp; @@ -556,7 +673,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) char *str; long long num; } args[MAX_ARGS]; -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT int entry_id = ACL_FIRST_ENTRY; acl_t acl, newacl; acl_entry_t entry, newentry; @@ -645,6 +762,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#ifdef HAVE_OPENAT case ACTION_OPENAT: flags = str2flags(open_flags, STR(2)); if (flags & O_CREAT) { @@ -664,6 +782,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#endif case ACTION_CREATE: rval = open(STR(0), O_CREAT | O_EXCL, (mode_t)NUM(1)); if (rval >= 0) @@ -672,46 +791,60 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_UNLINK: rval = unlink(STR(0)); break; +#ifdef HAVE_UNLINKAT case ACTION_UNLINKAT: rval = unlinkat(NUM(0), STR(1), (int)str2flags(unlinkat_flags, STR(2))); break; +#endif case ACTION_MKDIR: rval = mkdir(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKDIRAT case ACTION_MKDIRAT: rval = mkdirat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_RMDIR: rval = rmdir(STR(0)); break; case ACTION_LINK: rval = link(STR(0), STR(1)); break; +#ifdef HAVE_LINKAT case ACTION_LINKAT: rval = linkat(NUM(0), STR(1), NUM(2), STR(3), (int)str2flags(linkat_flags, STR(4))); break; +#endif case ACTION_SYMLINK: rval = symlink(STR(0), STR(1)); break; +#ifdef HAVE_SYMLINKAT case ACTION_SYMLINKAT: rval = symlinkat(STR(0), NUM(1), STR(2)); break; +#endif case ACTION_RENAME: rval = rename(STR(0), STR(1)); break; +#ifdef HAVE_RENAMEAT case ACTION_RENAMEAT: rval = renameat(NUM(0), STR(1), NUM(2), STR(3)); break; +#endif case ACTION_MKFIFO: rval = mkfifo(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKFIFOAT case ACTION_MKFIFOAT: rval = mkfifoat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_MKNOD: +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: +#endif { mode_t ntype; dev_t dev; @@ -721,9 +854,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: fa = 0; break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: fa = 1; break; +#endif default: abort(); } @@ -747,9 +882,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: rval = mknod(STR(0), ntype | NUM(2), dev); break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: rval = mknodat(NUM(0), STR(1), ntype | NUM(3), dev); break; +#endif default: abort(); } @@ -768,7 +905,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = bind(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT case ACTION_BINDAT: { struct sockaddr_un sunx; @@ -797,7 +934,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = connect(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT case ACTION_CONNECTAT: { struct sockaddr_un sunx; @@ -819,15 +956,17 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_FCHMOD: rval = fchmod(NUM(0), (mode_t)NUM(1)); break; -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD case ACTION_LCHMOD: rval = lchmod(STR(0), (mode_t)NUM(1)); break; #endif +#ifdef HAVE_FCHMODAT case ACTION_FCHMODAT: rval = fchmodat(NUM(0), STR(1), (mode_t)NUM(2), str2flags(fchmodat_flags, STR(3))); break; +#endif case ACTION_CHOWN: rval = chown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; @@ -837,62 +976,94 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_LCHOWN: rval = lchown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; +#ifdef HAVE_FCHOWNAT case ACTION_FCHOWNAT: rval = fchownat(NUM(0), STR(1), (uid_t)NUM(2), (gid_t)NUM(3), (int)str2flags(fchownat_flags, STR(4))); break; -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS case ACTION_CHFLAGS: rval = chflags(STR(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS case ACTION_FCHFLAGS: rval = fchflags(NUM(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT case ACTION_CHFLAGSAT: rval = chflagsat(NUM(0), STR(1), (unsigned long)str2flags(chflags_flags, STR(2)), (int)str2flags(chflagsat_flags, STR(3))); break; #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 28 09:22:48 2017 Return-Path: Delivered-To: svn-src-all@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 4CAF8D9D1E4; Wed, 28 Jun 2017 09:22:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 EF938719DA; Wed, 28 Jun 2017 09:22:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S9Ml65021693; Wed, 28 Jun 2017 09:22:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S9MkTZ021682; Wed, 28 Jun 2017 09:22:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280922.v5S9MkTZ021682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 09:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320448 - in head: contrib/pjdfstest contrib/pjdfstest/tests contrib/pjdfstest/tests/chflags contrib/pjdfstest/tests/chmod contrib/pjdfstest/tests/chown contrib/pjdfstest/tests/ftruncat... X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: contrib/pjdfstest contrib/pjdfstest/tests contrib/pjdfstest/tests/chflags contrib/pjdfstest/tests/chmod contrib/pjdfstest/tests/chown contrib/pjdfstest/tests/ftruncate contrib/pjdfstest/tests... X-SVN-Commit-Revision: 320448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 09:22:48 -0000 Author: ngie Date: Wed Jun 28 09:22:45 2017 New Revision: 320448 URL: https://svnweb.freebsd.org/changeset/base/320448 Log: Pull down pjdfstest 0.1 The summary of changes is as follows.. Generic changes:: - Added configure support [2]. - Check for lchmod filesystem support with create_file(..); for testcases that require lchmod, skip the testcase -- otherwise use chmod directly [1]. - Added Travis CI integration [2]. - Added utimensat testcases [1]. Linux support:: - Fixed Linux support to pass on later supported versions of Fedora/Ubuntu [2]. - Conditionally enable posix_fallocate(2) support [2]. OSX support:: - Fixed compilation on OSX [2]. - Added partial OSX support (the test run isn't fully green yet) [2]. MFC after: 2 months Obtained from: https://github.com/pjd/pjdfstest/tree/0.1 Relnotes: yes Submitted by: asomers [1], ngie [2] Tested with: UFS, ZFS Added: head/contrib/pjdfstest/.gitignore - copied unchanged from r320447, vendor/pjdfstest/dist/.gitignore head/contrib/pjdfstest/.travis.yml - copied unchanged from r320447, vendor/pjdfstest/dist/.travis.yml head/contrib/pjdfstest/AUTHORS - copied unchanged from r320447, vendor/pjdfstest/dist/AUTHORS head/contrib/pjdfstest/COPYING - copied unchanged from r320447, vendor/pjdfstest/dist/COPYING head/contrib/pjdfstest/ChangeLog - copied unchanged from r320447, vendor/pjdfstest/dist/ChangeLog head/contrib/pjdfstest/Makefile.am - copied unchanged from r320447, vendor/pjdfstest/dist/Makefile.am head/contrib/pjdfstest/NEWS - copied unchanged from r320447, vendor/pjdfstest/dist/NEWS head/contrib/pjdfstest/configure.ac - copied unchanged from r320447, vendor/pjdfstest/dist/configure.ac head/contrib/pjdfstest/tests/utimensat/ - copied from r320447, vendor/pjdfstest/dist/tests/utimensat/ head/contrib/pjdfstest/travis/ - copied from r320447, vendor/pjdfstest/dist/travis/ head/tests/sys/pjdfstest/config.h (contents, props changed) head/tests/sys/pjdfstest/tests/utimensat/ head/tests/sys/pjdfstest/tests/utimensat/Makefile - copied, changed from r320415, head/tests/sys/pjdfstest/tests/chown/Makefile Deleted: head/contrib/pjdfstest/Makefile Modified: head/contrib/pjdfstest/README head/contrib/pjdfstest/pjdfstest.c head/contrib/pjdfstest/tests/chflags/00.t head/contrib/pjdfstest/tests/chflags/01.t head/contrib/pjdfstest/tests/chflags/02.t head/contrib/pjdfstest/tests/chflags/03.t head/contrib/pjdfstest/tests/chflags/04.t head/contrib/pjdfstest/tests/chflags/05.t head/contrib/pjdfstest/tests/chflags/06.t head/contrib/pjdfstest/tests/chflags/07.t head/contrib/pjdfstest/tests/chflags/08.t head/contrib/pjdfstest/tests/chflags/09.t head/contrib/pjdfstest/tests/chflags/10.t head/contrib/pjdfstest/tests/chflags/11.t head/contrib/pjdfstest/tests/chflags/12.t head/contrib/pjdfstest/tests/chflags/13.t head/contrib/pjdfstest/tests/chmod/00.t head/contrib/pjdfstest/tests/chmod/01.t head/contrib/pjdfstest/tests/chmod/02.t head/contrib/pjdfstest/tests/chmod/03.t head/contrib/pjdfstest/tests/chmod/04.t head/contrib/pjdfstest/tests/chmod/05.t head/contrib/pjdfstest/tests/chmod/06.t head/contrib/pjdfstest/tests/chmod/07.t head/contrib/pjdfstest/tests/chmod/08.t head/contrib/pjdfstest/tests/chmod/09.t head/contrib/pjdfstest/tests/chmod/10.t head/contrib/pjdfstest/tests/chmod/11.t head/contrib/pjdfstest/tests/chmod/12.t head/contrib/pjdfstest/tests/chown/00.t head/contrib/pjdfstest/tests/chown/01.t head/contrib/pjdfstest/tests/chown/02.t head/contrib/pjdfstest/tests/chown/03.t head/contrib/pjdfstest/tests/chown/04.t head/contrib/pjdfstest/tests/chown/05.t head/contrib/pjdfstest/tests/chown/06.t head/contrib/pjdfstest/tests/chown/07.t head/contrib/pjdfstest/tests/chown/08.t head/contrib/pjdfstest/tests/chown/09.t head/contrib/pjdfstest/tests/chown/10.t head/contrib/pjdfstest/tests/conf head/contrib/pjdfstest/tests/ftruncate/00.t head/contrib/pjdfstest/tests/ftruncate/01.t head/contrib/pjdfstest/tests/ftruncate/02.t head/contrib/pjdfstest/tests/ftruncate/03.t head/contrib/pjdfstest/tests/ftruncate/04.t head/contrib/pjdfstest/tests/ftruncate/05.t head/contrib/pjdfstest/tests/ftruncate/06.t head/contrib/pjdfstest/tests/ftruncate/07.t head/contrib/pjdfstest/tests/ftruncate/08.t head/contrib/pjdfstest/tests/ftruncate/09.t head/contrib/pjdfstest/tests/ftruncate/10.t head/contrib/pjdfstest/tests/ftruncate/11.t head/contrib/pjdfstest/tests/ftruncate/12.t head/contrib/pjdfstest/tests/ftruncate/13.t head/contrib/pjdfstest/tests/ftruncate/14.t head/contrib/pjdfstest/tests/granular/00.t head/contrib/pjdfstest/tests/granular/01.t head/contrib/pjdfstest/tests/granular/02.t head/contrib/pjdfstest/tests/granular/03.t head/contrib/pjdfstest/tests/granular/04.t head/contrib/pjdfstest/tests/granular/05.t head/contrib/pjdfstest/tests/link/00.t head/contrib/pjdfstest/tests/link/01.t head/contrib/pjdfstest/tests/link/02.t head/contrib/pjdfstest/tests/link/03.t head/contrib/pjdfstest/tests/link/04.t head/contrib/pjdfstest/tests/link/05.t head/contrib/pjdfstest/tests/link/06.t head/contrib/pjdfstest/tests/link/07.t head/contrib/pjdfstest/tests/link/08.t head/contrib/pjdfstest/tests/link/09.t head/contrib/pjdfstest/tests/link/10.t head/contrib/pjdfstest/tests/link/11.t head/contrib/pjdfstest/tests/link/12.t head/contrib/pjdfstest/tests/link/13.t head/contrib/pjdfstest/tests/link/14.t head/contrib/pjdfstest/tests/link/15.t head/contrib/pjdfstest/tests/link/16.t head/contrib/pjdfstest/tests/link/17.t head/contrib/pjdfstest/tests/misc.sh head/contrib/pjdfstest/tests/mkdir/00.t head/contrib/pjdfstest/tests/mkdir/01.t head/contrib/pjdfstest/tests/mkdir/02.t head/contrib/pjdfstest/tests/mkdir/03.t head/contrib/pjdfstest/tests/mkdir/04.t head/contrib/pjdfstest/tests/mkdir/05.t head/contrib/pjdfstest/tests/mkdir/06.t head/contrib/pjdfstest/tests/mkdir/07.t head/contrib/pjdfstest/tests/mkdir/08.t head/contrib/pjdfstest/tests/mkdir/09.t head/contrib/pjdfstest/tests/mkdir/10.t head/contrib/pjdfstest/tests/mkdir/11.t head/contrib/pjdfstest/tests/mkdir/12.t head/contrib/pjdfstest/tests/mkfifo/00.t head/contrib/pjdfstest/tests/mkfifo/01.t head/contrib/pjdfstest/tests/mkfifo/02.t head/contrib/pjdfstest/tests/mkfifo/03.t head/contrib/pjdfstest/tests/mkfifo/04.t head/contrib/pjdfstest/tests/mkfifo/05.t head/contrib/pjdfstest/tests/mkfifo/06.t head/contrib/pjdfstest/tests/mkfifo/07.t head/contrib/pjdfstest/tests/mkfifo/08.t head/contrib/pjdfstest/tests/mkfifo/09.t head/contrib/pjdfstest/tests/mkfifo/10.t head/contrib/pjdfstest/tests/mkfifo/11.t head/contrib/pjdfstest/tests/mkfifo/12.t head/contrib/pjdfstest/tests/mknod/00.t head/contrib/pjdfstest/tests/mknod/01.t head/contrib/pjdfstest/tests/mknod/02.t head/contrib/pjdfstest/tests/mknod/03.t head/contrib/pjdfstest/tests/mknod/04.t head/contrib/pjdfstest/tests/mknod/05.t head/contrib/pjdfstest/tests/mknod/06.t head/contrib/pjdfstest/tests/mknod/07.t head/contrib/pjdfstest/tests/mknod/08.t head/contrib/pjdfstest/tests/mknod/09.t head/contrib/pjdfstest/tests/mknod/10.t head/contrib/pjdfstest/tests/mknod/11.t head/contrib/pjdfstest/tests/open/00.t head/contrib/pjdfstest/tests/open/01.t head/contrib/pjdfstest/tests/open/02.t head/contrib/pjdfstest/tests/open/03.t head/contrib/pjdfstest/tests/open/04.t head/contrib/pjdfstest/tests/open/05.t head/contrib/pjdfstest/tests/open/06.t head/contrib/pjdfstest/tests/open/07.t head/contrib/pjdfstest/tests/open/08.t head/contrib/pjdfstest/tests/open/09.t head/contrib/pjdfstest/tests/open/10.t head/contrib/pjdfstest/tests/open/11.t head/contrib/pjdfstest/tests/open/12.t head/contrib/pjdfstest/tests/open/13.t head/contrib/pjdfstest/tests/open/14.t head/contrib/pjdfstest/tests/open/15.t head/contrib/pjdfstest/tests/open/16.t head/contrib/pjdfstest/tests/open/17.t head/contrib/pjdfstest/tests/open/18.t head/contrib/pjdfstest/tests/open/19.t head/contrib/pjdfstest/tests/open/20.t head/contrib/pjdfstest/tests/open/21.t head/contrib/pjdfstest/tests/open/22.t head/contrib/pjdfstest/tests/open/23.t head/contrib/pjdfstest/tests/open/24.t head/contrib/pjdfstest/tests/rename/00.t head/contrib/pjdfstest/tests/rename/01.t head/contrib/pjdfstest/tests/rename/02.t head/contrib/pjdfstest/tests/rename/03.t head/contrib/pjdfstest/tests/rename/04.t head/contrib/pjdfstest/tests/rename/05.t head/contrib/pjdfstest/tests/rename/06.t head/contrib/pjdfstest/tests/rename/07.t head/contrib/pjdfstest/tests/rename/08.t head/contrib/pjdfstest/tests/rename/09.t head/contrib/pjdfstest/tests/rename/10.t head/contrib/pjdfstest/tests/rename/11.t head/contrib/pjdfstest/tests/rename/12.t head/contrib/pjdfstest/tests/rename/13.t head/contrib/pjdfstest/tests/rename/14.t head/contrib/pjdfstest/tests/rename/15.t head/contrib/pjdfstest/tests/rename/16.t head/contrib/pjdfstest/tests/rename/17.t head/contrib/pjdfstest/tests/rename/18.t head/contrib/pjdfstest/tests/rename/19.t head/contrib/pjdfstest/tests/rename/20.t head/contrib/pjdfstest/tests/rename/21.t head/contrib/pjdfstest/tests/rmdir/00.t head/contrib/pjdfstest/tests/rmdir/01.t head/contrib/pjdfstest/tests/rmdir/02.t head/contrib/pjdfstest/tests/rmdir/03.t head/contrib/pjdfstest/tests/rmdir/04.t head/contrib/pjdfstest/tests/rmdir/05.t head/contrib/pjdfstest/tests/rmdir/06.t head/contrib/pjdfstest/tests/rmdir/07.t head/contrib/pjdfstest/tests/rmdir/08.t head/contrib/pjdfstest/tests/rmdir/09.t head/contrib/pjdfstest/tests/rmdir/10.t head/contrib/pjdfstest/tests/rmdir/11.t head/contrib/pjdfstest/tests/rmdir/12.t head/contrib/pjdfstest/tests/rmdir/13.t head/contrib/pjdfstest/tests/rmdir/14.t head/contrib/pjdfstest/tests/rmdir/15.t head/contrib/pjdfstest/tests/symlink/00.t head/contrib/pjdfstest/tests/symlink/01.t head/contrib/pjdfstest/tests/symlink/02.t head/contrib/pjdfstest/tests/symlink/03.t head/contrib/pjdfstest/tests/symlink/04.t head/contrib/pjdfstest/tests/symlink/05.t head/contrib/pjdfstest/tests/symlink/06.t head/contrib/pjdfstest/tests/symlink/07.t head/contrib/pjdfstest/tests/symlink/08.t head/contrib/pjdfstest/tests/symlink/09.t head/contrib/pjdfstest/tests/symlink/10.t head/contrib/pjdfstest/tests/symlink/11.t head/contrib/pjdfstest/tests/symlink/12.t head/contrib/pjdfstest/tests/truncate/00.t head/contrib/pjdfstest/tests/truncate/01.t head/contrib/pjdfstest/tests/truncate/02.t head/contrib/pjdfstest/tests/truncate/03.t head/contrib/pjdfstest/tests/truncate/04.t head/contrib/pjdfstest/tests/truncate/05.t head/contrib/pjdfstest/tests/truncate/06.t head/contrib/pjdfstest/tests/truncate/07.t head/contrib/pjdfstest/tests/truncate/08.t head/contrib/pjdfstest/tests/truncate/09.t head/contrib/pjdfstest/tests/truncate/10.t head/contrib/pjdfstest/tests/truncate/11.t head/contrib/pjdfstest/tests/truncate/12.t head/contrib/pjdfstest/tests/truncate/13.t head/contrib/pjdfstest/tests/truncate/14.t head/contrib/pjdfstest/tests/unlink/00.t head/contrib/pjdfstest/tests/unlink/01.t head/contrib/pjdfstest/tests/unlink/02.t head/contrib/pjdfstest/tests/unlink/03.t head/contrib/pjdfstest/tests/unlink/04.t head/contrib/pjdfstest/tests/unlink/05.t head/contrib/pjdfstest/tests/unlink/06.t head/contrib/pjdfstest/tests/unlink/07.t head/contrib/pjdfstest/tests/unlink/08.t head/contrib/pjdfstest/tests/unlink/09.t head/contrib/pjdfstest/tests/unlink/10.t head/contrib/pjdfstest/tests/unlink/11.t head/contrib/pjdfstest/tests/unlink/12.t head/contrib/pjdfstest/tests/unlink/13.t head/etc/mtree/BSD.tests.dist head/tests/sys/pjdfstest/pjdfstest/Makefile head/tests/sys/pjdfstest/tests/Makefile Directory Properties: head/contrib/pjdfstest/ (props changed) Copied: head/contrib/pjdfstest/.gitignore (from r320447, vendor/pjdfstest/dist/.gitignore) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/.gitignore Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/.gitignore) @@ -0,0 +1,19 @@ +autom4te.cache +aclocal.m4 +compile +configure +config.h* +config.guess +config.log +config.status +config.sub +depcomp +install-sh +missing +pjdfstest +stamp-h1 +INSTALL +Makefile +Makefile.in +.deps +*.o Copied: head/contrib/pjdfstest/.travis.yml (from r320447, vendor/pjdfstest/dist/.travis.yml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/.travis.yml Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/.travis.yml) @@ -0,0 +1,19 @@ +language: c +sudo: required + +matrix: + include: + - os: linux + compiler: clang + dist: xenial + - os: linux + compiler: gcc + dist: xenial + - os: osx + compiler: clang + - os: osx + compiler: gcc + +script: + - ./travis/build.sh + - ./travis/test.sh Copied: head/contrib/pjdfstest/AUTHORS (from r320447, vendor/pjdfstest/dist/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/AUTHORS Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/AUTHORS) @@ -0,0 +1,3 @@ +* Alan Somers - contributor/co-maintainer +* Ngie Cooper - contributor/co-maintainer +* Pawel Jakub Dawidek - pjdfstest author/maintainer Copied: head/contrib/pjdfstest/COPYING (from r320447, vendor/pjdfstest/dist/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/COPYING Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/COPYING) @@ -0,0 +1,27 @@ +$FreeBSD: head/tools/regression/pjdfstest/LICENSE 211354 2010-08-15 21:29:03Z pjd $ + +License for all regression tests available with pjdfstest: + +Copyright (c) 2006-2012 Pawel Jakub Dawidek +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Copied: head/contrib/pjdfstest/ChangeLog (from r320447, vendor/pjdfstest/dist/ChangeLog) ============================================================================== Copied: head/contrib/pjdfstest/Makefile.am (from r320447, vendor/pjdfstest/dist/Makefile.am) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/Makefile.am Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/Makefile.am) @@ -0,0 +1,5 @@ +AM_CFLAGS= -Wall -Werror + +bin_PROGRAMS= pjdfstest + +pjdfstest_SOURCES= pjdfstest.c Copied: head/contrib/pjdfstest/NEWS (from r320447, vendor/pjdfstest/dist/NEWS) ============================================================================== Modified: head/contrib/pjdfstest/README ============================================================================== --- head/contrib/pjdfstest/README Wed Jun 28 08:48:09 2017 (r320447) +++ head/contrib/pjdfstest/README Wed Jun 28 09:22:45 2017 (r320448) @@ -1,22 +1,57 @@ $FreeBSD: head/tools/regression/pjdfstest/README 211354 2010-08-15 21:29:03Z pjd $ -Few notes on how to use pjdfstest in short steps: +============ +Introduction +============ - # cd pjdfstest - # vi tests/conf - Change 'fs' to file system type you want to test (UFS or ZFS). - # vi Makefile - You need to manually tweak few things by editing CFLAGS lines - at the top of the file. - # make - It will compile pjdfstest utility which is used by regression tests. - # cd /path/to/file/system/you/want/to/test/ - # prove -r /path/to/pjdfstest/tests +pjdfstest is a test suite that helps exercise POSIX system calls. -That's all. Enjoy. +pjdfstest supports the following operating systems/filesystems: -Currently supported operating systems: FreeBSD, Solaris. -Currently supported file system types: UFS, ZFS. +- Supported Operating Systems: FreeBSD, Linux, Solaris +- Supported Filesystems: ext4, UFS, ZFS --- -Pawel Jakub Dawidek +================== +Building pjdfstest +================== + +------------- +Prerequisites +------------- + +- autoconf 2.69 or newer +- automake 1.15 or newer +- cc (clang or gcc) +- make +- appropriate system headers (please install your distribution appropriate + header package) + +--------- +Procedure +--------- + + $ autoreconf -ifs + $ ./configure + $ make pjdfstest + +================= +Running pjdfstest +================= + +------------- +Prerequisites +------------- +- You must be root when running these testcases. + +---------------------- +Software Prerequisites +---------------------- +- perl +- TAP-Harness (perl package) + +--------- +Procedure +--------- + + # cd /path/to/filesystem/under/test + # prove -rv /path/to/pjdfstest/tests Copied: head/contrib/pjdfstest/configure.ac (from r320447, vendor/pjdfstest/dist/configure.ac) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/pjdfstest/configure.ac Wed Jun 28 09:22:45 2017 (r320448, copy of r320447, vendor/pjdfstest/dist/configure.ac) @@ -0,0 +1,107 @@ +AC_PREREQ(2.61) +AC_INIT([pjdfstest],[0.1],) +AC_CONFIG_AUX_DIR([.]) +AM_INIT_AUTOMAKE +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([ \ + Makefile \ +]) + +AC_CANONICAL_HOST + +AC_PROG_CC([cc]) + +# For _GNU_SOURCE on Linux, etc. +AC_USE_SYSTEM_EXTENSIONS + +AC_CHECK_HEADERS([ \ + sys/mkdev.h \ +]) + +#HAS_FREEBSD_ACL + +AC_CHECK_FUNC([bindat], + [AC_DEFINE([HAVE_BINDAT], [1], [Define if bindat exists])]) +AC_CHECK_FUNC([chflags], + [AC_DEFINE([HAVE_CHFLAGS], [1], [Define if chflags exists])]) +AC_CHECK_FUNC([chflagsat], + [AC_DEFINE([HAVE_CHFLAGSAT], [1], [Define if chflagsat exists])]) +AC_CHECK_FUNC([connectat], + [AC_DEFINE([HAVE_CONNECTAT], [1], [Define if connectat exists])]) +AC_CHECK_FUNC([faccessat], + [AC_DEFINE([HAVE_FACCESSAT], [1], [Define if faccessat exists])]) +AC_CHECK_FUNC([fchflags], + [AC_DEFINE([HAVE_FCHFLAGS], [1], [Define if fchflags exists])]) +AC_CHECK_FUNC([fchmodat], + [AC_DEFINE([HAVE_FCHMODAT], [1], [Define if fchmodat exists])]) +AC_CHECK_FUNC([fchownat], + [AC_DEFINE([HAVE_FCHOWNAT], [1], [Define if fchownat exists])]) +AC_CHECK_FUNC([fstatat], + [AC_DEFINE([HAVE_FSTATAT], [1], [Define if fstatat exists])]) +AC_CHECK_FUNC([lchflags], + [AC_DEFINE([HAVE_LCHFLAGS], [1], [Define if lchflags exists])]) +AC_CHECK_FUNC([lchmod], + [AC_DEFINE([HAVE_LCHMOD], [1], [Define if lchmod exists])]) +AC_CHECK_FUNC([linkat], + [AC_DEFINE([HAVE_LINKAT], [1], [Define if linkat exists])]) +AC_CHECK_FUNC([lpathconf], + [AC_DEFINE([HAVE_LPATHCONF], [1], [Define if lpathconf exists])]) +AC_CHECK_FUNC([mkdirat], + [AC_DEFINE([HAVE_MKDIRAT], [1], [Define if mkdirat exists])]) +AC_CHECK_FUNC([mkfifoat], + [AC_DEFINE([HAVE_MKFIFOAT], [1], [Define if mkfifoat exists])]) +AC_CHECK_FUNC([mknodat], + [AC_DEFINE([HAVE_MKNODAT], [1], [Define if mknodat exists])]) +AC_CHECK_FUNC([openat], + [AC_DEFINE([HAVE_OPENAT], [1], [Define if openat exists])]) +AC_CHECK_FUNC([posix_fallocate], + [AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define if posix_fallocate exists])]) +AC_CHECK_FUNC([readlinkat], + [AC_DEFINE([HAVE_READLINKAT], [1], [Define if readlinkat exists])]) +AC_CHECK_FUNC([renameat], + [AC_DEFINE([HAVE_RENAMEAT], [1], [Define if renameat exists])]) +AC_CHECK_FUNC([symlinkat], + [AC_DEFINE([HAVE_SYMLINKAT], [1], [Define if symlinkat exists])]) +AC_CHECK_FUNC([utimensat], + [AC_DEFINE([HAVE_UTIMENSAT], [1], [Define if utimensat exists])]) + +# ACL test battery. +AC_CHECK_HEADER([sys/acl.h], [has_sys_acl_h=yes], [has_sys_acl_h=no]) +has_acl_funcs=no +if test x$has_sys_acl_h = xyes; then + AC_DEFINE([HAVE_SYS_ACL_H], [1], + [Define to 1 if sys/acl.h is available]) + AC_CHECK_FUNCS([acl_create_entry_np acl_from_text acl_get_entry acl_get_file acl_set_file], + [has_acl_funcs=yes],[]) +fi +if test x$has_acl_funcs = xyes; then + # Check for NFSv4 ACL support. + AC_CHECK_DECL([ACL_TYPE_NFS4], + [has_nfsv4_acl_support=yes], [has_nfsv4_acl_support=no],[[#include ]]) + if test x$has_nfsv4_acl_support = xyes; then + AC_DEFINE([HAS_NFSV4_ACL_SUPPORT], [1], + [Define to 1 if NFSv4 ACL support is available]) + fi +fi + +AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_birthtim, struct stat.st_birthtime, struct stat.st_birthtimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_ctim, struct stat.st_ctimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimespec], [], [], [[ +#include +#include +]]) + +AC_OUTPUT Modified: head/contrib/pjdfstest/pjdfstest.c ============================================================================== --- head/contrib/pjdfstest/pjdfstest.c Wed Jun 28 08:48:09 2017 (r320447) +++ head/contrib/pjdfstest/pjdfstest.c Wed Jun 28 09:22:45 2017 (r320448) @@ -26,14 +26,19 @@ * $FreeBSD$ */ +/* Needs to be first to twiddle appropriate system configuration/HAVE_* flags */ +#include "config.h" + #include -#include +#ifdef HAVE_SYS_ACL_H +#include +#endif +#ifdef HAVE_SYS_MKDEV_H +#include +#endif #include #include #include -#ifndef makedev -#include -#endif #include #include @@ -45,18 +50,15 @@ #include #include -#ifndef HAS_TRUNCATE64 -#define truncate64 truncate -#define ftruncate64 ftruncate +#ifdef __sun__ +#define _USE_STAT64 #endif -#ifndef HAS_STAT64 -#define stat64 stat -#define fstat64 fstat -#define lstat64 lstat + +#ifdef _USE_STAT64 +typedef struct stat64 stat_t; +#else +typedef struct stat stat_t; #endif -#ifdef HAS_FREEBSD_ACL -#include -#endif #ifndef ALLPERMS #define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) @@ -64,69 +66,91 @@ enum action { ACTION_OPEN, +#ifdef HAVE_OPENAT ACTION_OPENAT, +#endif ACTION_CREATE, ACTION_UNLINK, +#ifdef HAVE_UNLINKAT ACTION_UNLINKAT, +#endif ACTION_MKDIR, +#ifdef HAVE_MKDIRAT ACTION_MKDIRAT, +#endif ACTION_RMDIR, ACTION_LINK, +#ifdef HAVE_LINKAT ACTION_LINKAT, +#endif ACTION_SYMLINK, +#ifdef HAVE_SYMLINKAT ACTION_SYMLINKAT, +#endif ACTION_RENAME, +#ifdef HAVE_RENAMEAT ACTION_RENAMEAT, +#endif ACTION_MKFIFO, +#ifdef HAVE_MKFIFOAT ACTION_MKFIFOAT, +#endif ACTION_MKNOD, ACTION_MKNODAT, ACTION_BIND, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT ACTION_BINDAT, #endif ACTION_CONNECT, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT ACTION_CONNECTAT, #endif ACTION_CHMOD, ACTION_FCHMOD, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD ACTION_LCHMOD, #endif ACTION_FCHMODAT, ACTION_CHOWN, ACTION_FCHOWN, ACTION_LCHOWN, +#ifdef HAVE_FCHOWNAT ACTION_FCHOWNAT, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS ACTION_CHFLAGS, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS ACTION_FCHFLAGS, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT ACTION_CHFLAGSAT, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS ACTION_LCHFLAGS, #endif ACTION_TRUNCATE, ACTION_FTRUNCATE, +#ifdef HAVE_POSIX_FALLOCATE + ACTION_POSIX_FALLOCATE, +#endif ACTION_STAT, ACTION_FSTAT, ACTION_LSTAT, ACTION_FSTATAT, ACTION_PATHCONF, ACTION_FPATHCONF, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF ACTION_LPATHCONF, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT ACTION_PREPENDACL, ACTION_READACL, #endif ACTION_WRITE, +#ifdef HAVE_UTIMENSAT + ACTION_UTIMENSAT, +#endif }; #define TYPE_NONE 0x0000 @@ -147,69 +171,104 @@ struct syscall_desc { static struct syscall_desc syscalls[] = { { "open", ACTION_OPEN, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#ifdef HAVE_OPENAT { "openat", ACTION_OPENAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#endif { "create", ACTION_CREATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "unlink", ACTION_UNLINK, { TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UNLINKAT { "unlinkat", ACTION_UNLINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "mkdir", ACTION_MKDIR, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKDIRAT { "mkdirat", ACTION_MKDIRAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "rmdir", ACTION_RMDIR, { TYPE_STRING, TYPE_NONE } }, { "link", ACTION_LINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_LINKAT { "linkat", ACTION_LINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_SYMLINKAT { "symlinkat", ACTION_SYMLINKAT, { TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_RENAMEAT { "renameat", ACTION_RENAMEAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKFIFOAT { "mkfifoat", ACTION_MKFIFOAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "mknod", ACTION_MKNOD, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#ifdef HAVE_MKNODAT { "mknodat", ACTION_MKNODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#endif { "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT { "bindat", ACTION_BINDAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT { "connectat", ACTION_CONNECTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "fchmod", ACTION_FCHMOD, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD { "lchmod", ACTION_LCHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, #endif +#ifdef HAVE_FCHMODAT { "fchmodat", ACTION_FCHMODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, +#endif { "chown", ACTION_CHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "fchown", ACTION_FCHOWN, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "lchown", ACTION_LCHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_FCHOWNAT { "fchownat", ACTION_FCHOWNAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS { "chflags", ACTION_CHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS { "fchflags", ACTION_FCHFLAGS, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT { "chflagsat", ACTION_CHFLAGSAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS { "lchflags", ACTION_LCHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif { "truncate", ACTION_TRUNCATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "ftruncate", ACTION_FTRUNCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_POSIX_FALLOCATE + { "posix_fallocate", ACTION_POSIX_FALLOCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#endif { "stat", ACTION_STAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fstat", ACTION_FSTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, { "lstat", ACTION_LSTAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_FSTATAT { "fstatat", ACTION_FSTATAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "pathconf", ACTION_PATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fpathconf", ACTION_FPATHCONF, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF { "lpathconf", ACTION_LPATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT { "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } }, #endif { "write", ACTION_WRITE, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UTIMENSAT + { "utimensat", ACTION_UTIMENSAT, { + TYPE_DESCRIPTOR, /* Directory */ + TYPE_STRING, /* Relative path */ + TYPE_NUMBER, /* atime seconds */ + TYPE_STRING, /* atime nanoseconds */ + TYPE_NUMBER, /* mtime seconds */ + TYPE_STRING, /* mtime nanoseconds */ + TYPE_STRING, /* flags */}}, +#endif { NULL, -1, { TYPE_NONE } } }; @@ -219,122 +278,136 @@ struct flag { }; static struct flag open_flags[] = { -#ifdef O_RDONLY +#ifdef O_RDONLY { O_RDONLY, "O_RDONLY" }, #endif -#ifdef O_WRONLY +#ifdef O_WRONLY { O_WRONLY, "O_WRONLY" }, #endif -#ifdef O_RDWR +#ifdef O_RDWR { O_RDWR, "O_RDWR" }, #endif -#ifdef O_NONBLOCK +#ifdef O_NONBLOCK { O_NONBLOCK, "O_NONBLOCK" }, #endif -#ifdef O_APPEND +#ifdef O_APPEND { O_APPEND, "O_APPEND" }, #endif -#ifdef O_CREAT +#ifdef O_CREAT { O_CREAT, "O_CREAT" }, #endif -#ifdef O_TRUNC +#ifdef O_TRUNC { O_TRUNC, "O_TRUNC" }, #endif -#ifdef O_EXCL +#ifdef O_EXCL { O_EXCL, "O_EXCL" }, #endif -#ifdef O_SHLOCK +#ifdef O_SHLOCK { O_SHLOCK, "O_SHLOCK" }, #endif -#ifdef O_EXLOCK +#ifdef O_EXLOCK { O_EXLOCK, "O_EXLOCK" }, #endif -#ifdef O_DIRECT +#ifdef O_DIRECT { O_DIRECT, "O_DIRECT" }, #endif -#ifdef O_FSYNC +#ifdef O_FSYNC { O_FSYNC, "O_FSYNC" }, #endif -#ifdef O_SYNC +#ifdef O_SYNC { O_SYNC, "O_SYNC" }, #endif -#ifdef O_NOFOLLOW +#ifdef O_NOFOLLOW { O_NOFOLLOW, "O_NOFOLLOW" }, #endif -#ifdef O_NOCTTY +#ifdef O_NOCTTY { O_NOCTTY, "O_NOCTTY" }, #endif -#ifdef O_DIRECTORY +#ifdef O_DIRECTORY { O_DIRECTORY, "O_DIRECTORY" }, #endif { 0, NULL } }; -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static struct flag chflags_flags[] = { -#ifdef UF_NODUMP +#ifdef UF_NODUMP { UF_NODUMP, "UF_NODUMP" }, #endif -#ifdef UF_IMMUTABLE +#ifdef UF_IMMUTABLE { UF_IMMUTABLE, "UF_IMMUTABLE" }, #endif -#ifdef UF_APPEND +#ifdef UF_APPEND { UF_APPEND, "UF_APPEND" }, #endif -#ifdef UF_NOUNLINK +#ifdef UF_NOUNLINK { UF_NOUNLINK, "UF_NOUNLINK" }, #endif -#ifdef UF_OPAQUE +#ifdef UF_OPAQUE { UF_OPAQUE, "UF_OPAQUE" }, #endif -#ifdef SF_ARCHIVED +#ifdef SF_ARCHIVED { SF_ARCHIVED, "SF_ARCHIVED" }, #endif -#ifdef SF_IMMUTABLE +#ifdef SF_IMMUTABLE { SF_IMMUTABLE, "SF_IMMUTABLE" }, #endif -#ifdef SF_APPEND +#ifdef SF_APPEND { SF_APPEND, "SF_APPEND" }, #endif -#ifdef SF_NOUNLINK +#ifdef SF_NOUNLINK { SF_NOUNLINK, "SF_NOUNLINK" }, #endif -#ifdef SF_SNAPSHOT +#ifdef SF_SNAPSHOT { SF_SNAPSHOT, "SF_SNAPSHOT" }, #endif { 0, NULL } }; #endif +#ifdef HAVE_UNLINKAT static struct flag unlinkat_flags[] = { { AT_REMOVEDIR, "AT_REMOVEDIR" }, { 0, NULL } }; +#endif +#ifdef HAVE_LINKAT static struct flag linkat_flags[] = { +#ifdef AT_SYMLINK_FOLLOW { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" }, +#endif { 0, NULL } }; +#endif +#ifdef HAVE_CHFLAGSAT static struct flag chflagsat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHMODAT static struct flag fchmodat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHOWNAT static struct flag fchownat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FSTATAT static struct flag fstatat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif struct name { int n_name; @@ -342,16 +415,16 @@ struct name { }; static struct name pathconf_names[] = { -#ifdef _PC_LINK_MAX +#ifdef _PC_LINK_MAX { _PC_LINK_MAX, "_PC_LINK_MAX" }, #endif -#ifdef _PC_NAME_MAX +#ifdef _PC_NAME_MAX { _PC_NAME_MAX, "_PC_NAME_MAX" }, #endif -#ifdef _PC_PATH_MAX +#ifdef _PC_PATH_MAX { _PC_PATH_MAX, "_PC_PATH_MAX" }, #endif -#ifdef _PC_SYMLINK_MAX +#ifdef _PC_SYMLINK_MAX { _PC_SYMLINK_MAX, "_PC_SYMLINK_MAX" }, #endif { 0, NULL } @@ -394,7 +467,7 @@ str2flags(struct flag *tflags, char *sflags) return (flags); } -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static char * flags2str(struct flag *tflags, long long flags) { @@ -440,7 +513,7 @@ find_syscall(const char *name) } static void -show_stat(struct stat64 *sp, const char *what) +show_stat(stat_t *sp, const char *what) { if (strcmp(what, "mode") == 0) @@ -459,11 +532,51 @@ show_stat(struct stat64 *sp, const char *what) printf("%lld", (long long)sp->st_blocks); else if (strcmp(what, "atime") == 0) printf("%lld", (long long)sp->st_atime); - else if (strcmp(what, "mtime") == 0) - printf("%lld", (long long)sp->st_mtime); +#if defined(HAVE_STRUCT_STAT_ST_ATIM) || \ + defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) + else if (strcmp(what, "atime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_ATIMESPEC + printf("%lld", (long long)sp->st_atimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_atim.tv_nsec); +#endif +#endif /* st_atim* */ else if (strcmp(what, "ctime") == 0) printf("%lld", (long long)sp->st_ctime); -#ifdef HAS_CHFLAGS +#if defined(HAVE_STRUCT_STAT_ST_CTIM) || \ + defined(HAVE_STRUCT_STAT_ST_CTIMESPEC) + else if (strcmp(what, "ctime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_CTIMESPEC + printf("%lld", (long long)sp->st_ctimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_ctim.tv_nsec); +#endif +#endif /* st_ctim* */ + else if (strcmp(what, "mtime") == 0) + printf("%lld", (long long)sp->st_mtime); + else if (strcmp(what, "mtime_ns") == 0) +#if defined(HAVE_STRUCT_STAT_ST_MTIM) || \ + defined(HAVE_STRUCT_STAT_ST_MTIMESPEC) +#ifdef HAVE_STRUCT_STAT_ST_MTIMESPEC + printf("%lld", (long long)sp->st_mtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_mtim.tv_nsec); +#endif +#endif /* st_mtim* */ +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + else if (strcmp(what, "birthtime") == 0) + printf("%lld", (long long)sp->st_birthtime); +#endif /* st_birthtime */ +#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIM) || \ + defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC) + else if (strcmp(what, "birthtime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC + printf("%lld", (long long)sp->st_birthtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_birthtim.tv_nsec); +#endif +#endif /* st_birthtim{,espec} */ +#ifdef HAVE_CHFLAGS else if (strcmp(what, "flags") == 0) printf("%s", flags2str(chflags_flags, (long long)sp->st_flags)); #endif @@ -504,7 +617,7 @@ show_stat(struct stat64 *sp, const char *what) } static void -show_stats(struct stat64 *sp, char *what) +show_stats(stat_t *sp, char *what) { const char *s = ""; char *w; @@ -547,7 +660,11 @@ descriptor_get(int pos) static unsigned int call_syscall(struct syscall_desc *scall, char *argv[]) { - struct stat64 sb; + stat_t sb; +#ifdef HAVE_UTIMENSAT + struct timespec times[2]; + int flag; +#endif long long flags; unsigned int i; char *endp; @@ -556,7 +673,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) char *str; long long num; } args[MAX_ARGS]; -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT int entry_id = ACL_FIRST_ENTRY; acl_t acl, newacl; acl_entry_t entry, newentry; @@ -645,6 +762,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#ifdef HAVE_OPENAT case ACTION_OPENAT: flags = str2flags(open_flags, STR(2)); if (flags & O_CREAT) { @@ -664,6 +782,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#endif case ACTION_CREATE: rval = open(STR(0), O_CREAT | O_EXCL, (mode_t)NUM(1)); if (rval >= 0) @@ -672,46 +791,60 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_UNLINK: rval = unlink(STR(0)); break; +#ifdef HAVE_UNLINKAT case ACTION_UNLINKAT: rval = unlinkat(NUM(0), STR(1), (int)str2flags(unlinkat_flags, STR(2))); break; +#endif case ACTION_MKDIR: rval = mkdir(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKDIRAT case ACTION_MKDIRAT: rval = mkdirat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_RMDIR: rval = rmdir(STR(0)); break; case ACTION_LINK: rval = link(STR(0), STR(1)); break; +#ifdef HAVE_LINKAT case ACTION_LINKAT: rval = linkat(NUM(0), STR(1), NUM(2), STR(3), (int)str2flags(linkat_flags, STR(4))); break; +#endif case ACTION_SYMLINK: rval = symlink(STR(0), STR(1)); break; +#ifdef HAVE_SYMLINKAT case ACTION_SYMLINKAT: rval = symlinkat(STR(0), NUM(1), STR(2)); break; +#endif case ACTION_RENAME: rval = rename(STR(0), STR(1)); break; +#ifdef HAVE_RENAMEAT case ACTION_RENAMEAT: rval = renameat(NUM(0), STR(1), NUM(2), STR(3)); break; +#endif case ACTION_MKFIFO: rval = mkfifo(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKFIFOAT case ACTION_MKFIFOAT: rval = mkfifoat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_MKNOD: +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: +#endif { mode_t ntype; dev_t dev; @@ -721,9 +854,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: fa = 0; break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: fa = 1; break; +#endif default: abort(); } @@ -747,9 +882,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: rval = mknod(STR(0), ntype | NUM(2), dev); break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: rval = mknodat(NUM(0), STR(1), ntype | NUM(3), dev); break; +#endif default: abort(); } @@ -768,7 +905,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = bind(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT case ACTION_BINDAT: { struct sockaddr_un sunx; @@ -797,7 +934,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = connect(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT case ACTION_CONNECTAT: { struct sockaddr_un sunx; @@ -819,15 +956,17 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_FCHMOD: rval = fchmod(NUM(0), (mode_t)NUM(1)); break; -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD case ACTION_LCHMOD: rval = lchmod(STR(0), (mode_t)NUM(1)); break; #endif +#ifdef HAVE_FCHMODAT case ACTION_FCHMODAT: rval = fchmodat(NUM(0), STR(1), (mode_t)NUM(2), str2flags(fchmodat_flags, STR(3))); break; +#endif case ACTION_CHOWN: rval = chown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; @@ -837,62 +976,94 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_LCHOWN: rval = lchown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; +#ifdef HAVE_FCHOWNAT case ACTION_FCHOWNAT: rval = fchownat(NUM(0), STR(1), (uid_t)NUM(2), (gid_t)NUM(3), (int)str2flags(fchownat_flags, STR(4))); break; -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS case ACTION_CHFLAGS: rval = chflags(STR(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS case ACTION_FCHFLAGS: rval = fchflags(NUM(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT case ACTION_CHFLAGSAT: rval = chflagsat(NUM(0), STR(1), (unsigned long)str2flags(chflags_flags, STR(2)), (int)str2flags(chflagsat_flags, STR(3))); break; #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 28 09:23:48 2017 Return-Path: Delivered-To: svn-src-all@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 A9077D9D267; Wed, 28 Jun 2017 09:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 597E771B2D; Wed, 28 Jun 2017 09:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S9NlS7021764; Wed, 28 Jun 2017 09:23:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S9Nls7021763; Wed, 28 Jun 2017 09:23:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280923.v5S9Nls7021763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 09:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320449 - vendor/pjdfstest/0.1 X-SVN-Group: vendor X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: vendor/pjdfstest/0.1 X-SVN-Commit-Revision: 320449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 09:23:48 -0000 Author: ngie Date: Wed Jun 28 09:23:47 2017 New Revision: 320449 URL: https://svnweb.freebsd.org/changeset/base/320449 Log: Tag pjdfstest 0.1 Added: vendor/pjdfstest/0.1/ - copied from r320448, vendor/pjdfstest/dist/ From owner-svn-src-all@freebsd.org Wed Jun 28 09:25:17 2017 Return-Path: Delivered-To: svn-src-all@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 2037ED9D2E4; Wed, 28 Jun 2017 09:25:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DF5CE71C69; Wed, 28 Jun 2017 09:25:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S9PFUP021863; Wed, 28 Jun 2017 09:25:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S9PFue021862; Wed, 28 Jun 2017 09:25:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280925.v5S9PFue021862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 09:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320450 - head X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 320450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 09:25:17 -0000 Author: ngie Date: Wed Jun 28 09:25:15 2017 New Revision: 320450 URL: https://svnweb.freebsd.org/changeset/base/320450 Log: Add asomers as a pjdfstest co-maintainer per the project status change made upstream. MFC after: 1 month Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Wed Jun 28 09:23:47 2017 (r320449) +++ head/MAINTAINERS Wed Jun 28 09:25:15 2017 (r320450) @@ -43,7 +43,7 @@ contrib/libcxxrt dim Pre-commit review preferred. contrib/llvm dim Pre-commit review preferred. contrib/llvm/tools/lldb emaste Pre-commit review preferred. contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested. -contrib/pjdfstest freebsd-testing,ngie,pjd Pre-commit review requested. +contrib/pjdfstest freebsd-testing,asomers,ngie,pjd Pre-commit review requested. dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. From owner-svn-src-all@freebsd.org Wed Jun 28 10:12:19 2017 Return-Path: Delivered-To: svn-src-all@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 65E82D9E176 for ; Wed, 28 Jun 2017 10:12:19 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.36]) (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 27DB9730BB; Wed, 28 Jun 2017 10:12:18 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [78.35.154.157] (helo=fabiankeil.de) by smtprelay02.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1dQ9lf-0000sF-Lx; Wed, 28 Jun 2017 12:00:15 +0200 Date: Wed, 28 Jun 2017 11:54:50 +0200 From: Fabian Keil To: Ed Maste Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r320367 - head/share/vt/fonts Message-ID: <20170628115450.0b88c448@fabiankeil.de> In-Reply-To: <201706261811.v5QIBmtr036462@repo.freebsd.org> References: <201706261811.v5QIBmtr036462@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/QWr1AVv4qdRGzym9tiH5Gf/"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 10:12:19 -0000 --Sig_/QWr1AVv4qdRGzym9tiH5Gf/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Ed Maste wrote: > Author: emaste > Date: Mon Jun 26 18:11:48 2017 > New Revision: 320367 > URL: https://svnweb.freebsd.org/changeset/base/320367 >=20 > Log: > Add "Terminus BSD Console" size 32 > =20 > Dimitar Toshkov, Terminus' creator, has made size 32 available under the > 2-clause BSD license for use by *BSD consoles. Where's the actual license text and copyright information? It seems to be missing for the other font files as well (assuming they too are under licenses that require retaining the copyright information and license conditions when distributing them). Fabian --Sig_/QWr1AVv4qdRGzym9tiH5Gf/ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTKUNd6H/m3+ByGULIFiohV/3dUnQUCWVN87AAKCRAFiohV/3dU nbCEAKDCcGbYfo0bxa70lLeoRp2+z/smMwCghVA9xobEWj78YTBFs2oEAxXzEvI= =dsUo -----END PGP SIGNATURE----- --Sig_/QWr1AVv4qdRGzym9tiH5Gf/-- From owner-svn-src-all@freebsd.org Wed Jun 28 12:20:53 2017 Return-Path: Delivered-To: svn-src-all@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 7B03CDA1077; Wed, 28 Jun 2017 12:20:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 3ACEC76E62; Wed, 28 Jun 2017 12:20:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1dQBxb-0009sr-Ok; Wed, 28 Jun 2017 15:20:43 +0300 Date: Wed, 28 Jun 2017 15:20:43 +0300 From: Slawa Olhovchenkov To: Eric Joyner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r317711 - stable/10/sys/dev/ixgbe Message-ID: <20170628122043.GE18123@zxy.spb.ru> References: <201705022257.v42MvRvo014209@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705022257.v42MvRvo014209@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 12:20:53 -0000 On Tue, May 02, 2017 at 10:57:27PM +0000, Eric Joyner wrote: > Author: erj > Date: Tue May 2 22:57:27 2017 > New Revision: 317711 > URL: https://svnweb.freebsd.org/changeset/base/317711 > > Log: > ixgbe(4): Fix build issue when compiling with netmap enabled > > Sponsored by: Intel Corporation After this (and r315333) netmap like broken: packets don't received anymore. ix0: port 0xd020-0xd03f mem 0xfb280000-0xfb2fffff,0xfb704000-0xfb707fff irq 34 at device 0.0 on pci5 work at r313387 From owner-svn-src-all@freebsd.org Wed Jun 28 12:56:13 2017 Return-Path: Delivered-To: svn-src-all@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 5DCD5DA1F09; Wed, 28 Jun 2017 12:56:13 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ua0-x231.google.com (mail-ua0-x231.google.com [IPv6:2607:f8b0:400c:c08::231]) (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 12F2278571; Wed, 28 Jun 2017 12:56:13 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ua0-x231.google.com with SMTP id g40so37047278uaa.3; Wed, 28 Jun 2017 05:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tvDaSLlXm7dIJ5RYd0pLAp+piF82oYnr+G1oJjQeFqM=; b=cLu+oJnB5EwtzdWVCkPkCfA1zwfRIXvHuQmSL0Yuf2+WA/wDbSBzTZX3adNVqd4OvW ze4KdBt1vGrkbZgi3ffqBBADMXs+wWAe8uAOkFHBsgEvXDUHMKGqA+4Gec2CzVwdNMez FQKlo0jZtSZBYA6tiPtjjyxSStKGiZHylZ9w+34NIIpMg6HifIISNidrT63zg4cHEcXi VkNzEZUngEwN1xUbTmoORV+vMoVsCI7AfPEpls+0TXBFO8P0VcgUAlRepHCf3x/hMTta EdtWd2QyNFQCs2e17bbiApu+To/5KMBh5l3rghal5jt5cDGnhUF5PBFtMKmgIE5oWUal KhJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tvDaSLlXm7dIJ5RYd0pLAp+piF82oYnr+G1oJjQeFqM=; b=lNFydi3Wqro8RMk0bKeobRoEx4Dj5SqzbWNcMB9nf9j5PPC6V+iEqpC7V1FvsdnIfr CrA8BKguEPqe47csCEi73P4mWWXaUAv/2TAVr69RBmQmQryfpadD3lNNL818TICB+0rY CpFur547x3d+V1GdnNBj5H3jQDY6hcpyLkTuKlRgdTMe1wCa/LbkotwA+ksOPZwY8LmI xmkQZB6zsBeVGOat+6Fb0eY96SFhhtU36rX74Z8MJY7g6Eak7ZWHTP659ooizGvLO3Qa EmZDurz4iyLKkoV/cdoH/kCsBcDn4YM/W1ut6rpuZheIBq1rczXjcXpiUdq7Ni7v6KPA JKpw== X-Gm-Message-State: AKS2vOwC3v9MBLlxontr43xr7tey7inpZfk/P6kF29dKuic7AyADsmuf xNXo7FIRxw0rlMBiHYq5cRWqJswowg== X-Received: by 10.159.36.209 with SMTP id 75mr5082274uar.72.1498654572097; Wed, 28 Jun 2017 05:56:12 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.83.198 with HTTP; Wed, 28 Jun 2017 05:56:11 -0700 (PDT) In-Reply-To: <201706270348.v5R3mvkV076055@slippy.cwsent.com> References: <201706270348.v5R3mvkV076055@slippy.cwsent.com> From: Edward Napierala Date: Wed, 28 Jun 2017 13:56:11 +0100 X-Google-Sender-Auth: Mv3IsXvKYmJVMySvEzreYcRqmP8 Message-ID: Subject: Re: svn commit: r320362 - head/share/zoneinfo To: Cy Schubert Cc: Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 12:56:13 -0000 This patch seems to fix the problem with "make -j4 installworld" for me. Do you intend to commit it? Thanks! (And sorry for the breakage.) 2017-06-27 4:48 GMT+01:00 Cy Schubert : > (since we're top posting.... ) > > Hi Sean, > > Do you want to give this a spin? > > Index: share/zoneinfo/Makefile > =================================================================== > --- share/zoneinfo/Makefile (revision 320389) > +++ share/zoneinfo/Makefile (working copy) > @@ -94,7 +94,7 @@ > .for f in ${TZS} > ${INSTALL} ${TAG_ARGS} \ > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > ${DESTDIR}/usr/share/zoneinfo/${f} > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > .endfor > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > ~cy > > > In message , Sean Bruno > write > s: > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > Content-Type: multipart/mixed; boundary="VFqTarnRbgKj5gwWULxfLoTjWIwLn2 > loQ"; > > protected-headers="v1" > > From: Sean Bruno > > To: Edward Tomasz Napierala , > src-committers@freebsd.org, > > svn-src-all@freebsd.org, svn-src-head@freebsd.org > > Message-ID: > > Subject: Re: svn commit: r320362 - head/share/zoneinfo > > References: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ > > Content-Type: text/plain; charset=utf-8 > > Content-Language: en-US > > Content-Transfer-Encoding: quoted-printable > > > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > src=3D/usr/sr= > > c > > -v head" > > > > --- realinstall_subdir_share/zoneinfo --- > > install: builddir/Africa/Abidjan: No such file or directory > > > > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Mon Jun 26 15:40:24 2017 > > > New Revision: 320362 > > > URL: https://svnweb.freebsd.org/changeset/base/320362 > > >=20 > > > Log: > > > Provide visual feedback when timezone files are installed. > > > After r320003 it wasn't being shown in any way. > > > =20 > > > Submitted by: bdrewery > > > MFC after: 1 month > > > Differential Revision: https://reviews.freebsd.org/D11154 > > >=20 > > > Modified: > > > head/share/zoneinfo/Makefile > > >=20 > > > Modified: head/share/zoneinfo/Makefile > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > 3D=3D=3D=3D=3D= > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > 3D=3D=3D=3D=3D=3D= > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > 3D=3D=3D=3D=3D=3D= > > =3D=3D=3D=3D > > > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 > (r32036 > > 1) > > > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 > (r32036 > > 2) > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > > > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > > > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > > > =20 > > > +.if make(*install*) > > > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > > > +.endif > > > + > > > beforeinstall: install-zoneinfo > > > install-zoneinfo: > > > mkdir -p ${DESTDIR}/usr/share/zoneinfo > > > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > > - cd ${TZBUILDDIR} && \ > > > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > > > +.for f in ${TZS} > > > + ${INSTALL} ${TAG_ARGS} \ > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > > > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > ${DESTDIR}/usr/share/zoneinfo= > > /${f} > > > +.endfor > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > =20 > > >=20 > > >=20 > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > Content-Type: application/pgp-signature; name="signature.asc" > > Content-Description: OpenPGP digital signature > > Content-Disposition: attachment; filename="signature.asc" > > > > -----BEGIN PGP SIGNATURE----- > > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== > > =9Mia > > -----END PGP SIGNATURE----- > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- > > > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > From owner-svn-src-all@freebsd.org Wed Jun 28 13:56:17 2017 Return-Path: Delivered-To: svn-src-all@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 17C34DA2CC3; Wed, 28 Jun 2017 13:56:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E7D0379EFA; Wed, 28 Jun 2017 13:56:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SDuGwq033528; Wed, 28 Jun 2017 13:56:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SDuGtV033527; Wed, 28 Jun 2017 13:56:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706281356.v5SDuGtV033527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 28 Jun 2017 13:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320451 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 320451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 13:56:17 -0000 Author: cem Date: Wed Jun 28 13:56:15 2017 New Revision: 320451 URL: https://svnweb.freebsd.org/changeset/base/320451 Log: Complete support for IO_APPEND flag in fuse This finishes what r245164 started and makes open(..., O_APPEND) work again after r299753. - Pass ioflags, incl. IO_APPEND, down to the direct write backend (r245164 added it to only the bio backend). - (r299753 changed the WRONLY backend from bio to direct.) PR: 220185 Reported by: Ben RUBSON Reviewed by: bapt@, rmacklem@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11348 Modified: head/sys/fs/fuse/fuse_io.c Modified: head/sys/fs/fuse/fuse_io.c ============================================================================== --- head/sys/fs/fuse/fuse_io.c Wed Jun 28 09:25:15 2017 (r320450) +++ head/sys/fs/fuse/fuse_io.c Wed Jun 28 13:56:15 2017 (r320451) @@ -108,7 +108,7 @@ fuse_read_biobackend(struct vnode *vp, struct uio *uio struct ucred *cred, struct fuse_filehandle *fufh); static int fuse_write_directbackend(struct vnode *vp, struct uio *uio, - struct ucred *cred, struct fuse_filehandle *fufh); + struct ucred *cred, struct fuse_filehandle *fufh, int ioflag); static int fuse_write_biobackend(struct vnode *vp, struct uio *uio, struct ucred *cred, struct fuse_filehandle *fufh, int ioflag); @@ -156,7 +156,7 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, in if (directio) { FS_DEBUG("direct write of vnode %ju via file handle %ju\n", (uintmax_t)VTOILLU(vp), (uintmax_t)fufh->fh_id); - err = fuse_write_directbackend(vp, uio, cred, fufh); + err = fuse_write_directbackend(vp, uio, cred, fufh, ioflag); } else { FS_DEBUG("buffered write of vnode %ju\n", (uintmax_t)VTOILLU(vp)); @@ -318,7 +318,7 @@ out: static int fuse_write_directbackend(struct vnode *vp, struct uio *uio, - struct ucred *cred, struct fuse_filehandle *fufh) + struct ucred *cred, struct fuse_filehandle *fufh, int ioflag) { struct fuse_vnode_data *fvdat = VTOFUD(vp); struct fuse_write_in *fwi; @@ -327,8 +327,10 @@ fuse_write_directbackend(struct vnode *vp, struct uio int diff; int err = 0; - if (!uio->uio_resid) + if (uio->uio_resid == 0) return (0); + if (ioflag & IO_APPEND) + uio_setoffset(uio, fvdat->filesize); fdisp_init(&fdi, 0); @@ -705,7 +707,7 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) io.iov_base = (char *)bp->b_data + bp->b_dirtyoff; uiop->uio_rw = UIO_WRITE; - error = fuse_write_directbackend(vp, uiop, cred, fufh); + error = fuse_write_directbackend(vp, uiop, cred, fufh, 0); if (error == EINTR || error == ETIMEDOUT || (!error && (bp->b_flags & B_NEEDCOMMIT))) { From owner-svn-src-all@freebsd.org Wed Jun 28 13:59:22 2017 Return-Path: Delivered-To: svn-src-all@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 0EA09DA2D85; Wed, 28 Jun 2017 13:59:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DD4BF7A081; Wed, 28 Jun 2017 13:59:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SDxKbl033683; Wed, 28 Jun 2017 13:59:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SDxKDB033681; Wed, 28 Jun 2017 13:59:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706281359.v5SDxKDB033681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 28 Jun 2017 13:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320452 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 320452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 13:59:22 -0000 Author: avg Date: Wed Jun 28 13:59:20 2017 New Revision: 320452 URL: https://svnweb.freebsd.org/changeset/base/320452 Log: fix an architectural problem introduced in r320156, ZFS ABD import The implementation of ZFS refcount_t uses the emulated illumos mutex (the sx lock) and the waiting memory allocation when ZFS_DEBUG is enabled. This makes refcount_t unsuitable for use in GEOM g_up thread where sleeping is prohibited. When importing the ABD change I modified vdev_geom using illumos vdev_disk as an example. As a result, I added a call to abd_return_buf in vdev_geom_io_intr. The latter is called on g_up thread while the former uses refcount_t. This change fixes the problem by deferring the abd_return_buf call to the previously unused vdev_geom_io_done that is called on a ZFS zio taskqueue thread where sleeping is allowed. A side bonus of this change is that now a vdev zio has a pointer to its corresponding bio while the zio is active. Reported by: Shawn Webb Tested by: Shawn Webb MFC after: 1 week X-MFC with: r320156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Jun 28 13:56:15 2017 (r320451) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Wed Jun 28 13:59:20 2017 (r320452) @@ -453,6 +453,10 @@ struct zio { avl_node_t io_alloc_node; zio_alloc_list_t io_alloc_list; +#ifdef __FreeBSD__ + struct bio *io_bio; +#endif + /* Internal pipeline state */ enum zio_flag io_flags; enum zio_stage io_stage; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Wed Jun 28 13:56:15 2017 (r320451) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Wed Jun 28 13:59:20 2017 (r320452) @@ -989,13 +989,6 @@ vdev_geom_io_intr(struct bio *bp) break; } - if (zio->io_type == ZIO_TYPE_READ) { - abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size); - } else if (zio->io_type == ZIO_TYPE_WRITE) { - abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size); - } - - g_destroy_bio(bp); zio_delay_interrupt(zio); } @@ -1087,6 +1080,7 @@ sendreq: break; } bp->bio_done = vdev_geom_io_intr; + zio->io_bio = bp; g_io_request(bp, cp); } @@ -1094,6 +1088,15 @@ sendreq: static void vdev_geom_io_done(zio_t *zio) { + struct bio *bp = zio->io_bio; + + if (zio->io_type == ZIO_TYPE_READ) { + abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size); + } else if (zio->io_type == ZIO_TYPE_WRITE) { + abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size); + } + + g_destroy_bio(bp); } static void From owner-svn-src-all@freebsd.org Wed Jun 28 14:31:49 2017 Return-Path: Delivered-To: svn-src-all@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 BF0B2DA367A; Wed, 28 Jun 2017 14:31:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54E377B505; Wed, 28 Jun 2017 14:31:48 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id QDlsdkOJ1M9gtQDltd8Y2D; Wed, 28 Jun 2017 08:16:47 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=SLG1KRGDAAAA:8 a=IIX2BFdiAAAA:8 a=NMM7OKYrAAAA:8 a=kUCByv9wAAAA:8 a=KpeJSf20AAAA:8 a=W8X-O0HiIXqmUOEBJpUA:9 a=_MQYmeOwPBP_ZLNZ:21 a=CjuIK1q_8ugA:10 a=Vi8sXVw4qWQA:10 a=NWVoK91CQyQA:10 a=pxhY87DP9d2VeQe4joPk:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=-TBaU1e9WpdkKBzYXnwo:22 a=rHg00LAlvzXsuODty-Nv:22 a=isrg6BwTYk6I_F0B0DtW:22 a=bu_5hG6eGWxBxPYBRUjp:22 a=8GyX2P7uvxEm4O_9qm7Q:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 7E73FEC; Wed, 28 Jun 2017 07:16:44 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5SEFQQc047530; Wed, 28 Jun 2017 07:15:26 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.14.8/Submit) with ESMTP id v5SEFPn9047463; Wed, 28 Jun 2017 07:15:26 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706281415.v5SEFPn9047463@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs 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.cschubert.com/ To: Edward Napierala cc: Cy Schubert , Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r320362 - head/share/zoneinfo In-Reply-To: Message from Edward Napierala of "Wed, 28 Jun 2017 13:56:11 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jun 2017 07:15:20 -0700 X-CMAE-Envelope: MS4wfOafYgL/tRLJyWHzr4oVZRjHtmImj5ZqCJ1LYfi4uJeP01oXS4EdK0lYCvmFk92eHce/KupF8ZVczAm8gGVMomSp1nJ5FWx/JelD6obZoELdb7yjSz3q rksjIAS2lyDRD5p8JXXUD1Hg2KxODTRLNJ8I+3nQmhZ47X6sj6E+z17fWL0rh6/cPE5BFPUMyxYmOm+ofnkcOFrCc//CevO9knQcPZeyN8qRlcZnvuIlrUyP XfAUxj0Rr9BXtUoxkH9aTWtLSKmUmKdFAi6gFtEOWc4TOIfC+7HUudUvkDwUFkWBe7GoKzwbZ23KWWfbRT6CZA== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 14:31:49 -0000 It doesn't matter who commits it. If you want me to, I will commit it at noon my time as I'm already a tad late for $JOB. ~cy In message , Edward Napierala writes: > --001a113d0020693f04055304b5a4 > Content-Type: text/plain; charset="UTF-8" > > This patch seems to fix the problem with "make -j4 installworld" for me. > Do you intend to commit it? Thanks! (And sorry for the breakage.) > > > 2017-06-27 4:48 GMT+01:00 Cy Schubert : > > > (since we're top posting.... ) > > > > Hi Sean, > > > > Do you want to give this a spin? > > > > Index: share/zoneinfo/Makefile > > =================================================================== > > --- share/zoneinfo/Makefile (revision 320389) > > +++ share/zoneinfo/Makefile (working copy) > > @@ -94,7 +94,7 @@ > > .for f in ${TZS} > > ${INSTALL} ${TAG_ARGS} \ > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > ${DESTDIR}/usr/share/zoneinfo/${f} > > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > > .endfor > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > ~cy > > > > > > In message , Sean Bruno > > write > > s: > > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > Content-Type: multipart/mixed; boundary="VFqTarnRbgKj5gwWULxfLoTjWIwLn2 > > loQ"; > > > protected-headers="v1" > > > From: Sean Bruno > > > To: Edward Tomasz Napierala , > > src-committers@freebsd.org, > > > svn-src-all@freebsd.org, svn-src-head@freebsd.org > > > Message-ID: > > > Subject: Re: svn commit: r320362 - head/share/zoneinfo > > > References: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ > > > Content-Type: text/plain; charset=utf-8 > > > Content-Language: en-US > > > Content-Transfer-Encoding: quoted-printable > > > > > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > > src=3D/usr/sr= > > > c > > > -v head" > > > > > > --- realinstall_subdir_share/zoneinfo --- > > > install: builddir/Africa/Abidjan: No such file or directory > > > > > > > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote: > > > > Author: trasz > > > > Date: Mon Jun 26 15:40:24 2017 > > > > New Revision: 320362 > > > > URL: https://svnweb.freebsd.org/changeset/base/320362 > > > >=20 > > > > Log: > > > > Provide visual feedback when timezone files are installed. > > > > After r320003 it wasn't being shown in any way. > > > > =20 > > > > Submitted by: bdrewery > > > > MFC after: 1 month > > > > Differential Revision: https://reviews.freebsd.org/D11154 > > > >=20 > > > > Modified: > > > > head/share/zoneinfo/Makefile > > > >=20 > > > > Modified: head/share/zoneinfo/Makefile > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > 3D=3D=3D=3D=3D= > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > 3D=3D=3D=3D=3D=3D= > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > 3D=3D=3D=3D=3D=3D= > > > =3D=3D=3D=3D > > > > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 > > (r32036 > > > 1) > > > > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 > > (r32036 > > > 2) > > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > > > > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > > > > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > > > > =20 > > > > +.if make(*install*) > > > > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > > > > +.endif > > > > + > > > > beforeinstall: install-zoneinfo > > > > install-zoneinfo: > > > > mkdir -p ${DESTDIR}/usr/share/zoneinfo > > > > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > > > - cd ${TZBUILDDIR} && \ > > > > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > > > > +.for f in ${TZS} > > > > + ${INSTALL} ${TAG_ARGS} \ > > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > > > > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > ${DESTDIR}/usr/share/zoneinfo= > > > /${f} > > > > +.endfor > > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > =20 > > > >=20 > > > >=20 > > > > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > Content-Type: application/pgp-signature; name="signature.asc" > > > Content-Description: OpenPGP digital signature > > > Content-Disposition: attachment; filename="signature.asc" > > > > > > -----BEGIN PGP SIGNATURE----- > > > > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo > > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 > > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 > > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ > > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R > > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr > > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P > > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo > > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== > > > =9Mia > > > -----END PGP SIGNATURE----- > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- > > > > > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > > > --001a113d0020693f04055304b5a4 > Content-Type: text/html; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > >
This patch seems to fix the problem with "make -j4 in= > stallworld" for me.
Do you intend to commit it?=C2=A0 Thanks! =C2= > =A0(And sorry for the breakage.)

tra">
2017-06-27 4:48 GMT+01:00 Cy Schubert <= > span dir=3D"ltr">< _blank">Cy.Schubert@komquats.com>:
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le= > ft:1ex">(since we're top posting.... )
>
> Hi Sean,
>
> Do you want to give this a spin?
>
> Index: share/zoneinfo/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(revision 320389)
> +++ share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(working copy)
> @@ -94,7 +94,7 @@
> =C2=A0.for f in ${TZS}
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} \
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -o ${BINOWN} -g ${BINGRP} -m ${NO= > BINMODE} \
>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${.OBJDIR}= > /,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR}/${f} ${DESTDIR}/usr= > /share/zoneinfo/${f}
> =C2=A0.endfor
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP= > } -m ${NOBINMODE} \
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${CONTRIBDIR}/zone.tab ${DESTDIR}= > /usr/share/zoneinfo/
>
>
~cy
>
>
> In message < sd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org>, Sean= > Bruno
> write
> s:
> > This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > Content-Type: multipart/mixed; boundary=3D"VFqTarnRbgKj5gwWU= > LxfLoTjWIwLn2loQ";
> >=C2=A0 protected-headers=3D"v1"
> > From: Sean Bruno <sbruno@free= > bsd.org>
> > To: Edward Tomasz Napierala <trasz@FreeBSD.org>, to:src-committers@freebsd.org">src-committers@freebsd.org,
> >=C2=A0 svn-src-all@freebsd.o= > rg, svn-src-head@freebsd.or= > g
> > Message-ID: < @freebsd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org>= >
> > Subject: Re: svn commit: r320362 - head/share/zoneinfo
> > References: < ebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> > In-Reply-To: < eebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> >
> > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ
> > Content-Type: text/plain; charset=3Dutf-8
> > Content-Language: en-US
> > Content-Transfer-Encoding: quoted-printable
> >
> > Hmmm ... This seems to break 'poudriere jail -c jailname -m src=3D= > 3D/usr/sr=3D
> > c
> > -v head"
> >
> > --- realinstall_subdir_share/zoneinfo ---
> > install: builddir/Africa/Abidjan: No such file or directory
> >
> >
> > On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> > > Author: trasz
> > > Date: Mon Jun 26 15:40:24 2017
> > > New Revision: 320362
> > > URL: rel=3D"noreferrer" target=3D"_blank">https://svnweb.freebsd.org/chang= > eset/base/320362
>
> >=3D20
> > > Log:
> > >=C2=A0 =C2=A0Provide visual feedback when timezone files are insta= > lled.
> > >=C2=A0 =C2=A0After r320003 it wasn't being shown in any way. r> >
> >=C2=A0 =3D20
> > >=C2=A0 =C2=A0Submitted by:=C2=A0 =C2=A0 =C2=A0bdr= > ewery
> > >=C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 =C2=A0 1 month
> > >=C2=A0 =C2=A0Differential Revision:=C2=A0 =C2=A0 //reviews.freebsd.org/D11154" rel=3D"noreferrer" target=3D"_blank">https://= > reviews.freebsd.org/D11154
>
> >=3D20
> > > Modified:
> > >=C2=A0 =C2=A0head/share/zoneinfo/Makefile
> > >=3D20
> > > Modified: head/share/zoneinfo/Makefile
> > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > =3D3D=3D3D=3D3D=3D3D
> > > --- head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mo= > n Jun 26 15:23:12 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > 1)
> > > +++ head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mon Jun 26 15:40:24= > 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > 2)
> > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
> > >=C2=A0 =C2=A0 =C2=A0zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${= > NOBINMODE} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LEAPFILE} -y ${.OBJDIR}/yearis= > type ${TZFILES}
>
> > =3D20
> > > +.if make(*install*)
> > > +TZS!=3D3D cd ${TZBUILDDIR} && find -s * -type f
> > > +.endif
> > > +
> > >=C2=A0 beforeinstall: install-zoneinfo
> > >=C2=A0 install-zoneinfo:
> > >=C2=A0 =C2=A0 =C2=A0mkdir -p ${DESTDIR}/usr/share/zoneinfo
> > >=C2=A0 =C2=A0 =C2=A0cd ${DESTDIR}/usr/share/zoneinfo;=C2=A0 mkdir = > -p ${TZBUILDSUBDIRS}
> > > -=C2=A0 =C2=A0cd ${TZBUILDDIR} && \
> > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0find -s * -type f -exec ${INSTALL} ${= > TAG_ARGS} \
> > > +.for f in ${TZS}
> > > +=C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${BINOWN} -g ${BINGRP} -m ${N= > OBINMODE} \
> > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0\{} ${DESTDIR}/usr/share/zoneinfo/ r>\{} \;
>
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${.OBJDIR}/,,}= > /${f} ${DESTDIR}/usr/share/zoneinfo=3D
> > /${f}
> > > +.endfor
> > >=C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGR= > P} -m ${NOBINMODE} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${CONTRIBDIR}/zone.tab ${DESTDIR= > }/usr/share/zoneinfo/
>
> > =3D20
> > >=3D20
> > >=3D20
> >
> >
> > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ--
> >
> > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > Content-Type: application/pgp-signature; name=3D"signature.asc&qu= > ot;
> > Content-Description: OpenPGP digital signature
> > Content-Disposition: attachment; filename=3D"signature.asc"<= > br> > >
> > -----BEGIN PGP SIGNATURE-----
> >
> > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAA= > LgAo
> > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5l= > dEU4
> > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1= > /om1
> > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+= > oGPJ
> > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3F= > Ng8R
> > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wf= > lPSr
> > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+= > aU/P
> > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYF= > laRo
> > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg=3D=3D
> > =3D9Mia
> > -----END PGP SIGNATURE-----
> >
> > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f--
> >
> >
>
> --
> Cheers,
> Cy Schubert <Cy.Schubert@cs= > chubert.com>
> FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 =3D"http://www.FreeBSD.org" rel=3D"noreferrer" target=3D"_blank">http://www= > .FreeBSD.org
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 The need of the many outweighs the greed of the= > few.
>
>
>

> > --001a113d0020693f04055304b5a4-- > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 28 15:35:21 2017 Return-Path: Delivered-To: svn-src-all@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 4B28BDA482B; Wed, 28 Jun 2017 15:35:21 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-vk0-x235.google.com (mail-vk0-x235.google.com [IPv6:2607:f8b0:400c:c05::235]) (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 E60AA7D616; Wed, 28 Jun 2017 15:35:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-vk0-x235.google.com with SMTP id 191so34897055vko.2; Wed, 28 Jun 2017 08:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=eJ7MS+S19uVf+FGu35RX8BWIN2kNE9q5du79jJPxRaA=; b=udO4H5q47+ag1t2oaNvgV5MkhEukCJCxp+mgEakrOHLaz+ORGKNB6oWdYZ2ttocoe3 MwbofiMuVCrwWL8MN+axWWea6AKqKp3hUr/mXzUPzv58IlGqZKoD7KqyYxpKmOFYokMU oSl4ZZLMR9yzNF+3aUJL3H8/G7XXH3SgFspxvePJKdu4zRjGj8vYjuZs9wbNYExVZodq hYIHJxFcuAoYt1UjVh3ffXYsu3g+d9q29CUX88HiC3ujZ5ccxOhH+wnUp+oVfD+bJzW7 nNrvOlS9iuuad7mAkbrrCwKS400Dd71eH3OMttyMGpR+WGmrpje/Cm/x71PzKVtOL0pi HcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=eJ7MS+S19uVf+FGu35RX8BWIN2kNE9q5du79jJPxRaA=; b=UzuH9YLH79BEnO2+Q9NUfmRSbRFBeNOldQAaOwMT/Gdw3FOZ+APuyDTMsITLqOlKlk V5prWCIYxOsEL0lRqtFThqXAr3LU0TYb4uyUiZNwstdozE9kHeGspObJQ/iIUj+kLWQ0 kvpSMPz/evdyYQvOb2ddiCvrw6K8MRrAG6VNL5Cb5XOmxujluZXV+56kn4oDysMSFby8 ypdf5WqN44PagFgB3drNL/Hk0spZxfRRLnopOjPu7MNK2jUH3wfu4J9oz1UFyEMrzpNq HuomsoAUJrODpS5B68oPpPa9VFP7aXz9tx6aOSYEvhdotVtrBuwAlyaBjXh5SHZ+NTuS b9lw== X-Gm-Message-State: AKS2vOyYaVlrrMHKNN4WVNmJe1GWJL0uEpja5x3l5x/OSxkdKSt+IXTA sIDpTXLIHoQsxHC6MvyQAsoOgGeIxw== X-Received: by 10.31.102.132 with SMTP id a126mr5981065vkc.107.1498664119885; Wed, 28 Jun 2017 08:35:19 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.83.198 with HTTP; Wed, 28 Jun 2017 08:35:19 -0700 (PDT) In-Reply-To: <201706281415.v5SEFPn9047463@slippy.cwsent.com> References: <201706281415.v5SEFPn9047463@slippy.cwsent.com> From: Edward Napierala Date: Wed, 28 Jun 2017 16:35:19 +0100 X-Google-Sender-Auth: mifAULcwovrHndV8SaOY35nuLxM Message-ID: Subject: Re: svn commit: r320362 - head/share/zoneinfo To: Cy Schubert Cc: Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 15:35:21 -0000 Please do. Thanks again :-) 2017-06-28 15:15 GMT+01:00 Cy Schubert : > It doesn't matter who commits it. If you want me to, I will commit it at > noon my time as I'm already a tad late for $JOB. > > ~cy > > In message KFM7ngEqiW86_g@mail.gmail.c > om> > , Edward Napierala writes: > > --001a113d0020693f04055304b5a4 > > Content-Type: text/plain; charset="UTF-8" > > > > This patch seems to fix the problem with "make -j4 installworld" for me. > > Do you intend to commit it? Thanks! (And sorry for the breakage.) > > > > > > 2017-06-27 4:48 GMT+01:00 Cy Schubert : > > > > > (since we're top posting.... ) > > > > > > Hi Sean, > > > > > > Do you want to give this a spin? > > > > > > Index: share/zoneinfo/Makefile > > > =================================================================== > > > --- share/zoneinfo/Makefile (revision 320389) > > > +++ share/zoneinfo/Makefile (working copy) > > > @@ -94,7 +94,7 @@ > > > .for f in ${TZS} > > > ${INSTALL} ${TAG_ARGS} \ > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > > ${DESTDIR}/usr/share/zoneinfo/${f} > > > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > > > .endfor > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m > ${NOBINMODE} \ > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > > > ~cy > > > > > > > > > In message , Sean > Bruno > > > write > > > s: > > > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > > Content-Type: multipart/mixed; boundary=" > VFqTarnRbgKj5gwWULxfLoTjWIwLn2 > > > loQ"; > > > > protected-headers="v1" > > > > From: Sean Bruno > > > > To: Edward Tomasz Napierala , > > > src-committers@freebsd.org, > > > > svn-src-all@freebsd.org, svn-src-head@freebsd.org > > > > Message-ID: > > > > Subject: Re: svn commit: r320362 - head/share/zoneinfo > > > > References: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ > > > > Content-Type: text/plain; charset=utf-8 > > > > Content-Language: en-US > > > > Content-Transfer-Encoding: quoted-printable > > > > > > > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > > > src=3D/usr/sr= > > > > c > > > > -v head" > > > > > > > > --- realinstall_subdir_share/zoneinfo --- > > > > install: builddir/Africa/Abidjan: No such file or directory > > > > > > > > > > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote: > > > > > Author: trasz > > > > > Date: Mon Jun 26 15:40:24 2017 > > > > > New Revision: 320362 > > > > > URL: https://svnweb.freebsd.org/changeset/base/320362 > > > > >=20 > > > > > Log: > > > > > Provide visual feedback when timezone files are installed. > > > > > After r320003 it wasn't being shown in any way. > > > > > =20 > > > > > Submitted by: bdrewery > > > > > MFC after: 1 month > > > > > Differential Revision: https://reviews.freebsd.org/D11154 > > > > >=20 > > > > > Modified: > > > > > head/share/zoneinfo/Makefile > > > > >=20 > > > > > Modified: head/share/zoneinfo/Makefile > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > 3D=3D=3D=3D=3D= > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > 3D=3D=3D=3D=3D=3D= > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > 3D=3D=3D=3D=3D=3D= > > > > =3D=3D=3D=3D > > > > > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 > > > (r32036 > > > > 1) > > > > > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 > > > (r32036 > > > > 2) > > > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > > > > > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > > > > > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > > > > > =20 > > > > > +.if make(*install*) > > > > > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > > > > > +.endif > > > > > + > > > > > beforeinstall: install-zoneinfo > > > > > install-zoneinfo: > > > > > mkdir -p ${DESTDIR}/usr/share/zoneinfo > > > > > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > > > > - cd ${TZBUILDDIR} && \ > > > > > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > > > > > +.for f in ${TZS} > > > > > + ${INSTALL} ${TAG_ARGS} \ > > > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > > > > > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > > ${DESTDIR}/usr/share/zoneinfo= > > > > /${f} > > > > > +.endfor > > > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m > ${NOBINMODE} \ > > > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > > =20 > > > > >=20 > > > > >=20 > > > > > > > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- > > > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > > Content-Type: application/pgp-signature; name="signature.asc" > > > > Content-Description: OpenPGP digital signature > > > > Content-Disposition: attachment; filename="signature.asc" > > > > > > > > -----BEGIN PGP SIGNATURE----- > > > > > > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo > > > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 > > > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 > > > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ > > > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R > > > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr > > > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P > > > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo > > > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== > > > > =9Mia > > > > -----END PGP SIGNATURE----- > > > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- > > > > > > > > > > > > > > -- > > > Cheers, > > > Cy Schubert > > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > > > The need of the many outweighs the greed of the few. > > > > > > > > > > > > > --001a113d0020693f04055304b5a4 > > Content-Type: text/html; charset="UTF-8" > > Content-Transfer-Encoding: quoted-printable > > > >
This patch seems to fix the problem with "make -j4 > in= > > stallworld" for me.
Do you intend to commit it?=C2=A0 Thanks! > =C2= > > =A0(And sorry for the breakage.)

class=3D"gmail_ex= > > tra">
2017-06-27 4:48 GMT+01:00 Cy > Schubert <= > > span dir=3D"ltr">< target=3D"= > > _blank">Cy.Schubert@komquats.com>:
class=3D"gm= > > ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc > solid;padding-le= > > ft:1ex">(since we're top posting.... )
> >
> > Hi Sean,
> >
> > Do you want to give this a spin?
> >
> > Index: share/zoneinfo/Makefile
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > 3D=3D=3D=3D=3D=3D= > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > 3D=3D=3D=3D=3D= > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > --- share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(revision 320389)
> > +++ share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(working copy)
> > @@ -94,7 +94,7 @@
> > =C2=A0.for f in ${TZS}
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} \
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -o ${BINOWN} -g ${BINGRP} -m > ${NO= > > BINMODE} \
> >
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${. > OBJDIR}= > > /,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR}/${f} > ${DESTDIR}/usr= > > /share/zoneinfo/${f}
> > =C2=A0.endfor
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g > ${BINGRP= > > } -m ${NOBINMODE} \
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${CONTRIBDIR}/zone.tab > ${DESTDIR}= > > /usr/share/zoneinfo/
> >
> >
~cy
> >
> >
> > In message < b6f5-6997-38293f10e25a@freeb= > > sd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org>, > Sean= > > Bruno
> > write
> > s:
> > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > Content-Type: multipart/mixed; boundary=3D" > VFqTarnRbgKj5gwWU= > > LxfLoTjWIwLn2loQ";
> > >=C2=A0 protected-headers=3D"v1"
> > > From: Sean Bruno < ">sbruno@free= > > bsd.org>
> > > To: Edward Tomasz Napierala <trasz@FreeBSD.org>, href=3D"mail= > > to:src-committers@freebsd.org">src-committers@freebsd.org,
> > >=C2=A0 svn-src-all@ > freebsd.o= > > rg, svn-src-head@ > freebsd.or= > > g
> > > Message-ID: < b6f5-6997-38293f10e25a= > > @freebsd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org > >= > >
> > > Subject: Re: svn commit: r320362 - head/share/zoneinfo
> > > References: < v5QFeOTj072841@repo.fre= > > ebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> > > In-Reply-To: < v5QFeOTj072841@repo.fr= > > eebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> > >
> > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ
> > > Content-Type: text/plain; charset=3Dutf-8
> > > Content-Language: en-US
> > > Content-Transfer-Encoding: quoted-printable
> > >
> > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > src=3D= > > 3D/usr/sr=3D
> > > c
> > > -v head"
> > >
> > > --- realinstall_subdir_share/zoneinfo ---
> > > install: builddir/Africa/Abidjan: No such file or directory
> > >
> > >
> > > On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> > > > Author: trasz
> > > > Date: Mon Jun 26 15:40:24 2017
> > > > New Revision: 320362
> > > > URL: 320362"= > > rel=3D"noreferrer" target=3D"_blank">https://svnweb.freebsd.org/ > chang= > > eset/base/320362
> >
> >=3D20
> > > > Log:
> > > >=C2=A0 =C2=A0Provide visual feedback when timezone files are > insta= > > lled.
> > > >=C2=A0 =C2=A0After r320003 it wasn't being shown in any > way. > r> > >
> >=C2=A0 =3D20
> > > >=C2=A0 =C2=A0Submitted by:=C2=A0 =C2=A0 > =C2=A0bdr= > > ewery
> > > >=C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 =C2=A0 1 month
> > > >=C2=A0 =C2=A0Differential Revision:=C2=A0 =C2=A0 href=3D"https:= > > //reviews.freebsd.org/D11154" rel=3D"noreferrer" > target=3D"_blank">https://= > > reviews.freebsd.org/D11154
> >
> >=3D20
> > > > Modified:
> > > >=C2=A0 =C2=A0head/share/zoneinfo/Makefile
> > > >=3D20
> > > > Modified: head/share/zoneinfo/Makefile
> > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > 3D3D=3D3D= > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > 3D3D=3D3D=3D3D= > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > 3D3D=3D3D=3D3D= > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > =3D3D=3D3D=3D3D=3D3D
> > > > --- head/share/zoneinfo/Makefile=C2=A0 > =C2=A0 Mo= > > n Jun 26 15:23:12 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > > 1)
> > > > +++ head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mon Jun 26 > 15:40:24= > > 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > > 2)
> > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
> > > >=C2=A0 =C2=A0 =C2=A0zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m > ${= > > NOBINMODE} \
> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LEAPFILE} -y > ${.OBJDIR}/yearis= > > type ${TZFILES}
> >
> > =3D20
> > > > +.if make(*install*)
> > > > +TZS!=3D3D cd ${TZBUILDDIR} && find -s * -type f
> > > > +.endif
> > > > +
> > > >=C2=A0 beforeinstall: install-zoneinfo
> > > >=C2=A0 install-zoneinfo:
> > > >=C2=A0 =C2=A0 =C2=A0mkdir -p ${DESTDIR}/usr/share/zoneinfo
> > > >=C2=A0 =C2=A0 =C2=A0cd ${DESTDIR}/usr/share/zoneinfo;=C2=A0 > mkdir = > > -p ${TZBUILDSUBDIRS}
> > > > -=C2=A0 =C2=A0cd ${TZBUILDDIR} && \
> > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0find -s * -type f -exec ${INSTALL} > ${= > > TAG_ARGS} \
> > > > +.for f in ${TZS}
> > > > +=C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} \
> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${BINOWN} -g ${BINGRP} -m > ${N= > > OBINMODE} \
> > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0\{} ${DESTDIR}/usr/share/zoneinfo/ > > r>\{} \;
> >
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${. > OBJDIR}/,,}= > > /${f} ${DESTDIR}/usr/share/zoneinfo=3D
> > > /${f}
> > > > +.endfor
> > > >=C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g > ${BINGR= > > P} -m ${NOBINMODE} \
> > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${CONTRIBDIR}/zone.tab > ${DESTDIR= > > }/usr/share/zoneinfo/
> >
> > =3D20
> > > >=3D20
> > > >=3D20
> > >
> > >
> > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ--
> > >
> > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > Content-Type: application/pgp-signature; > name=3D"signature.asc&qu= > > ot;
> > > Content-Description: OpenPGP digital signature
> > > Content-Disposition: attachment; filename=3D"signature. > asc"<= > > br> > > >
> > > -----BEGIN PGP SIGNATURE-----
> > >
> > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/ > LYFAllRUJtfFIAAAAAA= > > LgAo
> > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5l > = > > dEU4
> > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1 > = > > /om1
> > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0Di > irmhR1nW74ESXjGXd4u9WSYKfvxK+= > > oGPJ
> > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+ > kfzRbDwqiu3F= > > Ng8R
> > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+ > pLUK6jxy29wf= > > lPSr
> > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+ > F8v7tEJH9eNBpP6K6jR6B+= > > aU/P
> > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HK > XJdYF= > > laRo
> > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg=3D=3D
> > > =3D9Mia
> > > -----END PGP SIGNATURE-----
> > >
> > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f--
> > >
> > >
> >
> > --
> > Cheers,
> > Cy Schubert < ">Cy.Schubert@cs= > > chubert.com>
> > FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 href= > > =3D"http://www.FreeBSD.org" rel=3D"noreferrer" target=3D"_blank"> > http://www= > > .FreeBSD.org
> >
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 The need of the many outweighs the greed of > the= > > few.
> >
> >
> >

> > > > --001a113d0020693f04055304b5a4-- > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > From owner-svn-src-all@freebsd.org Wed Jun 28 17:32:11 2017 Return-Path: Delivered-To: svn-src-all@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 13A1ADA6B8A; Wed, 28 Jun 2017 17:32:11 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E4C71814DA; Wed, 28 Jun 2017 17:32:10 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SHW9JW025993; Wed, 28 Jun 2017 17:32:09 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SHW9hp025988; Wed, 28 Jun 2017 17:32:09 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201706281732.v5SHW9hp025988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 28 Jun 2017 17:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320453 - in head/sys/ufs: ffs ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head/sys/ufs: ffs ufs X-SVN-Commit-Revision: 320453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 17:32:11 -0000 Author: mckusick Date: Wed Jun 28 17:32:09 2017 New Revision: 320453 URL: https://svnweb.freebsd.org/changeset/base/320453 Log: Create a new function ffs_getcg() to read in and verify a cylinder group. Change all code points that open-coded this functionality to use the new function. This commit is a refactoring with no change in functionality. In the future this change allows more robust checking of cylinder group reads along the lines discussed in the hardening UFS session at BSDCan (retry I/O, add checksums, etc). For more detail see the session notes at https://wiki.freebsd.org/DevSummit/201706/HardeningUFS Reviewed by: kib Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_gjournal.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Wed Jun 28 13:59:20 2017 (r320452) +++ head/sys/ufs/ffs/ffs_alloc.c Wed Jun 28 17:32:09 2017 (r320453) @@ -1602,15 +1602,8 @@ ffs_fragextend(ip, cg, bprev, osize, nsize) return (0); } UFS_UNLOCK(ump); - error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); - if (error) + if ((error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp)) != 0) goto fail; - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) - goto fail; - bp->b_xflags |= BX_BKGRDWRITE; - cgp->cg_old_time = cgp->cg_time = time_second; bno = dtogd(fs, bprev); blksfree = cg_blksfree(cgp); for (i = numfrags(fs, osize); i < frags; i++) @@ -1680,16 +1673,9 @@ ffs_alloccg(ip, cg, bpref, size, rsize) if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); UFS_UNLOCK(ump); - error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); - if (error) + if ((error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp)) != 0 || + (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) goto fail; - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp) || - (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) - goto fail; - bp->b_xflags |= BX_BKGRDWRITE; - cgp->cg_old_time = cgp->cg_time = time_second; if (size == fs->fs_bsize) { UFS_LOCK(ump); blkno = ffs_alloccgblk(ip, bp, bpref, rsize); @@ -1857,7 +1843,7 @@ ffs_clusteralloc(ip, cg, bpref, len) struct cg *cgp; struct buf *bp; struct ufsmount *ump; - int i, run, bit, map, got; + int i, run, bit, map, got, error; ufs2_daddr_t bno; u_char *mapp; int32_t *lp; @@ -1868,13 +1854,10 @@ ffs_clusteralloc(ip, cg, bpref, len) if (fs->fs_maxcluster[cg] < len) return (0); UFS_UNLOCK(ump); - if (bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, - NOCRED, &bp)) - goto fail_lock; - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) - goto fail_lock; - bp->b_xflags |= BX_BKGRDWRITE; + if ((error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp)) != 0) { + UFS_LOCK(ump); + return (0); + } /* * Check to see if a cluster of the needed size (or bigger) is * available in this cylinder group. @@ -1897,7 +1880,8 @@ ffs_clusteralloc(ip, cg, bpref, len) break; UFS_LOCK(ump); fs->fs_maxcluster[cg] = i; - goto fail; + brelse(bp); + return (0); } /* * Search the cluster map to find a big enough cluster. @@ -1933,8 +1917,11 @@ ffs_clusteralloc(ip, cg, bpref, len) bit = 1; } } - if (got >= cgp->cg_nclusterblks) - goto fail_lock; + if (got >= cgp->cg_nclusterblks) { + UFS_LOCK(ump); + brelse(bp); + return (0); + } /* * Allocate the cluster that we have found. */ @@ -1954,12 +1941,6 @@ ffs_clusteralloc(ip, cg, bpref, len) UFS_UNLOCK(ump); bdwrite(bp); return (bno); - -fail_lock: - UFS_LOCK(ump); -fail: - brelse(bp); - return (0); } static inline struct buf * @@ -2005,21 +1986,16 @@ check_nifree: if (fs->fs_cs(fs, cg).cs_nifree == 0) return (0); UFS_UNLOCK(ump); - error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); - if (error) { - brelse(bp); + if ((error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp)) != 0) { UFS_LOCK(ump); return (0); } - cgp = (struct cg *)bp->b_data; restart: - if (!cg_chkmagic(cgp) || cgp->cg_cs.cs_nifree == 0) { + if (cgp->cg_cs.cs_nifree == 0) { brelse(bp); UFS_LOCK(ump); return (0); } - bp->b_xflags |= BX_BKGRDWRITE; inosused = cg_inosused(cgp); if (ipref) { ipref %= fs->fs_ipg; @@ -2103,21 +2079,16 @@ gotit: * to it, then leave it unchanged as the other thread * has already set it correctly. */ - error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); + error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp); UFS_LOCK(ump); ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); - if (error != 0) { - brelse(bp); + if (error != 0) return (error); - } - cgp = (struct cg *)bp->b_data; if (cgp->cg_initediblk == old_initediblk) cgp->cg_initediblk += INOPB(fs); goto restart; } - cgp->cg_old_time = cgp->cg_time = time_second; cgp->cg_irotor = ipref; UFS_LOCK(ump); ACTIVECLEAR(fs, cg); @@ -2160,7 +2131,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) struct buf *bp; ufs1_daddr_t fragno, cgbno; ufs2_daddr_t cgblkno; - int i, blk, frags, bbase; + int i, blk, frags, bbase, error; u_int cg; u_int8_t *blksfree; struct cdev *dev; @@ -2193,17 +2164,8 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) ffs_fserr(fs, inum, "bad block"); return; } - if (bread(devvp, cgblkno, (int)fs->fs_cgsize, NOCRED, &bp)) { - brelse(bp); + if ((error = ffs_getcg(fs, devvp, cg, &bp, &cgp)) != 0) return; - } - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) { - brelse(bp); - return; - } - bp->b_xflags |= BX_BKGRDWRITE; - cgp->cg_old_time = cgp->cg_time = time_second; cgbno = dtogd(fs, bno); blksfree = cg_blksfree(cgp); UFS_LOCK(ump); @@ -2408,14 +2370,9 @@ ffs_checkblk(ip, bno, size) } if ((u_int)bno >= fs->fs_size) panic("ffs_checkblk: bad block %jd", (intmax_t)bno); - error = bread(ITODEVVP(ip), fsbtodb(fs, cgtod(fs, dtog(fs, bno))), - (int)fs->fs_cgsize, NOCRED, &bp); + error = ffs_getcg(fs, ITODEVVP(ip), dtog(fs, bno), &bp, &cgp); if (error) - panic("ffs_checkblk: cg bread failed"); - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) - panic("ffs_checkblk: cg magic mismatch"); - bp->b_xflags |= BX_BKGRDWRITE; + panic("ffs_checkblk: cylinder group read failed"); blksfree = cg_blksfree(cgp); cgbno = dtogd(fs, bno); if (size == fs->fs_bsize) { @@ -2492,17 +2449,8 @@ ffs_freefile(ump, fs, devvp, ino, mode, wkhd) if (ino >= fs->fs_ipg * fs->fs_ncg) panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s", devtoname(dev), (uintmax_t)ino, fs->fs_fsmnt); - if ((error = bread(devvp, cgbno, (int)fs->fs_cgsize, NOCRED, &bp))) { - brelse(bp); + if ((error = ffs_getcg(fs, devvp, cg, &bp, &cgp)) != 0) return (error); - } - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) { - brelse(bp); - return (0); - } - bp->b_xflags |= BX_BKGRDWRITE; - cgp->cg_old_time = cgp->cg_time = time_second; inosused = cg_inosused(cgp); ino %= fs->fs_ipg; if (isclr(inosused, ino)) { @@ -2535,6 +2483,7 @@ ffs_freefile(ump, fs, devvp, ino, mode, wkhd) /* * Check to see if a file is free. + * Used to check for allocated files in snapshots. */ int ffs_checkfreefile(fs, devvp, ino) @@ -2545,7 +2494,7 @@ ffs_checkfreefile(fs, devvp, ino) struct cg *cgp; struct buf *bp; ufs2_daddr_t cgbno; - int ret; + int ret, error; u_int cg; u_int8_t *inosused; @@ -2561,15 +2510,8 @@ ffs_checkfreefile(fs, devvp, ino) } if (ino >= fs->fs_ipg * fs->fs_ncg) return (1); - if (bread(devvp, cgbno, (int)fs->fs_cgsize, NOCRED, &bp)) { - brelse(bp); + if ((error = ffs_getcg(fs, devvp, cg, &bp, &cgp)) != 0) return (1); - } - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) { - brelse(bp); - return (1); - } inosused = cg_inosused(cgp); ino %= fs->fs_ipg; ret = isclr(inosused, ino); @@ -2642,6 +2584,39 @@ ffs_mapsearch(fs, cgp, bpref, allocsiz) printf("bno = %lu, fs = %s\n", (u_long)bno, fs->fs_fsmnt); panic("ffs_alloccg: block not in map"); return (-1); +} + +/* + * Fetch and verify a cylinder group. + */ +int +ffs_getcg(fs, devvp, cg, bpp, cgpp) + struct fs *fs; + struct vnode *devvp; + u_int cg; + struct buf **bpp; + struct cg **cgpp; +{ + struct buf *bp; + struct cg *cgp; + int error; + + *bpp = NULL; + *cgpp = NULL; + error = bread(devvp, fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, NOCRED, &bp); + if (error != 0) + return (error); + cgp = (struct cg *)bp->b_data; + if (!cg_chkmagic(cgp) || cgp->cg_cgx != cg) { + brelse(bp); + return (EIO); + } + bp->b_xflags |= BX_BKGRDWRITE; + cgp->cg_old_time = cgp->cg_time = time_second; + *bpp = bp; + *cgpp = cgp; + return (0); } /* Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Wed Jun 28 13:59:20 2017 (r320452) +++ head/sys/ufs/ffs/ffs_extern.h Wed Jun 28 17:32:09 2017 (r320453) @@ -74,6 +74,8 @@ void ffs_fragacct(struct fs *, int, int32_t [], int); int ffs_freefile(struct ufsmount *, struct fs *, struct vnode *, ino_t, int, struct workhead *); void ffs_fserr(struct fs *, ino_t, char *); +int ffs_getcg(struct fs *, struct vnode *, u_int, struct buf **, + struct cg **); int ffs_isblock(struct fs *, u_char *, ufs1_daddr_t); int ffs_isfreeblock(struct fs *, u_char *, ufs1_daddr_t); void ffs_load_inode(struct buf *, struct inode *, struct fs *, ino_t); Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Wed Jun 28 13:59:20 2017 (r320452) +++ head/sys/ufs/ffs/ffs_snapshot.c Wed Jun 28 17:32:09 2017 (r320453) @@ -888,17 +888,8 @@ cgaccount(cg, vp, nbp, passno) ip = VTOI(vp); fs = ITOFS(ip); - error = bread(ITODEVVP(ip), fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, KERNCRED, &bp); - if (error) { - brelse(bp); + if ((error = ffs_getcg(fs, ITODEVVP(ip), cg, &bp, &cgp)) != 0) return (error); - } - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) { - brelse(bp); - return (EIO); - } UFS_LOCK(ITOUMP(ip)); ACTIVESET(fs, cg); /* Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Wed Jun 28 13:59:20 2017 (r320452) +++ head/sys/ufs/ffs/ffs_vfsops.c Wed Jun 28 17:32:09 2017 (r320453) @@ -1863,12 +1863,9 @@ ffs_fhtovp(mp, fhp, flags, vpp) if (fs->fs_magic != FS_UFS2_MAGIC) return (ufs_fhtovp(mp, ufhp, flags, vpp)); cg = ino_to_cg(fs, ino); - error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)), - (int)fs->fs_cgsize, NOCRED, &bp); - if (error) + if ((error = ffs_getcg(fs, ump->um_devvp, cg, &bp, &cgp)) != 0) return (error); - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp) || ino >= cg * fs->fs_ipg + cgp->cg_initediblk) { + if (ino >= cg * fs->fs_ipg + cgp->cg_initediblk) { brelse(bp); return (ESTALE); } Modified: head/sys/ufs/ufs/ufs_gjournal.c ============================================================================== --- head/sys/ufs/ufs/ufs_gjournal.c Wed Jun 28 13:59:20 2017 (r320452) +++ head/sys/ufs/ufs/ufs_gjournal.c Wed Jun 28 17:32:09 2017 (r320453) @@ -86,16 +86,8 @@ ufs_gjournal_modref(struct vnode *vp, int count) if ((u_int)ino >= fs->fs_ipg * fs->fs_ncg) panic("ufs_gjournal_modref: range: dev = %s, ino = %lu, fs = %s", devtoname(dev), (u_long)ino, fs->fs_fsmnt); - if ((error = bread(devvp, cgbno, (int)fs->fs_cgsize, NOCRED, &bp))) { - brelse(bp); + if ((error = ffs_getcg(fs, devvp, cg, &bp, &cgp)) != 0) return (error); - } - cgp = (struct cg *)bp->b_data; - if (!cg_chkmagic(cgp)) { - brelse(bp); - return (0); - } - bp->b_xflags |= BX_BKGRDWRITE; cgp->cg_unrefs += count; UFS_LOCK(ump); fs->fs_unrefs += count; From owner-svn-src-all@freebsd.org Wed Jun 28 19:05:06 2017 Return-Path: Delivered-To: svn-src-all@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 30030DA7F05; Wed, 28 Jun 2017 19:05:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 F0CA88396C; Wed, 28 Jun 2017 19:05:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SJ55xb062533; Wed, 28 Jun 2017 19:05:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SJ55Zb062532; Wed, 28 Jun 2017 19:05:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706281905.v5SJ55Zb062532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 28 Jun 2017 19:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320454 - head/share/zoneinfo X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/share/zoneinfo X-SVN-Commit-Revision: 320454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 19:05:06 -0000 Author: cy Date: Wed Jun 28 19:05:04 2017 New Revision: 320454 URL: https://svnweb.freebsd.org/changeset/base/320454 Log: Allow parallel installworld (-j N) and poudriere installworld (poudriere jail -c and poudriere jail -u) to proceed. Reviewed by: trasz@ Tested by: trasz@, cy@ MFC after: 1 month X-MFC-with: r320362 Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Wed Jun 28 17:32:09 2017 (r320453) +++ head/share/zoneinfo/Makefile Wed Jun 28 19:05:04 2017 (r320454) @@ -94,7 +94,7 @@ install-zoneinfo: .for f in ${TZS} ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} .endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ From owner-svn-src-all@freebsd.org Wed Jun 28 19:08:08 2017 Return-Path: Delivered-To: svn-src-all@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 80CC2DA80B8; Wed, 28 Jun 2017 19:08:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5A0CE83B3B; Wed, 28 Jun 2017 19:08:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SJ87wZ062715; Wed, 28 Jun 2017 19:08:07 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SJ87co062712; Wed, 28 Jun 2017 19:08:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706281908.v5SJ87co062712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 28 Jun 2017 19:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320455 - head/contrib/ipfilter/lib X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/lib X-SVN-Commit-Revision: 320455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 19:08:08 -0000 Author: cy Date: Wed Jun 28 19:08:07 2017 New Revision: 320455 URL: https://svnweb.freebsd.org/changeset/base/320455 Log: Ansify entry and exit points. MFC after: 1 month Modified: head/contrib/ipfilter/lib/hostname.c head/contrib/ipfilter/lib/portname.c head/contrib/ipfilter/lib/printstate.c Modified: head/contrib/ipfilter/lib/hostname.c ============================================================================== --- head/contrib/ipfilter/lib/hostname.c Wed Jun 28 19:05:04 2017 (r320454) +++ head/contrib/ipfilter/lib/hostname.c Wed Jun 28 19:08:07 2017 (r320455) @@ -10,9 +10,8 @@ #include "ipf.h" -char *hostname(family, ip) - int family; - void *ip; +char * +hostname(int family, void *ip) { static char hostbuf[MAXHOSTNAMELEN+1]; struct hostent *hp; @@ -24,7 +23,7 @@ char *hostname(family, ip) if (family == AF_INET) { ipa.s_addr = *(u_32_t *)ip; if (ipa.s_addr == htonl(0xfedcba98)) - return "test.host.dots"; + return ("test.host.dots"); } if ((opts & OPT_NORESOLVE) == 0) { @@ -34,7 +33,7 @@ char *hostname(family, ip) *hp->h_name != '\0') { strncpy(hostbuf, hp->h_name, sizeof(hostbuf)); hostbuf[sizeof(hostbuf) - 1] = '\0'; - return hostbuf; + return (hostbuf); } np = getnetbyaddr(ipa.s_addr, AF_INET); @@ -42,19 +41,19 @@ char *hostname(family, ip) *np->n_name != '\0') { strncpy(hostbuf, np->n_name, sizeof(hostbuf)); hostbuf[sizeof(hostbuf) - 1] = '\0'; - return hostbuf; + return (hostbuf); } } } if (family == AF_INET) { - return inet_ntoa(ipa); + return (inet_ntoa(ipa)); } #ifdef USE_INET6 (void) inet_ntop(AF_INET6, ip, hostbuf, sizeof(hostbuf) - 1); hostbuf[MAXHOSTNAMELEN] = '\0'; - return hostbuf; + return (hostbuf); #else - return "IPv6"; + return ("IPv6"); #endif } Modified: head/contrib/ipfilter/lib/portname.c ============================================================================== --- head/contrib/ipfilter/lib/portname.c Wed Jun 28 19:05:04 2017 (r320454) +++ head/contrib/ipfilter/lib/portname.c Wed Jun 28 19:08:07 2017 (r320455) @@ -10,8 +10,8 @@ #include "ipf.h" -char *portname(pr, port) - int pr, port; +char * +portname(int pr, int port) { static char buf[32]; struct protoent *p = NULL; @@ -28,16 +28,16 @@ char *portname(pr, port) NULL : sv1; } if (sv) - return buf; + return (buf); } else if ((pr != -2) && (p = getprotobynumber(pr))) { if ((sv = getservbyport(htons(port), p->p_name))) { strncpy(buf, sv->s_name, sizeof(buf)-1); buf[sizeof(buf)-1] = '\0'; - return buf; + return (buf); } } } (void) sprintf(buf, "%d", port); - return buf; + return (buf); } Modified: head/contrib/ipfilter/lib/printstate.c ============================================================================== --- head/contrib/ipfilter/lib/printstate.c Wed Jun 28 19:05:04 2017 (r320454) +++ head/contrib/ipfilter/lib/printstate.c Wed Jun 28 19:08:07 2017 (r320455) @@ -11,10 +11,7 @@ ipstate_t * -printstate(sp, opts, now) - ipstate_t *sp; - int opts; - u_long now; +printstate(ipstate_t *sp, int opts, u_long now) { struct protoent *pr; synclist_t ipsync; @@ -210,7 +207,7 @@ printstate(sp, opts, now) if (kmemcpy((char *)&ipsync, (u_long)sp->is_sync, sizeof(ipsync))) { PRINTF("status could not be retrieved\n"); - return NULL; + return (NULL); } PRINTF("idx %d num %d v %d pr %d rev %d\n", @@ -220,5 +217,5 @@ printstate(sp, opts, now) PRINTF("not synchronized\n"); } - return sp->is_next; + return (sp->is_next); } From owner-svn-src-all@freebsd.org Wed Jun 28 19:25:56 2017 Return-Path: Delivered-To: svn-src-all@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 886C2DA85D6; Wed, 28 Jun 2017 19:25:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (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 53F35844E3; Wed, 28 Jun 2017 19:25:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id z6so10149834pfk.3; Wed, 28 Jun 2017 12:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=NIGMiBUAfXG0FlmHlk3HqGYCJ6k0b4rIInLDs7XTUWY=; b=HupFriJUrVTG40ZpBm+SByDpDXCi+R3tHupUnDdT5zuh7evCo5mkJM2HkiQjPxuZqo qh2WItxDanCucsJWKBfD8hfb9Fwrmde1BsjtmYs8ltaDUZHdFshbLgFg1zjxpBCt+urD ViKjzNto4e3l5q2XqMjxMb9r3jZF/gNhTxMIOABHsMARnFhQnzIyNiWGbpK+70YLwRgF wZRLVU/eun72JLjHbmDn/0lFzo4fbS4LhRirdSKGQWqw2/9mbgSCjnQIHzHE1r1wL35s 6IWa3sp8oZptUppq5IKKOL95xTE/vevxQvwGGZpB7Y9ucjhMLKdD7gkF85tnW0mpeYRB rTzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=NIGMiBUAfXG0FlmHlk3HqGYCJ6k0b4rIInLDs7XTUWY=; b=YdypKIJ1xvu+30VSmqSE6ma7IJ9kawL853EYzqeyPhN9Rn4pizqzx0WQC9c1Ibs5tY 6ItDJH8GteEIhZpfVEAAfRrqzHsy5+Vdbk35fcVZaVGzYWp7JmeN7tIm51p6GrP0/uX0 M3n9lw2NDLbgk2dFqJUyfgVI7EayK8OKWy+GT7zyGwX548CeBTbIJcunjuPtnPMfGRUx YUskJPgm+Yooyzd66tWmWI7adDtiV1PZUm0yEMI6OGZ7fRzLrZM6r02XFOT43eLotTPS NxdqiFmR7PmWJdTeG61lBAuI2ESwwFx3dElYgutzY/ghask9Ofjoxam1GEsxNEhuhlTx HTeg== X-Gm-Message-State: AKS2vOzVQevUHDRfbIn/3bAy9lcsrxm12pVXDyAA/mvQFZ1kU+n4vrDG zHFcjMqN6hnj0hrNcQg= X-Received: by 10.84.128.195 with SMTP id a61mr13762699pla.130.1498677955645; Wed, 28 Jun 2017 12:25:55 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id x25sm7676426pfi.58.2017.06.28.12.25.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Jun 2017 12:25:54 -0700 (PDT) Subject: Re: svn commit: r320454 - head/share/zoneinfo Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_08D0994E-C5E0-4E84-ACF1-C103E9A01AF3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201706281905.v5SJ55Zb062532@repo.freebsd.org> Date: Wed, 28 Jun 2017 12:25:53 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <3305BCF7-0978-4152-B3AD-309FD891B59D@gmail.com> References: <201706281905.v5SJ55Zb062532@repo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 19:25:56 -0000 --Apple-Mail=_08D0994E-C5E0-4E84-ACF1-C103E9A01AF3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 28, 2017, at 12:05, Cy Schubert wrote: >=20 > Author: cy > Date: Wed Jun 28 19:05:04 2017 > New Revision: 320454 > URL: https://svnweb.freebsd.org/changeset/base/320454 >=20 > Log: > Allow parallel installworld (-j N) and poudriere installworld > (poudriere jail -c and poudriere jail -u) to proceed. >=20 > Reviewed by: trasz@ > Tested by: trasz@, cy@ > MFC after: 1 month > X-MFC-with: r320362 >=20 > Modified: > head/share/zoneinfo/Makefile >=20 > Modified: head/share/zoneinfo/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/zoneinfo/Makefile Wed Jun 28 17:32:09 2017 = (r320453) > +++ head/share/zoneinfo/Makefile Wed Jun 28 19:05:04 2017 = (r320454) > @@ -94,7 +94,7 @@ install-zoneinfo: > .for f in ${TZS} > ${INSTALL} ${TAG_ARGS} \ > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} = ${DESTDIR}/usr/share/zoneinfo/${f} > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > .endfor > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} = \ > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ Thank you for getting this in! In general, I would argue that for/.for loops in Make targets = are bad like this I think that individual targets could in fact be = created, and driven as a dependency of a top-level target, to avoid this = issue and keep bdrewery=E2=80=99s intended change in r320362, e.g. = something like, install-zones: .PHONY .for f in ${TZS} install-zones: ${DESTDIR}/usr/share/zoneinfo/${f} ${DESTDIR}/usr/share/zoneinfo/${f}: ${f} ${INSTALL} ... .endfor I=E2=80=99m not incredibly sure based on this commit alone why = this Makefile isn=E2=80=99t using FILES though=E2=80=A6 I=E2=80=99ll = look at it closer when I have a spare minute. Thanks, -Ngie --Apple-Mail=_08D0994E-C5E0-4E84-ACF1-C103E9A01AF3 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZVALBAAoJEPWDqSZpMIYVgcYP/3R5QvAZnRidzyPdfHFGOekX uL2esI0enXJUnlgQsQLSWi5aG6nDONAi3EanKI0OgJ2iKpRdKX5OFs+2rahcm6uD MaQyvbn/5+lL25g9O1V5/P5Eoa32kMkvYxHkxaz3YPJzkLto1I2R2J9Hj3g6jVU2 OrmPz71vU0X1G2QthXOzf63w+wbUF8YlmSrzZ2+ZgMeCKzfUdLuWrGejgY9ETHEz BbhLXQ2uvYqjJ4Ij00ojvMZCx5xaeFWpU5AR9dluwyaWp90U4Ey+5sPKdw2K/x5D +KNib3mgs79/K3vHSfr8ahyFUijxZN3uTmeGaBcOhQRr8ngI51ZmzWq83A0cGy/P yWg8mNeJ8CNhNoHE2bGyEYJxyBbAkykOqH5IidtgUMg+uO7JSNi15gZ5C77xmRFx GM191qQEQDpo7e6XcwM8/vUsqcTv1Az8MHnViuiDSC9D2ZZVgj/ZWG7jNt4HZquw 7PlwSGu1DXdlyhCPCa9dplOv3yuVbLJE9FOajfwstket7Jq8AwKLghaZlL+V7M8T X6UJEIUUVitmhzKd9cZqNopbZSsWX2dCx5mkxEY96+q/6gCnido0Tvk6TBfGyQGt nl+6+X0BHZk33bsVQL1jYWEQhJBYa/txlO8ZoORiu6cpNou1feaXhh3y7S++Q2Dq +oqopbUVDfjeK5B4/KTP =/DIH -----END PGP SIGNATURE----- --Apple-Mail=_08D0994E-C5E0-4E84-ACF1-C103E9A01AF3-- From owner-svn-src-all@freebsd.org Wed Jun 28 19:30:31 2017 Return-Path: Delivered-To: svn-src-all@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 B0A47DA892D; Wed, 28 Jun 2017 19:30:31 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 624FC8479C; Wed, 28 Jun 2017 19:30:29 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id QIQwdicW5ETFpQIQxdjnGy; Wed, 28 Jun 2017 13:15:28 -0600 X-Authority-Analysis: v=2.2 cv=dZbw5Tfe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=SLG1KRGDAAAA:8 a=IIX2BFdiAAAA:8 a=NMM7OKYrAAAA:8 a=kUCByv9wAAAA:8 a=KpeJSf20AAAA:8 a=0VOg8hKvAAAA:8 a=vUPWEWiMAAAA:8 a=BXYy4R0WAAAA:8 a=QSBWpcfR5GY4jEtF4JUA:9 a=NnUqzC6Fjy8AhMSI:21 a=CjuIK1q_8ugA:10 a=cHr6Uyts_5sA:10 a=NWVoK91CQyQA:10 a=pxhY87DP9d2VeQe4joPk:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=-TBaU1e9WpdkKBzYXnwo:22 a=rHg00LAlvzXsuODty-Nv:22 a=isrg6BwTYk6I_F0B0DtW:22 a=bu_5hG6eGWxBxPYBRUjp:22 a=8GyX2P7uvxEm4O_9qm7Q:22 a=I-efbNKAaAt4Mg394dr-:22 a=s3Yi14Of9AgBIP63TAoC:22 a=6K-cYB1gWkfn0jlA1t11:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 70048269; Wed, 28 Jun 2017 12:15:25 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5SJE9fq018387; Wed, 28 Jun 2017 12:14:09 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.14.8/Submit) with ESMTP id v5SJE9eN018384; Wed, 28 Jun 2017 12:14:09 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706281914.v5SJE9eN018384@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs 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.cschubert.com/ To: Edward Napierala cc: Cy Schubert , Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r320362 - head/share/zoneinfo In-Reply-To: Message from Edward Napierala of "Wed, 28 Jun 2017 16:35:19 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jun 2017 12:14:09 -0700 X-CMAE-Envelope: MS4wfCutTlDiCCzfEsr3I9fbYr73Rw6Wn8wS4EIOdUQAnmcVuG4Wj2tt9IKmxf6dOSAZSwfRtn29CFYeTBCpVQceNazwCawVfTdJrAKINWMVA0O8nnzNlPCz w+vcte+SIHMDXs6zRaMYITgD519YZh0wR4KWhdUhuwNPmXLd0dxYJ+O8N/gfDVTDkEFQVxEAAKZlrpQRFx5eT+HU78fP/3zku2SITwkme/Mks4K/BH1/v3uk 8OTLLbtKIOHBEXUu3DZUaSYdPYh7ZRBONaYMXVZ5YM5KrM8efFHvR4Lm6JqiK8mmFRPdQTkTe3r00lbAFOWsmg== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 19:30:31 -0000 It's committed. Remember to MFC it with r320362. ~cy In message , Edward Napierala writes: > --001a114df91c80e879055306eec4 > Content-Type: text/plain; charset="UTF-8" > > Please do. Thanks again :-) > > 2017-06-28 15:15 GMT+01:00 Cy Schubert : > > > It doesn't matter who commits it. If you want me to, I will commit it at > > noon my time as I'm already a tad late for $JOB. > > > > ~cy > > > > In message > KFM7ngEqiW86_g@mail.gmail.c > > om> > > , Edward Napierala writes: > > > --001a113d0020693f04055304b5a4 > > > Content-Type: text/plain; charset="UTF-8" > > > > > > This patch seems to fix the problem with "make -j4 installworld" for me. > > > Do you intend to commit it? Thanks! (And sorry for the breakage.) > > > > > > > > > 2017-06-27 4:48 GMT+01:00 Cy Schubert : > > > > > > > (since we're top posting.... ) > > > > > > > > Hi Sean, > > > > > > > > Do you want to give this a spin? > > > > > > > > Index: share/zoneinfo/Makefile > > > > =================================================================== > > > > --- share/zoneinfo/Makefile (revision 320389) > > > > +++ share/zoneinfo/Makefile (working copy) > > > > @@ -94,7 +94,7 @@ > > > > .for f in ${TZS} > > > > ${INSTALL} ${TAG_ARGS} \ > > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > > > ${DESTDIR}/usr/share/zoneinfo/${f} > > > > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > > > > .endfor > > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m > > ${NOBINMODE} \ > > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > > > > > ~cy > > > > > > > > > > > > In message , Sean > > Bruno > > > > write > > > > s: > > > > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > > > Content-Type: multipart/mixed; boundary=" > > VFqTarnRbgKj5gwWULxfLoTjWIwLn2 > > > > loQ"; > > > > > protected-headers="v1" > > > > > From: Sean Bruno > > > > > To: Edward Tomasz Napierala , > > > > src-committers@freebsd.org, > > > > > svn-src-all@freebsd.org, svn-src-head@freebsd.org > > > > > Message-ID: > > > > > Subject: Re: svn commit: r320362 - head/share/zoneinfo > > > > > References: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > > In-Reply-To: <201706261540.v5QFeOTj072841@repo.freebsd.org> > > > > > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ > > > > > Content-Type: text/plain; charset=utf-8 > > > > > Content-Language: en-US > > > > > Content-Transfer-Encoding: quoted-printable > > > > > > > > > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > > > > src=3D/usr/sr= > > > > > c > > > > > -v head" > > > > > > > > > > --- realinstall_subdir_share/zoneinfo --- > > > > > install: builddir/Africa/Abidjan: No such file or directory > > > > > > > > > > > > > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote: > > > > > > Author: trasz > > > > > > Date: Mon Jun 26 15:40:24 2017 > > > > > > New Revision: 320362 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/320362 > > > > > >=20 > > > > > > Log: > > > > > > Provide visual feedback when timezone files are installed. > > > > > > After r320003 it wasn't being shown in any way. > > > > > > =20 > > > > > > Submitted by: bdrewery > > > > > > MFC after: 1 month > > > > > > Differential Revision: https://reviews.freebsd.org/D11154 > > > > > >=20 > > > > > > Modified: > > > > > > head/share/zoneinfo/Makefile > > > > > >=20 > > > > > > Modified: head/share/zoneinfo/Makefile > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > > 3D=3D=3D=3D=3D= > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > > 3D=3D=3D=3D=3D=3D= > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > > > 3D=3D=3D=3D=3D=3D= > > > > > =3D=3D=3D=3D > > > > > > --- head/share/zoneinfo/Makefile Mon Jun 26 15:23:12 2017 > > > > (r32036 > > > > > 1) > > > > > > +++ head/share/zoneinfo/Makefile Mon Jun 26 15:40:24 2017 > > > > (r32036 > > > > > 2) > > > > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA} > > > > > > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ > > > > > > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} > > > > > > =20 > > > > > > +.if make(*install*) > > > > > > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f > > > > > > +.endif > > > > > > + > > > > > > beforeinstall: install-zoneinfo > > > > > > install-zoneinfo: > > > > > > mkdir -p ${DESTDIR}/usr/share/zoneinfo > > > > > > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > > > > > - cd ${TZBUILDDIR} && \ > > > > > > - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \ > > > > > > +.for f in ${TZS} > > > > > > + ${INSTALL} ${TAG_ARGS} \ > > > > > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > > > > > - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; > > > > > > + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} > > > > ${DESTDIR}/usr/share/zoneinfo= > > > > > /${f} > > > > > > +.endfor > > > > > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m > > ${NOBINMODE} \ > > > > > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > > > > > =20 > > > > > >=20 > > > > > >=20 > > > > > > > > > > > > > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ-- > > > > > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f > > > > > Content-Type: application/pgp-signature; name="signature.asc" > > > > > Content-Description: OpenPGP digital signature > > > > > Content-Disposition: attachment; filename="signature.asc" > > > > > > > > > > -----BEGIN PGP SIGNATURE----- > > > > > > > > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAAAAAALgAo > > > > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 > > > > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 > > > > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ > > > > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R > > > > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr > > > > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P > > > > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo > > > > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg== > > > > > =9Mia > > > > > -----END PGP SIGNATURE----- > > > > > > > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f-- > > > > > > > > > > > > > > > > > > -- > > > > Cheers, > > > > Cy Schubert > > > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > > > > > The need of the many outweighs the greed of the few. > > > > > > > > > > > > > > > > > > --001a113d0020693f04055304b5a4 > > > Content-Type: text/html; charset="UTF-8" > > > Content-Transfer-Encoding: quoted-printable > > > > > >
This patch seems to fix the problem with "make -j4 > > in= > > > stallworld" for me.
Do you intend to commit it?=C2=A0 Thanks! > > =C2= > > > =A0(And sorry for the breakage.)

> class=3D"gmail_ex= > > > tra">
2017-06-27 4:48 GMT+01:00 Cy > > Schubert <= > > > span dir=3D"ltr">< > target=3D"= > > > _blank">Cy.Schubert@komquats.com>:
> class=3D"gm= > > > ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc > > solid;padding-le= > > > ft:1ex">(since we're top posting.... )
> > >
> > > Hi Sean,
> > >
> > > Do you want to give this a spin?
> > >
> > > Index: share/zoneinfo/Makefile
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > 3D=3D=3D=3D=3D=3D= > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > 3D=3D=3D=3D=3D= > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > --- share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(revision 320389)
> > > +++ share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(working copy)
> > > @@ -94,7 +94,7 @@
> > > =C2=A0.for f in ${TZS}
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} \
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -o ${BINOWN} -g ${BINGRP} -m > > ${NO= > > > BINMODE} \
> > >
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${. > > OBJDIR}= > > > /,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR}/${f} > > ${DESTDIR}/usr= > > > /share/zoneinfo/${f}
> > > =C2=A0.endfor
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g > > ${BINGRP= > > > } -m ${NOBINMODE} \
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${CONTRIBDIR}/zone.tab > > ${DESTDIR}= > > > /usr/share/zoneinfo/
> > >
> > >
~cy
> > >
> > >
> > > In message < > b6f5-6997-38293f10e25a@freeb= > > > sd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org>, > > Sean= > > > Bruno
> > > write
> > > s:
> > > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > > Content-Type: multipart/mixed; boundary=3D" > > VFqTarnRbgKj5gwWU= > > > LxfLoTjWIwLn2loQ";
> > > >=C2=A0 protected-headers=3D"v1"
> > > > From: Sean Bruno < > ">sbruno@free= > > > bsd.org>
> > > > To: Edward Tomasz Napierala <trasz@FreeBSD.org>, > href=3D"mail= > > > to:src-committers@freebsd.org">src-committers@freebsd.org,
> > > >=C2=A0 svn-src-all@ > > freebsd.o= > > > rg, svn-src-head@ > > freebsd.or= > > > g
> > > > Message-ID: < > b6f5-6997-38293f10e25a= > > > @freebsd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org > > >= > > >
> > > > Subject: Re: svn commit: r320362 - head/share/zoneinfo
> > > > References: < > v5QFeOTj072841@repo.fre= > > > ebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> > > > In-Reply-To: < > v5QFeOTj072841@repo.fr= > > > eebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org>
> > > >
> > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ
> > > > Content-Type: text/plain; charset=3Dutf-8
> > > > Content-Language: en-US
> > > > Content-Transfer-Encoding: quoted-printable
> > > >
> > > > Hmmm ... This seems to break 'poudriere jail -c jailname -m > > src=3D= > > > 3D/usr/sr=3D
> > > > c
> > > > -v head"
> > > >
> > > > --- realinstall_subdir_share/zoneinfo ---
> > > > install: builddir/Africa/Abidjan: No such file or directory
> > > >
> > > >
> > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> > > > > Author: trasz
> > > > > Date: Mon Jun 26 15:40:24 2017
> > > > > New Revision: 320362
> > > > > URL: > 320362"= > > > rel=3D"noreferrer" target=3D"_blank">https://svnweb.freebsd.org/ > > chang= > > > eset/base/320362
> > >
> >=3D20
> > > > > Log:
> > > > >=C2=A0 =C2=A0Provide visual feedback when timezone files are > > insta= > > > lled.
> > > > >=C2=A0 =C2=A0After r320003 it wasn't being shown in any > > way. > > r> > > >
> >=C2=A0 =3D20
> > > > >=C2=A0 =C2=A0Submitted by:=C2=A0 =C2=A0 > > =C2=A0bdr= > > > ewery
> > > > >=C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 =C2=A0 1 month
> > > > >=C2=A0 =C2=A0Differential Revision:=C2=A0 =C2=A0 > href=3D"https:= > > > //reviews.freebsd.org/D11154" rel=3D"noreferrer" > > target=3D"_blank">https://= > > > reviews.freebsd.org/D11154
> > >
> >=3D20
> > > > > Modified:
> > > > >=C2=A0 =C2=A0head/share/zoneinfo/Makefile
> > > > >=3D20
> > > > > Modified: head/share/zoneinfo/Makefile
> > > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > > 3D3D=3D3D= > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > > 3D3D=3D3D=3D3D= > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > > 3D3D=3D3D=3D3D= > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D
> > > > > --- head/share/zoneinfo/Makefile=C2=A0 > > =C2=A0 Mo= > > > n Jun 26 15:23:12 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > > > 1)
> > > > > +++ head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mon Jun 26 > > 15:40:24= > > > 2017=C2=A0 =C2=A0 =C2=A0 =C2=A0 (r32036
> > > > 2)
> > > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
> > > > >=C2=A0 =C2=A0 =C2=A0zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m > > ${= > > > NOBINMODE} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LEAPFILE} -y > > ${.OBJDIR}/yearis= > > > type ${TZFILES}
> > >
> > =3D20
> > > > > +.if make(*install*)
> > > > > +TZS!=3D3D cd ${TZBUILDDIR} && find -s * -type f
> > > > > +.endif
> > > > > +
> > > > >=C2=A0 beforeinstall: install-zoneinfo
> > > > >=C2=A0 install-zoneinfo:
> > > > >=C2=A0 =C2=A0 =C2=A0mkdir -p ${DESTDIR}/usr/share/zoneinfo
> > > > >=C2=A0 =C2=A0 =C2=A0cd ${DESTDIR}/usr/share/zoneinfo;=C2=A0 > > mkdir = > > > -p ${TZBUILDSUBDIRS}
> > > > > -=C2=A0 =C2=A0cd ${TZBUILDDIR} && \
> > > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0find -s * -type f -exec ${INSTALL} > > ${= > > > TAG_ARGS} \
> > > > > +.for f in ${TZS}
> > > > > +=C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${BINOWN} -g ${BINGRP} -m > > ${N= > > > OBINMODE} \
> > > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0\{} ${DESTDIR}/usr/share/zoneinfo/ > > > > r>\{} \;
> > >
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${. > > OBJDIR}/,,}= > > > /${f} ${DESTDIR}/usr/share/zoneinfo=3D
> > > > /${f}
> > > > > +.endfor
> > > > >=C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g > > ${BINGR= > > > P} -m ${NOBINMODE} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${CONTRIBDIR}/zone.tab > > ${DESTDIR= > > > }/usr/share/zoneinfo/
> > >
> > =3D20
> > > > >=3D20
> > > > >=3D20
> > > >
> > > >
> > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ--
> > > >
> > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > > Content-Type: application/pgp-signature; > > name=3D"signature.asc&qu= > > > ot;
> > > > Content-Description: OpenPGP digital signature
> > > > Content-Disposition: attachment; filename=3D"signature. > > asc"<= > > > br> > > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > >
> > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/ > > LYFAllRUJtfFIAAAAAA= > > > LgAo
> > > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5l > > = > > > dEU4
> > > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1 > > = > > > /om1
> > > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0Di > > irmhR1nW74ESXjGXd4u9WSYKfvxK+= > > > oGPJ
> > > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+ > > kfzRbDwqiu3F= > > > Ng8R
> > > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+ > > pLUK6jxy29wf= > > > lPSr
> > > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+ > > F8v7tEJH9eNBpP6K6jR6B+= > > > aU/P
> > > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HK > > XJdYF= > > > laRo
> > > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg=3D=3D
> > > > =3D9Mia
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f--
> > > >
> > > >
> > >
> > > --
> > > Cheers,
> > > Cy Schubert < > ">Cy.Schubert@cs= > > > chubert.com>
> > > FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 > href= > > > =3D"http://www.FreeBSD.org" rel=3D"noreferrer" target=3D"_blank"> > > http://www= > > > .FreeBSD.org
> > >
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 The need of the many outweighs the greed of > > the= > > > few.
> > >
> > >
> > >

> > > > > > --001a113d0020693f04055304b5a4-- > > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > > > --001a114df91c80e879055306eec4 > Content-Type: text/html; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > >
Please do.=C2=A0 Thanks again :-)
_extra">
2017-06-28 15:15 GMT+01:00 Cy Schube= > rt < =3D"_blank">Cy.Schubert@komquats.com>:
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= > ing-left:1ex">It doesn't matter who commits it. If you want me to, I wi= > ll commit it at
> noon my time as I'm already a tad late for $JOB.
>
> ~cy
>
> In message <CAFLM3-rTjsQmMrDWSPPNpTqvnt3p33sOsmwmKFM7ngEqiW86_= > g@mail.gmail.c
> om>
> , Edward Napierala writes:
> > --001a113d0020693f04055304b5a4
> > Content-Type: text/plain; charset=3D"UTF-8"
>
>
> > This patch seems to fix the problem with "make -j4 installworld&q= > uot; for me.
> > Do you intend to commit it?=C2=A0 Thanks!=C2=A0 (And sorry for the bre= > akage.)
> >
> >
> > 2017-06-27 4:48 GMT+01:00 Cy Schubert < t@komquats.com">Cy.Schubert@komquats.com>:
> >
> > > (since we're top posting.... )
> > >
> > > Hi Sean,
> > >
> > > Do you want to give this a spin?
> > >
> > > Index: share/zoneinfo/Makefile
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<= > br> > > > --- share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(revision 320389)<= > br> > > > +++ share/zoneinfo/Makefile=C2=A0 =C2=A0 =C2=A0(working copy)
> > > @@ -94,7 +94,7 @@
> > >=C2=A0 .for f in ${TZS}
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${BINOWN} -g ${= > BINGRP} -m ${NOBINMODE} \
> > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${.OBJD= > IR}/,,}/${f}
> > > ${DESTDIR}/usr/share/zoneinfo/${f}
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR}/${f} ${DE= > STDIR}/usr/share/zoneinfo/${f}
> > >=C2=A0 .endfor
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} -o ${BINO= > WN} -g ${BINGRP} -m ${NOBINMODE} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${CONTRIBDIR}/zone= > .tab ${DESTDIR}/usr/share/zoneinfo/
> > >
> > > ~cy
> > >
> > >
> > > In message < e25a@freebsd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.org= > >, Sean Bruno
> > > write
> > > s:
> > > > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) r> > > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > > Content-Type: multipart/mixed; boundary=3D"VFqTarn= > RbgKj5gwWULxfLoTjWIwLn2
> > > loQ";
> > > >=C2=A0 protected-headers=3D"v1"
> > > > From: Sean Bruno <s= > bruno@freebsd.org>
> > > > To: Edward Tomasz Napierala <trasz@FreeBSD.org>,
> > > src-committers@free= > bsd.org,
> > > >=C2=A0 svn-src-all= > @freebsd.org, svn-src-head@= > freebsd.org
> > > > Message-ID: < 293f10e25a@freebsd.org">f6014fd3-9f4b-b6f5-6997-38293f10e25a@freebsd.o= > rg>
> > > > Subject: Re: svn commit: r320362 - head/share/zoneinfo
> > > > References: < 1@repo.freebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org&g= > t;
> > > > In-Reply-To: < 41@repo.freebsd.org">201706261540.v5QFeOTj072841@repo.freebsd.org&= > gt;
> > > >
> > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ
> > > > Content-Type: text/plain; charset=3Dutf-8
> > > > Content-Language: en-US
> > > > Content-Transfer-Encoding: quoted-printable
> > > >
> > > > Hmmm ... This seems to break 'poudriere jail -c jailname= > -m
> > > src=3D3D/usr/sr=3D
> > > > c
> > > > -v head"
> > > >
> > > > --- realinstall_subdir_share/zoneinfo ---
> > > > install: builddir/Africa/Abidjan: No such file or directory<= > br> > > > >
> > > >
> > > > On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> > > > > Author: trasz
> > > > > Date: Mon Jun 26 15:40:24 2017
> > > > > New Revision: 320362
> > > > > URL: se/320362" rel=3D"noreferrer" target=3D"_blank">https://svnweb.freebsd.org/= > changeset/base/320362
> > > > >=3D20
> > > > > Log:
> > > > >=C2=A0 =C2=A0Provide visual feedback when timezone files= > are installed.
> > > > >=C2=A0 =C2=A0After r320003 it wasn't being shown in = > any way.
> > > > >=C2=A0 =3D20
> > > > >=C2=A0 =C2=A0Submitted by:=C2=A0 =C2=A0 =C2=A0bdrewery r> > > > > >=C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 =C2=A0 1 mon= > th
> > > > >=C2=A0 =C2=A0Differential Revision:=C2=A0 =C2=A0 =3D"https://reviews.freebsd.org/D11154" rel=3D"noreferrer" target=3D"_blank= > ">https://reviews.freebsd.org/D11154
> > > > >=3D20
> > > > > Modified:
> > > > >=C2=A0 =C2=A0head/share/zoneinfo/Makefile
> > > > >=3D20
> > > > > Modified: head/share/zoneinfo/Makefile
> > > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > 3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > > > =3D3D=3D3D=3D3D=3D3D
> > > > > --- head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mon Jun 2= > 6 15:23:12 2017
> > > (r32036
> > > > 1)
> > > > > +++ head/share/zoneinfo/Makefile=C2=A0 =C2=A0 Mon Jun 2= > 6 15:40:24 2017
> > > (r32036
> > > > 2)
> > > > > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
> > > > >=C2=A0 =C2=A0 =C2=A0zic -D -d ${TZBUILDDIR} -p ${POSIXRU= > LES} -m ${NOBINMODE} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${LEAPFILE} -y ${.OBJD= > IR}/yearistype ${TZFILES}
> > > > > =3D20
> > > > > +.if make(*install*)
> > > > > +TZS!=3D3D cd ${TZBUILDDIR} && find -s * -type = > f
> > > > > +.endif
> > > > > +
> > > > >=C2=A0 beforeinstall: install-zoneinfo
> > > > >=C2=A0 install-zoneinfo:
> > > > >=C2=A0 =C2=A0 =C2=A0mkdir -p ${DESTDIR}/usr/share/zonein= > fo
> > > > >=C2=A0 =C2=A0 =C2=A0cd ${DESTDIR}/usr/share/zoneinfo;=C2= > =A0 mkdir -p ${TZBUILDSUBDIRS}
> > > > > -=C2=A0 =C2=A0cd ${TZBUILDDIR} && \
> > > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0find -s * -type f -exec ${I= > NSTALL} ${TAG_ARGS} \
> > > > > +.for f in ${TZS}
> > > > > +=C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${BINOWN} -g ${BING= > RP} -m ${NOBINMODE} \
> > > > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0\{} ${DESTDIR}/usr/share/zo= > neinfo/\{} \;
> > > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0${TZBUILDDIR:C,^${.OBJDIR}/= > ,,}/${f}
> > > ${DESTDIR}/usr/share/zoneinfo=3D
> > > > /${f}
> > > > > +.endfor
> > > > >=C2=A0 =C2=A0 =C2=A0${INSTALL} ${TAG_ARGS} -o ${BINOWN} = > -g ${BINGRP} -m ${NOBINMODE} \
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${CONTRIBDIR}/zone.tab= > ${DESTDIR}/usr/share/zoneinfo/
> > > > > =3D20
> > > > >=3D20
> > > > >=3D20
> > > >
> > > >
> > > > --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ--
> > > >
> > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> > > > Content-Type: application/pgp-signature; name=3D"signat= > ure.asc"
> > > > Content-Description: OpenPGP digital signature
> > > > Content-Disposition: attachment; filename=3D"signature.= > asc"
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > >
> > > > iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJ= > tfFIAAAAAALgAo
> > > > aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWF= > uLm5ldEU4
> > > > QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgk= > QveT1/om1
> > > > /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u= > 9WSYKfvxK+oGPJ
> > > > LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kf= > zRbDwqiu3FNg8R
> > > > zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pL= > UK6jxy29wflPSr
> > > > qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNB= > pP6K6jR6B+aU/P
> > > > VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HK= > XJdYFlaRo
> > > > dCw6yY1xFlMv/OrUWgSxj02fsd7GHg=3D=3D
> > > > =3D9Mia
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f--
> > > >
> > > >
> > >
> > > --
> > > Cheers,
> > > Cy Schubert <Cy.S= > chubert@cschubert.com>
> > > FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0= > ht= > tp://www.FreeBSD.org
> > >
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The need of the many outweighs t= > he greed of the few.
> > >
> > >
> > >
> >
>
> --001a113d0020693f04055304b5a4
> > Content-Type: text/html; charset=3D"UTF-8"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <div dir=3D3D"ltr">This patch seems to fix the problem= > with &quot;make -j4 in=3D
> > stallworld&quot; for me.<div>Do you intend to commit it?=3DC= > 2=3DA0 Thanks! =3DC2=3D
> > =3DA0(And sorry for the breakage.)</div><div><br><= > ;/div><div class=3D3D"gmail_ex=3D
> > tra"><br><div class=3D3D"gmail_quote">20= > 17-06-27 4:48 GMT+01:00 Cy Schubert <=3D
> > span dir=3D3D"ltr">&lt;<a href=3D3D"mailto: href=3D"mailto:Cy.Schubert@komquats.com">Cy.Schubert@komquats.com= > " target=3D3D"=3D
> > _blank">Cy.Schuber= > t@komquats.com</a>&gt;</span>:<br><b= > lockquote class=3D3D"gm=3D
> > ail_quote" style=3D3D"margin:0 0 0 .8ex;border-left:1px #ccc= > solid;padding-le=3D
> > ft:1ex">(since we&#39;re top posting.... )<br>
> > <br>
> > Hi Sean,<br>
> > <br>
> > Do you want to give this a spin?<br>
> > <br>
> > Index: share/zoneinfo/Makefile<br>
> > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > =3D3D=3D3D=3D3D=3D3D=3D3D<wbr>=3D3D=3D3D=3D3D=3D3D=3D3D=3D3= > D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D<w= > br>=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D<br>
> > --- share/zoneinfo/Makefile=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0(revision 3= > 20389)<br>
> > +++ share/zoneinfo/Makefile=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0(working co= > py)<br>
> > @@ -94,7 +94,7 @@<br>
> > =3DC2=3DA0.for f in ${TZS}<br>
> > <span class=3D3D"">=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 = > =3DC2=3DA0 ${INSTALL} ${TAG_ARGS} \<br>
> > =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 -o $= > {BINOWN} -g ${BINGRP} -m ${NO=3D
> > BINMODE} \<br>
> > </span>-=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 = > =3DC2=3DA0${TZBUILDDIR:C,^${.OBJDIR}=3D
> > /,,}<wbr>/${f} ${DESTDIR}/usr/share/zoneinfo/<wbr>${f= > }<br>
> > +=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0${TZ= > BUILDDIR}/${f} ${DESTDIR}/usr=3D
> > /share/zoneinfo/<wbr>${f}<br>
> > <span class=3D3D"">=3DC2=3DA0.endfor<br>
> > =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 ${INSTALL} ${TAG_ARGS} -o = > ${BINOWN} -g ${BINGRP=3D
> > } -m ${NOBINMODE} \<br>
> > =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 ${CO= > NTRIBDIR}/zone.tab ${DESTDIR}=3D
> > /usr/share/zoneinfo/<br>
> > <br>
> > </span>~cy<br>
> > <br>
> > <br>
> > In message &lt;<a href=3D3D"mailto: fd3-9f4b-b6f5-6997-38293f10e25a@freeb">f6014fd3-9f4b-b6f5-6997-38293f1= > 0e25a@freeb=3D
> > sd.org<= > /a>">f6014fd3-9f4b-b6f5-6997-<wbr> 3f10e25a@freebsd.org">38293f10e25a@freebsd.org</a>&gt;, = > Sean=3D
> >=C2=A0 Bruno<br>
> > write<br>
> > s:<br>
> > &gt; This is an OpenPGP/MIME signed message (RFC 4880 and 3156)<= > ;br>
> > &gt; --<wbr>WTKxh8RiNpWJJ66LumpxWUq5KMtbGf<wbr&= > gt;m2f<br>
> > &gt; Content-Type: multipart/mixed; boundary=3D3D&quot;<wbr= > >VFqTarnRbgKj5gwWU=3D
> > LxfLoTjWIwLn2<wbr>loQ&quot;;<br>
> > &gt;=3DC2=3DA0 protected-headers=3D3D&quot;v1&quot;&l= > t;br>
> > &gt; From: Sean Bruno &lt;<a href=3D3D"mailto: =3D"mailto:sbruno@freebsd.org">sbruno@freebsd.org">sbruno@= > free=3D
> > bsd.or= > g</a>&gt;<br>
> > &gt; To: Edward Tomasz Napierala &lt;trasz@FreeBSD.org&gt;= > , <a href=3D3D"mail=3D
> > to:src-committers@f= > reebsd.org">= > src-committers@freebsd.org</a>,<br>
> > &gt;=3DC2=3DA0 <a href=3D3D"mailto: rc-all@freebsd.org">svn-src-all@freebsd.org">svn-src-all@<= > wbr>freebsd.o=3D
> > rg</a>, <a href=3D3D"mailto: ad@freebsd.org">svn-src-head@freebsd.org">svn-src-head@ r>freebsd.or=3D
> > g</a><br>
> > &gt; Message-ID: &lt;<a href=3D3D"mailto: ilto:f6014fd3-9f4b-b6f5-6997-38293f10e25a">f6014fd3-9f4b-b6f5-6997-382= > 93f10e25a=3D
> > @f= > reebsd.org">f6014fd3-9f4b-b6f5-6997-<wbr> mailto:38293f10e25a@freebsd.org">38293f10e25a@freebsd.org</a>= > ;&gt;=3D
> > <br>
> > &gt; Subject: Re: svn commit: r320362 - head/share/zoneinfo<br&= > gt;
> > &gt; References: &lt;<a href=3D3D"mailto: ilto:201706261540.v5QFeOTj072841@repo.fre">201706261540.v5QFeOTj072841= > @repo.fre=3D
> > ebsd.= > org">201706261540.v5QFeOTj072841@<wbr> p://repo.freebsd.org" rel=3D"noreferrer" target=3D"_blank">repo.freebs= > d.org</a>&gt;<br>
> > &gt; In-Reply-To: &lt;<a href=3D3D"mailto: ailto:201706261540.v5QFeOTj072841@repo.fr">201706261540.v5QFeOTj072841= > @repo.fr=3D
> > eebs= > d.org">201706261540.v5QFeOTj072841@<wbr> ttp://repo.freebsd.org" rel=3D"noreferrer" target=3D"_blank">repo.free= > bsd.org</a>&gt;<br>
> > &gt;<br>
> > &gt; --<wbr>VFqTarnRbgKj5gwWULxfLoTjWIwLn2<wbr&= > gt;loQ<br>
> > &gt; Content-Type: text/plain; charset=3D3Dutf-8<br>
> > &gt; Content-Language: en-US<br>
> > &gt; Content-Transfer-Encoding: quoted-printable<br>
> > &gt;<br>
> > &gt; Hmmm ... This seems to break &#39;poudriere jail -c jailn= > ame -m src=3D3D=3D
> > 3D/usr/sr=3D3D<br>
> > <span class=3D3D"">&gt; c<br>
> > &gt; -v head&quot;<br>
> > &gt;<br>
> > &gt; --- realinstall_subdir_share/<wbr>zoneinfo ---<= > br>
> > &gt; install: builddir/Africa/Abidjan: No such file or directory&l= > t;br>
> > &gt;<br>
> > &gt;<br>
> > &gt; On 06/26/17 09:40, Edward Tomasz Napierala wrote:<br> r> > > &gt; &gt; Author: trasz<br>
> > &gt; &gt; Date: Mon Jun 26 15:40:24 2017<br>
> > &gt; &gt; New Revision: 320362<br>
> > &gt; &gt; URL: <a href=3D3D" freebsd.org/changeset/base/320362" rel=3D"noreferrer" target=3D"_blank">htt= > ps://svnweb.freebsd.org/changeset/base/320362"=3D
> >=C2=A0 rel=3D3D"noreferrer" target=3D3D"_blank">= > ">https://svnweb.freebsd.org/<wbr>chang=3D
> > eset/base/320362</a><br>
> > </span>&gt; &gt;=3D3D20<br>
> > <span class=3D3D"">&gt; &gt; Log:<br> > > > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0Provide visual feedback when tim= > ezone files are insta=3D
> > lled.<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0After r320003 it wasn&#39;t = > being shown in any way.<b=3D
> > r>
> > </span>&gt; &gt;=3DC2=3DA0 =3D3D20<br>
> > <span class=3D3D"">&gt; &gt;=3DC2=3DA0 =3DC2= > =3DA0Submitted by:=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0bdr=3D
> > ewery<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0MFC after:=3DC2=3DA0 =3DC2=3DA0 = > =3DC2=3DA0 =3DC2=3DA0 1 month<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0Differential Revision:=3DC2=3DA0= > =3DC2=3DA0 <a href=3D3D"https:=3D
> > // get=3D"_blank">reviews.freebsd.org/D11154" rel=3D3D"noreferre= > r" target=3D3D"_blank">https://=3D
> > blank">reviews.freebsd.org/<wbr>D11154</a><br> r> > > </span>&gt; &gt;=3D3D20<br>
> > &gt; &gt; Modified:<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0head/share/zoneinfo/Makefil= > e<br>
> > &gt; &gt;=3D3D20<br>
> > &gt; &gt; Modified: head/share/zoneinfo/Makefile<br>= > ;
> > &gt; &gt; =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D= > 3D=3D3D3D=3D3D3D=3D3D<wbr>3D=3D3D3D=3D3D3D=3D
> > =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<wbr>= > 3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<br>
> > &gt; =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D= > =3D3D3D=3D3D<wbr>3D=3D3D3D=3D3D3D=3D3D3D=3D
> > =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<wbr>3D=3D3D= > 3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<br>
> > &gt; =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D= > =3D3D3D=3D3D<wbr>3D=3D3D3D=3D3D3D=3D3D3D=3D
> > =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<wbr>3D=3D3D= > 3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D<br>
> > &gt; =3D3D3D=3D3D3D=3D3D3D=3D3D3D<br>
> > <span class=3D3D"">&gt; &gt; --- head/share/zo= > neinfo/Makefile=3DC2=3DA0 =3DC2=3DA0 Mo=3D
> > n Jun 26 15:23:12 2017=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 (r32= > 036<br>
> > &gt; 1)<br>
> > &gt; &gt; +++ head/share/zoneinfo/Makefile=3DC2=3DA0 =3DC= > 2=3DA0 Mon Jun 26 15:40:24=3D
> >=C2=A0 2017=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 (r32036<br>= > ;
> > &gt; 2)<br>
> > &gt; &gt; @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}<= > ;br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0zic -D -d ${TZBUILDDI= > R} -p ${POSIXRULES} -m ${=3D
> > NOBINMODE} \<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA= > 0${LEAPFILE} -y ${.OBJDIR}/yearis=3D
> > type ${TZFILES}<br>
> > </span>&gt; &gt; =3D3D20<br>
> > &gt; &gt; +.if make(*install*)<br>
> > &gt; &gt; +TZS!=3D3D3D cd ${TZBUILDDIR} &amp;&amp; fin= > d -s * -type f<br>
> > <span class=3D3D"">&gt; &gt; +.endif<br>= >
> > &gt; &gt; +<br>
> > &gt; &gt;=3DC2=3DA0 beforeinstall: install-zoneinfo<br><= > br> > > &gt; &gt;=3DC2=3DA0 install-zoneinfo:<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0mkdir -p ${DESTDIR}/u= > sr/share/zoneinfo<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0cd ${DESTDIR}/usr/sha= > re/zoneinfo;=3DC2=3DA0 mkdir =3D
> > -p ${TZBUILDSUBDIRS}<br>
> > &gt; &gt; -=3DC2=3DA0 =3DC2=3DA0cd ${TZBUILDDIR} &amp;&= > ;amp; \<br>
> > &gt; &gt; -=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0find -s = > * -type f -exec ${INSTALL} ${=3D
> > TAG_ARGS} \<br>
> > &gt; &gt; +.for f in ${TZS}<br>
> > &gt; &gt; +=3DC2=3DA0 =3DC2=3DA0${INSTALL} ${TAG_ARGS} \<br= > >
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA= > 0-o ${BINOWN} -g ${BINGRP} -m ${N=3D
> > OBINMODE} \<br>
> > &gt; &gt; -=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0\{} ${DE= > STDIR}/usr/share/zoneinfo/<wb=3D
> > r>\{} \;<br>
> > </span>&gt; &gt; +=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2= > =3DA0${TZBUILDDIR:C,^${.OBJDIR}/,,}=3D
> > <wbr>/${f} ${DESTDIR}/usr/share/zoneinfo=3D3D<br>
> > <span class=3D3D"">&gt; /${f}<br>
> > &gt; &gt; +.endfor<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0${INSTALL} ${TAG_ARGS= > } -o ${BINOWN} -g ${BINGR=3D
> > P} -m ${NOBINMODE} \<br>
> > &gt; &gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA= > 0${CONTRIBDIR}/zone.tab ${DESTDIR=3D
> > }/usr/share/zoneinfo/<br>
> > </span>&gt; &gt; =3D3D20<br>
> > &gt; &gt;=3D3D20<br>
> > &gt; &gt;=3D3D20<br>
> > &gt;<br>
> > &gt;<br>
> > &gt; --<wbr>VFqTarnRbgKj5gwWULxfLoTjWIwLn2<wbr&= > gt;loQ--<br>
> > &gt;<br>
> > &gt; --<wbr>WTKxh8RiNpWJJ66LumpxWUq5KMtbGf<wbr&= > gt;m2f<br>
> > &gt; Content-Type: application/pgp-signature; name=3D3D&quot;s= > ignature.asc&qu=3D
> > ot;<br>
> > &gt; Content-Description: OpenPGP digital signature<br>
> > &gt; Content-Disposition: attachment; filename=3D3D&quot;signa= > ture.asc&quot;<=3D
> > br>
> > &gt;<br>
> > &gt; -----BEGIN PGP SIGNATURE-----<br>
> > &gt;<br>
> > &gt; iQGTBAEBCgB9FiEE6MTp+<wbr>IA1BOHj9Lo0veT1/om1/<= > wbr>LYFAllRUJtfFIAAAAAA=3D
> > LgAo<br>
> > &gt; aXNzdWVyLWZwckBub3RhdGlvbnMub3<wbr>BlbnBncC5m= > aWZ0aGhvcnNlbWFuLm5l<wbr>=3D
> > dEU4<br>
> > &gt; QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNE<wbr>JERTRGNUZF= > ODlCNUZDQjYACgkQveT1<wbr>=3D
> > /om1<br>
> > &gt; /<wbr>LaIFggAlEX4pLTfDUaRsGoxWbGI0Di<wbr&g= > t;irmhR1nW74ESXjGXd4u9WSYKfvxK+=3D
> > <wbr>oGPJ<br>
> > &gt; LRwxcimGw/v+h8piM102ijsmquE0+<wbr>NlyyMAYjFNLb9tsZ= > uR+<wbr>kfzRbDwqiu3F=3D
> > Ng8R<br>
> > &gt; zDnsvo69JHiyoi7r9BJB30Q6P9fZDG<wbr>BtCrSQ9Up2IUiPH= > jz+<wbr>pLUK6jxy29wf=3D
> > lPSr<br>
> > &gt; qVDHitG2A7l7Sdn3Jsj8MWNw/<wbr>4ehRNlhxudgg+<wbr= > >F8v7tEJH9eNBpP6K6jR6B+=3D
> > aU/P<br>
> > &gt; VCPrKO1rRmmJTPxxPwskLLX4/<wbr>xXrf8hmUFTm0uBbLtKbv= > zsaO5IZ9HK<wbr>XJdYF=3D
> > laRo<br>
> > &gt; dCw6yY1xFlMv/<wbr>OrUWgSxj02fsd7GHg=3D3D=3D3D<b= > r>
> > &gt; =3D3D9Mia<br>
> > &gt; -----END PGP SIGNATURE-----<br>
> > &gt;<br>
> > &gt; --<wbr>WTKxh8RiNpWJJ66LumpxWUq5KMtbGf<wbr&= > gt;m2f--<br>
> > &gt;<br>
> > &gt;<br>
> > <span class=3D3D"HOEnZb"><font color=3D3D"#888= > 888"><br>
> > --<br>
> > Cheers,<br>
> > Cy Schubert &lt;<a href=3D3D"mailto: chubert@cschubert.com">Cy.Schubert@cschubert.com">Cy.Schub= > ert@cs=3D
> > ch= > ubert.com</a>&gt;<br>
> > FreeBSD UNIX:=3DC2=3DA0 &lt;cy@FreeBSD.org&gt;=3DC2=3DA0 =3DC2= > =3DA0Web:=3DC2=3DA0 <a href=3D
> > =3D3D" t=3D"_blank">http://www.FreeBSD.org" rel=3D3D"noreferrer"= > ; target=3D3D"_blank"> " target=3D"_blank">http://www=3D
> > .FreeBSD.org</a><br>
> > <br>
> > =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 The need of the many outwe= > ighs the greed of the=3D
> >=C2=A0 few.<br>
> > <br>
> > <br>
> > </font></span></blockquote></div><br&g= > t;</div></div>
> >
> > --001a113d0020693f04055304b5a4--
>
>
>
> --
> Cheers,
> Cy Schubert <Cy.Schubert@cs= > chubert.com>
> FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 =3D"http://www.FreeBSD.org" rel=3D"noreferrer" target=3D"_blank">http://www= > .FreeBSD.org
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 The need of the many outweighs the greed of the= > few.
>
>
>

> > --001a114df91c80e879055306eec4-- > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 28 19:38:01 2017 Return-Path: Delivered-To: svn-src-all@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 58422DA8BEA; Wed, 28 Jun 2017 19:38:01 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0621484C6D; Wed, 28 Jun 2017 19:38:00 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id QImddLd6Yyd2DQImedzi9K; Wed, 28 Jun 2017 13:37:53 -0600 X-Authority-Analysis: v=2.2 cv=F5wnTupN c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=w1pTgSsYZBf6PZK0XL8A:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id BEF86291; Wed, 28 Jun 2017 12:37:50 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5SJaYYS013603; Wed, 28 Jun 2017 12:36:34 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.14.8/Submit) with ESMTP id v5SJaYKS013590; Wed, 28 Jun 2017 12:36:34 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706281936.v5SJaYKS013590@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs 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.cschubert.com/ To: "Ngie Cooper (yaneurabeya)" cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320454 - head/share/zoneinfo In-Reply-To: Message from "Ngie Cooper (yaneurabeya)" of "Wed, 28 Jun 2017 12:25:53 -0700." <3305BCF7-0978-4152-B3AD-309FD891B59D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jun 2017 12:36:34 -0700 X-CMAE-Envelope: MS4wfL31Hl+V8z78deqBOcX2gSgLkcLXDZ8AzBBrdPXXO8c4KdEZ0hTgNwTQwGbpqH0I34284sfi2NblRkZuTq7/d/zErG9ujbkquIIhUJHxQfFy+FUDZQaV PprG+B7LqE5izahrxLf0bS5A+/PKTBSsBLjBVf4E9iOS1+A0WhNAMMBeVIl1Xxl4IqxKfoxD11V207F1RFSrAvGKuTzodxIv0cYjO+hvRG+Qrqx0ZZcyLrZ1 3ZUs/THkhcOM+5+BnMOsMADRW7Zw42b6nA0gdUQjIgy2s0kLB9nAF+MxInlHW6QHPZK/J5oPvchxpZ1Rw/KbjA== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 19:38:01 -0000 In message <3305BCF7-0978-4152-B3AD-309FD891B59D@gmail.com>, "Ngie Cooper (yane urabeya)" writes: > > > --Apple-Mail=_08D0994E-C5E0-4E84-ACF1-C103E9A01AF3 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=utf-8 > > > > On Jun 28, 2017, at 12:05, Cy Schubert wrote: > >=20 > > Author: cy > > Date: Wed Jun 28 19:05:04 2017 > > New Revision: 320454 > > URL: https://svnweb.freebsd.org/changeset/base/320454 > >=20 > > Log: > > Allow parallel installworld (-j N) and poudriere installworld > > (poudriere jail -c and poudriere jail -u) to proceed. > >=20 > > Reviewed by: trasz@ > > Tested by: trasz@, cy@ > > MFC after: 1 month > > X-MFC-with: r320362 > >=20 > > Modified: > > head/share/zoneinfo/Makefile > >=20 > > Modified: head/share/zoneinfo/Makefile > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- head/share/zoneinfo/Makefile Wed Jun 28 17:32:09 2017 = > (r320453) > > +++ head/share/zoneinfo/Makefile Wed Jun 28 19:05:04 2017 = > (r320454) > > @@ -94,7 +94,7 @@ install-zoneinfo: > > .for f in ${TZS} > > ${INSTALL} ${TAG_ARGS} \ > > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > - ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} = > ${DESTDIR}/usr/share/zoneinfo/${f} > > + ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} > > .endfor > > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} = > \ > > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ > > Thank you for getting this in! No problem. > In general, I would argue that for/.for loops in Make targets = > are bad like this I think that individual targets could in fact be = > created, and driven as a dependency of a top-level target, to avoid this = > issue and keep bdrewery=E2=80=99s intended change in r320362, e.g. = > something like, > > install-zones: .PHONY > .for f in ${TZS} > install-zones: ${DESTDIR}/usr/share/zoneinfo/${f} > ${DESTDIR}/usr/share/zoneinfo/${f}: ${f} > ${INSTALL} ... > .endfor This is definitely cleaner. Having said that, the problem wasn't caused by the loop itself but the edit of path. > > I=E2=80=99m not incredibly sure based on this commit alone why = > this Makefile isn=E2=80=99t using FILES though=E2=80=A6 I=E2=80=99ll = > look at it closer when I have a spare minute. Good idea. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 28 20:28:48 2017 Return-Path: Delivered-To: svn-src-all@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 4DE1ADA9568; Wed, 28 Jun 2017 20:28:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 19315153B; Wed, 28 Jun 2017 20:28:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SKSli8095565; Wed, 28 Jun 2017 20:28:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SKSl6p095564; Wed, 28 Jun 2017 20:28:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706282028.v5SKSl6p095564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 28 Jun 2017 20:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320456 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 320456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 20:28:48 -0000 Author: ian Date: Wed Jun 28 20:28:47 2017 New Revision: 320456 URL: https://svnweb.freebsd.org/changeset/base/320456 Log: Implement gpio input by reading the pad state register, not the data register. When a pin is set for input the value in the DR will be the same as the PSR. When a pin is set for output the value in the DR is the value output to the pad, and the value in the PSR is the actual electrical level sensed on the pad, and they can be different if the pad is configured for open-drain mode and some other entity on the board is driving the line low. Modified: head/sys/arm/freescale/imx/imx_gpio.c Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Wed Jun 28 19:08:07 2017 (r320455) +++ head/sys/arm/freescale/imx/imx_gpio.c Wed Jun 28 20:28:47 2017 (r320456) @@ -644,7 +644,7 @@ imx51_gpio_pin_get(device_t dev, uint32_t pin, unsigne if (pin >= sc->gpio_npins) return (EINVAL); - *val = (READ4(sc, IMX_GPIO_DR_REG) >> pin) & 1; + *val = (READ4(sc, IMX_GPIO_PSR_REG) >> pin) & 1; return (0); } From owner-svn-src-all@freebsd.org Wed Jun 28 21:08:22 2017 Return-Path: Delivered-To: svn-src-all@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 8E3A2DA9DBB; Wed, 28 Jun 2017 21:08:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5C98D283D; Wed, 28 Jun 2017 21:08:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SL8LH2011880; Wed, 28 Jun 2017 21:08:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SL8L3x011875; Wed, 28 Jun 2017 21:08:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706282108.v5SL8L3x011875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 28 Jun 2017 21:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320457 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 320457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 21:08:22 -0000 Author: tuexen Date: Wed Jun 28 21:08:21 2017 New Revision: 320457 URL: https://svnweb.freebsd.org/changeset/base/320457 Log: MFC r320263: Use a longer buffer for messages in ERROR chunks. MFC r320264: Check the length of a COOKIE chunk before accessing fields in it. MFC r320300: Handle sctp_get_next_param() in a consistent way. Approved by: re (marius@) Modified: stable/11/sys/netinet/sctp_auth.c stable/11/sys/netinet/sctp_constants.h stable/11/sys/netinet/sctp_input.c stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_pcb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_auth.c ============================================================================== --- stable/11/sys/netinet/sctp_auth.c Wed Jun 28 20:28:47 2017 (r320456) +++ stable/11/sys/netinet/sctp_auth.c Wed Jun 28 21:08:21 2017 (r320457) @@ -1434,7 +1434,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(random_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)random_store, min(plen, sizeof(random_store))); + (struct sctp_paramhdr *)random_store, plen); if (phdr == NULL) return; /* save the random and length for the key */ @@ -1447,7 +1447,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(hmacs_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)hmacs_store, min(plen, sizeof(hmacs_store))); + (struct sctp_paramhdr *)hmacs_store, plen); if (phdr == NULL) return; /* save the hmacs list and num for the key */ @@ -1469,7 +1469,7 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str if (plen > sizeof(chunks_store)) break; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)chunks_store, min(plen, sizeof(chunks_store))); + (struct sctp_paramhdr *)chunks_store, plen); if (phdr == NULL) return; chunks = (struct sctp_auth_chunk_list *)phdr; @@ -1814,7 +1814,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint int sctp_validate_init_auth_params(struct mbuf *m, int offset, int limit) { - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; uint16_t ptype, plen; int peer_supports_asconf = 0; int peer_supports_auth = 0; @@ -1823,7 +1823,7 @@ sctp_validate_init_auth_params(struct mbuf *m, int off uint8_t saw_asconf_ack = 0; /* go through each of the params. */ - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -1837,11 +1837,15 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (ptype == SCTP_SUPPORTED_CHUNK_EXT) { /* A supported extension chunk */ struct sctp_supported_chunk_types_param *pr_supported; - uint8_t local_store[SCTP_PARAM_BUFFER_SIZE]; + uint8_t local_store[SCTP_SMALL_CHUNK_STORE]; int num_ent, i; + if (plen > sizeof(local_store)) { + break; + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&local_store, min(plen, sizeof(local_store))); + (struct sctp_paramhdr *)&local_store, + plen); if (phdr == NULL) { return (-1); } @@ -1859,7 +1863,6 @@ sctp_validate_init_auth_params(struct mbuf *m, int off } } } else if (ptype == SCTP_RANDOM) { - got_random = 1; /* enforce the random length */ if (plen != (sizeof(struct sctp_auth_random) + SCTP_AUTH_RANDOM_SIZE_REQUIRED)) { @@ -1867,20 +1870,23 @@ sctp_validate_init_auth_params(struct mbuf *m, int off "SCTP: invalid RANDOM len\n"); return (-1); } + got_random = 1; } else if (ptype == SCTP_HMAC_LIST) { - uint8_t store[SCTP_PARAM_BUFFER_SIZE]; struct sctp_auth_hmac_algo *hmacs; + uint8_t store[SCTP_PARAM_BUFFER_SIZE]; int num_hmacs; - if (plen > sizeof(store)) + if (plen > sizeof(store)) { break; + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)store, min(plen, sizeof(store))); - if (phdr == NULL) + (struct sctp_paramhdr *)store, + plen); + if (phdr == NULL) { return (-1); + } hmacs = (struct sctp_auth_hmac_algo *)phdr; - num_hmacs = (plen - sizeof(*hmacs)) / - sizeof(hmacs->hmac_ids[0]); + num_hmacs = (plen - sizeof(*hmacs)) / sizeof(hmacs->hmac_ids[0]); /* validate the hmac list */ if (sctp_verify_hmac_param(hmacs, num_hmacs)) { SCTPDBG(SCTP_DEBUG_AUTH1, @@ -1889,18 +1895,19 @@ sctp_validate_init_auth_params(struct mbuf *m, int off } got_hmacs = 1; } else if (ptype == SCTP_CHUNK_LIST) { - int i, num_chunks; + struct sctp_auth_chunk_list *chunks; uint8_t chunks_store[SCTP_SMALL_CHUNK_STORE]; + int i, num_chunks; - /* did the peer send a non-empty chunk list? */ - struct sctp_auth_chunk_list *chunks = NULL; - + if (plen > sizeof(chunks_store)) { + break; + } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)chunks_store, - min(plen, sizeof(chunks_store))); - if (phdr == NULL) + plen); + if (phdr == NULL) { return (-1); - + } /*- * Flip through the list and mark that the * peer supports asconf/asconf_ack. @@ -1922,8 +1929,8 @@ sctp_validate_init_auth_params(struct mbuf *m, int off if (offset >= limit) { break; } - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } /* validate authentication required parameters */ if (got_random && got_hmacs) { Modified: stable/11/sys/netinet/sctp_constants.h ============================================================================== --- stable/11/sys/netinet/sctp_constants.h Wed Jun 28 20:28:47 2017 (r320456) +++ stable/11/sys/netinet/sctp_constants.h Wed Jun 28 21:08:21 2017 (r320457) @@ -758,7 +758,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_DEFAULT_SPLIT_POINT_MIN 2904 /* Maximum length of diagnostic information in error causes */ -#define SCTP_DIAG_INFO_LEN 64 +#define SCTP_DIAG_INFO_LEN 128 /* ABORT CODES and other tell-tale location * codes are generated by adding the below Modified: stable/11/sys/netinet/sctp_input.c ============================================================================== --- stable/11/sys/netinet/sctp_input.c Wed Jun 28 20:28:47 2017 (r320456) +++ stable/11/sys/netinet/sctp_input.c Wed Jun 28 21:08:21 2017 (r320457) @@ -2444,6 +2444,12 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in cookie_offset = offset + sizeof(struct sctp_chunkhdr); cookie_len = ntohs(cp->ch.chunk_length); + if (cookie_len < sizeof(struct sctp_cookie_echo_chunk) + + sizeof(struct sctp_init_chunk) + + sizeof(struct sctp_init_ack_chunk) + SCTP_SIGNATURE_SIZE) { + /* cookie too small */ + return (NULL); + } if ((cookie->peerport != sh->src_port) || (cookie->myport != sh->dest_port) || (cookie->my_vtag != sh->v_tag)) { @@ -2456,12 +2462,6 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in */ return (NULL); } - if (cookie_len < sizeof(struct sctp_cookie_echo_chunk) + - sizeof(struct sctp_init_chunk) + - sizeof(struct sctp_init_ack_chunk) + SCTP_SIGNATURE_SIZE) { - /* cookie too small */ - return (NULL); - } /* * split off the signature into its own mbuf (since it should not be * calculated in the sctp_hmac_m() call). @@ -3620,7 +3620,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc struct sctp_stream_reset_response *respin) { uint16_t type; - int lparm_len; + int lparam_len; struct sctp_association *asoc = &stcb->asoc; struct sctp_tmit_chunk *chk; struct sctp_stream_reset_request *req_param; @@ -3637,12 +3637,12 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc if (req_param != NULL) { stcb->asoc.str_reset_seq_out++; type = ntohs(req_param->ph.param_type); - lparm_len = ntohs(req_param->ph.param_length); + lparam_len = ntohs(req_param->ph.param_length); if (type == SCTP_STR_RESET_OUT_REQUEST) { int no_clear = 0; req_out_param = (struct sctp_stream_reset_out_request *)req_param; - number_entries = (lparm_len - sizeof(struct sctp_stream_reset_out_request)) / sizeof(uint16_t); + number_entries = (lparam_len - sizeof(struct sctp_stream_reset_out_request)) / sizeof(uint16_t); asoc->stream_reset_out_is_outstanding = 0; if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; @@ -3668,7 +3668,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stc } } else if (type == SCTP_STR_RESET_IN_REQUEST) { req_in_param = (struct sctp_stream_reset_in_request *)req_param; - number_entries = (lparm_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); + number_entries = (lparam_len - sizeof(struct sctp_stream_reset_in_request)) / sizeof(uint16_t); if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; if (action == SCTP_STREAM_RESET_RESULT_DENIED) { Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Wed Jun 28 20:28:47 2017 (r320456) +++ stable/11/sys/netinet/sctp_output.c Wed Jun 28 21:08:21 2017 (r320457) @@ -1940,7 +1940,7 @@ static struct mbuf * sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t *len) { #if defined(INET) || defined(INET6) - struct sctp_paramhdr *parmh; + struct sctp_paramhdr *paramh; struct mbuf *mret; uint16_t plen; #endif @@ -1962,7 +1962,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa #if defined(INET) || defined(INET6) if (M_TRAILINGSPACE(m) >= plen) { /* easy side we just drop it on the end */ - parmh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); + paramh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); mret = m; } else { /* Need more space */ @@ -1976,7 +1976,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa return (m); } mret = SCTP_BUF_NEXT(mret); - parmh = mtod(mret, struct sctp_paramhdr *); + paramh = mtod(mret, struct sctp_paramhdr *); } /* now add the parameter */ switch (ifa->address.sa.sa_family) { @@ -1987,9 +1987,9 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa struct sockaddr_in *sin; sin = &ifa->address.sin; - ipv4p = (struct sctp_ipv4addr_param *)parmh; - parmh->param_type = htons(SCTP_IPV4_ADDRESS); - parmh->param_length = htons(plen); + ipv4p = (struct sctp_ipv4addr_param *)paramh; + paramh->param_type = htons(SCTP_IPV4_ADDRESS); + paramh->param_length = htons(plen); ipv4p->addr = sin->sin_addr.s_addr; SCTP_BUF_LEN(mret) += plen; break; @@ -2002,9 +2002,9 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa struct sockaddr_in6 *sin6; sin6 = &ifa->address.sin6; - ipv6p = (struct sctp_ipv6addr_param *)parmh; - parmh->param_type = htons(SCTP_IPV6_ADDRESS); - parmh->param_length = htons(plen); + ipv6p = (struct sctp_ipv6addr_param *)paramh; + paramh->param_type = htons(SCTP_IPV6_ADDRESS); + paramh->param_length = htons(plen); memcpy(ipv6p->addr, &sin6->sin6_addr, sizeof(ipv6p->addr)); /* clear embedded scope in the address */ @@ -5141,7 +5141,10 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ s.param_length = htons(sizeof(s) + plen); m_copyback(op_err, err_at, sizeof(s), (caddr_t)&s); err_at += sizeof(s); - phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, min(sizeof(tempbuf), plen)); + if (plen > sizeof(tempbuf)) { + plen = sizeof(tempbuf); + } + phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, plen); if (phdr == NULL) { sctp_m_freem(op_err); /* @@ -5209,7 +5212,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ if (plen > sizeof(tempbuf)) { plen = sizeof(tempbuf); } - phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, min(sizeof(tempbuf), plen)); + phdr = sctp_get_next_param(mat, at, (struct sctp_paramhdr *)tempbuf, plen); if (phdr == NULL) { sctp_m_freem(op_err); /* @@ -5390,10 +5393,12 @@ sctp_are_there_new_addresses(struct sctp_association * { struct sctp_ipv4addr_param *p4, p4_buf; + if (plen != sizeof(struct sctp_ipv4addr_param)) { + return (1); + } phdr = sctp_get_next_param(in_initpkt, offset, (struct sctp_paramhdr *)&p4_buf, sizeof(p4_buf)); - if (plen != sizeof(struct sctp_ipv4addr_param) || - phdr == NULL) { + if (phdr == NULL) { return (1); } if (asoc->scope.ipv4_addr_legal) { @@ -5409,10 +5414,12 @@ sctp_are_there_new_addresses(struct sctp_association * { struct sctp_ipv6addr_param *p6, p6_buf; + if (plen != sizeof(struct sctp_ipv6addr_param)) { + return (1); + } phdr = sctp_get_next_param(in_initpkt, offset, (struct sctp_paramhdr *)&p6_buf, sizeof(p6_buf)); - if (plen != sizeof(struct sctp_ipv6addr_param) || - phdr == NULL) { + if (phdr == NULL) { return (1); } if (asoc->scope.ipv6_addr_legal) { @@ -9000,7 +9007,7 @@ sctp_send_cookie_echo(struct mbuf *m, */ int at; struct mbuf *cookie; - struct sctp_paramhdr parm, *phdr; + struct sctp_paramhdr param, *phdr; struct sctp_chunkhdr *hdr; struct sctp_tmit_chunk *chk; uint16_t ptype, plen; @@ -9010,7 +9017,7 @@ sctp_send_cookie_echo(struct mbuf *m, cookie = NULL; at = offset + sizeof(struct sctp_init_chunk); for (;;) { - phdr = sctp_get_next_param(m, at, &parm, sizeof(parm)); + phdr = sctp_get_next_param(m, at, ¶m, sizeof(param)); if (phdr == NULL) { return (-3); } Modified: stable/11/sys/netinet/sctp_pcb.c ============================================================================== --- stable/11/sys/netinet/sctp_pcb.c Wed Jun 28 20:28:47 2017 (r320456) +++ stable/11/sys/netinet/sctp_pcb.c Wed Jun 28 21:08:21 2017 (r320457) @@ -2046,7 +2046,7 @@ sctp_findassociation_special_addr(struct mbuf *m, int struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, struct sockaddr *dst) { - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; #if defined(INET) || defined(INET6) struct sctp_tcb *stcb; uint16_t ptype; @@ -2074,7 +2074,7 @@ sctp_findassociation_special_addr(struct mbuf *m, int offset += sizeof(struct sctp_init_chunk); - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr != NULL) { /* now we must see if we want the parameter */ #if defined(INET) || defined(INET6) @@ -2088,10 +2088,10 @@ sctp_findassociation_special_addr(struct mbuf *m, int if (ptype == SCTP_IPV4_ADDRESS && plen == sizeof(struct sctp_ipv4addr_param)) { /* Get the rest of the address */ - struct sctp_ipv4addr_param ip4_parm, *p4; + struct sctp_ipv4addr_param ip4_param, *p4; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&ip4_parm, min(plen, sizeof(ip4_parm))); + (struct sctp_paramhdr *)&ip4_param, sizeof(ip4_param)); if (phdr == NULL) { return (NULL); } @@ -2109,10 +2109,10 @@ sctp_findassociation_special_addr(struct mbuf *m, int if (ptype == SCTP_IPV6_ADDRESS && plen == sizeof(struct sctp_ipv6addr_param)) { /* Get the rest of the address */ - struct sctp_ipv6addr_param ip6_parm, *p6; + struct sctp_ipv6addr_param ip6_param, *p6; phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&ip6_parm, min(plen, sizeof(ip6_parm))); + (struct sctp_paramhdr *)&ip6_param, sizeof(ip6_param)); if (phdr == NULL) { return (NULL); } @@ -2127,8 +2127,8 @@ sctp_findassociation_special_addr(struct mbuf *m, int } #endif offset += SCTP_SIZE32(plen); - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } return (NULL); } @@ -2301,7 +2301,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off { struct sctp_tcb *stcb; union sctp_sockstore remote_store; - struct sctp_paramhdr parm_buf, *phdr; + struct sctp_paramhdr param_buf, *phdr; int ptype; int zero_address = 0; #ifdef INET @@ -2313,7 +2313,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off memset(&remote_store, 0, sizeof(remote_store)); phdr = sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &parm_buf, sizeof(struct sctp_paramhdr)); + ¶m_buf, sizeof(struct sctp_paramhdr)); if (phdr == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf lookup addr\n", __func__); @@ -2333,7 +2333,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off } p6 = (struct sctp_ipv6addr_param *)sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &p6_buf.ph, sizeof(*p6)); + &p6_buf.ph, sizeof(p6_buf)); if (p6 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v6 lookup addr\n", __func__); @@ -2360,7 +2360,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int off } p4 = (struct sctp_ipv4addr_param *)sctp_get_next_param(m, offset + sizeof(struct sctp_asconf_chunk), - &p4_buf.ph, sizeof(*p4)); + &p4_buf.ph, sizeof(p4_buf)); if (p4 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v4 lookup addr\n", __func__); @@ -6026,7 +6026,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s */ struct sctp_inpcb *inp; struct sctp_nets *net, *nnet, *net_tmp; - struct sctp_paramhdr *phdr, parm_buf; + struct sctp_paramhdr *phdr, param_buf; struct sctp_tcb *stcb_tmp; uint16_t ptype, plen; struct sockaddr *sa; @@ -6136,7 +6136,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s return (-4); } /* now we must go through each of the params. */ - phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, sizeof(param_buf)); while (phdr) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); @@ -6374,7 +6374,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)&lstore, - min(plen, sizeof(lstore))); + plen); if (phdr == NULL) { return (-24); } @@ -6427,8 +6427,11 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s uint8_t local_store[SCTP_PARAM_BUFFER_SIZE]; int num_ent, i; + if (plen > sizeof(local_store)) { + return (-35); + } phdr = sctp_get_next_param(m, offset, - (struct sctp_paramhdr *)&local_store, min(sizeof(local_store), plen)); + (struct sctp_paramhdr *)&local_store, plen); if (phdr == NULL) { return (-25); } @@ -6475,7 +6478,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)random_store, - min(sizeof(random_store), plen)); + plen); if (phdr == NULL) return (-26); p_random = (struct sctp_auth_random *)phdr; @@ -6498,7 +6501,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)hmacs_store, - min(plen, sizeof(hmacs_store))); + plen); if (phdr == NULL) return (-28); hmacs = (struct sctp_auth_hmac_algo *)phdr; @@ -6529,7 +6532,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)chunks_store, - min(plen, sizeof(chunks_store))); + plen); if (phdr == NULL) return (-30); chunks = (struct sctp_auth_chunk_list *)phdr; @@ -6577,8 +6580,8 @@ next_param: if (offset >= limit) { break; } - phdr = sctp_get_next_param(m, offset, &parm_buf, - sizeof(parm_buf)); + phdr = sctp_get_next_param(m, offset, ¶m_buf, + sizeof(param_buf)); } /* Now check to see if we need to purge any addresses */ TAILQ_FOREACH_SAFE(net, &stcb->asoc.nets, sctp_next, nnet) { From owner-svn-src-all@freebsd.org Wed Jun 28 21:37:10 2017 Return-Path: Delivered-To: svn-src-all@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 007F6DAA276; Wed, 28 Jun 2017 21:37:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BE74133E6; Wed, 28 Jun 2017 21:37:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SLb8Ee023993; Wed, 28 Jun 2017 21:37:08 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5SLb8CF023992; Wed, 28 Jun 2017 21:37:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201706282137.v5SLb8CF023992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 28 Jun 2017 21:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320458 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 320458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 21:37:10 -0000 Author: rmacklem Date: Wed Jun 28 21:37:08 2017 New Revision: 320458 URL: https://svnweb.freebsd.org/changeset/base/320458 Log: Fix an NFSv3 client case that probably never happens. If an NFSv3 server were to reply with weak cache consistency attributes, but not post operation attributes, the client would use garbage attributes from memory. This was spotted during work on the code for the NFSv4.1 client. I have never seen evidence that this happens and it wouldn't make sense for an NFSv3 server to do this, so this patch is basically "theoretical", but does fix the problem if a server were to do the above. PR: 219552 MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Wed Jun 28 21:08:21 2017 (r320457) +++ head/sys/fs/nfsclient/nfs_clport.c Wed Jun 28 21:37:08 2017 (r320458) @@ -741,6 +741,8 @@ nfscl_wcc_data(struct nfsrv_descript *nd, struct vnode } } error = nfscl_postop_attr(nd, nap, flagp, stuff); + if (wccflagp != NULL && *flagp == 0) + *wccflagp = 0; } else if ((nd->nd_flag & (ND_NOMOREDATA | ND_NFSV4 | ND_V4WCCATTR)) == (ND_NFSV4 | ND_V4WCCATTR)) { error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, From owner-svn-src-all@freebsd.org Wed Jun 28 22:32:41 2017 Return-Path: Delivered-To: svn-src-all@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 11D0ADAAD98 for ; Wed, 28 Jun 2017 22:32:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (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 B484964C26 for ; Wed, 28 Jun 2017 22:32:40 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x22c.google.com with SMTP id f92so61366255qtb.2 for ; Wed, 28 Jun 2017 15:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dZOVcppBdpt2smcpacK7z4ivPBqNFABFxHS4NDQ3em4=; b=aOK1ilRKR/u/kYTq5uHypZIolRWmgIrBoRFoBBskcuBpvl5d5m+2GmAipdc5SufVso PDe0LiD24YrcS8qF2+hy3FK6WXdV2q7SV6HFyNYAEZcnYlco5td5Yy1enAiRQ6KzNn4R KJ4BNd+enkwHwx1kQyVqHzWbwb0rzNKvN0OXeNNJ8OrA2tEwYBwSwFEHMSRTvyJBW9mg 36kgHxRnNaNY7vp71ed6oP1a5j6FnBimZ6gLUtGqgXg62OnWVtMjOspWE3jdu7Fe3IQl ScVOhiFHUoKzH87c4kE7jTkvcc38FXbQkpq6LjxZ50EXowZhr90JYcZ2i9xqKSJD0y6W Rg6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dZOVcppBdpt2smcpacK7z4ivPBqNFABFxHS4NDQ3em4=; b=UDOn8kXl21VVNNTVt5TsBPHSeK4SQpAIva7ohLjqlLHjntPfngvemObNaUJX4Rs1zp zdvE+eHO7YFxjpkfzqnTqQYp1sq7FjQzn5U0WE8TYyz2BNrKRmLNRDod212BQvNO0nn3 z8TZvkFlIrFxcE+4rB8uJLCPTMxW+FIz4Tifk+3QhWgnNkoAP6ykadR++4fiaVaJnuVr QpqW5zggnpwWq8rQ5GvtSdMISzvNlTPzIQ/dzAuB8EPiJWMWTOYKsDPWia58CvH7hC8v 2b2Sn+cqWFo/eoJFet724/Hld1/fnHsrZDGW2PRNh5iPYq8f4LiytzyNbfUcnX/fmRwb Z/nQ== X-Gm-Message-State: AKS2vOxvwBBPjf8tMIgZCBMduOASv0ruJOu45A+iFttbeksSXDbJOVgr /k5JzeuaFKosLfdn X-Received: by 10.200.53.78 with SMTP id z14mr15410904qtb.184.1498689159756; Wed, 28 Jun 2017 15:32:39 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id q90sm2676448qki.11.2017.06.28.15.32.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2017 15:32:38 -0700 (PDT) Date: Wed, 28 Jun 2017 18:32:38 -0400 From: Shawn Webb To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320430 - head/sys/vm Message-ID: <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> References: <201706280402.v5S42bQx089187@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wissjs73tyvhitp6" Content-Disposition: inline In-Reply-To: <201706280402.v5S42bQx089187@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 22:32:41 -0000 --wissjs73tyvhitp6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 28, 2017 at 04:02:37AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Jun 28 04:02:36 2017 > New Revision: 320430 > URL: https://svnweb.freebsd.org/changeset/base/320430 >=20 > Log: > Treat the addr argument for mmap(2) request without MAP_FIXED flag as > a hint. > =20 > Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted > as the absolute minimal address of the range where the mapping is > created. The VA allocator only allocates in the range [addr, > VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call might > unduly fail if there is no free addresses above addr but a lot of > usable space below it. > =20 > Lift this implementation limitation by allocating VA in two passes. > First, try to allocate above addr, as before. If that fails, do the > second pass with less restrictive constraints for the start of > allocation by specifying minimal allocation address at the max bss > end, if this limit is less than addr. > =20 > One important case where this change makes a difference is the > allocation of the stacks for new threads in libthr. Under some > configuration conditions, libthr tries to hint kernel to reuse the > main thread stack grow area for the new stacks. This cannot work by > design now after grow area is converted to stack, and there is no > unallocated VA above the main stack. Interpreting requested stack > base address as the hint provides compatibility with old libthr and > with (mis-)configured current libthr. > =20 > Reviewed by: alc > Tested by: dim (previous version) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week >=20 > Modified: > head/sys/vm/vm_map.c > head/sys/vm/vm_map.h > head/sys/vm/vm_mmap.c Hey Kostik, This commit breaks both xorg and shutting down/rebooting. Reverting this commit makes my laptop happy again. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --wissjs73tyvhitp6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAllULoMACgkQaoRlj1JF bu5cyg/9GDgKlk6IjQHzwSIPsb5s31YYjKIjcOSvZ+1DMikfEoQ9YPiFBzkWGHMw DUM4OTNpBS6r2qX/yFTGDahHC48CfC8GiwxfRPHHKjpg37eVwwzS+NPlIWp44ndV +00W9pdbxPucK/Wp6swBUGM+nKHowPjr8Cy5MLD7qPvy6AIiy69VrZ1sOwl8xfob MwqB9e04Wh7QKIm9uyTFPAOUBzbnhLl/gwNA9tEk1Y1UYWt9bUIP+fdh/mLoOc0r jVaIdX0Z+qd1sfkfvXe/uwzNceuuAgMhAIYdtISLTfvL5HGRJcNKdVbAQMKRBLel v1T2mpwgah+oBTUvlSiLlHpIkNeBFroVZvLsxTUvy5f85qdMhSJ1rghIs7iqs7cK 9kCLE2GUBO2AWcsyfS3oMq+WVhjuDSFjx1EInuhusz1qdGtVSetksWfCsq+Ks2Ev lNaQBRiytvkIrFIoqJGbB337cUAy1KV05R+dB7Ge/qn+NIMcjIlt0V5hN61z3o16 HH1jfzb37Z+DaHrUwiwrRLQxUOyjjLpILWc9DudB/75atlZfA8FrLaw37/1EgGyd 4NLo0jnMBKw6GsxLZBoH8jMk+QMeEjYRo73medsvOJ3hXBJndLewB8avAW7V11iM KZp5qscqCd1S1LJMVuCUpJZkBPQ5Oah8q2XwUFrgf6hVMv6wbwI= =tNe7 -----END PGP SIGNATURE----- --wissjs73tyvhitp6-- From owner-svn-src-all@freebsd.org Thu Jun 29 00:29:17 2017 Return-Path: Delivered-To: svn-src-all@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 032C9D887BA; Thu, 29 Jun 2017 00:29:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C421768650; Thu, 29 Jun 2017 00:29:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T0TF1J094108; Thu, 29 Jun 2017 00:29:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T0TFlB094107; Thu, 29 Jun 2017 00:29:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706290029.v5T0TFlB094107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 29 Jun 2017 00:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320460 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 320460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 00:29:17 -0000 Author: ian Date: Thu Jun 29 00:29:15 2017 New Revision: 320460 URL: https://svnweb.freebsd.org/changeset/base/320460 Log: If an i2c transfer ends due to error, issue a stop on the bus even if the nostop option is set, if a start was issued. The nostop option doesn't mean "never issue a stop" it means "only issue a stop after the last in a series of transfers". If the transfer ends due to error, then that was the last transfer in the series, and a stop is required. Before this change, any error during a transfer when nostop is set would effectively hang the bus, because sc->started would never get cleared, and that caused all future calls to iicbus_start() to return an error because it looked like the bus was already active. (Unrelated errors in handling the nostop option, to be addressed separately, could lead to this bus hang condition even on busses that don't set the nostop option.) Modified: head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Wed Jun 28 21:45:13 2017 (r320459) +++ head/sys/dev/iicbus/iiconf.c Thu Jun 29 00:29:15 2017 (r320460) @@ -419,7 +419,7 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs { int i, error, lenread, lenwrote, nkid, rpstart, addr; device_t *children, bus; - bool nostop; + bool nostop, started; if ((error = device_get_children(dev, &children, &nkid)) != 0) return (IIC_ERESOURCE); @@ -431,6 +431,7 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs rpstart = 0; free(children, M_TEMP); nostop = iicbus_get_nostop(dev); + started = false; for (i = 0, error = 0; i < nmsgs && error == 0; i++) { addr = msgs[i].slave; if (msgs[i].flags & IIC_M_RD) @@ -443,9 +444,10 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs error = iicbus_repeated_start(bus, addr, 0); else error = iicbus_start(bus, addr, 0); + if (error != 0) + break; + started = true; } - if (error != 0) - break; if (msgs[i].flags & IIC_M_RD) error = iicbus_read(bus, msgs[i].buf, msgs[i].len, @@ -464,7 +466,7 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs iicbus_stop(bus); } } - if (error != 0 && !nostop) + if (error != 0 && started) iicbus_stop(bus); return (error); } From owner-svn-src-all@freebsd.org Thu Jun 29 01:50:59 2017 Return-Path: Delivered-To: svn-src-all@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 BE816D8BF04; Thu, 29 Jun 2017 01:50:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 98BAF6F830; Thu, 29 Jun 2017 01:50:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T1ow4n027039; Thu, 29 Jun 2017 01:50:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T1owLP027037; Thu, 29 Jun 2017 01:50:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706290150.v5T1owLP027037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 29 Jun 2017 01:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320461 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 320461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 01:50:59 -0000 Author: ian Date: Thu Jun 29 01:50:58 2017 New Revision: 320461 URL: https://svnweb.freebsd.org/changeset/base/320461 Log: Add iic_recover_bus(), a helper function that can be used by any i2c driver which is able to manipulate the clock and data lines directly. When an i2c bus is hung by a slave device stuck in the middle of a transaction that didn't complete properly, this function manipulates the clock and data lines in a sequence known to reliably reset slave devices. The most common cause of a hung i2c bus is a system reboot in the middle of an i2c transfer (so it doesnt' happen often, but now there is a way other than power cycling to recover from it). Added: head/sys/dev/iicbus/iic_recover_bus.c (contents, props changed) head/sys/dev/iicbus/iic_recover_bus.h (contents, props changed) Added: head/sys/dev/iicbus/iic_recover_bus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/iic_recover_bus.c Thu Jun 29 01:50:58 2017 (r320461) @@ -0,0 +1,124 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Development sponsored by Microsemi, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Helper code to recover a hung i2c bus by bit-banging a recovery sequence. + * + * An i2c bus can be hung by a slave driving the clock (rare) or data lines low. + * The most common cause is a partially-completed transaction such as rebooting + * while a slave is sending a byte of data. Because i2c allows the clock to + * freeze for any amount of time, the slave device will continue driving the + * data line until power is removed, or the clock cycles enough times to + * complete the current byte. After completing any partial byte, a START/STOP + * sequence resets the slave and the bus is recovered. + * + * Any i2c driver which is able to manually set the level of the clock and data + * lines can use this common code for bus recovery. On many SOCs that have + * embedded i2c controllers, the i2c pins can be temporarily reassigned as gpio + * pins to do the bus recovery, then can be assigned back to the i2c hardware. + */ + +#include "opt_platform.h" + +#include +#include +#include + +#include +#include + +int +iic_recover_bus(struct iicrb_pin_access *pins) +{ + const u_int timeout_us = 40000; + const u_int delay_us = 500; + int i; + + /* + * Start with clock and data high. + */ + pins->setsda(pins->ctx, 1); + pins->setscl(pins->ctx, 1); + + /* + * At this point, SCL should be high. If it's not, some slave on the + * bus is doing clock-stretching and we should wait a while. If that + * slave is completely locked up there may be no way to recover at all. + * We wait up to 40 milliseconds, a seriously pessimistic time (even a + * cheap eeprom has a max post-write delay of only 10ms), and also long + * enough to allow SMB slaves to timeout normally after 35ms. + */ + for (i = 0; i < timeout_us; i += delay_us) { + if (pins->getscl(pins->ctx)) + break; + DELAY(delay_us); + } + if (i >= timeout_us) + return (IIC_EBUSERR); + + /* + * At this point we should be able to control the clock line. Some + * slave may be part way through a byte transfer, and could be holding + * the data line low waiting for more clock pulses to finish the byte. + * Cycle the clock until we see the data line go high, but only up to 9 + * times because if it's not free after 9 clocks we're never going to + * win this battle. We do 9 max because that's a byte plus an ack/nack + * bit, after which the slave must not be driving the data line anymore. + */ + for (i = 0; ; ++i) { + if (pins->getsda(pins->ctx)) + break; + if (i == 9) + return (IIC_EBUSERR); + pins->setscl(pins->ctx, 0); + DELAY(5); + pins->setscl(pins->ctx, 1); + DELAY(5); + } + + /* + * At this point we should be in control of both the clock and data + * lines, and both lines should be high. To complete the reset of a + * slave that was part way through a transaction, we need to do a + * START/STOP sequence, which leaves both lines high at the end. + * - START: SDA transitions high->low while SCL remains high. + * - STOP: SDA transitions low->high while SCL remains high. + * Note that even though the clock line remains high, we transition the + * data line no faster than it would change state with a 100khz clock. + */ + pins->setsda(pins->ctx, 0); + DELAY(5); + pins->setsda(pins->ctx, 1); + DELAY(5); + + return (0); +} + Added: head/sys/dev/iicbus/iic_recover_bus.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/iic_recover_bus.h Thu Jun 29 01:50:58 2017 (r320461) @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Development sponsored by Microsemi, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Helper code to recover a hung i2c bus by bit-banging a recovery sequence. + */ + +#ifndef _IICBUS_IIC_RECOVER_BUS_H_ +#define _IICBUS_IIC_RECOVER_BUS_H_ + +struct iicrb_pin_access { + void *ctx; + int (*getsda)(void *ctx); + void (*setsda)(void *ctx, int value); + int (*getscl)(void *ctx); + void (*setscl)(void *ctx, int value); +}; + +/* + * Drive the bus-recovery logic by manipulating the line states using the + * caller-provided functions. This does not block or sleep or acquire any locks + * (unless the provided pin access functions do so). It uses DELAY() to pace + * bits on the bus. + * + * Returns 0 if the bus is functioning properly or IIC_EBUSERR if the recovery + * attempt failed and some slave device is still driving the bus. + */ +int iic_recover_bus(struct iicrb_pin_access *pins); + +#endif From owner-svn-src-all@freebsd.org Thu Jun 29 01:59:40 2017 Return-Path: Delivered-To: svn-src-all@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 A5B44D8C425; Thu, 29 Jun 2017 01:59:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8193C6FD2D; Thu, 29 Jun 2017 01:59:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T1xd8H031166; Thu, 29 Jun 2017 01:59:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T1xdXR031165; Thu, 29 Jun 2017 01:59:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706290159.v5T1xdXR031165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 29 Jun 2017 01:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320462 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 320462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 01:59:40 -0000 Author: ian Date: Thu Jun 29 01:59:39 2017 New Revision: 320462 URL: https://svnweb.freebsd.org/changeset/base/320462 Log: Add bus recovery handling to the imx5/imx6 i2c driver. Modified: head/sys/arm/freescale/imx/imx_i2c.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Thu Jun 29 01:50:58 2017 (r320461) +++ head/sys/arm/freescale/imx/imx_i2c.c Thu Jun 29 01:59:39 2017 (r320462) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -61,12 +62,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "iicbus_if.h" #include #include #include +#include +#include + #define I2C_ADDR_REG 0x00 /* I2C slave address register */ #define I2C_FDR_REG 0x04 /* I2C frequency divider register */ #define I2C_CONTROL_REG 0x08 /* I2C control register */ @@ -130,6 +135,9 @@ struct i2c_softc { struct resource *res; int rid; sbintime_t byte_time_sbt; + int rb_pinctl_idx; + gpio_pin_t rb_sclpin; + gpio_pin_t rb_sdapin; }; static phandle_t i2c_get_node(device_t, device_t); @@ -274,6 +282,68 @@ i2c_error_handler(struct i2c_softc *sc, int error) } static int +i2c_recover_getsda(void *ctx) +{ + bool active; + + gpio_pin_is_active(((struct i2c_softc *)ctx)->rb_sdapin, &active); + return (active); +} + +static void +i2c_recover_setsda(void *ctx, int value) +{ + + gpio_pin_set_active(((struct i2c_softc *)ctx)->rb_sdapin, value); +} + +static int +i2c_recover_getscl(void *ctx) +{ + bool active; + + gpio_pin_is_active(((struct i2c_softc *)ctx)->rb_sclpin, &active); + return (active); + +} + +static void +i2c_recover_setscl(void *ctx, int value) +{ + + gpio_pin_set_active(((struct i2c_softc *)ctx)->rb_sclpin, value); +} + +static int +i2c_recover_bus(struct i2c_softc *sc) +{ + struct iicrb_pin_access pins; + int err; + + /* + * If we have gpio pinmux config, reconfigure the pins to gpio mode, + * invoke iic_recover_bus which checks for a hung bus and bitbangs a + * recovery sequence if necessary, then configure the pins back to i2c + * mode (idx 0). + */ + if (sc->rb_pinctl_idx == 0) + return (0); + + fdt_pinctrl_configure(sc->dev, sc->rb_pinctl_idx); + + pins.ctx = sc; + pins.getsda = i2c_recover_getsda; + pins.setsda = i2c_recover_setsda; + pins.getscl = i2c_recover_getscl; + pins.setscl = i2c_recover_setscl; + err = iic_recover_bus(&pins); + + fdt_pinctrl_configure(sc->dev, 0); + + return (err); +} + +static int i2c_probe(device_t dev) { @@ -291,7 +361,10 @@ i2c_probe(device_t dev) static int i2c_attach(device_t dev) { + char wrkstr[16]; struct i2c_softc *sc; + phandle_t node; + int err, cfgidx; sc = device_get_softc(dev); sc->dev = dev; @@ -310,6 +383,49 @@ i2c_attach(device_t dev) return (ENXIO); } + /* + * Set up for bus recovery using gpio pins, if the pinctrl and gpio + * properties are present. This is optional. If all the config data is + * not in place, we just don't do gpio bitbang bus recovery. + */ + node = ofw_bus_get_node(sc->dev); + + err = gpio_pin_get_by_ofw_property(dev, node, "scl-gpios", + &sc->rb_sclpin); + if (err != 0) + goto no_recovery; + err = gpio_pin_get_by_ofw_property(dev, node, "sda-gpios", + &sc->rb_sdapin); + if (err != 0) + goto no_recovery; + + /* + * Preset the gpio pins to output high (idle bus state). The signal + * won't actually appear on the pins until the bus recovery code changes + * the pinmux config from i2c to gpio. + */ + gpio_pin_setflags(sc->rb_sclpin, GPIO_PIN_OUTPUT); + gpio_pin_setflags(sc->rb_sdapin, GPIO_PIN_OUTPUT); + gpio_pin_set_active(sc->rb_sclpin, true); + gpio_pin_set_active(sc->rb_sdapin, true); + + /* + * Obtain the index of pinctrl node for bus recovery using gpio pins, + * then confirm that pinctrl properties exist for that index and for the + * default pinctrl-0. If sc->rb_pinctl_idx is non-zero, the reset code + * will also do a bus recovery, so setting this value must be last. + */ + err = ofw_bus_find_string_index(node, "pinctrl-names", "gpio", &cfgidx); + if (err == 0) { + snprintf(wrkstr, sizeof(wrkstr), "pinctrl-%d", cfgidx); + if (OF_hasprop(node, "pinctrl-0") && OF_hasprop(node, wrkstr)) + sc->rb_pinctl_idx = cfgidx; + } + +no_recovery: + + /* We don't do a hardware reset here because iicbus_attach() does it. */ + bus_generic_attach(dev); return (0); } @@ -339,7 +455,7 @@ i2c_repeated_start(device_t dev, u_char slave, int tim } static int -i2c_start(device_t dev, u_char slave, int timeout) +i2c_start_ll(device_t dev, u_char slave, int timeout) { struct i2c_softc *sc; int error; @@ -361,6 +477,31 @@ i2c_start(device_t dev, u_char slave, int timeout) } static int +i2c_start(device_t dev, u_char slave, int timeout) +{ + struct i2c_softc *sc; + int error; + + sc = device_get_softc(dev); + + /* + * Invoke the low-level code to put the bus into master mode and address + * the given slave. If that fails, idle the controller and attempt a + * bus recovery, and then try again one time. Signaling a start and + * addressing the slave is the only operation that a low-level driver + * can safely retry without any help from the upper layers that know + * more about the slave device. + */ + if ((error = i2c_start_ll(dev, slave, timeout)) != 0) { + i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); + if ((error = i2c_recover_bus(sc)) != 0) + return (error); + error = i2c_start_ll(dev, slave, timeout); + } + return (error); +} + +static int i2c_stop(device_t dev) { struct i2c_softc *sc; @@ -409,7 +550,12 @@ i2c_reset(device_t dev, u_char speed, u_char addr, u_c i2c_write_reg(sc, I2C_STATUS_REG, 0x0); i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)clkdiv_table[i].regcode); - return (IIC_NOERR); + + /* + * Now that the controller is idle, perform bus recovery. If the bus + * isn't hung, this a fairly fast no-op. + */ + return (i2c_recover_bus(sc)); } static int From owner-svn-src-all@freebsd.org Thu Jun 29 02:19:31 2017 Return-Path: Delivered-To: svn-src-all@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 E5AADD8D1EA; Thu, 29 Jun 2017 02:19:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B2C0670820; Thu, 29 Jun 2017 02:19:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T2JUJJ039205; Thu, 29 Jun 2017 02:19:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T2JUVr039204; Thu, 29 Jun 2017 02:19:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201706290219.v5T2JUVr039204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 29 Jun 2017 02:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320463 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 320463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 02:19:32 -0000 Author: ian Date: Thu Jun 29 02:19:30 2017 New Revision: 320463 URL: https://svnweb.freebsd.org/changeset/base/320463 Log: Add iic_recover_bus.c. Should have been part of r320461. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jun 29 01:59:39 2017 (r320462) +++ head/sys/conf/files Thu Jun 29 02:19:30 2017 (r320463) @@ -1723,6 +1723,7 @@ dev/iicbus/ds3231.c optional ds3231 dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic +dev/iicbus/iic_recover_bus.c optional iicbus dev/iicbus/iicbb.c optional iicbb dev/iicbus/iicbb_if.m optional iicbb dev/iicbus/iicbus.c optional iicbus From owner-svn-src-all@freebsd.org Thu Jun 29 03:57:23 2017 Return-Path: Delivered-To: svn-src-all@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 AD0A4D90DB8; Thu, 29 Jun 2017 03:57:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7BCDC73D8D; Thu, 29 Jun 2017 03:57:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T3vMW9080585; Thu, 29 Jun 2017 03:57:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T3vMXT080584; Thu, 29 Jun 2017 03:57:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201706290357.v5T3vMXT080584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 29 Jun 2017 03:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320464 - head/sys/mips/conf X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/conf X-SVN-Commit-Revision: 320464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 03:57:23 -0000 Author: adrian Date: Thu Jun 29 03:57:22 2017 New Revision: 320464 URL: https://svnweb.freebsd.org/changeset/base/320464 Log: [mips] make this compile again after all of the config changes. Modified: head/sys/mips/conf/DIR-825C1 Modified: head/sys/mips/conf/DIR-825C1 ============================================================================== --- head/sys/mips/conf/DIR-825C1 Thu Jun 29 02:19:30 2017 (r320463) +++ head/sys/mips/conf/DIR-825C1 Thu Jun 29 03:57:22 2017 (r320464) @@ -24,12 +24,6 @@ hints "DIR-825C1.hints" # Force the board memory - the base DB120 has 128MB RAM options AR71XX_REALMEM=(128*1024*1024) -# i2c GPIO bus -device gpioiic -device iicbb -device iicbus -device iic - # Options required for miiproxy and mdiobus options ARGE_MDIO # Export an MDIO bus separate from arge device miiproxy # MDIO bus <-> MII PHY rendezvous @@ -52,7 +46,6 @@ options GEOM_UZIP options GEOM_PART_GPT # yes, this board has a PCI connected atheros device -device ath_pci options AR71XX_ATH_EEPROM device firmware # Used by the above options ATH_EEPROM_FIRMWARE From owner-svn-src-all@freebsd.org Thu Jun 29 03:58:02 2017 Return-Path: Delivered-To: svn-src-all@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 79915D90E28; Thu, 29 Jun 2017 03:58:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 43B2573ED4; Thu, 29 Jun 2017 03:58:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T3w1GX080657; Thu, 29 Jun 2017 03:58:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T3w1Jv080656; Thu, 29 Jun 2017 03:58:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201706290358.v5T3w1Jv080656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 29 Jun 2017 03:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320465 - head/sys/mips/conf X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/conf X-SVN-Commit-Revision: 320465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 03:58:02 -0000 Author: adrian Date: Thu Jun 29 03:58:01 2017 New Revision: 320465 URL: https://svnweb.freebsd.org/changeset/base/320465 Log: [mips] [ar71xx] Since the wlan/ath drivers use ALQ, ensure we build the module here otherwise we can't load said module. Modified: head/sys/mips/conf/std.AR_MIPS_BASE Modified: head/sys/mips/conf/std.AR_MIPS_BASE ============================================================================== --- head/sys/mips/conf/std.AR_MIPS_BASE Thu Jun 29 03:57:22 2017 (r320464) +++ head/sys/mips/conf/std.AR_MIPS_BASE Thu Jun 29 03:58:01 2017 (r320465) @@ -23,6 +23,7 @@ options NO_SYSCTL_DESCR makeoptions MODULES_OVERRIDE+="gpio ar71xx if_gif if_vlan if_gre if_tap" makeoptions MODULES_OVERRIDE+="if_tun if_bridge bridgestp usb" +makeoptions MODULES_OVERRIDE+="alq" # Random - required during early boot! device random From owner-svn-src-all@freebsd.org Thu Jun 29 03:59:03 2017 Return-Path: Delivered-To: svn-src-all@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 D911ED90EBF; Thu, 29 Jun 2017 03:59:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A804F74052; Thu, 29 Jun 2017 03:59:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T3x2gX080744; Thu, 29 Jun 2017 03:59:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T3x2G9080743; Thu, 29 Jun 2017 03:59:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201706290359.v5T3x2G9080743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 29 Jun 2017 03:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320466 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 320466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 03:59:03 -0000 Author: adrian Date: Thu Jun 29 03:59:02 2017 New Revision: 320466 URL: https://svnweb.freebsd.org/changeset/base/320466 Log: [ath_hal] if building with ALQ, ensure we actually depend upon ALQ. Modified: head/sys/dev/ath/ah_osdep.c Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Thu Jun 29 03:58:01 2017 (r320465) +++ head/sys/dev/ath/ah_osdep.c Thu Jun 29 03:59:02 2017 (r320466) @@ -449,3 +449,6 @@ ath_hal_modevent(module_t mod __unused, int type, void DEV_MODULE(ath_hal, ath_hal_modevent, NULL); MODULE_VERSION(ath_hal, 1); +#if defined(AH_DEBUG_ALQ) +MODULE_DEPEND(ath_hal, alq, 1, 1, 1); +#endif From owner-svn-src-all@freebsd.org Thu Jun 29 04:33:57 2017 Return-Path: Delivered-To: svn-src-all@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 0F8E8D92033; Thu, 29 Jun 2017 04:33:57 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D1E9A7513C; Thu, 29 Jun 2017 04:33:56 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T4XuP0097387; Thu, 29 Jun 2017 04:33:56 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T4Xtx0097385; Thu, 29 Jun 2017 04:33:55 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201706290433.v5T4Xtx0097385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 29 Jun 2017 04:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320467 - in head/sys/boot/i386: libi386 loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/sys/boot/i386: libi386 loader X-SVN-Commit-Revision: 320467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 04:33:57 -0000 Author: tsoome Date: Thu Jun 29 04:33:55 2017 New Revision: 320467 URL: https://svnweb.freebsd.org/changeset/base/320467 Log: loader: chain load relocate data declaration is bad The implementation is using fixed size array allocated in asm module, need to use proper array declaration for C source. CID: 1376405 Reported by: Coverity, cem Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D11321 Modified: head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/chain.c Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Thu Jun 29 03:59:02 2017 (r320466) +++ head/sys/boot/i386/libi386/libi386.h Thu Jun 29 04:33:55 2017 (r320467) @@ -71,7 +71,10 @@ struct relocate_data { extern void relocater(void); -extern uint32_t relocater_data; +/* + * The relocater_data[] is fixed size array allocated in relocater_tramp.S + */ +extern struct relocate_data relocater_data[]; extern uint32_t relocater_size; extern uint16_t relocator_ip; Modified: head/sys/boot/i386/loader/chain.c ============================================================================== --- head/sys/boot/i386/loader/chain.c Thu Jun 29 03:59:02 2017 (r320466) +++ head/sys/boot/i386/loader/chain.c Thu Jun 29 04:33:55 2017 (r320467) @@ -58,7 +58,6 @@ command_chain(int argc, char *argv[]) int fd, len, size = SECTOR_SIZE; struct stat st; vm_offset_t mem = 0x100000; - uint32_t *uintptr = &relocater_data; struct i386_devdesc *rootdev; if (argc == 1) { @@ -108,9 +107,9 @@ command_chain(int argc, char *argv[]) return (CMD_ERROR); } - uintptr[0] = mem; - uintptr[1] = 0x7C00; - uintptr[2] = SECTOR_SIZE; + relocater_data[0].src = mem; + relocater_data[0].dest = 0x7C00; + relocater_data[0].size = SECTOR_SIZE; relocator_edx = bd_unit2bios(rootdev->d_unit); relocator_esi = relocater_size; From owner-svn-src-all@freebsd.org Thu Jun 29 06:28:56 2017 Return-Path: Delivered-To: svn-src-all@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 15A59D94498; Thu, 29 Jun 2017 06:28:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D86BE77E06; Thu, 29 Jun 2017 06:28:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T6StL4042548; Thu, 29 Jun 2017 06:28:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T6Ss92042545; Thu, 29 Jun 2017 06:28:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706290628.v5T6Ss92042545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Jun 2017 06:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320468 - head/lib/libstand X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libstand X-SVN-Commit-Revision: 320468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 06:28:56 -0000 Author: delphij Date: Thu Jun 29 06:28:54 2017 New Revision: 320468 URL: https://svnweb.freebsd.org/changeset/base/320468 Log: Don't bother to set target for SEEK_END. While there also collapase SEEK_END into default case in lseek. MFC after: 2 weeks Modified: head/lib/libstand/bzipfs.c head/lib/libstand/gzipfs.c head/lib/libstand/lseek.c Modified: head/lib/libstand/bzipfs.c ============================================================================== --- head/lib/libstand/bzipfs.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/bzipfs.c Thu Jun 29 06:28:54 2017 (r320468) @@ -320,8 +320,6 @@ bzf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + bzf->bzf_bzstream.total_out_lo32; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); Modified: head/lib/libstand/gzipfs.c ============================================================================== --- head/lib/libstand/gzipfs.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/gzipfs.c Thu Jun 29 06:28:54 2017 (r320468) @@ -300,8 +300,6 @@ zf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + zf->zf_zstream.total_out; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); Modified: head/lib/libstand/lseek.c ============================================================================== --- head/lib/libstand/lseek.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/lseek.c Thu Jun 29 06:28:54 2017 (r320468) @@ -87,7 +87,6 @@ lseek(int fd, off_t offset, int where) case SEEK_CUR: f->f_offset += offset; break; - case SEEK_END: default: errno = EOFFSET; return (-1); From owner-svn-src-all@freebsd.org Thu Jun 29 12:49:05 2017 Return-Path: Delivered-To: svn-src-all@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 295E9D9CC87; Thu, 29 Jun 2017 12:49:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 EC8D7833A1; Thu, 29 Jun 2017 12:49:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TCn4ra097909; Thu, 29 Jun 2017 12:49:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TCn436097908; Thu, 29 Jun 2017 12:49:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706291249.v5TCn436097908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 29 Jun 2017 12:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320469 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 320469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 12:49:05 -0000 Author: avg Date: Thu Jun 29 12:49:03 2017 New Revision: 320469 URL: https://svnweb.freebsd.org/changeset/base/320469 Log: MFC r320353: linux_getdents, linux_readdir: fix mismatch between malloc and free tags Approved by: re (gjb) Modified: stable/11/sys/compat/linux/linux_file.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_file.c ============================================================================== --- stable/11/sys/compat/linux/linux_file.c Thu Jun 29 06:28:54 2017 (r320468) +++ stable/11/sys/compat/linux/linux_file.c Thu Jun 29 12:49:03 2017 (r320469) @@ -394,9 +394,9 @@ linux_getdents(struct thread *td, struct linux_getdent td->td_retval[0] = retval; out: - free(lbuf, M_LINUX); + free(lbuf, M_TEMP); out1: - free(buf, M_LINUX); + free(buf, M_TEMP); return (error); } @@ -522,9 +522,9 @@ linux_readdir(struct thread *td, struct linux_readdir_ if (error == 0) td->td_retval[0] = linuxreclen; - free(lbuf, M_LINUX); + free(lbuf, M_TEMP); out: - free(buf, M_LINUX); + free(buf, M_TEMP); return (error); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ From owner-svn-src-all@freebsd.org Thu Jun 29 13:23:36 2017 Return-Path: Delivered-To: svn-src-all@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 B264ED9D827 for ; Thu, 29 Jun 2017 13:23:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (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 6689E8466E for ; Thu, 29 Jun 2017 13:23:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x235.google.com with SMTP id r30so74033815qtc.0 for ; Thu, 29 Jun 2017 06:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FFsUDnouX7hRQVrXhKKp1Fu1y6+7ho0mNE1rbq11LRs=; b=V5JXnVfRtpf9bx0NvtqG3xc1kvgpebFIIDFj5PykRksLkY72IRliRDEGF6qB1PY8u2 TimPA24if1QSkv3VguOq+uAY6jDAOqWX9jzZbmPlqx15KyNo7VS5EBawQLmIaocNFtEz eb0JqoFJXqS5cYZaRm15fr94f5iVxHvX/ffQcGUNS8HpP5nzF/rC/RUf9A260icixh7g 0dyvqVeiemRxsf7sLu65DxvnmL8iNIZfXS+u+30cBVIFFOytbK6QkhQG3nci65AP+awc sff1+PT1ka5dBLiJveu2s5584rWFwjTMyiaIkuImT6eXEOKirELXK4LnQwgBgz2ARX/K IzJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FFsUDnouX7hRQVrXhKKp1Fu1y6+7ho0mNE1rbq11LRs=; b=aWTJ/8PNjnZjpuu9aFinYfZPEbyVDpiaxMAa8LnWYhWYXCobisk2/y7qfYg1UqLCC+ /baMIe1gTYFMoWf7KU2l3+FtJs/aG1VG3sverl1sXEOq2sieSFlmxOP3VG2vv+/y7trd RmCgh4LTskbd7XsfuvBPSSBZeVG8IetnWpWBz6G2CcX30E+6bVZIb9/XgsPKHlL7Avz5 tvCgZJG7hv5h/JndIjEXuNRV20oYO3DZgWumJ2/r3AvKNf9PwRTHBrznSHypdZvaJYyW dV9iJYRplXkOCgq844hDp13oC6zzc8Rvxg2m7RPhvknriqFx/atdqWCcWGNBks38kbA6 r8xw== X-Gm-Message-State: AKS2vOwux+i9x9u2jcKaWLGaa1t4YoI1bGv+4Nu4WfYVhUPennRg5V9f FfC5yYSe98SuBLxy X-Received: by 10.237.32.202 with SMTP id 68mr20616641qtb.128.1498742615382; Thu, 29 Jun 2017 06:23:35 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id r33sm4246691qtc.43.2017.06.29.06.23.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2017 06:23:33 -0700 (PDT) Date: Thu, 29 Jun 2017 09:23:33 -0400 From: Shawn Webb To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320430 - head/sys/vm Message-ID: <20170629132333.pl6nk5bsw3fkevdx@mutt-hbsd> References: <201706280402.v5S42bQx089187@repo.freebsd.org> <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zdzlncmx3plci7qg" Content-Disposition: inline In-Reply-To: <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 13:23:36 -0000 --zdzlncmx3plci7qg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 28, 2017 at 06:32:38PM -0400, Shawn Webb wrote: > On Wed, Jun 28, 2017 at 04:02:37AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Jun 28 04:02:36 2017 > > New Revision: 320430 > > URL: https://svnweb.freebsd.org/changeset/base/320430 > >=20 > > Log: > > Treat the addr argument for mmap(2) request without MAP_FIXED flag as > > a hint. > > =20 > > Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted > > as the absolute minimal address of the range where the mapping is > > created. The VA allocator only allocates in the range [addr, > > VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call might > > unduly fail if there is no free addresses above addr but a lot of > > usable space below it. > > =20 > > Lift this implementation limitation by allocating VA in two passes. > > First, try to allocate above addr, as before. If that fails, do the > > second pass with less restrictive constraints for the start of > > allocation by specifying minimal allocation address at the max bss > > end, if this limit is less than addr. > > =20 > > One important case where this change makes a difference is the > > allocation of the stacks for new threads in libthr. Under some > > configuration conditions, libthr tries to hint kernel to reuse the > > main thread stack grow area for the new stacks. This cannot work by > > design now after grow area is converted to stack, and there is no > > unallocated VA above the main stack. Interpreting requested stack > > base address as the hint provides compatibility with old libthr and > > with (mis-)configured current libthr. > > =20 > > Reviewed by: alc > > Tested by: dim (previous version) > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > >=20 > > Modified: > > head/sys/vm/vm_map.c > > head/sys/vm/vm_map.h > > head/sys/vm/vm_mmap.c >=20 > Hey Kostik, >=20 > This commit breaks both xorg and shutting down/rebooting. Reverting this > commit makes my laptop happy again. Thnking out loud: would these issues arise due to HardenedBSD using SafeStack, which relies on libthr's stack code? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --zdzlncmx3plci7qg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAllU/1MACgkQaoRlj1JF bu4QVRAAjR20fRt6KlzxDIDzGILImR2JxX0lrX/Cl7tccUcIigJNWlYnYmYm2UyH qgILf4NELCJoLZ2b1wA54DXu5T+h9DeXHpL5UTPWwWnqK4PJHuOmrk0wMOjGA09q V6vx9a7HmJ2jdpzk0pgH8Ed1XR5z6EBIcJIkuuRV1sUbc9mzQpRKU3Ot961b00vX 8SkavhWIvU2iTU4jVjj+GpUQTgWUG/5vA/KUMLJibelKu5PIvmd8nCY8b7UYt7Qw IWvijRly5nrcjmuimq/zC9DOz9dJtjFZV85o/2CRAg3LZoKT0BL2YqDQ95ZaSdgL Drn9YhnvBgFS/C9f7kGq9afjJXjozItq+bFH2Fe3PzOxZkYuOlnwz5D7QW93diVu pMKqQZbyFjBOvziPrK74aKZNOqJrIoiczTI+AYuZc/VkKV2a+S6ylEy9a9jjUS5q p//Eohs3kJ2x/D/vQbP0nax/6zvQNBIcxezxazBcMzJ2f6fvIScpmasisfHBNdsB Pk5R8aK6lp5WMVdqs6nSjv2yUyYn65NJwAyqXU2VqA/GsQ3DeMtrce42zzWZeoZm oOal0UnombPF/3QGfAKSBnSjYt7jMu40bUSUvgw71/PFUTBemEOpdf/Uc6jtdKQb CJvTeO9UBBZAZpB6F96EZ4Ge6N/2Ho08R+AquA3q+lG5OaJzfEE= =BGoy -----END PGP SIGNATURE----- --zdzlncmx3plci7qg-- From owner-svn-src-all@freebsd.org Thu Jun 29 14:00:06 2017 Return-Path: Delivered-To: svn-src-all@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 B98BFD9E0C3; Thu, 29 Jun 2017 14:00:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 87FB8846; Thu, 29 Jun 2017 14:00:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TE053M026247; Thu, 29 Jun 2017 14:00:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TE05GI026245; Thu, 29 Jun 2017 14:00:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706291400.v5TE05GI026245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Jun 2017 14:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320470 - head/lib/libc/arm/gen X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/lib/libc/arm/gen X-SVN-Commit-Revision: 320470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 14:00:06 -0000 Author: andrew Date: Thu Jun 29 14:00:05 2017 New Revision: 320470 URL: https://svnweb.freebsd.org/changeset/base/320470 Log: Start to remove _libc_arm_fpu_present checks. We don't support the VFP on ARMv4 or ARMv5, and only support it when it's present on ARMv6 and later. As such always store the VFP register in setjmp and restore them in longjmp when building for armv6. Reviewed by: mmel Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11393 Modified: head/lib/libc/arm/gen/_setjmp.S head/lib/libc/arm/gen/setjmp.S Modified: head/lib/libc/arm/gen/_setjmp.S ============================================================================== --- head/lib/libc/arm/gen/_setjmp.S Thu Jun 29 12:49:03 2017 (r320469) +++ head/lib/libc/arm/gen/_setjmp.S Thu Jun 29 14:00:05 2017 (r320470) @@ -61,25 +61,12 @@ __FBSDID("$FreeBSD$"); ENTRY(_setjmp) ldr r1, .L_setjmp_magic -#if !defined(_STANDALONE) - ldr r2, .Lfpu_present -#ifdef PIC - GOT_INIT(r3, .L_setjmp_got, .L_setjmp_gotinit) - ldr r2, [r2, r3] -#else - ldr r2, [r2] -#endif - teq r2, #0 /* do we have a FPU? */ - beq 1f /* no, don't save VFP registers */ - - orr r1, r1, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) - /* change magic to VFP magic */ +#if !defined(_STANDALONE) && __ARM_ARCH >= 6 add r2, r0, #(_JB_REG_D8 * 4) vstmia r2, {d8-d15} vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] -1: -#endif /* !_STANDALONE */ +#endif /* !_STANDALONE && __ARM_ARCH >= 6 */ str r1, [r0] @@ -99,30 +86,20 @@ END(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP -#if !defined(_STANDALONE) - GOT_INITSYM(.L_setjmp_got, .L_setjmp_gotinit) -.Lfpu_present: - .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) -#endif /* !_STANDALONE */ WEAK_ALIAS(___longjmp, _longjmp) ENTRY(_longjmp) ldr r2, [r0] /* get magic from jmp_buf */ - bic r3, r2, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) - /* ignore VFP-ness of magic */ ldr ip, .L_setjmp_magic /* load magic */ - teq ip, r3 /* magic correct? */ + teq ip, r2 /* magic correct? */ bne botch /* no, botch */ -#if !defined(_STANDALONE) - teq r3, r2 /* did magic change? */ - beq 1f /* no, don't restore VFP */ +#if !defined(_STANDALONE) && __ARM_ARCH >= 6 add ip, r0, #(_JB_REG_D8 * 4) vldmia ip, {d8-d15} ldr ip, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, ip -1: -#endif /* !_STANDALONE */ +#endif /* !_STANDALONE && __ARM_ARCH >= 6 */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ Modified: head/lib/libc/arm/gen/setjmp.S ============================================================================== --- head/lib/libc/arm/gen/setjmp.S Thu Jun 29 12:49:03 2017 (r320469) +++ head/lib/libc/arm/gen/setjmp.S Thu Jun 29 14:00:05 2017 (r320470) @@ -64,23 +64,12 @@ ENTRY(setjmp) ldr r1, .Lsetjmp_magic - ldr r2, .Lfpu_present -#ifdef PIC - GOT_INIT(r3, .Lsetjmp_got, .Lsetjmp_gotinit) - ldr r2, [r2, r3] -#else - ldr r2, [r2] -#endif - teq r2, #0 /* do we have a FPU? */ - beq 1f /* no, don't save VFP registers */ - - orr r1, r1, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) - /* change magic to VFP magic */ +#if __ARM_ARCH >= 6 add r2, r0, #(_JB_REG_D8 * 4) vstmia r2, {d8-d15} vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] -1: +#endif str r1, [r0] /* store magic */ @@ -98,9 +87,6 @@ ENTRY(setjmp) .Lsetjmp_magic: .word _JB_MAGIC_SETJMP - GOT_INITSYM(.Lsetjmp_got, .Lsetjmp_gotinit) -.Lfpu_present: - .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) END(setjmp) .weak _C_LABEL(longjmp) @@ -108,8 +94,7 @@ END(setjmp) ENTRY(__longjmp) ldr r2, [r0] ldr ip, .Lsetjmp_magic - bic r3, r2, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) - teq r3, ip + teq r2, ip bne .Lbotch /* Restore the signal mask. */ @@ -120,14 +105,12 @@ ENTRY(__longjmp) bl PIC_SYM(_C_LABEL(sigprocmask), PLT) ldmfd sp!, {r0-r2, r14} - tst r2, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) - /* is this a VFP magic? */ - beq 1f /* no, don't restore VFP */ +#if __ARM_ARCH >= 6 add ip, r0, #(_JB_REG_D8 * 4) vldmia ip, {d8-d15} ldr ip, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, ip -1: +#endif add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ From owner-svn-src-all@freebsd.org Thu Jun 29 14:12:40 2017 Return-Path: Delivered-To: svn-src-all@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 C4D0DD9E8DF for ; Thu, 29 Jun 2017 14:12:40 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm10-vm2.bullet.mail.ne1.yahoo.com (nm10-vm2.bullet.mail.ne1.yahoo.com [98.138.90.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96FE61702 for ; Thu, 29 Jun 2017 14:12:40 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1498745451; bh=dwNm/+TiWvAj71YkN0Qoss85L8jKou+EtKLSjXdXNVM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=jdSbfGvh5kmh0idwmBau5a6avlDeHelOB8m7zEmtmiqSTc+PvJPRnwfo7pErvb1fGQX3W6oH9Dp3Pf/926I8oWHd0ipU3BkvS7R+OMJu/9UI8NjUaYoNmsSq711Wuleo1vXF503fE+9sfQMaylCY2kzfHEGjs9nEr7X+5iOpxgtuRL8PJWCQNPmMQaMaurhbvX+fp1hk6RvXoIY7vYZYa//Uy5rF1mvOh/zFnjEH+33bmZRaYZnTZCqL82zirjqpe4oeckeXeO5GzHvAMkVBC338NC+c3L0qOu+OBWVVk+9ojl98GO3YTME8cdYNNMBLzhq2iDXMrWSPtTYT8kjgSA== Received: from [98.138.100.117] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jun 2017 14:10:51 -0000 Received: from [98.138.226.60] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jun 2017 14:10:51 -0000 Received: from [127.0.0.1] by smtp211.mail.ne1.yahoo.com with NNFMP; 29 Jun 2017 14:10:51 -0000 X-Yahoo-Newman-Id: 140486.90205.bm@smtp211.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: LlOpHmgVM1mt1iwnSvU8e653oPn7CnGHgJfgPJzObw2FOd6 KfZoKVMSemwQn5ntLDAG542kHNVQjxeCmb.M_VWwQBdhCF3WPvzStjIpy3xW uZEJeamYQF4pP3zQBHVmTinQURO1egVmcmmmJZlnm3F59Sbl1j5ddPflHJqV ce0AjArEAkS_OatHCBnN6DdrY.uwZt88BseYVrfZMNfuOTybkCml8Lpdrblg 3.ljmfF9T_lQQE1aNqcEzzDfA_yDxhLL9326gxqX8JPaD9IwWUmv.siQ8cTR WKZpaS1TwV2HfiCCR5LCFIl1pe7B9pUoDj4GYhdEtJeiKk775eYA._.kRviQ UtdgOJenoO8NvV2GDYyEYEyknkgadVSykWyxVafwL5S3YQaV0uSlzXXk6xM7 8g1mrRaZ2Aiw_NnZCLuGaCXHDrAmG18xeEVF8spewZwXh4A_WHRqcOc1nNAc 59w9BBz9yCh3OvH4kn3FIEctlKnUjaHdNKWT8A1eJW4eVYZeyfCyFxfmvlyY X8Mnk4o3yJfuIdiliPXs- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320430 - head/sys/vm To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201706280402.v5S42bQx089187@repo.freebsd.org> <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> <20170629132333.pl6nk5bsw3fkevdx@mutt-hbsd> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Thu, 29 Jun 2017 09:10:53 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170629132333.pl6nk5bsw3fkevdx@mutt-hbsd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 14:12:40 -0000 Hello; On 6/29/2017 8:23 AM, Shawn Webb wrote: > On Wed, Jun 28, 2017 at 06:32:38PM -0400, Shawn Webb wrote: >> On Wed, Jun 28, 2017 at 04:02:37AM +0000, Konstantin Belousov wrote: >>> Author: kib >>> Date: Wed Jun 28 04:02:36 2017 >>> New Revision: 320430 >>> URL: https://svnweb.freebsd.org/changeset/base/320430 >>> >>> Log: >>> Treat the addr argument for mmap(2) request without MAP_FIXED flag as >>> a hint. >>> >>> Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted >>> as the absolute minimal address of the range where the mapping is >>> created. The VA allocator only allocates in the range [addr, >>> VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call might >>> unduly fail if there is no free addresses above addr but a lot of >>> usable space below it. >>> >>> Lift this implementation limitation by allocating VA in two passes. >>> First, try to allocate above addr, as before. If that fails, do the >>> second pass with less restrictive constraints for the start of >>> allocation by specifying minimal allocation address at the max bss >>> end, if this limit is less than addr. >>> >>> One important case where this change makes a difference is the >>> allocation of the stacks for new threads in libthr. Under some >>> configuration conditions, libthr tries to hint kernel to reuse the >>> main thread stack grow area for the new stacks. This cannot work by >>> design now after grow area is converted to stack, and there is no >>> unallocated VA above the main stack. Interpreting requested stack >>> base address as the hint provides compatibility with old libthr and >>> with (mis-)configured current libthr. >>> >>> Reviewed by: alc >>> Tested by: dim (previous version) >>> Sponsored by: The FreeBSD Foundation >>> MFC after: 1 week >>> >>> Modified: >>> head/sys/vm/vm_map.c >>> head/sys/vm/vm_map.h >>> head/sys/vm/vm_mmap.c >> Hey Kostik, >> >> This commit breaks both xorg and shutting down/rebooting. Reverting this >> commit makes my laptop happy again. > Thnking out loud: would these issues arise due to HardenedBSD using > SafeStack, which relies on libthr's stack code? I haven't been looking at SafeStack lately but unless HardenedBSD took the FreeBSD-specific code from EPFL and did some real work on it, there is little chance it does its work well. Pedro. ps. I would guess Oliver knows about the EPFL code since he did some review on github. From owner-svn-src-all@freebsd.org Thu Jun 29 14:40:34 2017 Return-Path: Delivered-To: svn-src-all@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 C9B17D9EE29; Thu, 29 Jun 2017 14:40:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 991BD2568; Thu, 29 Jun 2017 14:40:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TEeX1R042497; Thu, 29 Jun 2017 14:40:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TEeX2q042496; Thu, 29 Jun 2017 14:40:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706291440.v5TEeX2q042496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 29 Jun 2017 14:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320471 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 14:40:34 -0000 Author: kib Date: Thu Jun 29 14:40:33 2017 New Revision: 320471 URL: https://svnweb.freebsd.org/changeset/base/320471 Log: Do not cast struct kevent_args or struct freebsd11_kevent_args to struct g_kevent_args. On some architectures, e.g. PowerPC, there is additional padding in uap. Reported and tested by: andreast Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Thu Jun 29 14:00:05 2017 (r320470) +++ head/sys/kern/kern_event.c Thu Jun 29 14:40:33 2017 (r320471) @@ -935,8 +935,16 @@ sys_kevent(struct thread *td, struct kevent_args *uap) .k_copyin = kevent_copyin, .kevent_size = sizeof(struct kevent), }; + struct g_kevent_args gk_args = { + .fd = uap->fd, + .changelist = uap->changelist, + .nchanges = uap->nchanges, + .eventlist = uap->eventlist, + .nevents = uap->nevents, + .timeout = uap->timeout, + }; - return (kern_kevent_generic(td, (struct g_kevent_args *)uap, &k_ops)); + return (kern_kevent_generic(td, &gk_args, &k_ops)); } static int @@ -1107,8 +1115,16 @@ freebsd11_kevent(struct thread *td, struct freebsd11_k .k_copyin = kevent11_copyin, .kevent_size = sizeof(struct kevent_freebsd11), }; + struct g_kevent_args gk_args = { + .fd = uap->fd, + .changelist = uap->changelist, + .nchanges = uap->nchanges, + .eventlist = uap->eventlist, + .nevents = uap->nevents, + .timeout = uap->timeout, + }; - return (kern_kevent_generic(td, (struct g_kevent_args *)uap, &k_ops)); + return (kern_kevent_generic(td, &gk_args, &k_ops)); } #endif From owner-svn-src-all@freebsd.org Thu Jun 29 14:44:22 2017 Return-Path: Delivered-To: svn-src-all@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 580CDD9F036; Thu, 29 Jun 2017 14:44:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 22F2829A6; Thu, 29 Jun 2017 14:44:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TEiLbI046424; Thu, 29 Jun 2017 14:44:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TEiHKR046385; Thu, 29 Jun 2017 14:44:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706291444.v5TEiHKR046385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 29 Jun 2017 14:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320472 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 320472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 14:44:22 -0000 Author: kib Date: Thu Jun 29 14:44:17 2017 New Revision: 320472 URL: https://svnweb.freebsd.org/changeset/base/320472 Log: Make stdio deferred cancel-safe. If used with fopen(3)/fdopen(3)-ed FILEs, stdio accurately uses non-cancellable internal versions of the functions, i.e. it seems to be fine with regard to cancellation. But if the funopen(3) and f{r,w}open(3) functions were used to open the FILE, and corresponding user functions create cancellation points (they typically have no other choice), then stdio code at least leaks FILE' lock. The change installs cleanup handler which unlocks FILE. Some minimal restructuring of the code was required to make it use common return place to satisfy hand-rolled pthread_cleanup_pop() requirements. Noted by: eugen Reviewed by: eugen, vangyzen Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D11246 Modified: head/lib/libc/stdio/fclose.c head/lib/libc/stdio/fflush.c head/lib/libc/stdio/fgetc.c head/lib/libc/stdio/fgetln.c head/lib/libc/stdio/fgets.c head/lib/libc/stdio/fgetwc.c head/lib/libc/stdio/fgetwln.c head/lib/libc/stdio/fgetws.c head/lib/libc/stdio/fputc.c head/lib/libc/stdio/fputs.c head/lib/libc/stdio/fputwc.c head/lib/libc/stdio/fputws.c head/lib/libc/stdio/fread.c head/lib/libc/stdio/freopen.c head/lib/libc/stdio/fscanf.c head/lib/libc/stdio/fseek.c head/lib/libc/stdio/fwrite.c head/lib/libc/stdio/getc.c head/lib/libc/stdio/getchar.c head/lib/libc/stdio/getdelim.c head/lib/libc/stdio/gets.c head/lib/libc/stdio/local.h head/lib/libc/stdio/perror.c head/lib/libc/stdio/putc.c head/lib/libc/stdio/putchar.c head/lib/libc/stdio/puts.c head/lib/libc/stdio/putw.c head/lib/libc/stdio/refill.c head/lib/libc/stdio/scanf.c head/lib/libc/stdio/setvbuf.c head/lib/libc/stdio/stdio.c head/lib/libc/stdio/ungetc.c head/lib/libc/stdio/ungetwc.c head/lib/libc/stdio/vfprintf.c head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwprintf.c head/lib/libc/stdio/vfwscanf.c head/lib/libc/stdio/vscanf.c Modified: head/lib/libc/stdio/fclose.c ============================================================================== --- head/lib/libc/stdio/fclose.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fclose.c Thu Jun 29 14:44:17 2017 (r320472) @@ -97,7 +97,7 @@ fdclose(FILE *fp, int *fdp) return (EOF); } - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); r = 0; if (fp->_close != __sclose) { r = EOF; @@ -115,7 +115,7 @@ fdclose(FILE *fp, int *fdp) *fdp = fp->_file; r = cleanfile(fp, false); } - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (r); } @@ -130,9 +130,9 @@ fclose(FILE *fp) return (EOF); } - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); r = cleanfile(fp, true); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (r); } Modified: head/lib/libc/stdio/fflush.c ============================================================================== --- head/lib/libc/stdio/fflush.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fflush.c Thu Jun 29 14:44:17 2017 (r320472) @@ -56,7 +56,7 @@ fflush(FILE *fp) if (fp == NULL) return (_fwalk(sflush_locked)); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* * There is disagreement about the correct behaviour of fflush() @@ -76,7 +76,7 @@ fflush(FILE *fp) retval = 0; else retval = __sflush(fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } @@ -143,8 +143,8 @@ sflush_locked(FILE *fp) { int ret; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __sflush(fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/fgetc.c ============================================================================== --- head/lib/libc/stdio/fgetc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgetc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -46,10 +46,10 @@ int fgetc(FILE *fp) { int retval; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* Orientation set by __sgetc() when buffer is empty. */ /* ORIENT(fp, -1); */ retval = __sgetc(fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/fgetln.c ============================================================================== --- head/lib/libc/stdio/fgetln.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgetln.c Thu Jun 29 14:44:17 2017 (r320472) @@ -85,22 +85,21 @@ char * fgetln(FILE *fp, size_t *lenp) { unsigned char *p; + char *ret; size_t len; size_t off; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); /* make sure there is input */ if (fp->_r <= 0 && __srefill(fp)) { *lenp = 0; - FUNLOCKFILE(fp); - return (NULL); + ret = NULL; + goto end; } /* look for a newline in the input */ if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) != NULL) { - char *ret; - /* * Found one. Flag buffer as modified to keep fseek from * `optimising' a backward seek, in case the user stomps on @@ -112,8 +111,7 @@ fgetln(FILE *fp, size_t *lenp) fp->_flags |= __SMOD; fp->_r -= len; fp->_p = p; - FUNLOCKFILE(fp); - return (ret); + goto end; } /* @@ -163,12 +161,14 @@ fgetln(FILE *fp, size_t *lenp) #ifdef notdef fp->_lb._base[len] = '\0'; #endif - FUNLOCKFILE(fp); - return ((char *)fp->_lb._base); + ret = (char *)fp->_lb._base; +end: + FUNLOCKFILE_CANCELSAFE(); + return (ret); error: *lenp = 0; /* ??? */ fp->_flags |= __SERR; - FUNLOCKFILE(fp); - return (NULL); /* ??? */ + ret = NULL; + goto end; } Modified: head/lib/libc/stdio/fgets.c ============================================================================== --- head/lib/libc/stdio/fgets.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgets.c Thu Jun 29 14:44:17 2017 (r320472) @@ -53,17 +53,17 @@ char * fgets(char * __restrict buf, int n, FILE * __restrict fp) { size_t len; - char *s; + char *s, *ret; unsigned char *p, *t; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); if (n <= 0) { /* sanity check */ fp->_flags |= __SERR; errno = EINVAL; - FUNLOCKFILE(fp); - return (NULL); + ret = NULL; + goto end; } s = buf; @@ -76,8 +76,8 @@ fgets(char * __restrict buf, int n, FILE * __restrict if (__srefill(fp)) { /* EOF/error: stop with partial or no line */ if (!__sfeof(fp) || s == buf) { - FUNLOCKFILE(fp); - return (NULL); + ret = NULL; + goto end; } break; } @@ -100,8 +100,8 @@ fgets(char * __restrict buf, int n, FILE * __restrict fp->_p = t; (void)memcpy((void *)s, (void *)p, len); s[len] = 0; - FUNLOCKFILE(fp); - return (buf); + ret = buf; + goto end; } fp->_r -= len; fp->_p += len; @@ -110,6 +110,8 @@ fgets(char * __restrict buf, int n, FILE * __restrict n -= len; } *s = 0; - FUNLOCKFILE(fp); - return (buf); + ret = buf; +end: + FUNLOCKFILE_CANCELSAFE(); + return (ret); } Modified: head/lib/libc/stdio/fgetwc.c ============================================================================== --- head/lib/libc/stdio/fgetwc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgetwc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -52,10 +52,10 @@ fgetwc_l(FILE *fp, locale_t locale) wint_t r; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); r = __fgetwc(fp, locale); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (r); } Modified: head/lib/libc/stdio/fgetwln.c ============================================================================== --- head/lib/libc/stdio/fgetwln.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgetwln.c Thu Jun 29 14:44:17 2017 (r320472) @@ -45,13 +45,14 @@ wchar_t *fgetwln_l(FILE * __restrict, size_t *, locale wchar_t * fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { + wchar_t *ret; wint_t wc; size_t len; int savserr; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); savserr = fp->_flags & __SERR; @@ -77,14 +78,16 @@ fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t if (len == 0) goto error; - FUNLOCKFILE(fp); *lenp = len; - return ((wchar_t *)fp->_lb._base); + ret = (wchar_t *)fp->_lb._base; +end: + FUNLOCKFILE_CANCELSAFE(); + return (ret); error: - FUNLOCKFILE(fp); *lenp = 0; - return (NULL); + ret = NULL; + goto end; } wchar_t * Modified: head/lib/libc/stdio/fgetws.c ============================================================================== --- head/lib/libc/stdio/fgetws.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fgetws.c Thu Jun 29 14:44:17 2017 (r320472) @@ -46,14 +46,14 @@ wchar_t * fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t locale) { int sret; - wchar_t *wsp; + wchar_t *wsp, *ret; size_t nconv; const char *src; unsigned char *nl; FIX_LOCALE(locale); struct xlocale_ctype *l = XLOCALE_CTYPE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); if (n <= 0) { @@ -113,12 +113,14 @@ fgetws_l(wchar_t * __restrict ws, int n, FILE * __rest goto error; ok: *wsp = L'\0'; - FUNLOCKFILE(fp); + ret = ws; +end: + FUNLOCKFILE_CANCELSAFE(); return (ws); error: - FUNLOCKFILE(fp); - return (NULL); + ret = NULL; + goto end; } wchar_t * Modified: head/lib/libc/stdio/fputc.c ============================================================================== --- head/lib/libc/stdio/fputc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fputc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -46,10 +46,10 @@ int fputc(int c, FILE *fp) { int retval; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* Orientation set by __sputc() when buffer is full. */ /* ORIENT(fp, -1); */ retval = __sputc(c, fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/fputs.c ============================================================================== --- head/lib/libc/stdio/fputs.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fputs.c Thu Jun 29 14:44:17 2017 (r320472) @@ -59,10 +59,10 @@ fputs(const char * __restrict s, FILE * __restrict fp) uio.uio_resid = iov.iov_len = strlen(s); uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); retval = __sfvwrite(fp, &uio); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); if (retval == 0) return (iov.iov_len > INT_MAX ? INT_MAX : iov.iov_len); return (retval); Modified: head/lib/libc/stdio/fputwc.c ============================================================================== --- head/lib/libc/stdio/fputwc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fputwc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -74,10 +74,10 @@ fputwc_l(wchar_t wc, FILE *fp, locale_t locale) wint_t r; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); r = __fputwc(wc, fp, locale); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (r); } Modified: head/lib/libc/stdio/fputws.c ============================================================================== --- head/lib/libc/stdio/fputws.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fputws.c Thu Jun 29 14:44:17 2017 (r320472) @@ -53,11 +53,13 @@ fputws_l(const wchar_t * __restrict ws, FILE * __restr const wchar_t *wsp; FIX_LOCALE(locale); struct xlocale_ctype *l = XLOCALE_CTYPE(locale); + int ret; - FLOCKFILE(fp); + ret = -1; + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); if (prepwrite(fp) != 0) - goto error; + goto end; uio.uio_iov = &iov; uio.uio_iovcnt = 1; iov.iov_base = buf; @@ -66,17 +68,15 @@ fputws_l(const wchar_t * __restrict ws, FILE * __restr nbytes = l->__wcsnrtombs(buf, &wsp, SIZE_T_MAX, sizeof(buf), &fp->_mbstate); if (nbytes == (size_t)-1) - goto error; + goto end; uio.uio_resid = iov.iov_len = nbytes; if (__sfvwrite(fp, &uio) != 0) - goto error; + goto end; } while (wsp != NULL); - FUNLOCKFILE(fp); - return (0); - -error: - FUNLOCKFILE(fp); - return (-1); + ret = 0; +end: + FUNLOCKFILE_CANCELSAFE(); + return (ret); } int Modified: head/lib/libc/stdio/fread.c ============================================================================== --- head/lib/libc/stdio/fread.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fread.c Thu Jun 29 14:44:17 2017 (r320472) @@ -54,9 +54,9 @@ fread(void * __restrict buf, size_t size, size_t count { size_t ret; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __fread(buf, size, count, fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/freopen.c ============================================================================== --- head/lib/libc/stdio/freopen.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/freopen.c Thu Jun 29 14:44:17 2017 (r320472) @@ -68,7 +68,7 @@ freopen(const char * __restrict file, const char * __r return (NULL); } - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); if (!__sdidinit) __sinit(); @@ -81,24 +81,24 @@ freopen(const char * __restrict file, const char * __r if (file == NULL) { /* See comment below regarding freopen() of closed files. */ if (fp->_flags == 0) { - FUNLOCKFILE(fp); errno = EINVAL; - return (NULL); + fp = NULL; + goto end; } if ((dflags = _fcntl(fp->_file, F_GETFL)) < 0) { sverrno = errno; fclose(fp); - FUNLOCKFILE(fp); errno = sverrno; - return (NULL); + fp = NULL; + goto end; } /* Work around incorrect O_ACCMODE. */ if ((dflags & O_ACCMODE) != O_RDWR && (dflags & (O_ACCMODE | O_EXEC)) != (oflags & O_ACCMODE)) { fclose(fp); - FUNLOCKFILE(fp); errno = EBADF; - return (NULL); + fp = NULL; + goto end; } if (fp->_flags & __SWR) (void) __sflush(fp); @@ -108,9 +108,9 @@ freopen(const char * __restrict file, const char * __r if (_fcntl(fp->_file, F_SETFL, dflags) < 0) { sverrno = errno; fclose(fp); - FUNLOCKFILE(fp); errno = sverrno; - return (NULL); + fp = NULL; + goto end; } } if (oflags & O_TRUNC) @@ -193,9 +193,9 @@ finish: if (isopen) (void) (*fp->_close)(fp->_cookie); fp->_flags = 0; /* set it free */ - FUNLOCKFILE(fp); errno = sverrno; /* restore in case _close clobbered */ - return (NULL); + fp = NULL; + goto end; } /* @@ -221,9 +221,9 @@ finish: */ if (f > SHRT_MAX) { fp->_flags = 0; /* set it free */ - FUNLOCKFILE(fp); errno = EMFILE; - return (NULL); + fp = NULL; + goto end; } fp->_flags = flags; @@ -245,6 +245,7 @@ finish: fp->_flags2 |= __S2OAP; (void) _sseek(fp, (fpos_t)0, SEEK_END); } - FUNLOCKFILE(fp); +end: + FUNLOCKFILE_CANCELSAFE(); return (fp); } Modified: head/lib/libc/stdio/fscanf.c ============================================================================== --- head/lib/libc/stdio/fscanf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fscanf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -56,10 +56,10 @@ fscanf(FILE * __restrict fp, char const * __restrict f va_list ap; va_start(ap, fmt); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __svfscanf(fp, __get_locale(), fmt, ap); va_end(ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } int @@ -70,9 +70,9 @@ fscanf_l(FILE * __restrict fp, locale_t locale, char c FIX_LOCALE(locale); va_start(ap, fmt); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __svfscanf(fp, locale, fmt, ap); va_end(ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/fseek.c ============================================================================== --- head/lib/libc/stdio/fseek.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fseek.c Thu Jun 29 14:44:17 2017 (r320472) @@ -60,9 +60,9 @@ fseek(FILE *fp, long offset, int whence) if (!__sdidinit) __sinit(); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = _fseeko(fp, (off_t)offset, whence, 1); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); if (ret == 0) errno = serrno; return (ret); @@ -78,9 +78,9 @@ fseeko(FILE *fp, off_t offset, int whence) if (!__sdidinit) __sinit(); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = _fseeko(fp, offset, whence, 0); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); if (ret == 0) errno = serrno; return (ret); Modified: head/lib/libc/stdio/fwrite.c ============================================================================== --- head/lib/libc/stdio/fwrite.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/fwrite.c Thu Jun 29 14:44:17 2017 (r320472) @@ -82,7 +82,7 @@ fwrite(const void * __restrict buf, size_t size, size_ uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); /* * The usual case is success (__sfvwrite returns 0); @@ -91,6 +91,6 @@ fwrite(const void * __restrict buf, size_t size, size_ */ if (__sfvwrite(fp, &uio) != 0) count = (n - uio.uio_resid) / size; - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (count); } Modified: head/lib/libc/stdio/getc.c ============================================================================== --- head/lib/libc/stdio/getc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/getc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -49,11 +49,11 @@ int getc(FILE *fp) { int retval; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* Orientation set by __sgetc() when buffer is empty. */ /* ORIENT(fp, -1); */ retval = __sgetc(fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/getchar.c ============================================================================== --- head/lib/libc/stdio/getchar.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/getchar.c Thu Jun 29 14:44:17 2017 (r320472) @@ -52,11 +52,11 @@ int getchar(void) { int retval; - FLOCKFILE(stdin); + FLOCKFILE_CANCELSAFE(stdin); /* Orientation set by __sgetc() when buffer is empty. */ /* ORIENT(stdin, -1); */ retval = __sgetc(stdin); - FUNLOCKFILE(stdin); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/getdelim.c ============================================================================== --- head/lib/libc/stdio/getdelim.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/getdelim.c Thu Jun 29 14:44:17 2017 (r320472) @@ -112,7 +112,7 @@ getdelim(char ** __restrict linep, size_t * __restrict u_char *endp; size_t linelen; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); if (linep == NULL || linecapp == NULL) { @@ -127,9 +127,9 @@ getdelim(char ** __restrict linep, size_t * __restrict /* If fp is at EOF already, we just need space for the NUL. */ if (!__sfeof(fp) || expandtofit(linep, 1, linecapp)) goto error; - FUNLOCKFILE(fp); (*linep)[0] = '\0'; - return (-1); + linelen = -1; + goto end; } linelen = 0; @@ -150,11 +150,12 @@ getdelim(char ** __restrict linep, size_t * __restrict done: /* Invariant: *linep has space for at least linelen+1 bytes. */ (*linep)[linelen] = '\0'; - FUNLOCKFILE(fp); +end: + FUNLOCKFILE_CANCELSAFE(); return (linelen); error: fp->_flags |= __SERR; - FUNLOCKFILE(fp); - return (-1); + linelen = -1; + goto end; } Modified: head/lib/libc/stdio/gets.c ============================================================================== --- head/lib/libc/stdio/gets.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/gets.c Thu Jun 29 14:44:17 2017 (r320472) @@ -50,27 +50,30 @@ char * gets(char *buf) { int c; - char *s; + char *s, *ret; static int warned; static const char w[] = "warning: this program uses gets(), which is unsafe.\n"; - FLOCKFILE(stdin); + FLOCKFILE_CANCELSAFE(stdin); ORIENT(stdin, -1); if (!warned) { (void) _write(STDERR_FILENO, w, sizeof(w) - 1); warned = 1; } - for (s = buf; (c = __sgetc(stdin)) != '\n';) + for (s = buf; (c = __sgetc(stdin)) != '\n'; ) { if (c == EOF) if (s == buf) { - FUNLOCKFILE(stdin); - return (NULL); + ret = NULL; + goto end; } else break; else *s++ = c; + } *s = 0; - FUNLOCKFILE(stdin); - return (buf); + ret = buf; +end: + FUNLOCKFILE_CANCELSAFE(); + return (ret); } Modified: head/lib/libc/stdio/local.h ============================================================================== --- head/lib/libc/stdio/local.h Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/local.h Thu Jun 29 14:44:17 2017 (r320472) @@ -38,6 +38,9 @@ * $FreeBSD$ */ +#ifndef _STDIO_LOCAL_H +#define _STDIO_LOCAL_H + #include /* for off_t */ #include #include @@ -138,3 +141,26 @@ __fgetwc(FILE *fp, locale_t locale) if ((fp)->_orientation == 0) \ (fp)->_orientation = (o); \ } while (0) + +void __stdio_cancel_cleanup(void *); +#define FLOCKFILE_CANCELSAFE(fp) \ + { \ + struct _pthread_cleanup_info __cleanup_info__; \ + if (__isthreaded) { \ + _FLOCKFILE(fp); \ + __pthread_cleanup_push_imp( \ + __stdio_cancel_cleanup, (fp), \ + &__cleanup_info__); \ + } else { \ + __pthread_cleanup_push_imp( \ + __stdio_cancel_cleanup, NULL, \ + &__cleanup_info__); \ + } \ + { +#define FUNLOCKFILE_CANCELSAFE() \ + (void)0; \ + } \ + __pthread_cleanup_pop_imp(1); \ + } + +#endif /* _STDIO_LOCAL_H */ Modified: head/lib/libc/stdio/perror.c ============================================================================== --- head/lib/libc/stdio/perror.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/perror.c Thu Jun 29 14:44:17 2017 (r320472) @@ -67,9 +67,9 @@ perror(const char *s) v++; v->iov_base = "\n"; v->iov_len = 1; - FLOCKFILE(stderr); + FLOCKFILE_CANCELSAFE(stderr); __sflush(stderr); (void)_writev(stderr->_file, iov, (v - iov) + 1); stderr->_flags &= ~__SOFF; - FUNLOCKFILE(stderr); + FUNLOCKFILE_CANCELSAFE(); } Modified: head/lib/libc/stdio/putc.c ============================================================================== --- head/lib/libc/stdio/putc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/putc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -49,11 +49,11 @@ int putc(int c, FILE *fp) { int retval; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* Orientation set by __sputc() when buffer is full. */ /* ORIENT(fp, -1); */ retval = __sputc(c, fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/putchar.c ============================================================================== --- head/lib/libc/stdio/putchar.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/putchar.c Thu Jun 29 14:44:17 2017 (r320472) @@ -54,11 +54,11 @@ putchar(int c) int retval; FILE *so = stdout; - FLOCKFILE(so); + FLOCKFILE_CANCELSAFE(so); /* Orientation set by __sputc() when buffer is full. */ /* ORIENT(so, -1); */ retval = __sputc(c, so); - FUNLOCKFILE(so); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/puts.c ============================================================================== --- head/lib/libc/stdio/puts.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/puts.c Thu Jun 29 14:44:17 2017 (r320472) @@ -62,9 +62,9 @@ puts(char const *s) uio.uio_resid = c + 1; uio.uio_iov = &iov[0]; uio.uio_iovcnt = 2; - FLOCKFILE(stdout); + FLOCKFILE_CANCELSAFE(stdout); ORIENT(stdout, -1); retval = __sfvwrite(stdout, &uio) ? EOF : '\n'; - FUNLOCKFILE(stdout); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/putw.c ============================================================================== --- head/lib/libc/stdio/putw.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/putw.c Thu Jun 29 14:44:17 2017 (r320472) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "fvwrite.h" #include "libc_private.h" +#include "local.h" int putw(int w, FILE *fp) @@ -53,8 +54,8 @@ putw(int w, FILE *fp) uio.uio_resid = iov.iov_len = sizeof(w); uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); retval = __sfvwrite(fp, &uio); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: head/lib/libc/stdio/refill.c ============================================================================== --- head/lib/libc/stdio/refill.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/refill.c Thu Jun 29 14:44:17 2017 (r320472) @@ -53,9 +53,9 @@ lflush(FILE *fp) int ret = 0; if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) { - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __sflush(fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); } return (ret); } Modified: head/lib/libc/stdio/scanf.c ============================================================================== --- head/lib/libc/stdio/scanf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/scanf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -56,9 +56,9 @@ scanf(char const * __restrict fmt, ...) va_list ap; va_start(ap, fmt); - FLOCKFILE(stdin); + FLOCKFILE_CANCELSAFE(stdin); ret = __svfscanf(stdin, __get_locale(), fmt, ap); - FUNLOCKFILE(stdin); + FUNLOCKFILE_CANCELSAFE(); va_end(ap); return (ret); } @@ -70,9 +70,9 @@ scanf_l(locale_t locale, char const * __restrict fmt, FIX_LOCALE(locale); va_start(ap, fmt); - FLOCKFILE(stdin); + FLOCKFILE_CANCELSAFE(stdin); ret = __svfscanf(stdin, locale, fmt, ap); - FUNLOCKFILE(stdin); + FUNLOCKFILE_CANCELSAFE(); va_end(ap); return (ret); } Modified: head/lib/libc/stdio/setvbuf.c ============================================================================== --- head/lib/libc/stdio/setvbuf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/setvbuf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -63,7 +63,7 @@ setvbuf(FILE * __restrict fp, char * __restrict buf, i if ((mode != _IOFBF && mode != _IOLBF) || (int)size < 0) return (EOF); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* * Write current buffer, if any. Discard unread input (including * ungetc data), cancel line buffering, and free old buffer if @@ -115,8 +115,7 @@ nbf: fp->_w = 0; fp->_bf._base = fp->_p = fp->_nbuf; fp->_bf._size = 1; - FUNLOCKFILE(fp); - return (ret); + goto end; } flags |= __SMBF; } @@ -156,6 +155,7 @@ nbf: } __cleanup = _cleanup; - FUNLOCKFILE(fp); +end: + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/stdio.c ============================================================================== --- head/lib/libc/stdio/stdio.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/stdio.c Thu Jun 29 14:44:17 2017 (r320472) @@ -166,3 +166,11 @@ _sseek(FILE *fp, fpos_t offset, int whence) } return (ret); } + +void +__stdio_cancel_cleanup(void * arg) +{ + + if (arg != NULL) + _funlockfile((FILE *)arg); +} Modified: head/lib/libc/stdio/ungetc.c ============================================================================== --- head/lib/libc/stdio/ungetc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/ungetc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -94,10 +94,10 @@ ungetc(int c, FILE *fp) if (!__sdidinit) __sinit(); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); ret = __ungetc(c, fp); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/ungetwc.c ============================================================================== --- head/lib/libc/stdio/ungetwc.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/ungetwc.c Thu Jun 29 14:44:17 2017 (r320472) @@ -76,10 +76,10 @@ ungetwc_l(wint_t wc, FILE *fp, locale_t locale) wint_t r; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); r = __ungetwc(wc, fp, locale); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (r); } Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/vfprintf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -274,14 +274,14 @@ vfprintf_l(FILE * __restrict fp, locale_t locale, cons int ret; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->_file >= 0) ret = __sbprintf(fp, locale, fmt0, ap); else ret = __vfprintf(fp, locale, fmt0, ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } int Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/vfscanf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -443,9 +443,9 @@ __vfscanf(FILE *fp, char const *fmt0, va_list ap) { int ret; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __svfscanf(fp, __get_locale(), fmt0, ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } int @@ -454,9 +454,9 @@ vfscanf_l(FILE *fp, locale_t locale, char const *fmt0, int ret; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ret = __svfscanf(fp, locale, fmt0, ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } Modified: head/lib/libc/stdio/vfwprintf.c ============================================================================== --- head/lib/libc/stdio/vfwprintf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/vfwprintf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -356,14 +356,14 @@ vfwprintf_l(FILE * __restrict fp, locale_t locale, { int ret; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); /* optimise fprintf(stderr) (and other unbuffered Unix files) */ if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && fp->_file >= 0) ret = __sbprintf(fp, locale, fmt0, ap); else ret = __vfwprintf(fp, locale, fmt0, ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } int Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/vfwscanf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -428,10 +428,10 @@ vfwscanf_l(FILE * __restrict fp, locale_t locale, int ret; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); ret = __vfwscanf(fp, locale, fmt, ap); - FUNLOCKFILE(fp); + FUNLOCKFILE_CANCELSAFE(); return (ret); } int Modified: head/lib/libc/stdio/vscanf.c ============================================================================== --- head/lib/libc/stdio/vscanf.c Thu Jun 29 14:40:33 2017 (r320471) +++ head/lib/libc/stdio/vscanf.c Thu Jun 29 14:44:17 2017 (r320472) @@ -54,9 +54,9 @@ vscanf_l(locale_t locale, const char * __restrict fmt, int retval; FIX_LOCALE(locale); - FLOCKFILE(stdin); + FLOCKFILE_CANCELSAFE(stdin); retval = __svfscanf(stdin, locale, fmt, ap); - FUNLOCKFILE(stdin); + FUNLOCKFILE_CANCELSAFE(); return (retval); } int From owner-svn-src-all@freebsd.org Thu Jun 29 16:39:56 2017 Return-Path: Delivered-To: svn-src-all@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 44CC6DA0B5F; Thu, 29 Jun 2017 16:39:56 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 209D665CC8; Thu, 29 Jun 2017 16:39:56 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TGdtrH092611; Thu, 29 Jun 2017 16:39:55 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TGdtQs092610; Thu, 29 Jun 2017 16:39:55 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201706291639.v5TGdtQs092610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Thu, 29 Jun 2017 16:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320473 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 320473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 16:39:56 -0000 Author: swills (ports committer) Date: Thu Jun 29 16:39:55 2017 New Revision: 320473 URL: https://svnweb.freebsd.org/changeset/base/320473 Log: Add hardening menu item for security.bsd.see_jail_proc Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D11283 Modified: head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Thu Jun 29 14:44:17 2017 (r320472) +++ head/usr.sbin/bsdinstall/scripts/hardening Thu Jun 29 16:39:55 2017 (r320473) @@ -38,13 +38,14 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ 0 0 0 \ "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ "1 hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ - "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ - "3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ - "4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ - "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ - "6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ - "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ - "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ + "2 hide_jail" "Hide processes running in jails" ${hide_jail:-off} \ + "3 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ + "4 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ + "5 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ + "6 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ + "7 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ + "8 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ + "9 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ 2>&1 1>&3 ) exec 3>&- @@ -54,6 +55,9 @@ for feature in $FEATURES; do fi if [ "$feature" = "hide_gids" ]; then echo security.bsd.see_other_gids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "hide_jail" ]; then + echo security.bsd.see_jail_proc=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening fi if [ "$feature" = "read_msgbuf" ]; then echo security.bsd.unprivileged_read_msgbuf=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening From owner-svn-src-all@freebsd.org Thu Jun 29 17:29:08 2017 Return-Path: Delivered-To: svn-src-all@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 D799BDA1A77; Thu, 29 Jun 2017 17:29:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9BD1867954; Thu, 29 Jun 2017 17:29:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5THT7cA013036; Thu, 29 Jun 2017 17:29:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5THT7Jg013035; Thu, 29 Jun 2017 17:29:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706291729.v5THT7Jg013035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Jun 2017 17:29:07 +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: r320474 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/10/sys/cam/scsi X-SVN-Commit-Revision: 320474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 17:29:09 -0000 Author: markj Date: Thu Jun 29 17:29:07 2017 New Revision: 320474 URL: https://svnweb.freebsd.org/changeset/base/320474 Log: MFC r320372: Fix a memory leak in ses_get_elm_devnames(). Modified: stable/10/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 16:39:55 2017 (r320473) +++ stable/10/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 17:29:07 2017 (r320474) @@ -2687,10 +2687,11 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devn cam_periph_unlock(enc->periph); sbuf_new(&sb, NULL, len, SBUF_FIXEDLEN); ses_paths_iter(enc, &enc->enc_cache.elm_map[elmdn->elm_idx], - ses_elmdevname_callback, &sb); + ses_elmdevname_callback, &sb); sbuf_finish(&sb); elmdn->elm_names_len = sbuf_len(&sb); copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1); + sbuf_delete(&sb); cam_periph_lock(enc->periph); return (elmdn->elm_names_len > 0 ? 0 : ENODEV); } From owner-svn-src-all@freebsd.org Thu Jun 29 17:34:50 2017 Return-Path: Delivered-To: svn-src-all@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 3E131DA1D9B; Thu, 29 Jun 2017 17:34:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 076DA680B9; Thu, 29 Jun 2017 17:34:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5THYn6Y017098; Thu, 29 Jun 2017 17:34:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5THYnb5017097; Thu, 29 Jun 2017 17:34:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706291734.v5THYnb5017097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 29 Jun 2017 17:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320475 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 320475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 17:34:50 -0000 Author: markj Date: Thu Jun 29 17:34:48 2017 New Revision: 320475 URL: https://svnweb.freebsd.org/changeset/base/320475 Log: MFC r320372: Fix a memory leak in ses_get_elm_devnames(). Approved by: re (gjb) Modified: stable/11/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 17:29:07 2017 (r320474) +++ stable/11/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 17:34:48 2017 (r320475) @@ -2684,10 +2684,11 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devn cam_periph_unlock(enc->periph); sbuf_new(&sb, NULL, len, SBUF_FIXEDLEN); ses_paths_iter(enc, &enc->enc_cache.elm_map[elmdn->elm_idx], - ses_elmdevname_callback, &sb); + ses_elmdevname_callback, &sb); sbuf_finish(&sb); elmdn->elm_names_len = sbuf_len(&sb); copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1); + sbuf_delete(&sb); cam_periph_lock(enc->periph); return (elmdn->elm_names_len > 0 ? 0 : ENODEV); } From owner-svn-src-all@freebsd.org Thu Jun 29 18:07:31 2017 Return-Path: Delivered-To: svn-src-all@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 02710DA246C for ; Thu, 29 Jun 2017 18:07:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (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 AD0956A0C7 for ; Thu, 29 Jun 2017 18:07:30 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x22b.google.com with SMTP id 16so83078067qkg.2 for ; Thu, 29 Jun 2017 11:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wk0rctZMqLhkJ+mUne/WOS00rU5rAAFd9dmIRVmdOqI=; b=UUKXdBImqyPCYEUnzwK6Pfx2mK9TxvY7N748fAOmm/Kw0Sdm8JQliFl5Dr4vVb/sus 4LUDjknHL1ebc54Fd7EdoqHzm8XcEyQHdX/u39peBtGc6RvZDAXt3o6zqgVvbIUpcYdm gnw7fP/OqfqXWnanmih0Sxu/tCf7Kmk1zwdfF9yVZCLbXm6XGbCorWoa7NAWJ8a98xYb M8UFXb8rgB/z0JwPL7CDWiYrhOY+DoPaX+Crq188VcBDnL/pZV4VVp/lhWFFCasQ3om4 0kWLa20UTUtjdrUPoiVBuY2In4ZXxzb3rTu1bIMzpQoqy5dChYkkqXl4wrwCwfW4DnB9 35WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wk0rctZMqLhkJ+mUne/WOS00rU5rAAFd9dmIRVmdOqI=; b=BjrwN1ztKYTs4XLO5EX2fHvrkiKkvK2iGjhhMFXpVkrMu/RZUHg5gXJQ1LVI+3HHwi lLDZh6niAzy3hdCefPKDTqt6/OAaP1d0ZxgBHSmAhg3y8H+Ppxt91uT8SHhnFUrLCdKk ZfFtYPr+KM6PXl3jgP105LSR7x4A42w+kj2GpNlHxV03mGIvD89TCDQrTM+Vb62+iXdD J+fR/vZ0/OWzVi/p0u2VHQfW0pCo4uskixdh20NzFEALnlIsBCnPIeeOkxJY8I7gSxds kBq0qyc4gTIX9FMWkBcHohcnBukVF80lpQU+Vg0fBmh9TOnK1SGy3V2PI2b6DtyxkzQ2 Vxeg== X-Gm-Message-State: AKS2vOzUqzFv0mEeCXf2cxuzKTHpYSrBv4jIWK11sb/W/41SMLRubbJ0 aO44jyFnYmR7X1lxKpqOtA== X-Received: by 10.55.26.104 with SMTP id a101mr21458227qka.202.1498759649729; Thu, 29 Jun 2017 11:07:29 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id k33sm3335589qta.0.2017.06.29.11.07.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2017 11:07:28 -0700 (PDT) Date: Thu, 29 Jun 2017 14:07:28 -0400 From: Shawn Webb To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320430 - head/sys/vm Message-ID: <20170629180728.hqmguafgy4kbrwmq@mutt-hbsd> References: <201706280402.v5S42bQx089187@repo.freebsd.org> <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> <20170629132333.pl6nk5bsw3fkevdx@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="25tzry76bqduxqao" Content-Disposition: inline In-Reply-To: <20170629132333.pl6nk5bsw3fkevdx@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:07:31 -0000 --25tzry76bqduxqao Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2017 at 09:23:33AM -0400, Shawn Webb wrote: > On Wed, Jun 28, 2017 at 06:32:38PM -0400, Shawn Webb wrote: > > On Wed, Jun 28, 2017 at 04:02:37AM +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Wed Jun 28 04:02:36 2017 > > > New Revision: 320430 > > > URL: https://svnweb.freebsd.org/changeset/base/320430 > > >=20 > > > Log: > > > Treat the addr argument for mmap(2) request without MAP_FIXED flag = as > > > a hint. > > > =20 > > > Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted > > > as the absolute minimal address of the range where the mapping is > > > created. The VA allocator only allocates in the range [addr, > > > VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call mig= ht > > > unduly fail if there is no free addresses above addr but a lot of > > > usable space below it. > > > =20 > > > Lift this implementation limitation by allocating VA in two passes. > > > First, try to allocate above addr, as before. If that fails, do the > > > second pass with less restrictive constraints for the start of > > > allocation by specifying minimal allocation address at the max bss > > > end, if this limit is less than addr. > > > =20 > > > One important case where this change makes a difference is the > > > allocation of the stacks for new threads in libthr. Under some > > > configuration conditions, libthr tries to hint kernel to reuse the > > > main thread stack grow area for the new stacks. This cannot work by > > > design now after grow area is converted to stack, and there is no > > > unallocated VA above the main stack. Interpreting requested stack > > > base address as the hint provides compatibility with old libthr and > > > with (mis-)configured current libthr. > > > =20 > > > Reviewed by: alc > > > Tested by: dim (previous version) > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > >=20 > > > Modified: > > > head/sys/vm/vm_map.c > > > head/sys/vm/vm_map.h > > > head/sys/vm/vm_mmap.c > >=20 > > Hey Kostik, > >=20 > > This commit breaks both xorg and shutting down/rebooting. Reverting this > > commit makes my laptop happy again. >=20 > Thnking out loud: would these issues arise due to HardenedBSD using > SafeStack, which relies on libthr's stack code? Here's a somewhat crude and possibly improper fix that makes my laptop happy: http://ix.io/y6z I'm not sure, though, that really fixes the problem or just dances around it. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --25tzry76bqduxqao Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAllVQd0ACgkQaoRlj1JF bu5MgQ/+KmNU5UBxoFLtr4PIN6FvUFy2qvbOWUqTMyChyOI5q5qjiwlGw9tq1l5e OqfyJMnVNBSxGR7JCWhoQ5PFZtgJ0LWpWk3rWlAnu6GBNy6jpZfG1YkUi9ChVNcR /ZzTAsMs8qb4w8MuZTLJSZ0JfcX7mieZ4S8BBMV69PVZQwxJVf8WaGiWh0r+lGhj dc4f8okGuFDLmD8hepaj9IsM6fT1P6yALMrmJBU9yLa9t7MRZ+jdnlv3FJAxaWKh 8PwV19OQaTmWP+MR/Ng31QBl20zuHaTRewgph0SvwWiHcPPRtvzxYNO1MJfUYvTD GIDWwRcOOmPSW4sDEcqnmB1TJRaQJW+rPX56eJg/EaOJCKcleM3tJyATn1y6xmDF Sefd9EwKY2Lo9pTCchKZqQFIBGBy4U3DRKUK5PZBQPsqoA9OG5b84VXeHkR3eEMm 2EO1Kyu8x5I16GKuFaWcL6XJ4934HZ9qcYSEHpW1fpZhEvU7Ta3XGYaQugik/hsJ iqELtqEXi14fEIY9feca80lMho2yJqOlNTiAOp3v5OdXppGib//dbIsveRYbU9rd khno0Rj+3q7yebPOAAIVwIWbV5Botn9BCxiprwQpxq9FT8KEQnLGqvtFrXo2M7cm ziW06Qdn7jQOmZ3bkd/zI+tgSU7tkahhhLGzuQeX53cidZryvxE= =pM5M -----END PGP SIGNATURE----- --25tzry76bqduxqao-- From owner-svn-src-all@freebsd.org Thu Jun 29 18:42:16 2017 Return-Path: Delivered-To: svn-src-all@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 7285CDA2E65; Thu, 29 Jun 2017 18:42:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1C3B96E55E; Thu, 29 Jun 2017 18:42:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TIgFg0046845; Thu, 29 Jun 2017 18:42:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TIgDa6046829; Thu, 29 Jun 2017 18:42:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201706291842.v5TIgDa6046829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 29 Jun 2017 18:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320476 - in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/disassembler source/components/dispatcher source/components/executer source/com... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/disassembler source/components/dispatcher source/components/executer source/components/hardware source/c... X-SVN-Commit-Revision: 320476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:42:16 -0000 Author: jkim Date: Thu Jun 29 18:42:13 2017 New Revision: 320476 URL: https://svnweb.freebsd.org/changeset/base/320476 Log: Import ACPICA 20170629. Added: vendor-sys/acpica/dist/source/compiler/aslparseop.c (contents, props changed) Deleted: vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/changes.txt Thu Jun 29 18:42:13 2017 (r320476) @@ -1,4 +1,204 @@ ---------------------------------------- +29 June 2017. Summary of changes for version 20170629: + + +1) ACPICA kernel-resident subsystem: + +Tables: Implemented a deferred ACPI table verification. This is useful +for operating systems where the tables cannot be verified in the early +initialization stage due to early memory mapping limitations on some +architectures. Lv Zheng. + +Tables: Removed the signature validation for dynamically loaded tables. +Provides compatibility with other ACPI implementations. Previously, only +SSDT tables were allowed, as per the ACPI specification. Now, any table +signature can be used via the Load() operator. Lv Zheng. + +Tables: Fixed several mutex issues that could cause errors during table +acquisition. Lv Zheng. + +Tables: Fixed a problem where an ACPI warning could be generated if a +null pointer was passed to the AcpiPutTable interface. Lv Zheng. + +Tables: Added a mechanism to handle imbalances for the AcpiGetTable and +AcpiPutTable interfaces. This applies to the "late stage" table loading +when the use of AcpiPutTable is no longer required (since the system +memory manager is fully running and available). Lv Zheng. + +Fixed/Reverted a regression during processing of resource descriptors +that contain only a single EndTag. Fixes an AE_AML_NO_RESOURCE_END_TAG +exception in this case. + +Headers: IORT/SMMU support: Updated the SMMU models for Revision C of the +I/O Remapping specification. Robin Murphy + +Interpreter: Fixed a possible fault if an Alias operator with an invalid +or duplicate target is encountered during Alias creation in +AcpiExCreateAlias. Alex James + +Added an option to use designated initializers for function pointers. +Kees Cook + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Allow compilation of External declarations with target pathnames +that refer to existing named objects within the table. Erik Schmauss. + +iASL: Fixed a regression when compiling FieldUnits. Fixes an error if a +FieldUnit name also is declared via External in the same table. Erik +Schmauss. + +iASL: Allow existing scope names within pathnames used in External +statements. For example: + External (ABCD.EFGH) // ABCD exists, but EFGH is truly external + Device (ABCD) + +iASL: IORT ACPI table: Implemented changes required to decode the new +Proximity Domain for the SMMUv3 IORT. Disassembler and Data Table +compiler. Ganapatrao Kulkarni + +Disassembler: Don't abort disassembly on errors from External() +statements. Erik Schmauss. + +Disassembler: fixed a possible fault when one of the Create*Field +operators references a Resource Template. ACPICA Bugzilla 1396. + +iASL: In the source code, resolved some naming inconsistences across the +parsing support. Fixes confusion between "Parse Op" and "Parse Node". +Adds a new file, aslparseop.c + +---------------------------------------- +31 May 2017. Summary of changes for version 20170531: + + +0) ACPI 6.2 support: + +The ACPI specification version 6.2 has been released and is available at +http://uefi.org/specifications + +This version of ACPICA fully supports the ACPI 6.2 specification. Changes +are summarized below. + +New ACPI tables (Table Compiler/Disassembler/Templates): + HMAT (Heterogeneous Memory Attributes Table) + WSMT (Windows SMM Security Mitigation Table) + PPTT (Processor Properties Topology Table) + +New subtables for existing ACPI tables: + HEST (New subtable, Arch-deferred machine check) + SRAT (New subtable, Arch-specific affinity structure) + PCCT (New subtables, Extended PCC subspaces (types 3 and 4)) + +Simple updates for existing ACPI tables: + BGRT (two new flag bits) + HEST (New bit defined for several subtables, GHES_ASSIST) + +New Resource Descriptors and Resource macros (Compiler/Disassembler): + PinConfig() + PinFunction() + PinGroup() + PinGroupConfig() + PinGroupFunction() + New type for hardware error notification (section 18.3.2.9) + +New predefined names/methods (Compiler/Interpreter): + _HMA (Heterogeneous Memory Attributes) + _LSI (Label Storage Information) + _LSR (Label Storage Read) + _LSW (Label Storage Write) + +ASL grammar/macro changes (Compiler): + For() ASL macro, implemented with the AML while operator + Extensions to Concatenate operator + Support for multiple definition blocks in same ASL file + Clarification for Buffer operator + Allow executable AML code underneath all scopes (Devices, etc.) + Clarification/change for the _OSI return value + ASL grammar update for reference operators + Allow a zero-length string for AML filename in DefinitionBlock + +Miscellaneous: + New device object notification value + Remove a notify value (0x0C) for graceful shutdown + New UUIDs for processor/cache properties and + physical package property + New _HID, ACPI0014 (Wireless Power Calibration Device) + + +1) ACPICA kernel-resident subsystem: + +Added support to disable ACPI events on hardware-reduced platforms. +Eliminates error messages of the form "Could not enable fixed event". Lv +Zheng + +Fixed a problem using Device/Thermal objects with the ObjectType and +DerefOf ASL operators. This support had not been fully/properly +implemented. + +Fixed a problem where if a Buffer object containing a resource template +was longer than the actual resource template, an error was generated -- +even though the AML is legal. This case has been seen in the field. + +Fixed a problem with the header definition of the MADT PCAT_COMPAT flag. +The values for DUAL_PIC and MULTIPLE_APIC were reversed. + +Added header file changes for the TPM2 ACPI table. Update to new version +of the TCG specification. Adds a new TPM2 subtable for ARM SMC. + +Exported the external interfaces AcpiAcquireMutex and AcpiReleaseMutex. +These interfaces are intended to be used only in conjunction with the +predefined _DLM method (Device Lock Method). "This object appears in a +device scope when AML access to the device must be synchronized with the +OS environment". + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 143.1K Code, 60.0K Data, 203.1K Total + Debug Version: 204.0K Code, 84.3K Data, 288.3K Total + Previous Release: + Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total + Debug Version: 207.5K Code, 82.7K Data, 290.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem where an External() declaration could not refer to +a Field Unit. Erik Schmauss. + +Disassembler: Improved support for the Switch/Case operators. This +feature will disassemble AML code back to the original Switch operators +when possible, instead of an If..Else sequence. David Box + +iASL and disassembler: Improved the handling of multiple extraneous +parentheses for both ASL input and disassembled ASL output. + +Improved the behavior of the iASL compiler and disassembler to detect +improper use of external declarations + +Disassembler: Now aborts immediately upon detection of an unknown AML +opcode. The AML parser has no real way to recover from this, and can +result in the creation of an ill-formed parse tree that causes errors +later during the disassembly. + +All tools: Fixed a problem where the Unix application OSL did not handle +control-c correctly. For example, a control-c could incorrectly wake the +debugger. + +AcpiExec: Improved the Control-C handling and added a handler for +segmentation faults (SIGSEGV). Supports both Windows and Unix-like +environments. + +Reduced the verbosity of the generic unix makefiles. Previously, each +compilation displayed the full set of compiler options. This has been +eliminated as the options are easily inspected within the makefiles. Each +compilation now results in a single line of output. + +---------------------------------------- 03 March 2017. Summary of changes for version 20170303: Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Jun 29 18:42:13 2017 (r320476) @@ -82,6 +82,7 @@ OBJECTS = \ $(OBJDIR)/asloperands.o\ $(OBJDIR)/aslopt.o\ $(OBJDIR)/asloptions.o\ + $(OBJDIR)/aslparseop.o\ $(OBJDIR)/aslpredef.o\ $(OBJDIR)/aslprepkg.o\ $(OBJDIR)/aslprintf.o\ Modified: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/acfileio.c Thu Jun 29 18:42:13 2017 (r320476) @@ -175,6 +175,36 @@ AcCheckTextModeCorruption ( /******************************************************************************* * + * FUNCTION: AcDeleteTableList + * + * PARAMETERS: ListHead - List to delete + * + * RETURN: Status + * + * DESCRIPTION: Delete a list of tables. This is useful for removing memory + * allocated by AcGetAllTablesFromFile + * + ******************************************************************************/ + +void +AcDeleteTableList ( + ACPI_NEW_TABLE_DESC *ListHead) +{ + ACPI_NEW_TABLE_DESC *Current = ListHead; + ACPI_NEW_TABLE_DESC *Previous = Current; + + + while (Current) + { + Current = Current->Next; + AcpiOsFree (Previous); + Previous = Current; + } +} + + +/******************************************************************************* + * * FUNCTION: AcGetAllTablesFromFile * * PARAMETERS: Filename - Table filename Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Jun 29 18:42:13 2017 (r320476) @@ -408,6 +408,8 @@ Cleanup: ACPI_FREE (Table); } + AcDeleteTableList (ListHead); + if (File) { fclose (File); @@ -748,6 +750,7 @@ AdDoExternalFileList ( continue; } + AcDeleteTableList (ExternalListHead); return (Status); } @@ -761,6 +764,7 @@ AdDoExternalFileList ( { AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", AcpiFormatException (Status)); + AcDeleteTableList (ExternalListHead); return (Status); } @@ -779,6 +783,8 @@ AdDoExternalFileList ( ExternalFileList = ExternalFileList->Next; } + + AcDeleteTableList (ExternalListHead); if (ACPI_FAILURE (GlobalStatus)) { Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/adwalk.c Thu Jun 29 18:42:13 2017 (r320476) @@ -536,11 +536,20 @@ AcpiDmDumpDescending ( case AML_NAME_OP: case AML_METHOD_OP: case AML_DEVICE_OP: + + AcpiOsPrintf ("%4.4s", + ACPI_CAST_PTR (char, &Op->Named.Name)); + break; + case AML_INT_NAMEDFIELD_OP: - AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name)); + AcpiOsPrintf ("%4.4s Length: (bits) %8.8X%8.8X (bytes) %8.8X%8.8X", + ACPI_CAST_PTR (char, &Op->Named.Name), + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer / 8)); break; + default: break; @@ -1070,10 +1079,10 @@ AcpiDmCommonDescendingOp ( { ACPI_STATUS Status; + /* Resource descriptor conversion */ Status = AcpiDmProcessResourceDescriptors (Op, Level, Context); - if (ACPI_FAILURE (Status)) { return (Status); @@ -1082,7 +1091,6 @@ AcpiDmCommonDescendingOp ( /* Switch/Case conversion */ Status = AcpiDmProcessSwitch (Op); - return (AE_OK); } @@ -1113,6 +1121,7 @@ AcpiDmProcessResourceDescriptors ( ACPI_OBJECT_TYPE ObjectType; ACPI_STATUS Status; + WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -1138,7 +1147,6 @@ AcpiDmProcessResourceDescriptors ( * If so, convert the reference into a symbolic reference. */ AcpiDmCheckResourceReference (Op, WalkState); - return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jun 29 18:42:13 2017 (r320476) @@ -474,6 +474,15 @@ AcpiAhMatchPredefinedName ( const AH_PREDEFINED_NAME *Info; + /* Nameseg must start with an underscore */ + + if (*Nameseg != '_') + { + return (NULL); + } + + /* Search for a match in the predefined name table */ + for (Info = AslPredefinedInfo; Info->Name; Info++) { if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jun 29 18:42:13 2017 (r320476) @@ -1838,6 +1838,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] = {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Flags), "Flags (decoded below)", 0}, {ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0}, {ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0}, + {ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0}, {ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0}, @@ -1845,6 +1846,9 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] = {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (PriGsiv), "PRI GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (GerrGsiv), "GERR GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (SyncGsiv), "Sync GSIV", 0}, + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0}, + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0}, + {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0}, ACPI_DMT_TERMINATOR }; Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jun 29 18:42:13 2017 (r320476) @@ -435,13 +435,13 @@ AnCheckMethodReturnValue ( /* Examine the parent op of this method */ OwningOp = Node->Op; - if (OwningOp->Asl.CompileFlags & NODE_METHOD_NO_RETVAL) + if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL) { /* Method NEVER returns a value */ AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName); } - else if (OwningOp->Asl.CompileFlags & NODE_METHOD_SOME_NO_RETVAL) + else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL) { /* Method SOMETIMES returns a value, SOMETIMES not */ Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jun 29 18:42:13 2017 (r320476) @@ -560,7 +560,7 @@ AnGetBtype ( return (ACPI_UINT32_MAX); } - if (ReferencedNode->Asl.CompileFlags & NODE_METHOD_TYPED) + if (ReferencedNode->Asl.CompileFlags & OP_METHOD_TYPED) { ThisNodeBtype = ReferencedNode->Asl.AcpiBtype; } Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jun 29 18:42:13 2017 (r320476) @@ -291,6 +291,8 @@ CgAmlWriteWalk ( /* 19 */ Op->Asl.LogicalLineNumber, /* 20 */ Op->Asl.EndLogicalLine); + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT); + DbgPrint (ASL_TREE_OUTPUT, "\n"); return (AE_OK); } @@ -438,7 +440,7 @@ CgWriteAmlOpcode ( /* Does this opcode have an associated "PackageLength" field? */ - if (Op->Asl.CompileFlags & NODE_AML_PACKAGE) + if (Op->Asl.CompileFlags & OP_AML_PACKAGE) { if (Op->Asl.AmlPkgLenBytes == 1) { Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jun 29 18:42:13 2017 (r320476) @@ -790,17 +790,6 @@ TrAmlTransformWalkEnd ( /* - * asltree - parse tree support - */ -ACPI_STATUS -TrWalkParseTree ( - ACPI_PARSE_OBJECT *Op, - UINT32 Visitation, - ASL_WALK_CALLBACK DescendingCallback, - ASL_WALK_CALLBACK AscendingCallback, - void *Context); - -/* * aslexternal - External opcode support */ ACPI_STATUS @@ -826,103 +815,111 @@ ExDoExternal ( #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) -void -TrSetParent ( - ACPI_PARSE_OBJECT *Op, - ACPI_PARSE_OBJECT *ParentOp); - +/* + * aslparseop.c - Parse op create/allocate/cache + */ ACPI_PARSE_OBJECT * -TrAllocateNode ( - UINT32 ParseOpcode); - -void -TrPrintNodeCompileFlags ( - UINT32 Flags); - -void -TrReleaseNode ( - ACPI_PARSE_OBJECT *Op); - -ACPI_PARSE_OBJECT * -TrUpdateNode ( +TrCreateOp ( UINT32 ParseOpcode, - ACPI_PARSE_OBJECT *Op); - -ACPI_PARSE_OBJECT * -TrCreateNode ( - UINT32 ParseOpcode, UINT32 NumChildren, ...); ACPI_PARSE_OBJECT * -TrCreateLeafNode ( +TrCreateLeafOp ( UINT32 ParseOpcode); ACPI_PARSE_OBJECT * -TrCreateNullTarget ( +TrCreateNullTargetOp ( void); ACPI_PARSE_OBJECT * -TrCreateAssignmentNode ( +TrCreateAssignmentOp ( ACPI_PARSE_OBJECT *Target, ACPI_PARSE_OBJECT *Source); ACPI_PARSE_OBJECT * -TrCreateTargetOperand ( +TrCreateTargetOp ( ACPI_PARSE_OBJECT *OriginalOp, ACPI_PARSE_OBJECT *ParentOp); ACPI_PARSE_OBJECT * -TrCreateValuedLeafNode ( +TrCreateValuedLeafOp ( UINT32 ParseOpcode, UINT64 Value); ACPI_PARSE_OBJECT * -TrCreateConstantLeafNode ( +TrCreateConstantLeafOp ( UINT32 ParseOpcode); ACPI_PARSE_OBJECT * -TrLinkChildren ( - ACPI_PARSE_OBJECT *Op, - UINT32 NumChildren, - ...); +TrAllocateOp ( + UINT32 ParseOpcode); void -TrSetEndLineNumber ( +TrPrintOpFlags ( + UINT32 Flags, + UINT32 OutputLevel); + + +/* + * asltree.c - Parse tree management + */ +void +TrSetOpParent ( + ACPI_PARSE_OBJECT *Op, + ACPI_PARSE_OBJECT *ParentOp); + +ACPI_PARSE_OBJECT * +TrSetOpIntegerValue ( + UINT32 ParseOpcode, ACPI_PARSE_OBJECT *Op); void -TrSetCurrentFilename ( +TrSetOpEndLineNumber ( ACPI_PARSE_OBJECT *Op); void -TrWalkTree ( - void); +TrSetOpCurrentFilename ( + ACPI_PARSE_OBJECT *Op); ACPI_PARSE_OBJECT * -TrLinkPeerNode ( +TrLinkOpChildren ( + ACPI_PARSE_OBJECT *Op, + UINT32 NumChildren, + ...); + +ACPI_PARSE_OBJECT * +TrLinkPeerOp ( ACPI_PARSE_OBJECT *Op1, ACPI_PARSE_OBJECT *Op2); ACPI_PARSE_OBJECT * -TrLinkChildNode ( +TrLinkChildOp ( ACPI_PARSE_OBJECT *Op1, ACPI_PARSE_OBJECT *Op2); ACPI_PARSE_OBJECT * -TrSetNodeFlags ( +TrSetOpFlags ( ACPI_PARSE_OBJECT *Op, UINT32 Flags); ACPI_PARSE_OBJECT * -TrSetNodeAmlLength ( +TrSetOpAmlLength ( ACPI_PARSE_OBJECT *Op, UINT32 Length); ACPI_PARSE_OBJECT * -TrLinkPeerNodes ( +TrLinkPeerOps ( UINT32 NumPeers, ...); + +ACPI_STATUS +TrWalkParseTree ( + ACPI_PARSE_OBJECT *Op, + UINT32 Visitation, + ASL_WALK_CALLBACK DescendingCallback, + ASL_WALK_CALLBACK AscendingCallback, + void *Context); /* Modified: vendor-sys/acpica/dist/source/compiler/aslcstyle.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcstyle.y Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcstyle.y Thu Jun 29 18:42:13 2017 (r320476) @@ -201,59 +201,59 @@ Expression /* Unary operators */ - : PARSEOP_EXP_LOGICAL_NOT {$$ = TrCreateLeafNode (PARSEOP_LNOT);} - TermArg {$$ = TrLinkChildren ($2,1,$3);} - | PARSEOP_EXP_NOT {$$ = TrCreateLeafNode (PARSEOP_NOT);} - TermArg {$$ = TrLinkChildren ($2,2,$3,TrCreateNullTarget ());} + : PARSEOP_EXP_LOGICAL_NOT {$$ = TrCreateLeafOp (PARSEOP_LNOT);} + TermArg {$$ = TrLinkOpChildren ($2,1,$3);} + | PARSEOP_EXP_NOT {$$ = TrCreateLeafOp (PARSEOP_NOT);} + TermArg {$$ = TrLinkOpChildren ($2,2,$3,TrCreateNullTargetOp ());} - | SuperName PARSEOP_EXP_INCREMENT {$$ = TrCreateLeafNode (PARSEOP_INCREMENT);} - {$$ = TrLinkChildren ($3,1,$1);} - | SuperName PARSEOP_EXP_DECREMENT {$$ = TrCreateLeafNode (PARSEOP_DECREMENT);} - {$$ = TrLinkChildren ($3,1,$1);} + | SuperName PARSEOP_EXP_INCREMENT {$$ = TrCreateLeafOp (PARSEOP_INCREMENT);} + {$$ = TrLinkOpChildren ($3,1,$1);} + | SuperName PARSEOP_EXP_DECREMENT {$$ = TrCreateLeafOp (PARSEOP_DECREMENT);} + {$$ = TrLinkOpChildren ($3,1,$1);} /* Binary operators: math and logical */ - | TermArg PARSEOP_EXP_ADD {$$ = TrCreateLeafNode (PARSEOP_ADD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_DIVIDE {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} - TermArg {$$ = TrLinkChildren ($3,4,$1,$4,TrCreateNullTarget (), - TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_MODULO {$$ = TrCreateLeafNode (PARSEOP_MOD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_MULTIPLY {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SHIFT_LEFT {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SHIFT_RIGHT {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SUBTRACT {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} + | TermArg PARSEOP_EXP_ADD {$$ = TrCreateLeafOp (PARSEOP_ADD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_DIVIDE {$$ = TrCreateLeafOp (PARSEOP_DIVIDE);} + TermArg {$$ = TrLinkOpChildren ($3,4,$1,$4,TrCreateNullTargetOp (), + TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_MODULO {$$ = TrCreateLeafOp (PARSEOP_MOD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_MULTIPLY {$$ = TrCreateLeafOp (PARSEOP_MULTIPLY);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SHIFT_LEFT {$$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SHIFT_RIGHT {$$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SUBTRACT {$$ = TrCreateLeafOp (PARSEOP_SUBTRACT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} - | TermArg PARSEOP_EXP_AND {$$ = TrCreateLeafNode (PARSEOP_AND);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_OR {$$ = TrCreateLeafNode (PARSEOP_OR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_XOR {$$ = TrCreateLeafNode (PARSEOP_XOR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} + | TermArg PARSEOP_EXP_AND {$$ = TrCreateLeafOp (PARSEOP_AND);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_OR {$$ = TrCreateLeafOp (PARSEOP_OR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_XOR {$$ = TrCreateLeafOp (PARSEOP_XOR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} - | TermArg PARSEOP_EXP_GREATER {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_GREATER_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LGREATEREQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LESS {$$ = TrCreateLeafNode (PARSEOP_LLESS);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LESS_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LLESSEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_GREATER {$$ = TrCreateLeafOp (PARSEOP_LGREATER);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_GREATER_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LGREATEREQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LESS {$$ = TrCreateLeafOp (PARSEOP_LLESS);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LESS_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LLESSEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_NOT_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LNOTEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_NOT_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LNOTEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LOGICAL_AND {$$ = TrCreateLeafNode (PARSEOP_LAND);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LOGICAL_OR {$$ = TrCreateLeafNode (PARSEOP_LOR);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LOGICAL_AND {$$ = TrCreateLeafOp (PARSEOP_LAND);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LOGICAL_OR {$$ = TrCreateLeafOp (PARSEOP_LOR);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} /* Parentheses */ @@ -280,8 +280,8 @@ IndexExpTerm : SuperName PARSEOP_EXP_INDEX_LEFT TermArg - PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); - TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} + PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafOp (PARSEOP_INDEX); + TrLinkOpChildren ($$,3,$1,$3,TrCreateNullTargetOp ());} ; @@ -304,7 +304,7 @@ EqualsTerm | SuperName PARSEOP_EXP_EQUALS - TermArg {$$ = TrCreateAssignmentNode ($1, $3);} + TermArg {$$ = TrCreateAssignmentOp ($1, $3);} /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */ @@ -312,47 +312,47 @@ EqualsTerm EqualsTerm PARSEOP_CLOSE_PAREN PARSEOP_EXP_EQUALS - TermArg {$$ = TrCreateAssignmentNode ($2, $5);} + TermArg {$$ = TrCreateAssignmentOp ($2, $5);} /* Compound assignments -- Add (operand, operand, target) */ - | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafNode (PARSEOP_ADD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafOp (PARSEOP_ADD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_DIV_EQ {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} - TermArg {$$ = TrLinkChildren ($3,4,$1,$4,TrCreateNullTarget (), - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_DIV_EQ {$$ = TrCreateLeafOp (PARSEOP_DIVIDE);} + TermArg {$$ = TrLinkOpChildren ($3,4,$1,$4,TrCreateNullTargetOp (), + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_MOD_EQ {$$ = TrCreateLeafNode (PARSEOP_MOD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_MOD_EQ {$$ = TrCreateLeafOp (PARSEOP_MOD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_MUL_EQ {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_MUL_EQ {$$ = TrCreateLeafOp (PARSEOP_MULTIPLY);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SHL_EQ {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SHL_EQ {$$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SHR_EQ {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SHR_EQ {$$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SUB_EQ {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SUB_EQ {$$ = TrCreateLeafOp (PARSEOP_SUBTRACT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_AND_EQ {$$ = TrCreateLeafNode (PARSEOP_AND);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_AND_EQ {$$ = TrCreateLeafOp (PARSEOP_AND);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_OR_EQ {$$ = TrCreateLeafNode (PARSEOP_OR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_OR_EQ {$$ = TrCreateLeafOp (PARSEOP_OR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_XOR_EQ {$$ = TrCreateLeafNode (PARSEOP_XOR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_XOR_EQ {$$ = TrCreateLeafOp (PARSEOP_XOR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} ; Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jun 29 18:42:13 2017 (r320476) @@ -290,7 +290,7 @@ #define ASL_PARSE_TREE_DEBUG2 \ " %08X %04X %04X %01X %04X %04X %05X %05X "\ - "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d\n" + "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d" /* * Macros for ASL/ASL+ converter Modified: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Thu Jun 29 18:42:13 2017 (r320476) @@ -202,7 +202,7 @@ ExDoExternal ( /* Create new list node of arbitrary type */ - ListOp = TrAllocateNode (PARSEOP_DEFAULT_ARG); + ListOp = TrAllocateOp (PARSEOP_DEFAULT_ARG); /* Store External node as child */ @@ -266,7 +266,7 @@ ExInsertArgCount ( /* Skip if External node already handled */ - if (Next->Asl.Child->Asl.CompileFlags & NODE_VISITED) + if (Next->Asl.Child->Asl.CompileFlags & OP_VISITED) { Next = Next->Asl.Next; continue; @@ -282,7 +282,7 @@ ExInsertArgCount ( continue; } - Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED; + Next->Asl.Child->Asl.CompileFlags |= OP_VISITED; /* * Since we will reposition Externals to the Root, set Namepath @@ -544,7 +544,7 @@ ExMoveExternals ( Next->Asl.Child->Asl.Next->Asl.Value.Integer; if (ObjType == ACPI_TYPE_METHOD && - !(Next->Asl.CompileFlags & NODE_VISITED)) + !(Next->Asl.CompileFlags & OP_VISITED)) { if (Next == Prev) { @@ -578,12 +578,12 @@ ExMoveExternals ( Gbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF; Gbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP; - Gbl_ExternalsListHead->Asl.CompileFlags = NODE_AML_PACKAGE; + Gbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE; UtSetParseOpName (Gbl_ExternalsListHead); /* Create a Zero op for the If predicate */ - PredicateOp = TrAllocateNode (PARSEOP_ZERO); + PredicateOp = TrAllocateOp (PARSEOP_ZERO); PredicateOp->Asl.AmlOpcode = AML_ZERO_OP; PredicateOp->Asl.Parent = Gbl_ExternalsListHead; Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 29 18:42:13 2017 (r320476) @@ -232,8 +232,8 @@ OpcAmlConstantWalk ( * Only interested in subtrees that could possibly contain * expressions that can be evaluated at this time */ - if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) || - (Op->Asl.CompileFlags & NODE_IS_TARGET)) + if ((!(Op->Asl.CompileFlags & OP_COMPILE_TIME_CONST)) || + (Op->Asl.CompileFlags & OP_IS_TARGET)) { return (AE_OK); } @@ -412,7 +412,7 @@ OpcAmlCheckForConstant ( { /* Error if there is a target operand */ - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL); Status = AE_TYPE; @@ -420,11 +420,11 @@ OpcAmlCheckForConstant ( /* Error if expression cannot be reduced (folded) */ - if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE)) + if (!(NextOp->Asl.CompileFlags & OP_COULD_NOT_REDUCE)) { /* Ensure only one error message per statement */ - NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE; + NextOp->Asl.CompileFlags |= OP_COULD_NOT_REDUCE; DbgPrint (ASL_PARSE_OUTPUT, "**** Could not reduce operands for NAME opcode ****\n"); @@ -441,7 +441,7 @@ OpcAmlCheckForConstant ( /* This is not a 3/4/5 opcode, but maybe can convert to STORE */ - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { DbgPrint (ASL_PARSE_OUTPUT, "**** Valid Target, transform to Store ****\n"); @@ -484,7 +484,7 @@ OpcAmlCheckForConstant ( DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345"); - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { if (Op->Asl.ParseOpcode == PARSEOP_ZERO) { @@ -496,7 +496,7 @@ OpcAmlCheckForConstant ( } } - if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG) + if (Op->Asl.CompileFlags & OP_IS_TERM_ARG) { DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG"); } @@ -505,7 +505,7 @@ CleanupAndExit: /* Dump the node compile flags also */ - TrPrintNodeCompileFlags (Op->Asl.CompileFlags); + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_PARSE_OUTPUT); DbgPrint (ASL_PARSE_OUTPUT, "\n"); return (Status); } @@ -543,7 +543,7 @@ TrSimpleConstantReduction ( /* Allocate a new temporary root for this subtree */ - RootOp = TrAllocateNode (PARSEOP_INTEGER); + RootOp = TrAllocateOp (PARSEOP_INTEGER); if (!RootOp) { return (AE_NO_MEMORY); @@ -654,7 +654,7 @@ TrTransformToStoreOp ( * Create a NULL (zero) target so that we can use the * interpreter to evaluate the expression. */ - NewTarget = TrCreateNullTarget (); + NewTarget = TrCreateNullTargetOp (); NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP; /* Handle one-operand cases (NOT, TOBCD, etc.) */ @@ -670,7 +670,7 @@ TrTransformToStoreOp ( Child2->Asl.Next = NewTarget; NewTarget->Asl.Parent = OriginalTarget->Asl.Parent; - NewParent = TrAllocateNode (PARSEOP_INTEGER); + NewParent = TrAllocateOp (PARSEOP_INTEGER); NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP; OriginalParent = Op->Common.Parent; @@ -799,12 +799,12 @@ TrInstallReducedConstant ( */ Op->Asl.ParseOpcode = PARSEOP_BUFFER; Op->Common.AmlOpcode = AML_BUFFER_OP; - Op->Asl.CompileFlags = NODE_AML_PACKAGE; + Op->Asl.CompileFlags = OP_AML_PACKAGE; UtSetParseOpName (Op); /* Child node is the buffer length */ - LengthOp = TrAllocateNode (PARSEOP_INTEGER); + LengthOp = TrAllocateOp (PARSEOP_INTEGER); LengthOp->Asl.AmlOpcode = AML_DWORD_OP; LengthOp->Asl.Value.Integer = ObjDesc->Buffer.Length; @@ -815,7 +815,7 @@ TrInstallReducedConstant ( /* Next child is the raw buffer data */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 29 18:42:51 2017 Return-Path: Delivered-To: svn-src-all@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 24AC5DA2EC5; Thu, 29 Jun 2017 18:42:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CE2E56E7B2; Thu, 29 Jun 2017 18:42:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TIgnNQ046915; Thu, 29 Jun 2017 18:42:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TIgn9K046914; Thu, 29 Jun 2017 18:42:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201706291842.v5TIgn9K046914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 29 Jun 2017 18:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320477 - vendor-sys/acpica/20170629 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20170629 X-SVN-Commit-Revision: 320477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:42:51 -0000 Author: jkim Date: Thu Jun 29 18:42:49 2017 New Revision: 320477 URL: https://svnweb.freebsd.org/changeset/base/320477 Log: Tag ACPICA 20170629. Added: vendor-sys/acpica/20170629/ - copied from r320476, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Thu Jun 29 18:52:38 2017 Return-Path: Delivered-To: svn-src-all@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 1FE4EDA31BD; Thu, 29 Jun 2017 18:52:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DD8886ED2B; Thu, 29 Jun 2017 18:52:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TIqbnb051043; Thu, 29 Jun 2017 18:52:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TIqajw051039; Thu, 29 Jun 2017 18:52:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201706291852.v5TIqajw051039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 29 Jun 2017 18:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320478 - head/usr.sbin/sesutil X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/sesutil X-SVN-Commit-Revision: 320478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:52:38 -0000 Author: bapt Date: Thu Jun 29 18:52:36 2017 New Revision: 320478 URL: https://svnweb.freebsd.org/changeset/base/320478 Log: Add libxo(3) support to sesutil(8) This is useful to simplify parsing "sesutil map" Submitted by: nikita.kozlov@blade-group.com MFC after: 3 weeks Relnotes: yes Sponsored by: blade Modified: head/usr.sbin/sesutil/Makefile head/usr.sbin/sesutil/eltsub.c head/usr.sbin/sesutil/sesutil.8 head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/Makefile ============================================================================== --- head/usr.sbin/sesutil/Makefile Thu Jun 29 18:42:49 2017 (r320477) +++ head/usr.sbin/sesutil/Makefile Thu Jun 29 18:52:36 2017 (r320478) @@ -4,4 +4,6 @@ PROG= sesutil SRCS= sesutil.c eltsub.c MAN= sesutil.8 +LIBADD= xo + .include Modified: head/usr.sbin/sesutil/eltsub.c ============================================================================== --- head/usr.sbin/sesutil/eltsub.c Thu Jun 29 18:42:49 2017 (r320477) +++ head/usr.sbin/sesutil/eltsub.c Thu Jun 29 18:52:36 2017 (r320478) @@ -39,6 +39,7 @@ #include #include #include +#include #include "eltsub.h" Modified: head/usr.sbin/sesutil/sesutil.8 ============================================================================== --- head/usr.sbin/sesutil/sesutil.8 Thu Jun 29 18:42:49 2017 (r320477) +++ head/usr.sbin/sesutil/sesutil.8 Thu Jun 29 18:52:36 2017 (r320478) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2015 +.Dd June 29, 2017 .Dt SESUTIL 8 .Os .Sh NAME @@ -43,9 +43,11 @@ .Op on | off .Nm .Cm map +.Op Fl -libxo Ar options .Op Fl u Ar /dev/sesN .Nm .Cm status +.Op Fl -libxo Ar options .Op Fl u Ar /dev/sesN .Sh DESCRIPTION The @@ -55,6 +57,12 @@ Services (SES) devices. .Pp List of supported commands: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 .It Cm fault Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off Change the state of the external fault LED associated with .Ar disk . @@ -114,6 +122,8 @@ Turn on the fault LED for a drive bay not associated w .Pp .Dl Nm Cm fault -u /dev/ses2 7 on .Sh SEE ALSO +.Xr libxo 3 , +.Xr xo_parse_args 3 , .Xr ses 4 .Sh HISTORY The Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Thu Jun 29 18:42:49 2017 (r320477) +++ head/usr.sbin/sesutil/sesutil.c Thu Jun 29 18:52:36 2017 (r320478) @@ -46,11 +46,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "eltsub.h" +#define SESUTIL_XO_VERSION "1" + static int encstatus(int argc, char **argv); static int fault(int argc, char **argv); static int locate(int argc, char **argv); @@ -116,7 +119,7 @@ do_led(int fd, unsigned int idx, bool onoff, bool setf o.elm_idx = idx; if (ioctl(fd, ENCIOC_GETELMSTAT, (caddr_t) &o) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; if (setfault) { @@ -133,7 +136,7 @@ do_led(int fd, unsigned int idx, bool onoff, bool setf if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_SETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_SETELMSTAT"); } } @@ -179,7 +182,7 @@ sesled(int argc, char **argv, bool setfault) if (*endptr == '\0') { endptr = strrchr(uflag, '*'); if (endptr != NULL && *endptr == '*') { - warnx("Must specifying a SES device (-u) to use a SES " + xo_warnx("Must specifying a SES device (-u) to use a SES " "id# to identify a disk"); usage(stderr, (setfault ? "fault" : "locate")); } @@ -203,7 +206,7 @@ sesled(int argc, char **argv, bool setfault) if (glob((uflag != NULL ? uflag : "/dev/ses[0-9]*"), 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } ndisks = 0; @@ -219,32 +222,32 @@ sesled(int argc, char **argv, bool setfault) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETNELM"); + xo_err(EXIT_FAILURE, "ENCIOC_GETNELM"); } objp = calloc(nobj, sizeof(encioc_element_t)); if (objp == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) objp) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); } if (isses) { if (sesid > nobj) { close(fd); - errx(EXIT_FAILURE, + xo_errx(EXIT_FAILURE, "Requested SES ID does not exist"); } do_led(fd, sesid, onoff, setfault); @@ -263,7 +266,7 @@ sesled(int argc, char **argv, bool setfault) objdn.elm_devnames = calloc(128, sizeof(char)); if (objdn.elm_devnames == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, (caddr_t) &objdn) <0) { @@ -283,7 +286,7 @@ sesled(int argc, char **argv, bool setfault) } globfree(&g); if (ndisks == 0 && all == false) { - errx(EXIT_FAILURE, "Count not find the SES id of device '%s'", + xo_errx(EXIT_FAILURE, "Count not find the SES id of device '%s'", disk); } @@ -311,11 +314,12 @@ sesutil_print(bool *title, const char *fmt, ...) va_list args; if (!*title) { - printf("\t\tExtra status:\n"); + xo_open_container("extra_status"); + xo_emit("\t\tExtra status:\n"); *title = true; } va_start(args, fmt); - vprintf(fmt, args); + xo_emit_hv(NULL, fmt, args); va_end(args); } @@ -325,48 +329,44 @@ print_extra_status(int eletype, u_char *cstat) bool title = false; if (cstat[0] & 0x40) { - sesutil_print(&title, "\t\t- Predicted Failure\n"); + sesutil_print(&title, "\t\t-{e:predicted_failure/true} Predicted Failure\n"); } if (cstat[0] & 0x20) { - sesutil_print(&title, "\t\t- Disabled\n"); + sesutil_print(&title, "\t\t-{e:disabled/true} Disabled\n"); } if (cstat[0] & 0x10) { - sesutil_print(&title, "\t\t- Swapped\n"); + sesutil_print(&title, "\t\t-{e:swapped/true} Swapped\n"); } switch (eletype) { case ELMTYP_DEVICE: - if (cstat[2] & 0x02) { - sesutil_print(&title, "\t\t- LED=locate\n"); - } - if (cstat[2] & 0x20) { - sesutil_print(&title, "\t\t- LED=fault\n"); - } - break; case ELMTYP_ARRAY_DEV: if (cstat[2] & 0x02) { - sesutil_print(&title, "\t\t- LED=locate\n"); + sesutil_print(&title, "\t\t- LED={q:led/locate}\n"); } if (cstat[2] & 0x20) { - sesutil_print(&title, "\t\t- LED=fault\n"); + sesutil_print(&title, "\t\t- LED={q:led/fault}\n"); } break; case ELMTYP_FAN: - sesutil_print(&title, "\t\t- Speed: %d rpm\n", + sesutil_print(&title, "\t\t- Speed: {:speed/%d}{Uw:rpm}\n", (((0x7 & cstat[1]) << 8) + cstat[2]) * 10); break; case ELMTYP_THERM: if (cstat[2]) { - sesutil_print(&title, "\t\t- Temperature: %d C\n", + sesutil_print(&title, "\t\t- Temperature: {:temperature/%d}{Uw:C}\n", cstat[2] - TEMPERATURE_OFFSET); } else { - sesutil_print(&title, "\t\t- Temperature: -reserved-\n"); + sesutil_print(&title, "\t\t- Temperature: -{q:temperature/reserved}-\n"); } break; case ELMTYP_VOM: - sesutil_print(&title, "\t\t- Voltage: %.2f V\n", + sesutil_print(&title, "\t\t- Voltage: {:voltage/%.2f}{Uw:V}\n", be16dec(cstat + 2) / 100.0); break; } + if (title) { + xo_close_container("extra_status"); + } } static int @@ -390,8 +390,11 @@ objmap(int argc, char **argv __unused) /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } + xo_set_version(SESUTIL_XO_VERSION); + xo_open_container("sesutil"); + xo_open_list("enclosures"); for (i = 0; i < g.gl_pathc; i++) { /* ensure we only got numbers after ses */ if (strspn(g.gl_pathv[i] + 8, "0123456789") != @@ -404,38 +407,40 @@ objmap(int argc, char **argv __unused) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETNELM"); + xo_err(EXIT_FAILURE, "ENCIOC_GETNELM"); } e_ptr = calloc(nobj, sizeof(encioc_element_t)); if (e_ptr == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) e_ptr) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); } - printf("%s:\n", g.gl_pathv[i] + 5); + xo_open_instance("enclosures"); + xo_emit("{t:enc/%s}:\n", g.gl_pathv[i] + 5); stri.bufsiz = sizeof(str); stri.buf = &str[0]; if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) &stri) == 0) - printf("\tEnclosure Name: %s\n", stri.buf); + xo_emit("\tEnclosure Name: {t:name/%s}\n", stri.buf); stri.bufsiz = sizeof(str); stri.buf = &str[0]; if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) &stri) == 0) - printf("\tEnclosure ID: %s\n", stri.buf); + xo_emit("\tEnclosure ID: {t:id/%s}\n", stri.buf); + xo_open_list("elements"); for (j = 0; j < nobj; j++) { /* Get the status of the element */ memset(&e_status, 0, sizeof(e_status)); @@ -443,7 +448,7 @@ objmap(int argc, char **argv __unused) if (ioctl(fd, ENCIOC_GETELMSTAT, (caddr_t) &e_status) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } /* Get the description of the element */ memset(&e_desc, 0, sizeof(e_desc)); @@ -452,12 +457,12 @@ objmap(int argc, char **argv __unused) e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); if (e_desc.elm_desc_str == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDESC, (caddr_t) &e_desc) < 0) { close(fd); - err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); + xo_err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); } /* Get the device name(s) of the element */ memset(&e_devname, 0, sizeof(e_devname)); @@ -466,34 +471,40 @@ objmap(int argc, char **argv __unused) e_devname.elm_devnames = calloc(128, sizeof(char)); if (e_devname.elm_devnames == NULL) { close(fd); - err(EXIT_FAILURE, "calloc()"); + xo_err(EXIT_FAILURE, "calloc()"); } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, (caddr_t) &e_devname) <0) { /* We don't care if this fails */ e_devname.elm_devnames[0] = '\0'; } - printf("\tElement %u, Type: %s\n", e_ptr[j].elm_idx, + xo_open_instance("elements"); + xo_emit("\tElement {:id/%u}, Type: {:type/%s}\n", e_ptr[j].elm_idx, geteltnm(e_ptr[j].elm_type)); - printf("\t\tStatus: %s (0x%02x 0x%02x 0x%02x 0x%02x)\n", + xo_emit("\t\tStatus: {:status/%s} ({q:status_code/0x%02x 0x%02x 0x%02x 0x%02x})\n", scode2ascii(e_status.cstat[0]), e_status.cstat[0], e_status.cstat[1], e_status.cstat[2], e_status.cstat[3]); if (e_desc.elm_desc_len > 0) { - printf("\t\tDescription: %s\n", + xo_emit("\t\tDescription: {:description/%s}\n", e_desc.elm_desc_str); } if (e_devname.elm_names_len > 0) { - printf("\t\tDevice Names: %s\n", + xo_emit("\t\tDevice Names: {:device_names/%s}\n", e_devname.elm_devnames); } print_extra_status(e_ptr[j].elm_type, e_status.cstat); + xo_close_instance("elements"); free(e_devname.elm_devnames); } + xo_close_list("elements"); free(e_ptr); close(fd); } globfree(&g); + xo_close_list("enclosures"); + xo_close_container("sesutil"); + xo_finish(); return (EXIT_SUCCESS); } @@ -514,8 +525,12 @@ encstatus(int argc, char **argv __unused) /* Get the list of ses devices */ if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { globfree(&g); - errx(EXIT_FAILURE, "No SES devices found"); + xo_errx(EXIT_FAILURE, "No SES devices found"); } + + xo_set_version(SESUTIL_XO_VERSION); + xo_open_container("sesutil"); + xo_open_list("enclosures"); for (i = 0; i < g.gl_pathc; i++) { /* ensure we only got numbers after ses */ if (strspn(g.gl_pathv[i] + 8, "0123456789") != @@ -528,56 +543,61 @@ encstatus(int argc, char **argv __unused) * accessing all devices */ if (errno == EACCES && g.gl_pathc > 1) { - err(EXIT_FAILURE, "unable to access SES device"); + xo_err(EXIT_FAILURE, "unable to access SES device"); } - warn("unable to access SES device: %s", g.gl_pathv[i]); + xo_warn("unable to access SES device: %s", g.gl_pathv[i]); continue; } if (ioctl(fd, ENCIOC_GETENCSTAT, (caddr_t) &estat) < 0) { + xo_err(EXIT_FAILURE, "ENCIOC_GETENCSTAT"); close(fd); - err(EXIT_FAILURE, "ENCIOC_GETENCSTAT"); } - printf("%s: ", g.gl_pathv[i] + 5); + xo_open_instance("enclosures"); + xo_emit("{:enc/%s}: ", g.gl_pathv[i] + 5); e = 0; if (estat == 0) { if (status == 0) { status = 1; } - printf("OK"); + xo_emit("{q:status/OK}"); } else { if (estat & SES_ENCSTAT_INFO) { - printf("INFO"); + xo_emit("{lq:status/INFO}"); e++; } if (estat & SES_ENCSTAT_NONCRITICAL) { if (e) - printf(","); - printf("NONCRITICAL"); + xo_emit(","); + xo_emit("{lq:status/NONCRITICAL}"); e++; } if (estat & SES_ENCSTAT_CRITICAL) { if (e) - printf(","); - printf("CRITICAL"); + xo_emit(","); + xo_emit("{lq:status/CRITICAL}"); e++; status = -1; } if (estat & SES_ENCSTAT_UNRECOV) { if (e) - printf(","); - printf("UNRECOV"); + xo_emit(","); + xo_emit("{lq:status/UNRECOV}"); e++; status = -1; } } - printf("\n"); - + xo_close_instance("enclosures"); + xo_emit("\n"); close(fd); } globfree(&g); + xo_close_list("enclosures"); + xo_close_container("sesutil"); + xo_finish(); + if (status == 1) { return (EXIT_SUCCESS); } else { @@ -590,6 +610,10 @@ main(int argc, char **argv) { int i, ch; struct command *cmd = NULL; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); uflag = "/dev/ses[0-9]*"; while ((ch = getopt_long(argc, argv, "u:", NULL, NULL)) != -1) { From owner-svn-src-all@freebsd.org Thu Jun 29 18:56:20 2017 Return-Path: Delivered-To: svn-src-all@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 0528CDA35BE; Thu, 29 Jun 2017 18:56:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D56506F290; Thu, 29 Jun 2017 18:56:19 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 0D0961020D; Thu, 29 Jun 2017 18:56:18 +0000 (UTC) Date: Thu, 29 Jun 2017 20:56:18 +0200 From: Baptiste Daroussin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320478 - head/usr.sbin/sesutil Message-ID: <20170629185618.g5jtpedjfbyl4otr@ivaldir.net> References: <201706291852.v5TIqajw051039@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2xs23zu4nf6jnqsw" Content-Disposition: inline In-Reply-To: <201706291852.v5TIqajw051039@repo.freebsd.org> User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:56:20 -0000 --2xs23zu4nf6jnqsw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2017 at 06:52:36PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Thu Jun 29 18:52:36 2017 > New Revision: 320478 > URL: https://svnweb.freebsd.org/changeset/base/320478 >=20 > Log: > Add libxo(3) support to sesutil(8) > =20 > This is useful to simplify parsing "sesutil map" > =20 > Submitted by: nikita.kozlov@blade-group.com > MFC after: 3 weeks > Relnotes: yes > Sponsored by: blade Reviewed by: Allanjude, bapt Differential revision: https://reviews.freebsd.org/D11372 Bapt --2xs23zu4nf6jnqsw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAllVTU8ACgkQY4mL3PG3 PlqILw//WYuO/6+56t4pziubXHMRvoSKiJNI4+38aKiabAyMLyyidR5I1ZRmL1yN OwiNkoPGNSOizp6WM90IT148tBcRN0TtqI+OoIIXEcDkrEJD/xHyJJgpPMgY+DM0 PKfDD5Xw21hVcsXSOtvjhDdg9P5vjYgvmuu7RXtTEEWCJzlhvJw3LcK7Hwb1XrGJ FhAjZaZR2XOfjqFp/gDkqgER1pl0FVs9TH9PPPcpjgvl0DJm1B3XDoGBvsmi29nw mEKVhSDegKFua8Z78FLQ84NElF7Cm6ueD0ZMUaKwdNJQVEsOQGyNYsSvuFMSlPIa vlo5CHaSf8YTWIeDk4p7kTjscbZBJa0vsBEOmJ7LekEoZvwE+W9dNcQrt99XWRII Bklex1YSi+OT+bToMnXlyVMQlqf/FICnaeDwg+X0UMj+cdwX0xpPcPW1qV32ZLsU rmPmHna7rFfxRW5ZfTFe+qPEWP4aVfLKIMYhuFTV3zwiVt7Z5kP/VNExWF3TC6Nn RSGSo8ACttFxdJBoJHFXfFPBDTRdH7jh2DVj80Pem7xtkNa9dht8TC4qUr5yZaMk fLOavgb+etL3RjVQk0130WP82FlrOKyI+EniTYvf535kOI8jwwBfWbSfdTPjJcVC 02oSqoEfdL/FmK27i4OQTIONw7pV41tJhMY0N84eMqcIxxFi7ZM= =BXFo -----END PGP SIGNATURE----- --2xs23zu4nf6jnqsw-- From owner-svn-src-all@freebsd.org Thu Jun 29 19:06:45 2017 Return-Path: Delivered-To: svn-src-all@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 59971DA3A68; Thu, 29 Jun 2017 19:06:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1CB026F94D; Thu, 29 Jun 2017 19:06:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TJ6iCl055285; Thu, 29 Jun 2017 19:06:44 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TJ6i7Z055282; Thu, 29 Jun 2017 19:06:44 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706291906.v5TJ6i7Z055282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 29 Jun 2017 19:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320479 - in head/sys/netpfil/ipfw: nat64 nptv6 pmod X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys/netpfil/ipfw: nat64 nptv6 pmod X-SVN-Commit-Revision: 320479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 19:06:45 -0000 Author: ae Date: Thu Jun 29 19:06:43 2017 New Revision: 320479 URL: https://svnweb.freebsd.org/changeset/base/320479 Log: Fix IPv6 extension header parsing. The length field doesn't include the first 8 octets. Obtained from: Yandex LLC MFC after: 3 days Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c head/sys/netpfil/ipfw/nptv6/nptv6.c head/sys/netpfil/ipfw/pmod/tcpmod.c Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Jun 29 18:52:36 2017 (r320478) +++ head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Jun 29 19:06:43 2017 (r320479) @@ -1054,7 +1054,7 @@ nat64_getlasthdr(struct mbuf *m, int *offset) if (proto == IPPROTO_HOPOPTS && ip6->ip6_plen == 0) return (-1); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } if (offset != NULL) *offset = hlen; Modified: head/sys/netpfil/ipfw/nptv6/nptv6.c ============================================================================== --- head/sys/netpfil/ipfw/nptv6/nptv6.c Thu Jun 29 18:52:36 2017 (r320478) +++ head/sys/netpfil/ipfw/nptv6/nptv6.c Thu Jun 29 19:06:43 2017 (r320479) @@ -125,7 +125,7 @@ nptv6_getlasthdr(struct nptv6_cfg *cfg, struct mbuf *m if (m->m_len < hlen) return (-1); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } if (offset != NULL) *offset = hlen; Modified: head/sys/netpfil/ipfw/pmod/tcpmod.c ============================================================================== --- head/sys/netpfil/ipfw/pmod/tcpmod.c Thu Jun 29 18:52:36 2017 (r320478) +++ head/sys/netpfil/ipfw/pmod/tcpmod.c Thu Jun 29 19:06:43 2017 (r320479) @@ -137,7 +137,7 @@ tcpmod_ipv6_setmss(struct mbuf **mp, uint16_t mss) proto == IPPROTO_DSTOPTS) { hbh = mtodo(*mp, hlen); proto = hbh->ip6h_nxt; - hlen += hbh->ip6h_len << 3; + hlen += (hbh->ip6h_len + 1) << 3; } tcp = mtodo(*mp, hlen); plen = (*mp)->m_pkthdr.len - hlen; From owner-svn-src-all@freebsd.org Thu Jun 29 19:43:29 2017 Return-Path: Delivered-To: svn-src-all@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 03C35DA47D6; Thu, 29 Jun 2017 19:43:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6DEC0719DD; Thu, 29 Jun 2017 19:43:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TJhRDJ073947; Thu, 29 Jun 2017 19:43:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TJhREN073946; Thu, 29 Jun 2017 19:43:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706291943.v5TJhREN073946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 29 Jun 2017 19:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320480 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 19:43:29 -0000 Author: np Date: Thu Jun 29 19:43:27 2017 New Revision: 320480 URL: https://svnweb.freebsd.org/changeset/base/320480 Log: Adjust sowakeup post-r319685 so that it continues to make upcalls but still avoids calling soconnected during sodisconnected. Discussed with: glebius@ Sponsored by: Chelsio Communications Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Thu Jun 29 19:06:43 2017 (r320479) +++ head/sys/kern/uipc_sockbuf.c Thu Jun 29 19:43:27 2017 (r320480) @@ -322,7 +322,7 @@ sowakeup(struct socket *so, struct sockbuf *sb) wakeup(&sb->sb_acc); } KNOTE_LOCKED(&sb->sb_sel->si_note, 0); - if (sb->sb_upcall != NULL && !(so->so_state & SS_ISDISCONNECTED)) { + if (sb->sb_upcall != NULL) { ret = sb->sb_upcall(so, sb->sb_upcallarg, M_NOWAIT); if (ret == SU_ISCONNECTED) { KASSERT(sb == &so->so_rcv, @@ -334,7 +334,7 @@ sowakeup(struct socket *so, struct sockbuf *sb) if (sb->sb_flags & SB_AIO) sowakeup_aio(so, sb); SOCKBUF_UNLOCK(sb); - if (ret == SU_ISCONNECTED) + if (ret == SU_ISCONNECTED && !(so->so_state & SS_ISDISCONNECTED)) soisconnected(so); if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL) pgsigio(&so->so_sigio, SIGIO, 0); From owner-svn-src-all@freebsd.org Thu Jun 29 21:31:15 2017 Return-Path: Delivered-To: svn-src-all@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 B2A29DA5F1C; Thu, 29 Jun 2017 21:31:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8E90274727; Thu, 29 Jun 2017 21:31:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TLVEuE018307; Thu, 29 Jun 2017 21:31:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TLVEcF018300; Thu, 29 Jun 2017 21:31:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706292131.v5TLVEcF018300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Jun 2017 21:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320481 - in head: sys/compat/freebsd32 sys/kern sys/sys usr.bin/gcore X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sys/compat/freebsd32 sys/kern sys/sys usr.bin/gcore X-SVN-Commit-Revision: 320481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 21:31:15 -0000 Author: jhb Date: Thu Jun 29 21:31:13 2017 New Revision: 320481 URL: https://svnweb.freebsd.org/changeset/base/320481 Log: Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps. Process core notes for a 32-bit process running on a 64-bit host need to use 32-bit structures so that the note layout matches the layout of notes of a core dump of a 32-bit process under a 32-bit kernel. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D11407 Modified: head/sys/compat/freebsd32/freebsd32_signal.h head/sys/kern/imgact_elf.c head/sys/kern/sys_process.c head/sys/sys/ptrace.h head/sys/sys/signal.h head/usr.bin/gcore/elf32core.c head/usr.bin/gcore/elfcore.c Modified: head/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_signal.h Thu Jun 29 19:43:27 2017 (r320480) +++ head/sys/compat/freebsd32/freebsd32_signal.h Thu Jun 29 21:31:13 2017 (r320481) @@ -35,44 +35,6 @@ struct sigaltstack32 { int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ }; -union sigval32 { - int sival_int; - u_int32_t sival_ptr; - /* 6.0 compatibility */ - int sigval_int; - u_int32_t sigval_ptr; -}; - -struct siginfo32 { - int si_signo; /* signal number */ - int si_errno; /* errno association */ - int si_code; /* signal code */ - int32_t si_pid; /* sending process */ - u_int32_t si_uid; /* sender's ruid */ - int si_status; /* exit value */ - u_int32_t si_addr; /* faulting instruction */ - union sigval32 si_value; /* signal value */ - union { - struct { - int _trapno;/* machine specific trap code */ - } _fault; - struct { - int _timerid; - int _overrun; - } _timer; - struct { - int _mqd; - } _mesgq; - struct { - int _band; /* band event for SIGPOLL */ - } _poll; /* was this ever used ? */ - struct { - int __spare1__; - int __spare2__[7]; - } __spare__; - } _reason; -}; - struct osigevent32 { int sigev_notify; /* Notification type */ union { Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu Jun 29 19:43:27 2017 (r320480) +++ head/sys/kern/imgact_elf.c Thu Jun 29 21:31:13 2017 (r320481) @@ -1875,6 +1875,7 @@ __elfN(putnote)(struct note_info *ninfo, struct sbuf * #if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 #include +#include typedef struct prstatus32 elf_prstatus_t; typedef struct prpsinfo32 elf_prpsinfo_t; @@ -2029,13 +2030,17 @@ __elfN(note_ptlwpinfo)(void *arg, struct sbuf *sb, siz struct thread *td; size_t size; int structsize; +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 + struct ptrace_lwpinfo32 pl; +#else struct ptrace_lwpinfo pl; +#endif td = (struct thread *)arg; - size = sizeof(structsize) + sizeof(struct ptrace_lwpinfo); + size = sizeof(structsize) + sizeof(pl); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); - structsize = sizeof(struct ptrace_lwpinfo); + structsize = sizeof(pl); sbuf_bcat(sb, &structsize, sizeof(structsize)); bzero(&pl, sizeof(pl)); pl.pl_lwpid = td->td_tid; @@ -2045,11 +2050,15 @@ __elfN(note_ptlwpinfo)(void *arg, struct sbuf *sb, siz if (td->td_si.si_signo != 0) { pl.pl_event = PL_EVENT_SIGNAL; pl.pl_flags |= PL_FLAG_SI; +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 + siginfo_to_siginfo32(&td->td_si, &pl.pl_siginfo); +#else pl.pl_siginfo = td->td_si; +#endif } strcpy(pl.pl_tdname, td->td_name); /* XXX TODO: supply more information in struct ptrace_lwpinfo*/ - sbuf_bcat(sb, &pl, sizeof(struct ptrace_lwpinfo)); + sbuf_bcat(sb, &pl, sizeof(pl)); } *sizep = size; } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Jun 29 19:43:27 2017 (r320480) +++ head/sys/kern/sys_process.c Thu Jun 29 21:31:13 2017 (r320481) @@ -87,20 +87,6 @@ struct ptrace_vm_entry32 { u_int pve_fsid; uint32_t pve_path; }; - -struct ptrace_lwpinfo32 { - lwpid_t pl_lwpid; /* LWP described. */ - int pl_event; /* Event that stopped the LWP. */ - int pl_flags; /* LWP flags. */ - sigset_t pl_sigmask; /* LWP signal mask */ - sigset_t pl_siglist; /* LWP pending signal */ - struct siginfo32 pl_siginfo; /* siginfo for signal */ - char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ - pid_t pl_child_pid; /* New child pid */ - u_int pl_syscall_code; - u_int pl_syscall_narg; -}; - #endif /* Modified: head/sys/sys/ptrace.h ============================================================================== --- head/sys/sys/ptrace.h Thu Jun 29 19:43:27 2017 (r320480) +++ head/sys/sys/ptrace.h Thu Jun 29 21:31:13 2017 (r320481) @@ -138,6 +138,21 @@ struct ptrace_lwpinfo { u_int pl_syscall_narg; }; +#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) +struct ptrace_lwpinfo32 { + lwpid_t pl_lwpid; /* LWP described. */ + int pl_event; /* Event that stopped the LWP. */ + int pl_flags; /* LWP flags. */ + sigset_t pl_sigmask; /* LWP signal mask */ + sigset_t pl_siglist; /* LWP pending signal */ + struct siginfo32 pl_siginfo; /* siginfo for signal */ + char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ + pid_t pl_child_pid; /* New child pid */ + u_int pl_syscall_code; + u_int pl_syscall_narg; +}; +#endif + /* Argument structure for PT_VM_ENTRY. */ struct ptrace_vm_entry { int pve_entry; /* Entry number used for iteration. */ Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Thu Jun 29 19:43:27 2017 (r320480) +++ head/sys/sys/signal.h Thu Jun 29 21:31:13 2017 (r320481) @@ -174,7 +174,17 @@ union sigval { int sigval_int; void *sigval_ptr; }; + +#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) +union sigval32 { + int sival_int; + uint32_t sival_ptr; + /* 6.0 compatibility */ + int sigval_int; + uint32_t sigval_ptr; +}; #endif +#endif #if __POSIX_VISIBLE >= 199309 @@ -255,6 +265,38 @@ typedef struct __siginfo { #define si_overrun _reason._timer._overrun #define si_mqd _reason._mesgq._mqd #define si_band _reason._poll._band + +#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) +struct siginfo32 { + int si_signo; /* signal number */ + int si_errno; /* errno association */ + int si_code; /* signal code */ + __pid_t si_pid; /* sending process */ + __uid_t si_uid; /* sender's ruid */ + int si_status; /* exit value */ + uint32_t si_addr; /* faulting instruction */ + union sigval32 si_value; /* signal value */ + union { + struct { + int _trapno;/* machine specific trap code */ + } _fault; + struct { + int _timerid; + int _overrun; + } _timer; + struct { + int _mqd; + } _mesgq; + struct { + int32_t _band; /* band event for SIGPOLL */ + } _poll; /* was this ever used ? */ + struct { + int32_t __spare1__; + int __spare2__[7]; + } __spare__; + } _reason; +}; +#endif /** si_code **/ /* codes for SIGILL */ Modified: head/usr.bin/gcore/elf32core.c ============================================================================== --- head/usr.bin/gcore/elf32core.c Thu Jun 29 19:43:27 2017 (r320480) +++ head/usr.bin/gcore/elf32core.c Thu Jun 29 21:31:13 2017 (r320481) @@ -5,6 +5,7 @@ #define __ELF_WORD_SIZE 32 #define _MACHINE_ELF_WANT_32BIT +#define _WANT_LWPINFO32 #include @@ -46,3 +47,42 @@ elf_convert_fpregset(elfcore_fpregset_t *rd, struct fp #error Unsupported architecture #endif } + +static void +elf_convert_siginfo(struct siginfo32 *sid, siginfo_t *sis) +{ + + bzero(sid, sizeof(*sid)); + sid->si_signo = sis->si_signo; + sid->si_errno = sis->si_errno; + sid->si_code = sis->si_code; + sid->si_pid = sis->si_pid; + sid->si_uid = sis->si_uid; + sid->si_status = sis->si_status; + sid->si_addr = (uintptr_t)sis->si_addr; +#if _BYTE_ORDER == _BIG_ENDIAN + if (sis->si_value.sival_int == 0) + sid->si_value.sival_ptr = (uintptr_t)sis->si_value.sival_ptr; + else +#endif + sid->si_value.sival_int = sis->si_value.sival_int; + sid->si_timerid = sis->si_timerid; + sid->si_overrun = sis->si_overrun; +} + +static void +elf_convert_lwpinfo(struct ptrace_lwpinfo32 *pld, struct ptrace_lwpinfo *pls) +{ + + pld->pl_lwpid = pls->pl_lwpid; + pld->pl_event = pls->pl_event; + pld->pl_flags = pls->pl_flags; + pld->pl_sigmask = pls->pl_sigmask; + pld->pl_siglist = pls->pl_siglist; + elf_convert_siginfo(&pld->pl_siginfo, &pls->pl_siginfo); + memcpy(pld->pl_tdname, pls->pl_tdname, sizeof(pld->pl_tdname)); + pld->pl_child_pid = pls->pl_child_pid; + pld->pl_syscall_code = pls->pl_syscall_code; + pld->pl_syscall_narg = pls->pl_syscall_narg; +} + Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Thu Jun 29 19:43:27 2017 (r320480) +++ head/usr.bin/gcore/elfcore.c Thu Jun 29 21:31:13 2017 (r320481) @@ -81,15 +81,20 @@ typedef struct fpreg32 elfcore_fpregset_t; typedef struct reg32 elfcore_gregset_t; typedef struct prpsinfo32 elfcore_prpsinfo_t; typedef struct prstatus32 elfcore_prstatus_t; +typedef struct ptrace_lwpinfo32 elfcore_lwpinfo_t; static void elf_convert_gregset(elfcore_gregset_t *rd, struct reg *rs); static void elf_convert_fpregset(elfcore_fpregset_t *rd, struct fpreg *rs); +static void elf_convert_lwpinfo(struct ptrace_lwpinfo32 *pld, + struct ptrace_lwpinfo *pls); #else typedef fpregset_t elfcore_fpregset_t; typedef gregset_t elfcore_gregset_t; typedef prpsinfo_t elfcore_prpsinfo_t; typedef prstatus_t elfcore_prstatus_t; +typedef struct ptrace_lwpinfo elfcore_lwpinfo_t; #define elf_convert_gregset(d,s) *d = *s #define elf_convert_fpregset(d,s) *d = *s +#define elf_convert_lwpinfo(d,s) *d = *s #endif typedef void* (*notefunc_t)(void *, size_t *); @@ -696,15 +701,18 @@ static void * elf_note_ptlwpinfo(void *arg, size_t *sizep) { lwpid_t tid; + elfcore_lwpinfo_t *elf_info; + struct ptrace_lwpinfo lwpinfo; void *p; tid = *(lwpid_t *)arg; - p = calloc(1, sizeof(int) + sizeof(struct ptrace_lwpinfo)); + p = calloc(1, sizeof(int) + sizeof(elfcore_lwpinfo_t)); if (p == NULL) errx(1, "out of memory"); - *(int *)p = sizeof(struct ptrace_lwpinfo); - ptrace(PT_LWPINFO, tid, - (char *)p + sizeof (int), sizeof(struct ptrace_lwpinfo)); + *(int *)p = sizeof(elfcore_lwpinfo_t); + elf_info = (void *)((int *)p + 1); + ptrace(PT_LWPINFO, tid, (void *)&lwpinfo, sizeof(lwpinfo)); + elf_convert_lwpinfo(elf_info, &lwpinfo); *sizep = sizeof(int) + sizeof(struct ptrace_lwpinfo); return (p); From owner-svn-src-all@freebsd.org Thu Jun 29 22:09:34 2017 Return-Path: Delivered-To: svn-src-all@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 4A515DA67F3; Thu, 29 Jun 2017 22:09:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1788E7572C; Thu, 29 Jun 2017 22:09:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TM9Xck032097; Thu, 29 Jun 2017 22:09:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TM9XHe032096; Thu, 29 Jun 2017 22:09:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706292209.v5TM9XHe032096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 29 Jun 2017 22:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320482 - head/sys/boot/efi/loader/arch/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/boot/efi/loader/arch/arm X-SVN-Commit-Revision: 320482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 22:09:34 -0000 Author: andrew Date: Thu Jun 29 22:09:32 2017 New Revision: 320482 URL: https://svnweb.freebsd.org/changeset/base/320482 Log: As with arm64 mark the EFI PE header as allocated on arm. This is needed for lld to link laoder.efi and boot1.efi. Reported by: emaste Modified: head/sys/boot/efi/loader/arch/arm/start.S Modified: head/sys/boot/efi/loader/arch/arm/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/arm/start.S Thu Jun 29 21:31:13 2017 (r320481) +++ head/sys/boot/efi/loader/arch/arm/start.S Thu Jun 29 22:09:32 2017 (r320482) @@ -42,7 +42,7 @@ #define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 - .section .peheader + .section .peheader,"a" efi_start: /* The MS-DOS Stub, only used to get the offset of the COFF header */ .ascii "MZ" From owner-svn-src-all@freebsd.org Thu Jun 29 23:15:30 2017 Return-Path: Delivered-To: svn-src-all@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 19622DA79DA; Thu, 29 Jun 2017 23:15:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E8B6277561; Thu, 29 Jun 2017 23:15:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TNFTcH060310; Thu, 29 Jun 2017 23:15:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TNFTOp060309; Thu, 29 Jun 2017 23:15:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201706292315.v5TNFTOp060309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 29 Jun 2017 23:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320483 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 320483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 23:15:30 -0000 Author: imp Date: Thu Jun 29 23:15:28 2017 New Revision: 320483 URL: https://svnweb.freebsd.org/changeset/base/320483 Log: Improve wdc error log pulling. After review by the WDC engineers, improve how we pull down the so-called 'e6' logs. The 'c6' logs are obsolete and support for them has been removed because FreeBSD needed to pull them in chunks, which is incompatible with the 0xc6 opcode implementation. Rather than leave the code in place that produces bad log pulls, remove it. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Thu Jun 29 22:09:32 2017 (r320482) +++ head/sbin/nvmecontrol/wdc.c Thu Jun 29 23:15:28 2017 (r320483) @@ -47,36 +47,12 @@ __FBSDID("$FreeBSD$"); #define WDC_NVME_CAP_DIAG_OPCODE 0xe6 #define WDC_NVME_CAP_DIAG_CMD 0x0000 -#define WDC_NVME_DIAG_OPCODE 0xc6 -#define WDC_NVME_DRIVE_LOG_SIZE_CMD 0x0120 -#define WDC_NVME_DRIVE_LOG_CMD 0x0020 -#define WDC_NVME_CRASH_DUMP_SIZE_CMD 0x0320 -#define WDC_NVME_CRASH_DUMP_CMD 0x0420 -#define WDC_NVME_PFAIL_DUMP_SIZE_CMD 0x0520 -#define WDC_NVME_PFAIL_DUMP_CMD 0x0620 - -#define WDC_NVME_CLEAR_DUMP_OPCODE 0xff -#define WDC_NVME_CLEAR_CRASH_DUMP_CMD 0x0503 -#define WDC_NVME_CLEAR_PFAIL_DUMP_CMD 0x0603 - static void wdc_cap_diag(int argc, char *argv[]); -static void wdc_drive_log(int argc, char *argv[]); -static void wdc_get_crash_dump(int argc, char *argv[]); -static void wdc_purge(int argc, char *argv[]); -static void wdc_purge_monitor(int argc, char *argv[]); #define WDC_CAP_DIAG_USAGE "\tnvmecontrol wdc cap-diag [-o path-template]\n" -#define WDC_DRIVE_LOG_USAGE "\tnvmecontrol wdc drive-log [-o path-template]\n" -#define WDC_GET_CRASH_DUMP_USAGE "\tnvmecontrol wdc get-crash-dump [-o path-template]\n" -#define WDC_PURGE_USAGE "\tnvmecontrol wdc purge [-o path-template]\n" -#define WDC_PURGE_MONITOR_USAGE "\tnvmecontrol wdc purge-monitor\n" static struct nvme_function wdc_funcs[] = { {"cap-diag", wdc_cap_diag, WDC_CAP_DIAG_USAGE}, - {"drive-log", wdc_drive_log, WDC_DRIVE_LOG_USAGE}, - {"get-crash-dump", wdc_get_crash_dump, WDC_GET_CRASH_DUMP_USAGE}, - {"purge", wdc_purge, WDC_PURGE_USAGE}, - {"purge_monitor", wdc_purge_monitor, WDC_PURGE_MONITOR_USAGE}, {NULL, NULL, NULL}, }; @@ -123,8 +99,9 @@ wdc_get_data(int fd, uint32_t opcode, uint32_t len, ui static void wdc_do_dump(int fd, char *tmpl, const char *suffix, uint32_t opcode, - uint32_t size_cmd, uint32_t cmd, int len_off) + uint32_t cmd, int len_off) { + int first; int fd2; uint8_t *buf; uint32_t len, offset; @@ -132,52 +109,49 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); - buf = aligned_alloc(PAGE_SIZE, WDC_NVME_TOC_SIZE); - if (buf == NULL) - errx(1, "Can't get buffer to get size"); - wdc_get_data(fd, opcode, WDC_NVME_TOC_SIZE, - 0, size_cmd, buf, WDC_NVME_TOC_SIZE); - len = be32dec(buf + len_off); - - if (len == 0) - errx(1, "No data for %s", suffix); - - printf("Dumping %d bytes to %s\n", len, tmpl); /* XXX overwrite protection? */ - fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC); + fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd2 < 0) err(1, "open %s", tmpl); - offset = 0; buf = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE); if (buf == NULL) errx(1, "Can't get buffer to read dump"); - while (len > 0) { + offset = 0; + len = NVME_MAX_XFER_SIZE; + first = 1; + + do { resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); + + if (first) { + len = be32dec(buf + len_off); + if (len == 0) + errx(1, "No data for %s", suffix); + if (memcmp("E6LG", buf, 4) != 0) + printf("Expected header of E6LG, found '%4.4s' instead\n", + buf); + printf("Dumping %d bytes of version %d.%d log to %s\n", len, + buf[8], buf[9], tmpl); + /* + * Adjust amount to dump if total dump < 1MB, + * though it likely doesn't matter to the WDC + * analysis tools. + */ + if (resid > len) + resid = len; + first = 0; + } if (write(fd2, buf, resid) != resid) err(1, "write"); offset += resid; len -= resid; - } + } while (len > 0); free(buf); close(fd2); } static void -wdc_do_clear_dump(int fd, uint32_t opcode, uint32_t cmd) -{ - struct nvme_pt_command pt; - - memset(&pt, 0, sizeof(pt)); - pt.cmd.opc = opcode; - pt.cmd.cdw12 = cmd; - if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) - err(1, "wdc_do_clear_dump request failed"); - if (nvme_completion_is_error(&pt.cpl)) - errx(1, "wdc_do_clear_dump request returned error"); -} - -static void wdc_cap_diag_usage(void) { fprintf(stderr, "usage:\n"); @@ -207,131 +181,11 @@ wdc_cap_diag(int argc, char *argv[]) open_dev(argv[optind], &fd, 1, 1); wdc_do_dump(fd, path_tmpl, "cap_diag", WDC_NVME_CAP_DIAG_OPCODE, - WDC_NVME_CAP_DIAG_CMD, WDC_NVME_CAP_DIAG_CMD, 4); + WDC_NVME_CAP_DIAG_CMD, 4); close(fd); exit(1); -} - -static void -wdc_drive_log_usage(void) -{ - fprintf(stderr, "usage:\n"); - fprintf(stderr, WDC_DRIVE_LOG_USAGE); - exit(1); -} - -static void -wdc_drive_log(int argc, char *argv[]) -{ - char path_tmpl[MAXPATHLEN]; - int ch, fd; - - path_tmpl[0] = '\0'; - while ((ch = getopt(argc, argv, "o:")) != -1) { - switch ((char)ch) { - case 'o': - strlcpy(path_tmpl, optarg, MAXPATHLEN); - break; - default: - wdc_drive_log_usage(); - } - } - /* Check that a controller was specified. */ - if (optind >= argc) - wdc_drive_log_usage(); - open_dev(argv[optind], &fd, 1, 1); - - wdc_do_dump(fd, path_tmpl, "drive_log", WDC_NVME_DIAG_OPCODE, - WDC_NVME_DRIVE_LOG_SIZE_CMD, WDC_NVME_DRIVE_LOG_CMD, 0); - - close(fd); - - exit(1); -} - -static void -wdc_get_crash_dump_usage(void) -{ - fprintf(stderr, "usage:\n"); - fprintf(stderr, WDC_CAP_DIAG_USAGE); - exit(1); -} - -static void -wdc_get_crash_dump(int argc, char *argv[]) -{ - char path_tmpl[MAXPATHLEN]; - int ch, fd; - - while ((ch = getopt(argc, argv, "o:")) != -1) { - switch ((char)ch) { - case 'o': - strlcpy(path_tmpl, optarg, MAXPATHLEN); - break; - default: - wdc_get_crash_dump_usage(); - } - } - /* Check that a controller was specified. */ - if (optind >= argc) - wdc_get_crash_dump_usage(); - open_dev(argv[optind], &fd, 1, 1); - - wdc_do_dump(fd, path_tmpl, "crash_dump", WDC_NVME_DIAG_OPCODE, - WDC_NVME_CRASH_DUMP_SIZE_CMD, WDC_NVME_CRASH_DUMP_CMD, 0); - wdc_do_clear_dump(fd, WDC_NVME_CLEAR_DUMP_OPCODE, - WDC_NVME_CLEAR_CRASH_DUMP_CMD); -// wdc_led_beacon_disable(fd); - wdc_do_dump(fd, path_tmpl, "pfail_dump", WDC_NVME_DIAG_OPCODE, - WDC_NVME_PFAIL_DUMP_SIZE_CMD, WDC_NVME_PFAIL_DUMP_CMD, 0); - wdc_do_clear_dump(fd, WDC_NVME_CLEAR_DUMP_OPCODE, - WDC_NVME_CLEAR_PFAIL_DUMP_CMD); - - close(fd); - - exit(1); -} - -static void -wdc_purge(int argc, char *argv[]) -{ - char path_tmpl[MAXPATHLEN]; - int ch; - - while ((ch = getopt(argc, argv, "o:")) != -1) { - switch ((char)ch) { - case 'o': - strlcpy(path_tmpl, optarg, MAXPATHLEN); - break; - default: - wdc_cap_diag_usage(); - } - } - - printf("purge has not been implemented.\n"); - exit(1); -} - -static void -wdc_purge_monitor(int argc, char *argv[]) -{ - char path_tmpl[MAXPATHLEN]; - int ch; - - while ((ch = getopt(argc, argv, "o:")) != -1) { - switch ((char)ch) { - case 'o': - strlcpy(path_tmpl, optarg, MAXPATHLEN); - break; - default: - wdc_cap_diag_usage(); - } - } - - printf("purge has not been implemented.\n"); - exit(1); } void From owner-svn-src-all@freebsd.org Thu Jun 29 23:35:56 2017 Return-Path: Delivered-To: svn-src-all@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 E9907DA80D8; Thu, 29 Jun 2017 23:35:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 ADCA977F55; Thu, 29 Jun 2017 23:35:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TNZt4O068402; Thu, 29 Jun 2017 23:35:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TNZtvl068401; Thu, 29 Jun 2017 23:35:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706292335.v5TNZtvl068401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 29 Jun 2017 23:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r320484 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 320484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 23:35:57 -0000 Author: gjb Date: Thu Jun 29 23:35:55 2017 New Revision: 320484 URL: https://svnweb.freebsd.org/changeset/base/320484 Log: Require explicit re@ approval for commits to releng/11.1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Thu Jun 29 23:15:28 2017 (r320483) +++ svnadmin/conf/approvers Thu Jun 29 23:35:55 2017 (r320484) @@ -20,6 +20,7 @@ ^stable/11/ re #^stable/10/ re ^release/ re +^releng/11.1/ re ^releng/11.0/ (security-officer|so) ^releng/10.[0-3]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) From owner-svn-src-all@freebsd.org Thu Jun 29 23:56:51 2017 Return-Path: Delivered-To: svn-src-all@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 C1614DA84F9; Thu, 29 Jun 2017 23:56:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 862A3787C6; Thu, 29 Jun 2017 23:56:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TNuoL5076761; Thu, 29 Jun 2017 23:56:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TNuojd076759; Thu, 29 Jun 2017 23:56:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706292356.v5TNuojd076759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 29 Jun 2017 23:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r320486 - in releng/11.1/sys: conf sys X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in releng/11.1/sys: conf sys X-SVN-Commit-Revision: 320486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 23:56:51 -0000 Author: gjb Date: Thu Jun 29 23:56:50 2017 New Revision: 320486 URL: https://svnweb.freebsd.org/changeset/base/320486 Log: - Copy stable/11@r320475 to releng/11.1 as part of the 11.1-RELEASE cycle. - Prune svn:mergeinfo from the new branch. - Bump __FreeBSD_version. - Rename releng/11.1 to RC1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: - copied from r320475, stable/11/ Directory Properties: releng/11.1/ (props changed) Modified: releng/11.1/sys/conf/newvers.sh releng/11.1/sys/sys/param.h Modified: releng/11.1/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 29 17:34:48 2017 (r320475) +++ releng/11.1/sys/conf/newvers.sh Thu Jun 29 23:56:50 2017 (r320486) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.1/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Jun 29 17:34:48 2017 (r320475) +++ releng/11.1/sys/sys/param.h Thu Jun 29 23:56:50 2017 (r320486) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1101000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Thu Jun 29 23:57:36 2017 Return-Path: Delivered-To: svn-src-all@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 E26E4DA875C; Thu, 29 Jun 2017 23:57:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B1BF3788FC; Thu, 29 Jun 2017 23:57:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TNvZKC076831; Thu, 29 Jun 2017 23:57:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TNvZxe076829; Thu, 29 Jun 2017 23:57:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706292357.v5TNvZxe076829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 29 Jun 2017 23:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320487 - in stable/11/sys: conf sys X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/sys: conf sys X-SVN-Commit-Revision: 320487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 23:57:37 -0000 Author: gjb Date: Thu Jun 29 23:57:35 2017 New Revision: 320487 URL: https://svnweb.freebsd.org/changeset/base/320487 Log: - Update stable/11 to 11.1-PRERELEASE for the duration of the 11.1-RELEASE cycle. - Reset __FreeBSD_version for 11.1-STABLE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh stable/11/sys/sys/param.h Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 29 23:56:50 2017 (r320486) +++ stable/11/sys/conf/newvers.sh Thu Jun 29 23:57:35 2017 (r320487) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="BETA3" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Jun 29 23:56:50 2017 (r320486) +++ stable/11/sys/sys/param.h Thu Jun 29 23:57:35 2017 (r320487) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1101500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Jun 30 00:20:49 2017 Return-Path: Delivered-To: svn-src-all@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 BE757DA8D55; Fri, 30 Jun 2017 00:20:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 89059793C0; Fri, 30 Jun 2017 00:20:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U0KmoF088478; Fri, 30 Jun 2017 00:20:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U0KmX4088477; Fri, 30 Jun 2017 00:20:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706300020.v5U0KmX4088477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 30 Jun 2017 00:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320488 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 320488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 00:20:49 -0000 Author: gjb Date: Fri Jun 30 00:20:48 2017 New Revision: 320488 URL: https://svnweb.freebsd.org/changeset/base/320488 Log: Correct the branch naming convention in param.h. While here, consistently use upper-case 'X' to represent the version number. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Jun 29 23:57:35 2017 (r320487) +++ head/sys/sys/param.h Fri Jun 30 00:20:48 2017 (r320488) @@ -54,7 +54,7 @@ * * scheme is: Rxx * 'R' is in the range 0 to 4 if this is a release branch or - * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is + * X.0-CURRENT before releng/X.0 is created, otherwise 'R' is * in the range 5 to 9. */ #undef __FreeBSD_version From owner-svn-src-all@freebsd.org Fri Jun 30 02:11:33 2017 Return-Path: Delivered-To: svn-src-all@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 80D71DAA6CD; Fri, 30 Jun 2017 02:11:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 459A87BDFB; Fri, 30 Jun 2017 02:11:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U2BW3N044121; Fri, 30 Jun 2017 02:11:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U2BWtt044120; Fri, 30 Jun 2017 02:11:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706300211.v5U2BWtt044120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 30 Jun 2017 02:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320489 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 320489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 02:11:33 -0000 Author: jhibbits Date: Fri Jun 30 02:11:32 2017 New Revision: 320489 URL: https://svnweb.freebsd.org/changeset/base/320489 Log: Use the more common Book-E idiom for disabling interrupts. Book-E has the wrteei/wrtee instructions for writing the PSL_EE bit, ignoring all others. Use this instead of the AIM-typical mtmsr. MFC with: r320392 Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri Jun 30 00:20:48 2017 (r320488) +++ head/sys/powerpc/booke/pmap.c Fri Jun 30 02:11:32 2017 (r320489) @@ -3818,7 +3818,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) KASSERT((entry != NULL), ("%s(): Entry is NULL!", __func__)); msr = mfmsr(); - mtmsr(msr & ~PSL_EE); + __asm __volatile("wrteei 0"); mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(slot); mtspr(SPR_MAS0, mas0); @@ -3865,7 +3865,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx) //debugf("tlb1_write_entry: mas0 = 0x%08x\n", mas0); msr = mfmsr(); - mtmsr(msr & ~PSL_EE); + __asm __volatile("wrteei 0"); mtspr(SPR_MAS0, mas0); __asm __volatile("isync"); From owner-svn-src-all@freebsd.org Fri Jun 30 03:01:23 2017 Return-Path: Delivered-To: svn-src-all@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 858F9D8668C; Fri, 30 Jun 2017 03:01:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 527917D15F; Fri, 30 Jun 2017 03:01:23 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U31Msi064973; Fri, 30 Jun 2017 03:01:22 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U31MFE064972; Fri, 30 Jun 2017 03:01:22 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201706300301.v5U31MFE064972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 30 Jun 2017 03:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320490 - head/sys/dev/hyperv/input X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/input X-SVN-Commit-Revision: 320490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 03:01:23 -0000 Author: sephe Date: Fri Jun 30 03:01:22 2017 New Revision: 320490 URL: https://svnweb.freebsd.org/changeset/base/320490 Log: hyperv/input: Remove unnecessary inclusion. The unbreaks gcc compilation. Submitted by: Ryan Libby MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11415 Modified: head/sys/dev/hyperv/input/hv_kbdc.c Modified: head/sys/dev/hyperv/input/hv_kbdc.c ============================================================================== --- head/sys/dev/hyperv/input/hv_kbdc.c Fri Jun 30 02:11:32 2017 (r320489) +++ head/sys/dev/hyperv/input/hv_kbdc.c Fri Jun 30 03:01:22 2017 (r320490) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-all@freebsd.org Fri Jun 30 05:49:13 2017 Return-Path: Delivered-To: svn-src-all@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 48D13D88F80; Fri, 30 Jun 2017 05:49:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1761780F0F; Fri, 30 Jun 2017 05:49:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U5nClY032564; Fri, 30 Jun 2017 05:49:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U5nCVc032562; Fri, 30 Jun 2017 05:49:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706300549.v5U5nCVc032562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 30 Jun 2017 05:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320491 - in head: contrib/atf/atf-sh libexec/atf/atf-sh X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: contrib/atf/atf-sh libexec/atf/atf-sh X-SVN-Commit-Revision: 320491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 05:49:13 -0000 Author: ngie Date: Fri Jun 30 05:49:12 2017 New Revision: 320491 URL: https://svnweb.freebsd.org/changeset/base/320491 Log: atf-sh(3): document atf_init_test_cases(3) fully The function was missing from the NAME/SYNOPSIS sections. Add a manpage link to complete the documentation reference. MFC after: 1 month Modified: head/contrib/atf/atf-sh/atf-sh.3 head/libexec/atf/atf-sh/Makefile Modified: head/contrib/atf/atf-sh/atf-sh.3 ============================================================================== --- head/contrib/atf/atf-sh/atf-sh.3 Fri Jun 30 03:01:22 2017 (r320490) +++ head/contrib/atf/atf-sh/atf-sh.3 Fri Jun 30 05:49:12 2017 (r320491) @@ -40,6 +40,7 @@ .Nm atf_fail , .Nm atf_get , .Nm atf_get_srcdir , +.Nm atf_init_test_cases , .Nm atf_pass , .Nm atf_require_prog , .Nm atf_set , @@ -82,6 +83,8 @@ .Nm atf_get .Qq var_name .Nm atf_get_srcdir +.Nm atf_init_test_cases +.Qq name .Nm atf_pass .Nm atf_require_prog .Qq prog_name Modified: head/libexec/atf/atf-sh/Makefile ============================================================================== --- head/libexec/atf/atf-sh/Makefile Fri Jun 30 03:01:22 2017 (r320490) +++ head/libexec/atf/atf-sh/Makefile Fri Jun 30 05:49:12 2017 (r320491) @@ -52,6 +52,7 @@ MLINKS+= \ atf-sh.3 atf_fail.3 \ atf-sh.3 atf_get.3 \ atf-sh.3 atf_get_srcdir.3 \ + atf-sh.3 atf_init_test_cases.3 \ atf-sh.3 atf_pass.3 \ atf-sh.3 atf_require_prog.3 \ atf-sh.3 atf_set.3 \ From owner-svn-src-all@freebsd.org Fri Jun 30 06:10:20 2017 Return-Path: Delivered-To: svn-src-all@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 F3871D89427; Fri, 30 Jun 2017 06:10:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BFE16817E3; Fri, 30 Jun 2017 06:10:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U6AIiK040763; Fri, 30 Jun 2017 06:10:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U6AI0e040762; Fri, 30 Jun 2017 06:10:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706300610.v5U6AI0e040762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Jun 2017 06:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320492 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 320492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 06:10:20 -0000 Author: mav Date: Fri Jun 30 06:10:18 2017 New Revision: 320492 URL: https://svnweb.freebsd.org/changeset/base/320492 Log: Polish target_id/target_lun setting for ATIOs/INOTs. For ATIOs it is pointless to report isp_loopid to CAM, since in other places it operates with port database record IDs, not with loop IDs. For INOTs target_id/target_lun seems were never set, so wildcard INOTs probably were not working correctly when LUN IDs were important. Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Jun 30 05:49:12 2017 (r320491) +++ head/sys/dev/isp/isp_freebsd.c Fri Jun 30 06:10:18 2017 (r320492) @@ -1608,7 +1608,7 @@ isp_target_putback_atio(union ccb *ccb) } at->at_status = CT_OK; at->at_rxid = cso->tag_id; - at->at_iid = cso->ccb_h.target_id; + at->at_iid = cso->init_id; if (isp_target_put_entry(isp, at)) { callout_reset(&PISP_PCMD(ccb)->wdog, 10, isp_refire_putback_atio, ccb); @@ -1693,7 +1693,7 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); - atiop->ccb_h.target_id = fcp->isp_loopid; + atiop->ccb_h.target_id = ISP_MAX_TARGETS(isp); atiop->ccb_h.target_lun = lun; /* @@ -1872,7 +1872,7 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->init_id = FC_PORTDB_TGT(isp, chan, lp); - atiop->ccb_h.target_id = FCPARAM(isp, chan)->isp_loopid; + atiop->ccb_h.target_id = ISP_MAX_TARGETS(isp); atiop->ccb_h.target_lun = lun; atiop->sense_len = 0; cdbxlen = aep->at_cmnd.fcp_cmnd_alen_datadir >> FCP_CMND_ADDTL_CDBLEN_SHIFT; @@ -2357,6 +2357,8 @@ isp_handle_platform_target_tmf(ispsoftc_t *isp, isp_no goto bad; } + inot->ccb_h.target_id = ISP_MAX_TARGETS(isp); + inot->ccb_h.target_lun = lun; if (isp_find_pdb_by_portid(isp, notify->nt_channel, notify->nt_sid, &lp) == 0 && isp_find_pdb_by_handle(isp, notify->nt_channel, notify->nt_nphdl, &lp) == 0) { inot->initiator_id = CAM_TARGET_WILDCARD; From owner-svn-src-all@freebsd.org Fri Jun 30 06:34:50 2017 Return-Path: Delivered-To: svn-src-all@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 6D568D89B67; Fri, 30 Jun 2017 06:34:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 39DCD8230A; Fri, 30 Jun 2017 06:34:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U6YnB3052951; Fri, 30 Jun 2017 06:34:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U6YngS052950; Fri, 30 Jun 2017 06:34:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706300634.v5U6YngS052950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Jun 2017 06:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320493 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 320493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 06:34:50 -0000 Author: mav Date: Fri Jun 30 06:34:49 2017 New Revision: 320493 URL: https://svnweb.freebsd.org/changeset/base/320493 Log: Unify INOT/ATIO setup. Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jun 30 06:10:18 2017 (r320492) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jun 30 06:34:49 2017 (r320493) @@ -523,7 +523,7 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->atio_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; new_ccb->ccb_h.cbfcnp = ctlfedone; new_ccb->ccb_h.flags |= CAM_UNLOCKED; @@ -570,7 +570,7 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->inot_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; new_ccb->ccb_h.cbfcnp = ctlfedone; new_ccb->ccb_h.flags |= CAM_UNLOCKED; @@ -1003,10 +1003,7 @@ ctlfe_requeue_ccb(struct cam_periph *periph, union ccb * target/lun. Reset the target and LUN fields back to the wildcard * values before we send them back down to the SIM. */ - if (softc->flags & CTLFE_LUN_WILDCARD) { - ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; - } + xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); xpt_action(ccb); } From owner-svn-src-all@freebsd.org Fri Jun 30 07:04:11 2017 Return-Path: Delivered-To: svn-src-all@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 C921DD8A0BA; Fri, 30 Jun 2017 07:04:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8AC2082CE8; Fri, 30 Jun 2017 07:04:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U74A7m065340; Fri, 30 Jun 2017 07:04:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U74ABh065339; Fri, 30 Jun 2017 07:04:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706300704.v5U74ABh065339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 30 Jun 2017 07:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320494 - head/lib/libc/rpc X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libc/rpc X-SVN-Commit-Revision: 320494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 07:04:11 -0000 Author: delphij Date: Fri Jun 30 07:04:10 2017 New Revision: 320494 URL: https://svnweb.freebsd.org/changeset/base/320494 Log: Revert r300385 and r300624 which was false positive reported by cppcheck. dup_ncp() tries to allocate a buffer of MAXNETCONFIGLINE as tmp, which is then assigned to p->nc_netid via strcpy, so the free(p->nc_netid) would have correctly released the memory in case nc_lookups() fails, therefore, the allerged leak never existed. MFC after: 3 days Modified: head/lib/libc/rpc/getnetconfig.c Modified: head/lib/libc/rpc/getnetconfig.c ============================================================================== --- head/lib/libc/rpc/getnetconfig.c Fri Jun 30 06:34:49 2017 (r320493) +++ head/lib/libc/rpc/getnetconfig.c Fri Jun 30 07:04:10 2017 (r320494) @@ -692,7 +692,7 @@ static struct netconfig * dup_ncp(struct netconfig *ncp) { struct netconfig *p; - char *tmp, *tmp2; + char *tmp; u_int i; if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL) @@ -701,7 +701,6 @@ dup_ncp(struct netconfig *ncp) free(tmp); return(NULL); } - tmp2 = tmp; /* * First we dup all the data from matched netconfig buffer. Then we * adjust some of the member pointer to a pre-allocated buffer where @@ -723,7 +722,6 @@ dup_ncp(struct netconfig *ncp) if (p->nc_lookups == NULL) { free(p->nc_netid); free(p); - free(tmp2); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { From owner-svn-src-all@freebsd.org Fri Jun 30 07:48:09 2017 Return-Path: Delivered-To: svn-src-all@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 DB68AD8AE3C; Fri, 30 Jun 2017 07:48:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A88EC840F5; Fri, 30 Jun 2017 07:48:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U7m8mq082100; Fri, 30 Jun 2017 07:48:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U7m8Yb082099; Fri, 30 Jun 2017 07:48:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201706300748.v5U7m8Yb082099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 30 Jun 2017 07:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320495 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 320495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 07:48:10 -0000 Author: mav Date: Fri Jun 30 07:48:08 2017 New Revision: 320495 URL: https://svnweb.freebsd.org/changeset/base/320495 Log: Allow status aggregation for ramdisk reads. Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Fri Jun 30 07:04:10 2017 (r320494) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Fri Jun 30 07:48:08 2017 (r320495) @@ -525,6 +525,11 @@ nospc: io->scsiio.kern_sg_entries = sgs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; PRIV(io)->len += lbas; + if ((ARGS(io)->flags & CTL_LLF_READ) && + ARGS(io)->len <= PRIV(io)->len) { + ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbinuptime(&io->io_hdr.dma_start_bt); #endif From owner-svn-src-all@freebsd.org Fri Jun 30 09:34:52 2017 Return-Path: Delivered-To: svn-src-all@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 BD937D8D0B8; Fri, 30 Jun 2017 09:34:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 899EF2620; Fri, 30 Jun 2017 09:34:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U9Yp32026880; Fri, 30 Jun 2017 09:34:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5U9Yo8k026872; Fri, 30 Jun 2017 09:34:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706300934.v5U9Yo8k026872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 30 Jun 2017 09:34: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: r320496 - in stable/10: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 320496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 09:34:52 -0000 Author: avg Date: Fri Jun 30 09:34:50 2017 New Revision: 320496 URL: https://svnweb.freebsd.org/changeset/base/320496 Log: MFC r308782: After some ZIL changes 6 years ago zil_slog_limit got partially broken due to zl_itx_list_sz not updated when async itx'es upgraded to sync. Actually because of other changes about that time zl_itx_list_sz is not really required to implement the functionality, so this patch removes some unneeded broken code and variables. Original idea of zil_slog_limit was to reduce chance of SLOG abuse by single heavy logger, that increased latency for other (more latency critical) loggers, by pushing heavy log out into the main pool instead of SLOG. Beside huge latency increase for heavy writers, this implementation caused double write of all data, since the log records were explicitly prepared for SLOG. Since we now have I/O scheduler, I've found it can be much more efficient to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG. Existing ZIL implementation had problem with space efficiency when it has to write large chunks of data into log blocks of limited size. In some cases efficiency stopped to almost as low as 50%. In case of ZIL stored on spinning rust, that also reduced log write speed in half, since head had to uselessly fly over allocated but not written areas. This change improves the situation by offloading problematic operations from z*_log_write() to zil_lwb_commit(), which knows real situation of log blocks allocation and can split large requests into pieces much more efficiently. Also as side effect it removes one of two data copy operations done by ZIL code WR_COPIED case. While there, untangle and unify code of z*_log_write() functions. Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing block boundary, that may also improve efficiency if ZPL is made to do that. Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jun 30 09:34:50 2017 (r320496) @@ -1371,7 +1371,6 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t *tx, lr_write itx->itx_private = zd; itx->itx_wr_state = write_state; itx->itx_sync = (ztest_random(8) == 0); - itx->itx_sod += (write_state == WR_NEED_COPY ? lr->lr_length : 0); bcopy(&lr->lr_common + 1, &itx->itx_lr + 1, sizeof (*lr) - sizeof (lr_t)); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h Fri Jun 30 09:34:50 2017 (r320496) @@ -369,7 +369,6 @@ typedef struct itx { void *itx_private; /* type-specific opaque data */ itx_wr_state_t itx_wr_state; /* write state */ uint8_t itx_sync; /* synchronous transaction */ - uint64_t itx_sod; /* record size on disk */ uint64_t itx_oid; /* object id */ lr_t itx_lr; /* common part of log record */ /* followed by type-specific part of lr_xx_t and its immediate data */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Fri Jun 30 09:34:50 2017 (r320496) @@ -42,6 +42,7 @@ extern "C" { typedef struct lwb { zilog_t *lwb_zilog; /* back pointer to log struct */ blkptr_t lwb_blk; /* on disk address of this log blk */ + boolean_t lwb_slog; /* lwb_blk is on SLOG device */ int lwb_nused; /* # used bytes in buffer */ int lwb_sz; /* size of block and buffer */ char *lwb_buf; /* log write buffer */ @@ -62,7 +63,6 @@ typedef struct itxs { typedef struct itxg { kmutex_t itxg_lock; /* lock for this structure */ uint64_t itxg_txg; /* txg for this chain */ - uint64_t itxg_sod; /* total size on disk for this txg */ itxs_t *itxg_itxs; /* sync and async itxs */ } itxg_t; @@ -120,7 +120,6 @@ struct zilog { kcondvar_t zl_cv_batch[2]; /* batch condition variables */ itxg_t zl_itxg[TXG_SIZE]; /* intent log txg chains */ list_t zl_itx_commit_list; /* itx list to be committed */ - uint64_t zl_itx_list_sz; /* total size of records on list */ uint64_t zl_cur_used; /* current commit log size used */ list_t zl_lwb_list; /* in-flight log write list */ kmutex_t zl_vdev_lock; /* protects zl_vdev_tree */ @@ -142,6 +141,8 @@ typedef struct zil_bp_node { #define ZIL_MAX_LOG_DATA (SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t) - \ sizeof (lr_write_t)) +#define ZIL_MAX_COPIED_DATA \ + ((SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) #ifdef __cplusplus } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri Jun 30 09:34:50 2017 (r320496) @@ -546,7 +546,7 @@ extern zio_t *zio_free_sync(zio_t *pio, spa_t *spa, ui const blkptr_t *bp, uint64_t size, enum zio_flag flags); extern int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, - blkptr_t *old_bp, uint64_t size, boolean_t use_slog); + blkptr_t *old_bp, uint64_t size, boolean_t *slog); extern void zio_free_zil(spa_t *spa, uint64_t txg, blkptr_t *bp); extern void zio_flush(zio_t *zio, vdev_t *vd); extern zio_t *zio_trim(zio_t *zio, spa_t *spa, vdev_t *vd, uint64_t offset, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c Fri Jun 30 09:34:50 2017 (r320496) @@ -459,21 +459,18 @@ void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, offset_t off, ssize_t resid, int ioflag) { + uint32_t blocksize = zp->z_blksz; itx_wr_state_t write_state; - boolean_t slogging; uintptr_t fsync_cnt; - ssize_t immediate_write_sz; if (zil_replaying(zilog, tx) || zp->z_unlinked) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zfs_immediate_write_sz; - - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); - if (resid > immediate_write_sz && !slogging && resid <= zp->z_blksz) + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= zfs_immediate_write_sz) + write_state = WR_INDIRECT; else if (ioflag & (FSYNC | FDSYNC)) write_state = WR_COPIED; else @@ -486,30 +483,26 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * If the write would overflow the largest block then split it. - */ - if (write_state != WR_INDIRECT && resid > ZIL_MAX_LOG_DATA) - len = SPA_OLD_MAXBLOCKSIZE >> 1; - else - len = resid; + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(txtype, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, + if (wr_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, zp->z_id, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(txtype, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = zp->z_id; lr->lr_offset = off; lr->lr_length = len; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri Jun 30 09:34:50 2017 (r320496) @@ -90,6 +90,15 @@ TUNABLE_INT("vfs.zfs.trim.enabled", &zfs_trim_enabled) SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_RDTUN, &zfs_trim_enabled, 0, "Enable ZFS TRIM"); +/* + * Limit SLOG write size per commit executed with synchronous priority. + * Any writes above that executed with lower (asynchronous) priority to + * limit potential SLOG device abuse by single active ZIL writer. + */ +uint64_t zil_slog_limit = 768 * 1024; +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, zil_slog_limit, CTLFLAG_RWTUN, + &zil_slog_limit, 0, "Maximal SLOG commit size with sync priority"); + static kmem_cache_t *zil_lwb_cache; #define LWB_EMPTY(lwb) ((BP_GET_LSIZE(&lwb->lwb_blk) - \ @@ -449,13 +458,14 @@ zil_free_log_record(zilog_t *zilog, lr_t *lrc, void *t } static lwb_t * -zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, uint64_t txg) +zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, boolean_t slog, uint64_t txg) { lwb_t *lwb; lwb = kmem_cache_alloc(zil_lwb_cache, KM_SLEEP); lwb->lwb_zilog = zilog; lwb->lwb_blk = *bp; + lwb->lwb_slog = slog; lwb->lwb_buf = zio_buf_alloc(BP_GET_LSIZE(bp)); lwb->lwb_max_txg = txg; lwb->lwb_zio = NULL; @@ -539,6 +549,7 @@ zil_create(zilog_t *zilog) dmu_tx_t *tx = NULL; blkptr_t blk; int error = 0; + boolean_t slog = FALSE; /* * Wait for any previous destroy to complete. @@ -567,7 +578,7 @@ zil_create(zilog_t *zilog) } error = zio_alloc_zil(zilog->zl_spa, txg, &blk, NULL, - ZIL_MIN_BLKSZ, zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); + ZIL_MIN_BLKSZ, &slog); if (error == 0) zil_init_log_chain(zilog, &blk); @@ -577,7 +588,7 @@ zil_create(zilog_t *zilog) * Allocate a log write buffer (lwb) for the first log block. */ if (error == 0) - lwb = zil_alloc_lwb(zilog, &blk, txg); + lwb = zil_alloc_lwb(zilog, &blk, slog, txg); /* * If we just allocated the first log block, commit our transaction @@ -910,6 +921,7 @@ static void zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) { zbookmark_phys_t zb; + zio_priority_t prio; SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, @@ -920,9 +932,13 @@ zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) ZIO_FLAG_CANFAIL); } if (lwb->lwb_zio == NULL) { + if (zilog->zl_cur_used <= zil_slog_limit || !lwb->lwb_slog) + prio = ZIO_PRIORITY_SYNC_WRITE; + else + prio = ZIO_PRIORITY_ASYNC_WRITE; lwb->lwb_zio = zio_rewrite(zilog->zl_root_zio, zilog->zl_spa, 0, &lwb->lwb_blk, lwb->lwb_buf, BP_GET_LSIZE(&lwb->lwb_blk), - zil_lwb_write_done, lwb, ZIO_PRIORITY_SYNC_WRITE, + zil_lwb_write_done, lwb, prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE, &zb); } } @@ -942,16 +958,6 @@ uint64_t zil_block_buckets[] = { }; /* - * Use the slog as long as the logbias is 'latency' and the current commit size - * is less than the limit or the total list size is less than 2X the limit. - * Limit checking is disabled by setting zil_slog_limit to UINT64_MAX. - */ -uint64_t zil_slog_limit = 1024 * 1024; -#define USE_SLOG(zilog) (((zilog)->zl_logbias == ZFS_LOGBIAS_LATENCY) && \ - (((zilog)->zl_cur_used < zil_slog_limit) || \ - ((zilog)->zl_itx_list_sz < (zil_slog_limit << 1)))) - -/* * Start a log block write and advance to the next log block. * Calls are serialized. */ @@ -966,6 +972,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea uint64_t txg; uint64_t zil_blksz, wsz; int i, error; + boolean_t slog; if (BP_GET_CHECKSUM(&lwb->lwb_blk) == ZIO_CHECKSUM_ZILOG2) { zilc = (zil_chain_t *)lwb->lwb_buf; @@ -1022,8 +1029,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea BP_ZERO(bp); /* pass the old blkptr in order to spread log blocks across devs */ - error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, - USE_SLOG(zilog)); + error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, &slog); if (error == 0) { ASSERT3U(bp->blk_birth, ==, txg); bp->blk_cksum = lwb->lwb_blk.blk_cksum; @@ -1032,7 +1038,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea /* * Allocate a new log write buffer (lwb). */ - nlwb = zil_alloc_lwb(zilog, bp, txg); + nlwb = zil_alloc_lwb(zilog, bp, slog, txg); /* Record the block for later vdev flushing */ zil_add_block(zilog, &lwb->lwb_blk); @@ -1071,12 +1077,13 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea static lwb_t * zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) { - lr_t *lrc = &itx->itx_lr; /* common log record */ - lr_write_t *lrw = (lr_write_t *)lrc; + lr_t *lrcb, *lrc = &itx->itx_lr; /* common log record */ + lr_write_t *lrwb, *lrw = (lr_write_t *)lrc; char *lr_buf; uint64_t txg = lrc->lrc_txg; uint64_t reclen = lrc->lrc_reclen; uint64_t dlen = 0; + uint64_t dnow, lwb_sp; if (lwb == NULL) return (NULL); @@ -1091,25 +1098,30 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) zil_lwb_write_init(zilog, lwb); +cont: /* * If this record won't fit in the current log block, start a new one. + * For WR_NEED_COPY optimize layout for minimal number of chunks, but + * try to keep wasted space withing reasonable range (12%). */ - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + if (reclen > lwb_sp || (reclen + dlen > lwb_sp && + lwb_sp < ZIL_MAX_LOG_DATA / 8 && (dlen % ZIL_MAX_LOG_DATA == 0 || + lwb_sp < reclen + dlen % ZIL_MAX_LOG_DATA))) { lwb = zil_lwb_write_start(zilog, lwb, B_FALSE); if (lwb == NULL) return (NULL); zil_lwb_write_init(zilog, lwb); ASSERT(LWB_EMPTY(lwb)); - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { - txg_wait_synced(zilog->zl_dmu_pool, txg); - return (lwb); - } + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + ASSERT3U(reclen + MIN(dlen, sizeof(uint64_t)), <=, lwb_sp); } + dnow = MIN(dlen, lwb_sp - reclen); lr_buf = lwb->lwb_buf + lwb->lwb_nused; bcopy(lrc, lr_buf, reclen); - lrc = (lr_t *)lr_buf; - lrw = (lr_write_t *)lrc; + lrcb = (lr_t *)lr_buf; + lrwb = (lr_write_t *)lrcb; /* * If it's a write, fetch the data or get its blkptr as appropriate. @@ -1121,16 +1133,19 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) char *dbuf; int error; - if (dlen) { - ASSERT(itx->itx_wr_state == WR_NEED_COPY); + if (itx->itx_wr_state == WR_NEED_COPY) { dbuf = lr_buf + reclen; - lrw->lr_common.lrc_reclen += dlen; + lrcb->lrc_reclen += dnow; + if (lrwb->lr_length > dnow) + lrwb->lr_length = dnow; + lrw->lr_offset += dnow; + lrw->lr_length -= dnow; } else { ASSERT(itx->itx_wr_state == WR_INDIRECT); dbuf = NULL; } error = zilog->zl_get_data( - itx->itx_private, lrw, dbuf, lwb->lwb_zio); + itx->itx_private, lrwb, dbuf, lwb->lwb_zio); if (error == EIO) { txg_wait_synced(zilog->zl_dmu_pool, txg); return (lwb); @@ -1149,12 +1164,18 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) * equal to the itx sequence number because not all transactions * are synchronous, and sometimes spa_sync() gets there first. */ - lrc->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ - lwb->lwb_nused += reclen + dlen; + lrcb->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ + lwb->lwb_nused += reclen + dnow; lwb->lwb_max_txg = MAX(lwb->lwb_max_txg, txg); ASSERT3U(lwb->lwb_nused, <=, lwb->lwb_sz); ASSERT0(P2PHASE(lwb->lwb_nused, sizeof (uint64_t))); + dlen -= dnow; + if (dlen > 0) { + zilog->zl_cur_used += reclen; + goto cont; + } + return (lwb); } @@ -1168,7 +1189,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; - itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */ itx->itx_lr.lrc_seq = 0; /* defensive */ itx->itx_sync = B_TRUE; /* default is synchronous */ @@ -1317,11 +1337,8 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *t * this itxg. Save the itxs for release below. * This should be rare. */ - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean = itxg->itxg_itxs; } - ASSERT(itxg->itxg_sod == 0); itxg->itxg_txg = txg; itxs = itxg->itxg_itxs = kmem_zalloc(sizeof (itxs_t), KM_SLEEP); @@ -1333,8 +1350,6 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *t } if (itx->itx_sync) { list_insert_tail(&itxs->i_sync_list, itx); - atomic_add_64(&zilog->zl_itx_list_sz, itx->itx_sod); - itxg->itxg_sod += itx->itx_sod; } else { avl_tree_t *t = &itxs->i_async_tree; uint64_t foid = ((lr_ooo_t *)&itx->itx_lr)->lr_foid; @@ -1382,8 +1397,6 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) ASSERT3U(itxg->itxg_txg, <=, synced_txg); ASSERT(itxg->itxg_txg != 0); ASSERT(zilog->zl_clean_taskq != NULL); - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean_me = itxg->itxg_itxs; itxg->itxg_itxs = NULL; itxg->itxg_txg = 0; @@ -1407,7 +1420,6 @@ zil_get_commit_list(zilog_t *zilog) { uint64_t otxg, txg; list_t *commit_list = &zilog->zl_itx_commit_list; - uint64_t push_sod = 0; if (spa_freeze_txg(zilog->zl_spa) != UINT64_MAX) /* ziltest support */ otxg = ZILTEST_TXG; @@ -1439,12 +1451,9 @@ zil_get_commit_list(zilog_t *zilog) ASSERT(zilog_is_dirty_in_txg(zilog, txg) || spa_freeze_txg(zilog->zl_spa) != UINT64_MAX); list_move_tail(commit_list, &itxg->itxg_itxs->i_sync_list); - push_sod += itxg->itxg_sod; - itxg->itxg_sod = 0; mutex_exit(&itxg->itxg_lock); } - atomic_add_64(&zilog->zl_itx_list_sz, -push_sod); } /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jun 30 09:34:50 2017 (r320496) @@ -2943,20 +2943,21 @@ zio_dva_unallocate(zio_t *zio, zio_gang_node_t *gn, bl */ int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, blkptr_t *old_bp, - uint64_t size, boolean_t use_slog) + uint64_t size, boolean_t *slog) { int error = 1; ASSERT(txg > spa_syncing_txg(spa)); - if (use_slog) { - error = metaslab_alloc(spa, spa_log_class(spa), size, - new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); - } - - if (error) { + error = metaslab_alloc(spa, spa_log_class(spa), size, + new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); + if (error == 0) { + *slog = TRUE; + } else { error = metaslab_alloc(spa, spa_normal_class(spa), size, new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); + if (error == 0) + *slog = FALSE; } if (error == 0) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Jun 30 07:48:08 2017 (r320495) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Jun 30 09:34:50 2017 (r320496) @@ -1362,54 +1362,44 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_ { uint32_t blocksize = zv->zv_volblocksize; zilog_t *zilog = zv->zv_zilog; - boolean_t slogging; - ssize_t immediate_write_sz; + itx_wr_state_t write_state; if (zil_replaying(zilog, tx)) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zvol_immediate_write_sz; + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) + write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= blocksize && blocksize > zvol_immediate_write_sz) + write_state = WR_INDIRECT; + else if (sync) + write_state = WR_COPIED; + else + write_state = WR_NEED_COPY; - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); - while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; - itx_wr_state_t write_state; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * Unlike zfs_log_write() we can be called with - * upto DMU_MAX_ACCESS/2 (5MB) writes. - */ - if (blocksize > immediate_write_sz && !slogging && - resid >= blocksize && off % blocksize == 0) { - write_state = WR_INDIRECT; /* uses dmu_sync */ - len = blocksize; - } else if (sync) { - write_state = WR_COPIED; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } else { - write_state = WR_NEED_COPY; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(TX_WRITE, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zv->zv_objset, + if (wr_state == WR_COPIED && dmu_read(zv->zv_objset, ZVOL_OBJ, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(TX_WRITE, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = ZVOL_OBJ; lr->lr_offset = off; lr->lr_length = len; From owner-svn-src-all@freebsd.org Fri Jun 30 14:05:35 2017 Return-Path: Delivered-To: svn-src-all@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 5E6FED92599; Fri, 30 Jun 2017 14:05:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 E77166F4CB; Fri, 30 Jun 2017 14:05:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5UE5Te6042096 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 30 Jun 2017 17:05:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5UE5Te6042096 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5UE5T83042077; Fri, 30 Jun 2017 17:05:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Jun 2017 17:05:29 +0300 From: Konstantin Belousov To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320483 - head/sbin/nvmecontrol Message-ID: <20170630140529.GV1935@kib.kiev.ua> References: <201706292315.v5TNFTOp060309@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706292315.v5TNFTOp060309@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 14:05:35 -0000 On Thu, Jun 29, 2017 at 11:15:29PM +0000, Warner Losh wrote: > Author: imp > Date: Thu Jun 29 23:15:28 2017 > New Revision: 320483 > URL: https://svnweb.freebsd.org/changeset/base/320483 > > Log: > Improve wdc error log pulling. i386 buildworld fails with /scratch/tmp/kib/src/sbin/nvmecontrol/wdc.c:141:14: error: comparison of integer s of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare] if (resid > len) ~~~~~ ^ ~~~ 1 error generated. --- wdc.o --- From owner-svn-src-all@freebsd.org Fri Jun 30 14:45:44 2017 Return-Path: Delivered-To: svn-src-all@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 62F5CD93236; Fri, 30 Jun 2017 14:45:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 30CE7706A2; Fri, 30 Jun 2017 14:45:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UEjhbQ058085; Fri, 30 Jun 2017 14:45:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UEjhkM058084; Fri, 30 Jun 2017 14:45:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706301445.v5UEjhkM058084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 30 Jun 2017 14:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320497 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 320497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 14:45:44 -0000 Author: andrew Date: Fri Jun 30 14:45:43 2017 New Revision: 320497 URL: https://svnweb.freebsd.org/changeset/base/320497 Log: Remove a blank line accidentally added in r320403. Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Fri Jun 30 09:34:50 2017 (r320496) +++ head/sys/arm64/include/atomic.h Fri Jun 30 14:45:43 2017 (r320497) @@ -448,7 +448,6 @@ atomic_thread_fence_acq(void) { dmb(ld); - } static __inline void From owner-svn-src-all@freebsd.org Fri Jun 30 15:49:38 2017 Return-Path: Delivered-To: svn-src-all@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 0C029D94747; Fri, 30 Jun 2017 15:49:38 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CD88F72A95; Fri, 30 Jun 2017 15:49:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UFnbSX084056; Fri, 30 Jun 2017 15:49:37 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UFnaFA084054; Fri, 30 Jun 2017 15:49:36 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706301549.v5UFnaFA084054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 30 Jun 2017 15:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320498 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 320498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 15:49:38 -0000 Author: alc Date: Fri Jun 30 15:49:36 2017 New Revision: 320498 URL: https://svnweb.freebsd.org/changeset/base/320498 Log: Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it recycles the current vm space. Otherwise, an mlockall(MCL_FUTURE) could still be in effect on the process after an execve(2), which violates the specification for mlockall(2). It's pointless for vm_map_stack() to check the MEMLOCK limit. It will never be asked to wire the stack. Moreover, it doesn't even implement wiring of the stack. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11421 Modified: head/sys/kern/kern_exec.c head/sys/vm/vm_map.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jun 30 14:45:43 2017 (r320497) +++ head/sys/kern/kern_exec.c Fri Jun 30 15:49:36 2017 (r320498) @@ -1091,6 +1091,10 @@ exec_new_vmspace(struct image_params *imgp, struct sys shmexit(vmspace); pmap_remove_pages(vmspace_pmap(vmspace)); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); + /* An exec terminates mlockall(MCL_FUTURE). */ + vm_map_lock(map); + vm_map_modflags(map, 0, MAP_WIREFUTURE); + vm_map_unlock(map); } else { error = vmspace_exec(p, sv_minuser, sv->sv_maxuser); if (error) Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Fri Jun 30 14:45:43 2017 (r320497) +++ head/sys/vm/vm_map.c Fri Jun 30 15:49:36 2017 (r320498) @@ -3557,25 +3557,23 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c return (vm2); } +/* + * Create a process's stack for exec_new_vmspace(). This function is never + * asked to wire the newly created stack. + */ int vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, vm_prot_t prot, vm_prot_t max, int cow) { vm_size_t growsize, init_ssize; - rlim_t lmemlim, vmemlim; + rlim_t vmemlim; int rv; + MPASS((map->flags & MAP_WIREFUTURE) == 0); growsize = sgrowsiz; init_ssize = (max_ssize < growsize) ? max_ssize : growsize; vm_map_lock(map); - lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK); vmemlim = lim_cur(curthread, RLIMIT_VMEM); - if (!old_mlock && map->flags & MAP_WIREFUTURE) { - if (ptoa(pmap_wired_count(map->pmap)) + init_ssize > lmemlim) { - rv = KERN_NO_SPACE; - goto out; - } - } /* If we would blow our VMEM resource limit, no go */ if (map->size + init_ssize > vmemlim) { rv = KERN_NO_SPACE; From owner-svn-src-all@freebsd.org Fri Jun 30 16:10:22 2017 Return-Path: Delivered-To: svn-src-all@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 46079D94FB6; Fri, 30 Jun 2017 16:10:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 13155738A8; Fri, 30 Jun 2017 16:10:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UGALP0092335; Fri, 30 Jun 2017 16:10:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UGAL0R092334; Fri, 30 Jun 2017 16:10:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706301610.v5UGAL0R092334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jun 2017 16:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320499 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 16:10:22 -0000 Author: kib Date: Fri Jun 30 16:10:21 2017 New Revision: 320499 URL: https://svnweb.freebsd.org/changeset/base/320499 Log: Define ino64_trunc_error under same conditions as the code which uses the variable. Noted by: bde Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Jun 30 15:49:36 2017 (r320498) +++ head/sys/kern/vfs_syscalls.c Fri Jun 30 16:10:21 2017 (r320499) @@ -2106,7 +2106,7 @@ cvtstat(struct stat *st, struct ostat *ost) } #endif /* COMPAT_43 */ -#if defined(COMPAT_FREEBSD11) +#if defined(COMPAT_43) || defined(COMPAT_FREEBSD11) int ino64_trunc_error; SYSCTL_INT(_vfs, OID_AUTO, ino64_trunc_error, CTLFLAG_RW, &ino64_trunc_error, 0, From owner-svn-src-all@freebsd.org Fri Jun 30 16:12:58 2017 Return-Path: Delivered-To: svn-src-all@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 6E548D951A3; Fri, 30 Jun 2017 16:12:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3C2D273CFA; Fri, 30 Jun 2017 16:12:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UGCvvW096192; Fri, 30 Jun 2017 16:12:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UGCv0e096190; Fri, 30 Jun 2017 16:12:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706301612.v5UGCv0e096190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jun 2017 16:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320500 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 320500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 16:12:58 -0000 Author: kib Date: Fri Jun 30 16:12:57 2017 New Revision: 320500 URL: https://svnweb.freebsd.org/changeset/base/320500 Log: Amend the layout of kevent32 on powerpc where uint64_t has 8-byte alignment. Reported,tested and assertion updates by: andreast Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Fri Jun 30 16:10:21 2017 (r320499) +++ head/sys/compat/freebsd32/freebsd32.h Fri Jun 30 16:12:57 2017 (r320500) @@ -141,8 +141,14 @@ struct kevent32 { short filter; /* filter for event */ u_short flags; u_int fflags; +#ifdef __powerpc__ + uint32_t pad0; +#endif int32_t data1, data2; uint32_t udata; /* opaque user data identifier */ +#ifdef __powerpc__ + uint32_t pad1; +#endif uint32_t ext64[8]; }; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Jun 30 16:10:21 2017 (r320499) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Jun 30 16:12:57 2017 (r320500) @@ -119,7 +119,11 @@ CTASSERT(sizeof(struct statfs32) == 256); CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); +#ifdef __powerpc__ +CTASSERT(sizeof(struct kevent32) == 64); +#else CTASSERT(sizeof(struct kevent32) == 56); +#endif CTASSERT(sizeof(struct iovec32) == 8); CTASSERT(sizeof(struct msghdr32) == 28); #ifdef __amd64__ From owner-svn-src-all@freebsd.org Fri Jun 30 16:16:22 2017 Return-Path: Delivered-To: svn-src-all@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 7920FD95263; Fri, 30 Jun 2017 16:16:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4712C73E6E; Fri, 30 Jun 2017 16:16:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UGGLgd096354; Fri, 30 Jun 2017 16:16:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UGGLr4096353; Fri, 30 Jun 2017 16:16:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706301616.v5UGGLr4096353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jun 2017 16:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320501 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 320501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 16:16:22 -0000 Author: kib Date: Fri Jun 30 16:16:21 2017 New Revision: 320501 URL: https://svnweb.freebsd.org/changeset/base/320501 Log: Correct fences for sys/refcount.h. The acq barrier in refcount_acquire() has no use, constructor must ensure that the changes are visible before publication by other means. Last release must sync/with the constructor and all updaters. This is based on the refcount/shared_ptr analysis I heard at the Hans Boehm and Herb Sutter talks about C++ atomics. Reviewed by: alc, jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D11270 Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Fri Jun 30 16:12:57 2017 (r320500) +++ head/sys/sys/refcount.h Fri Jun 30 16:16:21 2017 (r320501) @@ -50,7 +50,7 @@ refcount_acquire(volatile u_int *count) { KASSERT(*count < UINT_MAX, ("refcount %p overflowed", count)); - atomic_add_acq_int(count, 1); + atomic_add_int(count, 1); } static __inline int @@ -58,10 +58,20 @@ refcount_release(volatile u_int *count) { u_int old; - /* XXX: Should this have a rel membar? */ + atomic_thread_fence_rel(); old = atomic_fetchadd_int(count, -1); KASSERT(old > 0, ("negative refcount %p", count)); - return (old == 1); + if (old > 1) + return (0); + + /* + * Last reference. Signal the user to call the destructor. + * + * Ensure that the destructor sees all updates. The fence_rel + * at the start of the function synchronized with this fence. + */ + atomic_thread_fence_acq(); + return (1); } #endif /* ! __SYS_REFCOUNT_H__ */ From owner-svn-src-all@freebsd.org Fri Jun 30 16:34:18 2017 Return-Path: Delivered-To: svn-src-all@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 6E34AD958E9; Fri, 30 Jun 2017 16:34:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3D081749F9; Fri, 30 Jun 2017 16:34:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UGYH8O004259; Fri, 30 Jun 2017 16:34:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UGYHgF004258; Fri, 30 Jun 2017 16:34:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706301634.v5UGYHgF004258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Jun 2017 16:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320502 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 320502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 16:34:18 -0000 Author: emaste Date: Fri Jun 30 16:34:17 2017 New Revision: 320502 URL: https://svnweb.freebsd.org/changeset/base/320502 Log: bsd.linker.mk: add band-aid for linker invocation failure In some cases bsd.linker.mk reports an error like: make[4]: ".../share/mk/bsd.linker.mk" line 56: Unknown linker from LD=ld -m elf32ppc_fbsd:" For now change this to a .warning, and then assume GNU ld 2.17.50. At present the linker type detection is used only for enabling build-id, and we can carry on without it when type detection fails. Also, show errors from ${LD} --version to aid in failure diagnosis. Successful invocations of ${LD} --version produce no output on stderr so this will not create any spam in non-failing builds. Tested by: swills Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11424 Modified: head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Fri Jun 30 16:16:21 2017 (r320501) +++ head/share/mk/bsd.linker.mk Fri Jun 30 16:34:17 2017 (r320502) @@ -47,9 +47,9 @@ ${var}= ${${var}.${${X_}_ld_hash}} .if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) .if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION) -_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none +_ld_version!= (${${ld}} --version || echo none) | head -n 1 .if ${_ld_version} == "none" -.error Unable to determine linker type from ${ld}=${${ld}} +.warning Unable to determine linker type from ${ld}=${${ld}} .endif .if ${_ld_version:[1..2]} == "GNU ld" ${X_}LINKER_TYPE= bfd @@ -58,7 +58,9 @@ _v= ${_ld_version:M[1-9].[0-9]*:[1]} ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} .else -.error Unknown linker from ${ld}=${${ld}}: ${_ld_version} +.warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd +${X_}LINKER_TYPE= bfd +_v= 2.17.50 .endif ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' From owner-svn-src-all@freebsd.org Fri Jun 30 17:43:15 2017 Return-Path: Delivered-To: svn-src-all@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 518C4D96CED; Fri, 30 Jun 2017 17:43:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1DFD376BB1; Fri, 30 Jun 2017 17:43:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UHhEUc033283; Fri, 30 Jun 2017 17:43:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UHhEvr033282; Fri, 30 Jun 2017 17:43:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706301743.v5UHhEvr033282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 30 Jun 2017 17:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r320503 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 320503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 17:43:15 -0000 Author: emaste Date: Fri Jun 30 17:43:13 2017 New Revision: 320503 URL: https://svnweb.freebsd.org/changeset/base/320503 Log: Welcome Kyle Evans (kevans) as a new src committer. He's done good work fixing up bsdgrep and many other userland utilities. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Jun 30 16:34:17 2017 (r320502) +++ svnadmin/conf/access Fri Jun 30 17:43:13 2017 (r320503) @@ -122,6 +122,7 @@ kaiw kan karels ken +kevans kevlo kib kp Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Jun 30 16:34:17 2017 (r320502) +++ svnadmin/conf/mentors Fri Jun 30 17:43:13 2017 (r320503) @@ -20,6 +20,7 @@ jceel trasz jkh rwatson jwd rmacklem kadesai ken Co-mentor: scottl, ambrisko +kevans emaste mahrens mckusick peterj jhb Co-mentor: grog rgrimes grehan From owner-svn-src-all@freebsd.org Fri Jun 30 17:45:53 2017 Return-Path: Delivered-To: svn-src-all@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 54805D96D61; Fri, 30 Jun 2017 17:45:53 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 163D076CE9; Fri, 30 Jun 2017 17:45:53 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UHjqVa033446; Fri, 30 Jun 2017 17:45:52 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UHjpdX033442; Fri, 30 Jun 2017 17:45:51 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201706301745.v5UHjpdX033442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Fri, 30 Jun 2017 17:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320504 - in head/contrib/jemalloc: . doc include/jemalloc/internal X-SVN-Group: head X-SVN-Commit-Author: jasone X-SVN-Commit-Paths: in head/contrib/jemalloc: . doc include/jemalloc/internal X-SVN-Commit-Revision: 320504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 17:45:53 -0000 Author: jasone Date: Fri Jun 30 17:45:51 2017 New Revision: 320504 URL: https://svnweb.freebsd.org/changeset/base/320504 Log: Default the abort_conf malloc option to false. This avoids troublesome backward compatibility issues. Modified: head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/FREEBSD-upgrade head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Fri Jun 30 17:43:13 2017 (r320503) +++ head/contrib/jemalloc/FREEBSD-diffs Fri Jun 30 17:45:51 2017 (r320504) @@ -1,8 +1,8 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index 21e401ac..f977c5f5 100644 +index 21e401ac..c26f9f4a 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in -@@ -53,11 +53,21 @@ +@@ -53,11 +53,22 @@ This manual describes jemalloc @jemalloc_version@. More information can be found at the jemalloc website. @@ -10,7 +10,8 @@ index 21e401ac..f977c5f5 100644 + The following configuration options are enabled in libc's built-in + jemalloc: , + , , -+ , and . ++ , , and ++ . + Additionally, is enabled in development + versions of FreeBSD (controlled by the + MALLOC_PRODUCTION make variable). @@ -25,7 +26,7 @@ index 21e401ac..f977c5f5 100644 Standard API -@@ -3252,4 +3262,18 @@ malloc_conf = "narenas:1";]]> +@@ -3252,4 +3263,18 @@ malloc_conf = "narenas:1";]]> The posix_memalign() function conforms to IEEE Std 1003.1-2001 (POSIX.1). Modified: head/contrib/jemalloc/FREEBSD-upgrade ============================================================================== --- head/contrib/jemalloc/FREEBSD-upgrade Fri Jun 30 17:43:13 2017 (r320503) +++ head/contrib/jemalloc/FREEBSD-upgrade Fri Jun 30 17:45:51 2017 (r320504) @@ -96,6 +96,7 @@ do_extract_helper() { do_autogen() { ./autogen.sh --enable-xmalloc --enable-utrace \ + --with-malloc-conf=abort_conf:false \ --with-xslroot=/usr/local/share/xsl/docbook --with-private-namespace=__ \ --with-lg-page-sizes=12,13,14,16 } Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Fri Jun 30 17:43:13 2017 (r320503) +++ head/contrib/jemalloc/doc/jemalloc.3 Fri Jun 30 17:45:51 2017 (r320504) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 06/14/2017 +.\" Date: 06/29/2017 .\" Manual: User Manual .\" Source: jemalloc 5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6 .\" Language: English .\" -.TH "JEMALLOC" "3" "06/14/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual" +.TH "JEMALLOC" "3" "06/29/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,8 +38,9 @@ The following configuration options are enabled in lib \fB\-\-enable\-fill\fR, \fB\-\-enable\-lazy\-lock\fR, \fB\-\-enable\-stats\fR, -\fB\-\-enable\-utrace\fR, and -\fB\-\-enable\-xmalloc\fR\&. Additionally, +\fB\-\-enable\-utrace\fR, +\fB\-\-enable\-xmalloc\fR, and +\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally, \fB\-\-enable\-debug\fR is enabled in development versions of FreeBSD (controlled by the \fBMALLOC_PRODUCTION\fR Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Fri Jun 30 17:43:13 2017 (r320503) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Fri Jun 30 17:45:51 2017 (r320504) @@ -329,7 +329,7 @@ /* #undef JEMALLOC_EXPORT */ /* config.malloc_conf options string. */ -#define JEMALLOC_CONFIG_MALLOC_CONF "" +#define JEMALLOC_CONFIG_MALLOC_CONF "abort_conf:false" /* If defined, jemalloc takes the malloc/free/etc. symbol names. */ #define JEMALLOC_IS_MALLOC 1 From owner-svn-src-all@freebsd.org Fri Jun 30 19:22:36 2017 Return-Path: Delivered-To: svn-src-all@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 86D56D98E40; Fri, 30 Jun 2017 19:22:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 61F6B79D0F; Fri, 30 Jun 2017 19:22:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UJMZGp075229; Fri, 30 Jun 2017 19:22:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UJMZ2M075224; Fri, 30 Jun 2017 19:22:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706301922.v5UJMZ2M075224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 30 Jun 2017 19:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r320505 - in releng/11.1/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/readme en_US.ISO8859-1/relnotes share/xml X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in releng/11.1/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/readme en_US.ISO8859-1/relnotes share/xml X-SVN-Commit-Revision: 320505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 19:22:36 -0000 Author: gjb Date: Fri Jun 30 19:22:35 2017 New Revision: 320505 URL: https://svnweb.freebsd.org/changeset/base/320505 Log: release.ent: - Update versions, and switch from 'snapshot' to 'release'. errata/article.xml: - Prune stale entries from 11.0-RELEASE. - Bump copyright date. relnotes/article.xml: - Remove several empty sections. readme/article.xml: - Fix a malformed URL. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.1/release/doc/en_US.ISO8859-1/errata/article.xml releng/11.1/release/doc/en_US.ISO8859-1/readme/article.xml releng/11.1/release/doc/en_US.ISO8859-1/relnotes/article.xml releng/11.1/release/doc/share/xml/release.ent Modified: releng/11.1/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/11.1/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 30 17:45:51 2017 (r320504) +++ releng/11.1/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 30 19:22:35 2017 (r320505) @@ -23,7 +23,7 @@ $FreeBSD$ - 2016 + 2017 The &os; Documentation Project @@ -95,17 +95,6 @@ - An issue was discovered with Amazon® EC2™ - images which would cause the virtual machine to hang during - boot when upgrading from previous FreeBSD versions. New - EC2™ installations are not affected, but existing - installations running earlier releases are advised to wait - until the issue is resolved in an Errata Notice before - upgrading. An Errata Notice to address this is planned - following the release. - - - &os;/&arch.i386; installed on ZFS may crash during boot when the ZFS pool mount is attempted while booting an unmodified GENERIC kernel. @@ -131,111 +120,10 @@ boot - A bug was diagnosed in interaction of the - pmap_activate() function and - TLB shootdown IPI - handler on amd64 systems which have PCID - features but do not implement the INVPCID - instruction. On such machines, such as SandyBridge™ - and IvyBridge™ microarchitectures, set the loader - tunable vm.pmap.pcid_enabled=0 during - boot: - - set vm.pmap.pcid_enabled=0 -boot - - Add this line to - /boot/loader.conf for the change to - persist across reboots: - - To check if the system is affected, check - &man.dmesg.8; for PCID listed in the - "Features2", and absence of - INVPCID in the "Structured Extended - Features". If the PCID feature is - not present, or INVPCID is present, - system is not affected. - - vm.pmap.pcid_enabled=0 - - - - The Release Notes erroneously states the - WITH_SYSTEM_COMPILER &man.src.conf.5; - option is enabled by default, however this was disabled - prior to the final release build. - - - - The release announcement stated "Wireless support - for 802.11n has been added." This was intended to - state "Wireless support for 802.11n has been added for - additional wireless network drivers." - - - - Some release notes pertaining to the Cavium ThunderX - platform (the &os;/&arch.arm64; reference platform) were - omitted: - - - - Support for the Cavium Virtualized - NIC ethernet driver has been added. - - - - Support for the GICv3 and ITS device - drivers has been added. - - - - Support for PCI Enhanced Allocation - support has been added. - - - - - - [2016-10-20] Several recent Dell - systems fail to find a bootable disk when the system boots - in Legacy/BIOS/CSM mode, the boot disk is partitioned with - GPT, and the Active flag in the - Protective MBR is not set. To work - around this issue, either configure the system to boot in - UEFI mode, or choose the "GPT - + Active" scheme. - - - - [2016-10-21] Support for sha512 and - skein checksumming has been added to the - ZFS filesystem. This was not mentioned - in the release notes. - - Systems being upgraded from earlier &os; releases with - ZFS will see a message in zpool - status output noting the pool is not at the - latest version, and some features may not be enabled. - Additional instructions on how to update - ZFS pools to the latest version and - update the boot blocks for all boot drives in the pool will - also be provided in the output. - - This information is also documented in - /usr/src/UPDATING, which is included if - the src component is selected during - installation. - - - - [2016-10-21] The size of the GPT - enabled ZFS boot blocks + The size of the GPT enabled + ZFS boot blocks (/boot/gptzfsboot) has increased past - 64K. Systems upgraded from older releases may experience + 82K. Systems upgraded from older releases may experience a problem where the size of the existing "freebsd-boot" partition is too small to hold the new gptzfsboot. @@ -249,16 +137,15 @@ boot - [2016-10-21] Due to a bug in earlier versions of - &man.clang.1; that is difficult to work around in the - upgrade process, to upgrade the system from sources via - buildworld to -CURRENT or &release;, it is necessary to - upgrade machines running 9.x to at least revision r286035, - or machines running 10.x to revision r286033. Source-based - upgrades from 10.3-RELEASE are not affected. This differs - from the historical situation where one could generally - upgrade from anywhere on earlier stable branches, so caution - should be exercised. + Due to a bug in earlier versions of &man.clang.1; that + is difficult to work around in the upgrade process, to + upgrade the system from sources via buildworld to -CURRENT + or &release;, it is necessary to upgrade machines running + 10.x to revision r286033. Source-based upgrades from + 10.3-RELEASE are not affected. This differs from the + historical situation where one could generally upgrade from + anywhere on earlier stable branches, so caution should be + exercised. Modified: releng/11.1/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- releng/11.1/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 30 17:45:51 2017 (r320504) +++ releng/11.1/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 30 19:22:35 2017 (r320505) @@ -362,8 +362,9 @@ consulted as the current errata for this release. These other copies of the errata are located at &url.base;/releases/ - (as well as any sites which keep up-to-date mirrors of this + xlink:href="&url.base;/releases/">&os; &release.current; + page (as well as any sites which keep up-to-date + mirrors of this location). Modified: releng/11.1/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 30 17:45:51 2017 (r320504) +++ releng/11.1/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 30 19:22:35 2017 (r320505) @@ -795,12 +795,6 @@ This section covers changes and additions to file systems and other storage subsystems, both local and networked. - - General Storage - -   - - Networked Storage @@ -828,12 +822,6 @@ &man.loader.conf.5;, whereas vfs.zfs.debug_flags could not. - - - <literal>geom(4)</literal> - -   - @@ -853,12 +841,6 @@ EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server. - - - - Boot Menu Changes - -   Modified: releng/11.1/release/doc/share/xml/release.ent ============================================================================== --- releng/11.1/release/doc/share/xml/release.ent Fri Jun 30 17:45:51 2017 (r320504) +++ releng/11.1/release/doc/share/xml/release.ent Fri Jun 30 19:22:35 2017 (r320505) @@ -6,7 +6,7 @@ - + - + - + - + @@ -37,10 +37,10 @@ or "release" --> - + - - + + From owner-svn-src-all@freebsd.org Fri Jun 30 20:01:33 2017 Return-Path: Delivered-To: svn-src-all@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 1C496D996D1; Fri, 30 Jun 2017 20:01:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D29C87ADAC; Fri, 30 Jun 2017 20:01:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UK1VOS089190; Fri, 30 Jun 2017 20:01:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UK1Vaf089189; Fri, 30 Jun 2017 20:01:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201706302001.v5UK1Vaf089189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 30 Jun 2017 20:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320506 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 320506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 20:01:33 -0000 Author: kevans Date: Fri Jun 30 20:01:31 2017 New Revision: 320506 URL: https://svnweb.freebsd.org/changeset/base/320506 Log: Add myself to commiters-src.dot, emaste@ as mentor; sort his mentees while here Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11429 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Fri Jun 30 19:22:35 2017 (r320505) +++ head/share/misc/committers-src.dot Fri Jun 30 20:01:31 2017 (r320506) @@ -219,6 +219,7 @@ kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07 karels [label="Mike Karels\nkarels@FreeBSD.org\n2016/06/09"] ken [label="Ken Merry\nken@FreeBSD.org\n1998/09/08"] kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004/01/23"] +kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2017/06/20"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] @@ -466,9 +467,10 @@ eivind -> des eivind -> rwatson emaste -> achim -emaste -> rstone emaste -> dteske +emaste -> kevans emaste -> markj +emaste -> rstone emax -> markus From owner-svn-src-all@freebsd.org Fri Jun 30 20:06:17 2017 Return-Path: Delivered-To: svn-src-all@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 05C7FD9991A; Fri, 30 Jun 2017 20:06:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C96637B074; Fri, 30 Jun 2017 20:06:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UK6FBZ092483; Fri, 30 Jun 2017 20:06:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UK6FNg092482; Fri, 30 Jun 2017 20:06:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706302006.v5UK6FNg092482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 30 Jun 2017 20:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r320507 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 320507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 20:06:17 -0000 Author: gjb Date: Fri Jun 30 20:06:15 2017 New Revision: 320507 URL: https://svnweb.freebsd.org/changeset/base/320507 Log: Thaw stable/11 after releng/11.1 has branched. Committers are requested to excercise caution for the duration of the 11.1-RELEASE cycle, especially regarding changes that are eligible (or proposed) for MFC to releng/11.1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Jun 30 20:01:31 2017 (r320506) +++ svnadmin/conf/approvers Fri Jun 30 20:06:15 2017 (r320507) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/11/ re +#^stable/11/ re #^stable/10/ re ^release/ re ^releng/11.1/ re From owner-svn-src-all@freebsd.org Fri Jun 30 20:23:47 2017 Return-Path: Delivered-To: svn-src-all@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 D8A7AD99F2A; Fri, 30 Jun 2017 20:23:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A7E0E7BB3F; Fri, 30 Jun 2017 20:23:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UKNkup000896; Fri, 30 Jun 2017 20:23:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UKNkxZ000895; Fri, 30 Jun 2017 20:23:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706302023.v5UKNkxZ000895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jun 2017 20:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320508 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 320508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 20:23:47 -0000 Author: kib Date: Fri Jun 30 20:23:46 2017 New Revision: 320508 URL: https://svnweb.freebsd.org/changeset/base/320508 Log: Fix typo in the r320472 change to fgetws(). Return proper value. Reported by: Oleg Ginzburg Reviewed by: vangyzen Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/lib/libc/stdio/fgetws.c Modified: head/lib/libc/stdio/fgetws.c ============================================================================== --- head/lib/libc/stdio/fgetws.c Fri Jun 30 20:06:15 2017 (r320507) +++ head/lib/libc/stdio/fgetws.c Fri Jun 30 20:23:46 2017 (r320508) @@ -116,7 +116,7 @@ ok: ret = ws; end: FUNLOCKFILE_CANCELSAFE(); - return (ws); + return (ret); error: ret = NULL; From owner-svn-src-all@freebsd.org Fri Jun 30 20:27:53 2017 Return-Path: Delivered-To: svn-src-all@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 05F2ED9A01F; Fri, 30 Jun 2017 20:27:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C89047BD97; Fri, 30 Jun 2017 20:27:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UKRqNk001262; Fri, 30 Jun 2017 20:27:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UKRpeQ001259; Fri, 30 Jun 2017 20:27:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706302027.v5UKRpeQ001259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 30 Jun 2017 20:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320509 - in head/lib/libc: include stdio X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/lib/libc: include stdio X-SVN-Commit-Revision: 320509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 20:27:53 -0000 Author: kib Date: Fri Jun 30 20:27:51 2017 New Revision: 320509 URL: https://svnweb.freebsd.org/changeset/base/320509 Log: In the stdio cleanup push and pop wrappers, always call libc stubs for __pthread_cleanup_push/pop_imp instead of symbols also exported from libthr. This prevents calls into libthr if libthr is not yet initialized. The situation occurs e.g. when an LD_PRELOADed object is not linked against libthr, but the main binary is. Reported and tested by: jbeich PR: 220381 Discussed with: vangyzen Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/lib/libc/include/libc_private.h head/lib/libc/stdio/local.h Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Fri Jun 30 20:23:46 2017 (r320508) +++ head/lib/libc/include/libc_private.h Fri Jun 30 20:27:51 2017 (r320509) @@ -415,6 +415,11 @@ void __libc_map_stacks_exec(void); void _pthread_cancel_enter(int); void _pthread_cancel_leave(int); +struct _pthread_cleanup_info; +void ___pthread_cleanup_push_imp(void (*)(void *), void *, + struct _pthread_cleanup_info *); +void ___pthread_cleanup_pop_imp(int); + void __throw_constraint_handler_s(const char * restrict msg, int error); #endif /* _LIBC_PRIVATE_H_ */ Modified: head/lib/libc/stdio/local.h ============================================================================== --- head/lib/libc/stdio/local.h Fri Jun 30 20:23:46 2017 (r320508) +++ head/lib/libc/stdio/local.h Fri Jun 30 20:27:51 2017 (r320509) @@ -148,11 +148,11 @@ void __stdio_cancel_cleanup(void *); struct _pthread_cleanup_info __cleanup_info__; \ if (__isthreaded) { \ _FLOCKFILE(fp); \ - __pthread_cleanup_push_imp( \ + ___pthread_cleanup_push_imp( \ __stdio_cancel_cleanup, (fp), \ &__cleanup_info__); \ } else { \ - __pthread_cleanup_push_imp( \ + ___pthread_cleanup_push_imp( \ __stdio_cancel_cleanup, NULL, \ &__cleanup_info__); \ } \ @@ -160,7 +160,7 @@ void __stdio_cancel_cleanup(void *); #define FUNLOCKFILE_CANCELSAFE() \ (void)0; \ } \ - __pthread_cleanup_pop_imp(1); \ + ___pthread_cleanup_pop_imp(1); \ } #endif /* _STDIO_LOCAL_H */ From owner-svn-src-all@freebsd.org Fri Jun 30 21:32:50 2017 Return-Path: Delivered-To: svn-src-all@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 2ADA7D9AF2F; Fri, 30 Jun 2017 21:32:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 002267D919; Fri, 30 Jun 2017 21:32:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ULWn0m030248; Fri, 30 Jun 2017 21:32:49 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ULWmg0030245; Fri, 30 Jun 2017 21:32:48 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201706302132.v5ULWmg0030245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 30 Jun 2017 21:32: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: r320510 - in stable/10/bin/sh: . tests/expansion X-SVN-Group: stable-10 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/10/bin/sh: . tests/expansion X-SVN-Commit-Revision: 320510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 21:32:50 -0000 Author: jilles Date: Fri Jun 30 21:32:48 2017 New Revision: 320510 URL: https://svnweb.freebsd.org/changeset/base/320510 Log: MFC r315005: sh: Fix executing wrong command with ${x#$(y)}$(z). The parsed internal representation of words consists of a byte string with a list of nodes (commands in command substitution). Each unescaped CTLBACKQ or CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list. If param in ${param#%##%%word} is not set, the word is not expanded (in a deviation of POSIX shared with other ash variants and ksh93). Erroneously, the pointer in the list of commands (argbackq) was not advanced. This caused the wrong command to be executed later if the outer word contained another command substitution. Example: echo "${unsetvar#$(echo a)}$(echo b)" wrote "a" but should write "b". Added: stable/10/bin/sh/tests/expansion/cmdsubst23.0 - copied unchanged from r315005, head/bin/sh/tests/expansion/cmdsubst23.0 Modified: stable/10/bin/sh/expand.c stable/10/bin/sh/tests/expansion/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/expand.c ============================================================================== --- stable/10/bin/sh/expand.c Fri Jun 30 20:27:51 2017 (r320509) +++ stable/10/bin/sh/expand.c Fri Jun 30 21:32:48 2017 (r320510) @@ -740,8 +740,10 @@ again: /* jump here after setting a variable with ${va case VSTRIMLEFTMAX: case VSTRIMRIGHT: case VSTRIMRIGHTMAX: - if (!set) + if (!set) { + set = 1; break; + } /* * Terminate the string and start recording the pattern * right after it Modified: stable/10/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/10/bin/sh/tests/expansion/Makefile Fri Jun 30 20:27:51 2017 (r320509) +++ stable/10/bin/sh/tests/expansion/Makefile Fri Jun 30 21:32:48 2017 (r320510) @@ -43,6 +43,7 @@ FILES+= cmdsubst19.0 FILES+= cmdsubst20.0 FILES+= cmdsubst21.0 FILES+= cmdsubst22.0 +FILES+= cmdsubst23.0 FILES+= export1.0 FILES+= export2.0 FILES+= export3.0 Copied: stable/10/bin/sh/tests/expansion/cmdsubst23.0 (from r315005, head/bin/sh/tests/expansion/cmdsubst23.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/cmdsubst23.0 Fri Jun 30 21:32:48 2017 (r320510, copy of r315005, head/bin/sh/tests/expansion/cmdsubst23.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +unset n +x=abcd +[ "X${n#$(echo a)}X${x#$(echo ab)}X$(echo abc)X" = XXcdXabcX ] From owner-svn-src-all@freebsd.org Fri Jun 30 22:01:20 2017 Return-Path: Delivered-To: svn-src-all@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 1FC95D9B8CC; Fri, 30 Jun 2017 22:01:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E34E07E740; Fri, 30 Jun 2017 22:01:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UM1Jrq041790; Fri, 30 Jun 2017 22:01:19 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UM1JKR041789; Fri, 30 Jun 2017 22:01:19 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201706302201.v5UM1JKR041789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 30 Jun 2017 22:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320511 - head/sys/geom/virstor X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/geom/virstor X-SVN-Commit-Revision: 320511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 22:01:20 -0000 Author: rlibby Date: Fri Jun 30 22:01:18 2017 New Revision: 320511 URL: https://svnweb.freebsd.org/changeset/base/320511 Log: g_virstor.h: macro parenthesization Build with gcc -Wint-in-bool-context revealed a macro parenthesization error (invoking LOG_MSG with a ternary expression for lvl). Reviewed by: markj Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential revision: https://reviews.freebsd.org/D11411 Modified: head/sys/geom/virstor/g_virstor.h Modified: head/sys/geom/virstor/g_virstor.h ============================================================================== --- head/sys/geom/virstor/g_virstor.h Fri Jun 30 21:32:48 2017 (r320510) +++ head/sys/geom/virstor/g_virstor.h Fri Jun 30 22:01:18 2017 (r320511) @@ -48,8 +48,8 @@ struct virstor_map_entry { #define LOG_MSG(lvl, ...) do { \ if (g_virstor_debug >= (lvl)) { \ printf("GEOM_" G_VIRSTOR_CLASS_NAME); \ - if (lvl > 0) \ - printf("[%u]", lvl); \ + if ((lvl) > 0) \ + printf("[%u]", (lvl)); \ printf(": "); \ printf(__VA_ARGS__); \ printf("\n"); \ @@ -60,8 +60,8 @@ struct virstor_map_entry { #define LOG_REQ(lvl, bp, ...) do { \ if (g_virstor_debug >= (lvl)) { \ printf("GEOM_" G_VIRSTOR_CLASS_NAME); \ - if (lvl > 0) \ - printf("[%u]", lvl); \ + if ((lvl) > 0) \ + printf("[%u]", (lvl)); \ printf(": "); \ printf(__VA_ARGS__); \ printf(" "); \ From owner-svn-src-all@freebsd.org Fri Jun 30 22:06:26 2017 Return-Path: Delivered-To: svn-src-all@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 51EB9D9BB6D; Fri, 30 Jun 2017 22:06:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 197E17EBAA; Fri, 30 Jun 2017 22:06:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UM6Pko043014; Fri, 30 Jun 2017 22:06:25 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UM6Pgo043013; Fri, 30 Jun 2017 22:06:25 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201706302206.v5UM6Pgo043013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 30 Jun 2017 22:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320513 - head/sys/dev/mpt X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/mpt X-SVN-Commit-Revision: 320513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 22:06:26 -0000 Author: rlibby Date: Fri Jun 30 22:06:24 2017 New Revision: 320513 URL: https://svnweb.freebsd.org/changeset/base/320513 Log: mpt.h: macro parenthesization Build with gcc -Wint-in-bool-context revealed a macro parenthesization error (invoking mpt_lprt with a ternary expression for level). Reviewed by: markj Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential revision: https://reviews.freebsd.org/D11412 Modified: head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Fri Jun 30 22:04:10 2017 (r320512) +++ head/sys/dev/mpt/mpt.h Fri Jun 30 22:06:24 2017 (r320513) @@ -932,14 +932,14 @@ enum { #define mpt_lprt(mpt, level, ...) \ do { \ - if (level <= (mpt)->verbose) \ + if ((level) <= (mpt)->verbose) \ mpt_prt(mpt, __VA_ARGS__); \ } while (0) #if 0 #define mpt_lprtc(mpt, level, ...) \ do { \ - if (level <= (mpt)->verbose) \ + if ((level) <= (mpt)->verbose) \ mpt_prtc(mpt, __VA_ARGS__); \ } while (0) #endif From owner-svn-src-all@freebsd.org Fri Jun 30 22:14:23 2017 Return-Path: Delivered-To: svn-src-all@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 BCE4CD9C0CC; Fri, 30 Jun 2017 22:14:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7E7077F7B2; Fri, 30 Jun 2017 22:14:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UMEMto048793; Fri, 30 Jun 2017 22:14:22 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UMEMe0048792; Fri, 30 Jun 2017 22:14:22 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201706302214.v5UMEMe0048792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 30 Jun 2017 22:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320517 - head/sys/dev/xen/netfront X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/xen/netfront X-SVN-Commit-Revision: 320517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 22:14:23 -0000 Author: rlibby Date: Fri Jun 30 22:14:22 2017 New Revision: 320517 URL: https://svnweb.freebsd.org/changeset/base/320517 Log: netfront.c: avoid gcc variably-modified warning gcc produces a "variably modified X at file scope" warning for structures that use these size definitions. I think the definitions are actually fine but can be rephrased with the __CONST_RING_SIZE macro more cleanly anyway. Reviewed by: markj, royger Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential revision: https://reviews.freebsd.org/D11417 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Fri Jun 30 22:13:28 2017 (r320516) +++ head/sys/dev/xen/netfront/netfront.c Fri Jun 30 22:14:22 2017 (r320517) @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); /* Features supported by all backends. TSO and LRO can be negotiated */ #define XN_CSUM_FEATURES (CSUM_TCP | CSUM_UDP) -#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) -#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) +#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE) +#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE) #define NET_RX_SLOTS_MIN (XEN_NETIF_NR_SLOTS_MIN + 1) From owner-svn-src-all@freebsd.org Fri Jun 30 22:16:29 2017 Return-Path: Delivered-To: svn-src-all@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 C7F6ED9C428; Fri, 30 Jun 2017 22:16:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9452A80271; Fri, 30 Jun 2017 22:16:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UMGS4n050048; Fri, 30 Jun 2017 22:16:28 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UMGSoI050046; Fri, 30 Jun 2017 22:16:28 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201706302216.v5UMGSoI050046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 30 Jun 2017 22:16:28 +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: r320518 - in stable/10: etc/mtree usr.bin/compress usr.bin/compress/tests X-SVN-Group: stable-10 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/10: etc/mtree usr.bin/compress usr.bin/compress/tests X-SVN-Commit-Revision: 320518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 22:16:29 -0000 Author: jilles Date: Fri Jun 30 22:16:28 2017 New Revision: 320518 URL: https://svnweb.freebsd.org/changeset/base/320518 Log: MFC r318591: compress: Add basic tests. Added: stable/10/usr.bin/compress/tests/ - copied from r318591, head/usr.bin/compress/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/compress/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Fri Jun 30 22:14:22 2017 (r320517) +++ stable/10/etc/mtree/BSD.tests.dist Fri Jun 30 22:16:28 2017 (r320518) @@ -576,6 +576,8 @@ .. cmp .. + compress + .. cpio .. col Modified: stable/10/usr.bin/compress/Makefile ============================================================================== --- stable/10/usr.bin/compress/Makefile Fri Jun 30 22:14:22 2017 (r320517) +++ stable/10/usr.bin/compress/Makefile Fri Jun 30 22:16:28 2017 (r320518) @@ -1,6 +1,8 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 # $FreeBSD$ +.include + PROG= compress SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress @@ -8,5 +10,9 @@ MLINKS= compress.1 uncompress.1 # XXX zopen is not part of libc # MAN=zopen.3 + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include From owner-svn-src-all@freebsd.org Fri Jun 30 23:53:41 2017 Return-Path: Delivered-To: svn-src-all@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 70676D9DE45; Fri, 30 Jun 2017 23:53:41 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3DE4483294; Fri, 30 Jun 2017 23:53:41 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UNreZJ090806; Fri, 30 Jun 2017 23:53:40 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UNreVP090805; Fri, 30 Jun 2017 23:53:40 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201706302353.v5UNreVP090805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Fri, 30 Jun 2017 23:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320521 - head/lib/libxo/tests X-SVN-Group: head X-SVN-Commit-Author: phil X-SVN-Commit-Paths: head/lib/libxo/tests X-SVN-Commit-Revision: 320521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 23:53:41 -0000 Author: phil Date: Fri Jun 30 23:53:40 2017 New Revision: 320521 URL: https://svnweb.freebsd.org/changeset/base/320521 Log: Fix functional_test.sh to use --libxo options instead of the deprecated LIBXO_OPTIONS environment variable. Submitted by: phil Modified: head/lib/libxo/tests/functional_test.sh Modified: head/lib/libxo/tests/functional_test.sh ============================================================================== --- head/lib/libxo/tests/functional_test.sh Fri Jun 30 22:19:18 2017 (r320520) +++ head/lib/libxo/tests/functional_test.sh Fri Jun 30 23:53:40 2017 (r320521) @@ -39,14 +39,14 @@ check() [ -s "${out_file}" ] && out_flag="-o file:${out_file}" if [ "$xo_fmt" = "E" ]; then - LIBXO_OPTIONS="warn,encoder=test" + libxo_options=" warn,encoder=test" else - LIBXO_OPTIONS=":W${xo_fmt}" + libxo_options=":W${xo_fmt}" fi atf_check -s exit:0 -e file:${err_file} -o file:${out_file} \ env LC_ALL=en_US.UTF-8 \ - LIBXO_OPTIONS="${LIBXO_OPTIONS}" TZ="EST" "${SRCDIR}/${tc}" \ + TZ="EST" "${SRCDIR}/${tc}" --libxo${libxo_options}\ } From owner-svn-src-all@freebsd.org Sat Jul 1 02:19:52 2017 Return-Path: Delivered-To: svn-src-all@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 E2489DA300D; Sat, 1 Jul 2017 02:19:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4B435326F; Sat, 1 Jul 2017 02:19:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v612Jnkj047874; Sat, 1 Jul 2017 02:19:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v612JnCm047873; Sat, 1 Jul 2017 02:19:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201707010219.v612JnCm047873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 1 Jul 2017 02:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320522 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 320522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 02:19:53 -0000 Author: imp Date: Sat Jul 1 02:19:48 2017 New Revision: 320522 URL: https://svnweb.freebsd.org/changeset/base/320522 Log: Fix sign of resid and add a mostly useless cast to cope with signed vs unsigned check warnings from traditional unix code construsts bogusly flagged as potentially unsafe. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Fri Jun 30 23:53:40 2017 (r320521) +++ head/sbin/nvmecontrol/wdc.c Sat Jul 1 02:19:48 2017 (r320522) @@ -105,7 +105,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui int fd2; uint8_t *buf; uint32_t len, offset; - ssize_t resid; + size_t resid; wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); @@ -142,7 +142,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui resid = len; first = 0; } - if (write(fd2, buf, resid) != resid) + if (write(fd2, buf, resid) != (ssize_t)resid) err(1, "write"); offset += resid; len -= resid; From owner-svn-src-all@freebsd.org Sat Jul 1 03:30:48 2017 Return-Path: Delivered-To: svn-src-all@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 BDA0FDA5926; Sat, 1 Jul 2017 03:30:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8C80065726; Sat, 1 Jul 2017 03:30:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v613Ul2N077173; Sat, 1 Jul 2017 03:30:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v613Ulvm077172; Sat, 1 Jul 2017 03:30:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707010330.v613Ulvm077172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 03:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320523 - stable/11/sys/amd64/ia32 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/ia32 X-SVN-Commit-Revision: 320523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 03:30:48 -0000 Author: kib Date: Sat Jul 1 03:30:47 2017 New Revision: 320523 URL: https://svnweb.freebsd.org/changeset/base/320523 Log: MFC r320308: Translate between abridged and full x87 tags for compat32 ptrace(PT_GETFPREGS). Modified: stable/11/sys/amd64/ia32/ia32_reg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/ia32/ia32_reg.c ============================================================================== --- stable/11/sys/amd64/ia32/ia32_reg.c Sat Jul 1 02:19:48 2017 (r320522) +++ stable/11/sys/amd64/ia32/ia32_reg.c Sat Jul 1 03:30:47 2017 (r320523) @@ -156,7 +156,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_87->en_cw = penv_xmm->en_cw; penv_87->en_sw = penv_xmm->en_sw; - penv_87->en_tw = penv_xmm->en_tw; + /* * XXX for en_fip/fcs/foo/fos, check if the fxsave format * uses the old-style layout for 32 bit user apps. If so, @@ -170,9 +170,13 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* Entry into the kernel always sets TF_HASSEGS */ penv_87->en_fos = td->td_frame->tf_ds; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_87->en_tw = 0xffff; + for (i = 0; i < 8; ++i) { sv_87->sv_ac[i] = sv_fpu->sv_fp[i].fp_acc; + if ((penv_xmm->en_tw & (1 << i)) != 0) + penv_87->en_tw &= ~(3 << i * 2); + } return (0); } @@ -189,15 +193,19 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_xmm->en_cw = penv_87->en_cw; penv_xmm->en_sw = penv_87->en_sw; - penv_xmm->en_tw = penv_87->en_tw; penv_xmm->en_rip = penv_87->en_fip; /* penv_87->en_fcs and en_fos ignored, see above */ penv_xmm->en_opcode = penv_87->en_opcode; penv_xmm->en_rdp = penv_87->en_foo; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_xmm->en_tw = 0; + for (i = 0; i < 8; ++i) { sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i]; + if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) + penv_xmm->en_tw |= 1 << i; + } + for (i = 8; i < 16; ++i) bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc)); fpuuserinited(td); From owner-svn-src-all@freebsd.org Sat Jul 1 03:33:27 2017 Return-Path: Delivered-To: svn-src-all@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 930A4DA5B7F; Sat, 1 Jul 2017 03:33:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5F5B965AB0; Sat, 1 Jul 2017 03:33:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v613XQvu081110; Sat, 1 Jul 2017 03:33:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v613XQG6081109; Sat, 1 Jul 2017 03:33:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707010333.v613XQG6081109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 03:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320524 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 03:33:27 -0000 Author: kib Date: Sat Jul 1 03:33:26 2017 New Revision: 320524 URL: https://svnweb.freebsd.org/changeset/base/320524 Log: MFC r320316: Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread. Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Sat Jul 1 03:30:47 2017 (r320523) +++ stable/11/sys/vm/vm_map.c Sat Jul 1 03:33:26 2017 (r320524) @@ -2712,9 +2712,6 @@ done: } for (entry = first_entry; entry != &map->header && entry->start < end; entry = entry->next) { - if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) - goto next_entry_done; - /* * If VM_MAP_WIRE_HOLESOK was specified, an empty * space in the unwired region could have been mapped @@ -2722,7 +2719,7 @@ done: * pages or draining MAP_ENTRY_IN_TRANSITION. * Moreover, another thread could be simultaneously * wiring this new mapping entry. Detect these cases - * and skip any entries marked as in transition by us. + * and skip any entries marked as in transition not by us. */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { @@ -2730,6 +2727,9 @@ done: ("vm_map_wire: !HOLESOK and new/changed entry")); continue; } + + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) + goto next_entry_done; if (rv == KERN_SUCCESS) { if (user_wire) From owner-svn-src-all@freebsd.org Sat Jul 1 03:38:14 2017 Return-Path: Delivered-To: svn-src-all@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 4BA64DA5D24; Sat, 1 Jul 2017 03:38:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 141AD65CF4; Sat, 1 Jul 2017 03:38:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v613cDB1081349; Sat, 1 Jul 2017 03:38:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v613cDDT081348; Sat, 1 Jul 2017 03:38:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707010338.v613cDDT081348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 03:38:13 +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: r320525 - stable/10/sys/amd64/ia32 X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/amd64/ia32 X-SVN-Commit-Revision: 320525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 03:38:14 -0000 Author: kib Date: Sat Jul 1 03:38:12 2017 New Revision: 320525 URL: https://svnweb.freebsd.org/changeset/base/320525 Log: MFC r320308: Translate between abridged and full x87 tags for compat32 ptrace(PT_GETFPREGS). Modified: stable/10/sys/amd64/ia32/ia32_reg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/ia32/ia32_reg.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_reg.c Sat Jul 1 03:33:26 2017 (r320524) +++ stable/10/sys/amd64/ia32/ia32_reg.c Sat Jul 1 03:38:12 2017 (r320525) @@ -156,7 +156,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_87->en_cw = penv_xmm->en_cw; penv_87->en_sw = penv_xmm->en_sw; - penv_87->en_tw = penv_xmm->en_tw; + /* * XXX for en_fip/fcs/foo/fos, check if the fxsave format * uses the old-style layout for 32 bit user apps. If so, @@ -170,9 +170,13 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs) /* Entry into the kernel always sets TF_HASSEGS */ penv_87->en_fos = td->td_frame->tf_ds; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_87->en_tw = 0xffff; + for (i = 0; i < 8; ++i) { sv_87->sv_ac[i] = sv_fpu->sv_fp[i].fp_acc; + if ((penv_xmm->en_tw & (1 << i)) != 0) + penv_87->en_tw &= ~(3 << i * 2); + } return (0); } @@ -189,15 +193,19 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs) /* FPU control/status */ penv_xmm->en_cw = penv_87->en_cw; penv_xmm->en_sw = penv_87->en_sw; - penv_xmm->en_tw = penv_87->en_tw; penv_xmm->en_rip = penv_87->en_fip; /* penv_87->en_fcs and en_fos ignored, see above */ penv_xmm->en_opcode = penv_87->en_opcode; penv_xmm->en_rdp = penv_87->en_foo; - /* FPU registers */ - for (i = 0; i < 8; ++i) + /* FPU registers and tags */ + penv_xmm->en_tw = 0; + for (i = 0; i < 8; ++i) { sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i]; + if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) + penv_xmm->en_tw |= 1 << i; + } + for (i = 8; i < 16; ++i) bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc)); fpuuserinited(td); From owner-svn-src-all@freebsd.org Sat Jul 1 03:39:39 2017 Return-Path: Delivered-To: svn-src-all@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 AF710DA5E39; Sat, 1 Jul 2017 03:39:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7B90C65E8D; Sat, 1 Jul 2017 03:39:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v613dcRv081449; Sat, 1 Jul 2017 03:39:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v613dcBR081448; Sat, 1 Jul 2017 03:39:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707010339.v613dcBR081448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 03:39: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: r320526 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 03:39:39 -0000 Author: kib Date: Sat Jul 1 03:39:38 2017 New Revision: 320526 URL: https://svnweb.freebsd.org/changeset/base/320526 Log: MFC r320316: Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sat Jul 1 03:38:12 2017 (r320525) +++ stable/10/sys/vm/vm_map.c Sat Jul 1 03:39:38 2017 (r320526) @@ -2658,9 +2658,6 @@ done: } for (entry = first_entry; entry != &map->header && entry->start < end; entry = entry->next) { - if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) - goto next_entry_done; - /* * If VM_MAP_WIRE_HOLESOK was specified, an empty * space in the unwired region could have been mapped @@ -2668,7 +2665,7 @@ done: * pages or draining MAP_ENTRY_IN_TRANSITION. * Moreover, another thread could be simultaneously * wiring this new mapping entry. Detect these cases - * and skip any entries marked as in transition by us. + * and skip any entries marked as in transition not by us. */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { @@ -2676,6 +2673,9 @@ done: ("vm_map_wire: !HOLESOK and new/changed entry")); continue; } + + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) + goto next_entry_done; if (rv == KERN_SUCCESS) { if (user_wire) From owner-svn-src-all@freebsd.org Sat Jul 1 05:27:41 2017 Return-Path: Delivered-To: svn-src-all@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 6B2B4D8D928; Sat, 1 Jul 2017 05:27:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 476EE791B9; Sat, 1 Jul 2017 05:27:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v615Rele026695; Sat, 1 Jul 2017 05:27:40 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v615RekV026694; Sat, 1 Jul 2017 05:27:40 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707010527.v615RekV026694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 05:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320527 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 05:27:41 -0000 Author: alc Date: Sat Jul 1 05:27:40 2017 New Revision: 320527 URL: https://svnweb.freebsd.org/changeset/base/320527 Log: Change blst_leaf_alloc() to handle a cursor argument, and to improve performance. To find in the leaf bitmap all ranges of sufficient length, use a doubling strategy with shift-and-and until each bit still set represents a bit sequence of length 'count', or until the bitmask is zero. In the latter case, update the hint based on the first bit sequence length not found to be available. For example, seeking an interval of length 12, the set bits of the bitmap would represent intervals of length 1, then 2, then 3, then 6, then 12. If no bits are set at the point when each bit represents an interval of length 6, then the hint can be updated to 5 and the search terminated. If long-enough intervals are found, discard those before the cursor. If any remain, use binary search to find the position of the first of them, and allocate that interval. Submitted by: Doug Moore Reviewed by: kib, markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D11426 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sat Jul 1 03:39:38 2017 (r320526) +++ head/sys/kern/subr_blist.c Sat Jul 1 05:27:40 2017 (r320527) @@ -121,7 +121,8 @@ void panic(const char *ctl, ...); * static support functions */ -static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count); +static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, + daddr_t cursor); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, daddr_t skip, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); @@ -227,7 +228,8 @@ blist_alloc(blist_t bl, daddr_t count) */ while (count <= bl->bl_root->bm_bighint) { if (bl->bl_radix == BLIST_BMAP_RADIX) - blk = blst_leaf_alloc(bl->bl_root, 0, count); + blk = blst_leaf_alloc(bl->bl_root, 0, count, + bl->bl_cursor); else blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, bl->bl_skip, bl->bl_cursor); @@ -352,77 +354,92 @@ blist_print(blist_t bl) /* * blist_leaf_alloc() - allocate at a leaf in the radix tree (a bitmap). * - * This is the core of the allocator and is optimized for the 1 block - * and the BLIST_BMAP_RADIX block allocation cases. Other cases are - * somewhat slower. The 1 block allocation case is log2 and extremely - * quick. + * This is the core of the allocator and is optimized for the + * BLIST_BMAP_RADIX block allocation case. Otherwise, execution + * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX). */ static daddr_t -blst_leaf_alloc( - blmeta_t *scan, - daddr_t blk, - int count -) { - u_daddr_t orig = scan->u.bmu_bitmap; +blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) +{ + u_daddr_t mask; + int count1, hi, lo, mid, num_shifts, range1, range_ext; - if (orig == 0) { + if (count == BLIST_BMAP_RADIX) { /* - * Optimize bitmap all-allocated case. Also, count = 1 - * case assumes at least 1 bit is free in the bitmap, so - * we have to take care of this case here. + * Optimize allocation of BLIST_BMAP_RADIX bits. If this wasn't + * a special case, then forming the final value of 'mask' below + * would require special handling to avoid an invalid left shift + * when count equals the number of bits in mask. */ + if (~scan->u.bmu_bitmap != 0) { + scan->bm_bighint = BLIST_BMAP_RADIX - 1; + return (SWAPBLK_NONE); + } + if (cursor != blk) + return (SWAPBLK_NONE); + scan->u.bmu_bitmap = 0; scan->bm_bighint = 0; - return(SWAPBLK_NONE); + return (blk); } - if (count == 1) { + range1 = 0; + count1 = count - 1; + num_shifts = fls(count1); + mask = scan->u.bmu_bitmap; + while (mask != 0 && num_shifts > 0) { /* - * Optimized code to allocate one bit out of the bitmap + * If bit i is set in mask, then bits in [i, i+range1] are set + * in scan->u.bmu_bitmap. The value of range1 is equal to + * count1 >> num_shifts. Grow range and reduce num_shifts to 0, + * while preserving these invariants. The updates to mask leave + * fewer bits set, but each bit that remains set represents a + * longer string of consecutive bits set in scan->u.bmu_bitmap. */ - u_daddr_t mask; - int j = BLIST_BMAP_RADIX/2; - int r = 0; - - mask = (u_daddr_t)-1 >> (BLIST_BMAP_RADIX/2); - - while (j) { - if ((orig & mask) == 0) { - r += j; - orig >>= j; - } - j >>= 1; - mask >>= j; - } - scan->u.bmu_bitmap &= ~((u_daddr_t)1 << r); - return(blk + r); + num_shifts--; + range_ext = range1 + ((count1 >> num_shifts) & 1); + mask &= mask >> range_ext; + range1 += range_ext; } - if (count <= BLIST_BMAP_RADIX) { + if (mask == 0) { /* - * non-optimized code to allocate N bits out of the bitmap. - * The more bits, the faster the code runs. It will run - * the slowest allocating 2 bits, but since there aren't any - * memory ops in the core loop (or shouldn't be, anyway), - * you probably won't notice the difference. + * Update bighint. There is no allocation bigger than range1 + * available in this leaf. */ - int j; - int n = BLIST_BMAP_RADIX - count; - u_daddr_t mask; + scan->bm_bighint = range1; + return (SWAPBLK_NONE); + } - mask = (u_daddr_t)-1 >> n; + /* + * Discard any candidates that appear before the cursor. + */ + lo = cursor - blk; + mask &= ~(u_daddr_t)0 << lo; - for (j = 0; j <= n; ++j) { - if ((orig & mask) == mask) { - scan->u.bmu_bitmap &= ~mask; - return(blk + j); - } - mask = (mask << 1); - } + if (mask == 0) + return (SWAPBLK_NONE); + + /* + * The least significant set bit in mask marks the start of the first + * available range of sufficient size. Clear all the bits but that one, + * and then perform a binary search to find its position. + */ + mask &= -mask; + hi = BLIST_BMAP_RADIX - count1; + while (lo + 1 < hi) { + mid = (lo + hi) >> 1; + if ((mask >> mid) != 0) + lo = mid; + else + hi = mid; } + /* - * We couldn't allocate count in this subtree, update bighint. + * Set in mask exactly the bits being allocated, and clear them from + * the set of available bits. */ - scan->bm_bighint = count - 1; - return(SWAPBLK_NONE); + mask = (mask << count) - mask; + scan->u.bmu_bitmap &= ~mask; + return (blk + lo); } /* @@ -491,7 +508,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * The allocation might fit in the i'th subtree. */ if (next_skip == 1) { - r = blst_leaf_alloc(&scan[i], blk, count); + r = blst_leaf_alloc(&scan[i], blk, count, + cursor > blk ? cursor : blk); } else { r = blst_meta_alloc(&scan[i], blk, count, radix, next_skip - 1, cursor > blk ? From owner-svn-src-all@freebsd.org Sat Jul 1 05:35:35 2017 Return-Path: Delivered-To: svn-src-all@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 2B42ED8EDF6; Sat, 1 Jul 2017 05:35:35 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BC71C79BA4; Sat, 1 Jul 2017 05:35:34 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v615ZXpZ031187; Sat, 1 Jul 2017 05:35:33 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v615ZTSY031146; Sat, 1 Jul 2017 05:35:29 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201707010535.v615ZTSY031146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 1 Jul 2017 05:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320528 - in head/sys: amd64/include arm/arm arm/include arm64/arm64 arm64/include dev/aac dev/aacraid dev/bnxt dev/cxgb dev/cxgb/ulp/iw_cxgb dev/hyperv/storvsc dev/mfi dev/tsec dev/xdm... X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: in head/sys: amd64/include arm/arm arm/include arm64/arm64 arm64/include dev/aac dev/aacraid dev/bnxt dev/cxgb dev/cxgb/ulp/iw_cxgb dev/hyperv/storvsc dev/mfi dev/tsec dev/xdma dev/xen/blkfront i386/i... X-SVN-Commit-Revision: 320528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 05:35:35 -0000 Author: jah Date: Sat Jul 1 05:35:29 2017 New Revision: 320528 URL: https://svnweb.freebsd.org/changeset/base/320528 Log: Clean up MD pollution of bus_dma.h: --Remove special-case handling of sparc64 bus_dmamap* functions. Replace with a more generic mechanism that allows MD busdma implementations to generate inline mapping functions by defining WANT_INLINE_DMAMAP in . This is currently useful for sparc64, x86, and arm64, which all implement non-load dmamap operations as simple wrappers around map objects which may be bus- or device-specific. --Remove NULL-checked bus_dmamap macros. Implement the equivalent NULL checks in the inlined x86 implementation. For non-x86 platforms, these checks are a minor pessimization as those platforms do not currently allow NULL maps. NULL maps were originally allowed on arm64, which appears to have been the motivation behind adding arm[64]-specific barriers to bus_dma.h, but that support was removed in r299463. --Simplify the internal interface used by the bus_dmamap_load* variants and move it to bus_dma_internal.h --Fix some drivers that directly include sys/bus_dma.h despite the recommendations of bus_dma(9) Reviewed by: kib (previous revision), marius Differential Revision: https://reviews.freebsd.org/D10729 Added: head/sys/sys/bus_dma_internal.h (contents, props changed) head/sys/x86/include/bus_dma.h (contents, props changed) Modified: head/sys/amd64/include/bus_dma.h head/sys/arm/arm/busdma_machdep-v4.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/include/bus_dma.h head/sys/arm64/arm64/busdma_machdep.c head/sys/arm64/include/bus_dma.h head/sys/arm64/include/bus_dma_impl.h head/sys/dev/aac/aac.c head/sys/dev/aacraid/aacraid.c head/sys/dev/bnxt/bnxt.h head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/mfi/mfi.c head/sys/dev/mfi/mfi_cam.c head/sys/dev/tsec/if_tsec.c head/sys/dev/xdma/xdma.c head/sys/dev/xen/blkfront/blkfront.c head/sys/i386/include/bus_dma.h head/sys/mips/include/bus_dma.h head/sys/mips/mips/busdma_machdep.c head/sys/net/iflib.h head/sys/powerpc/include/bus_dma.h head/sys/powerpc/powerpc/busdma_machdep.c head/sys/riscv/include/bus_dma.h head/sys/riscv/riscv/busdma_machdep.c head/sys/sparc64/include/bus_dma.h head/sys/sys/bus_dma.h head/sys/x86/include/busdma_impl.h head/sys/x86/iommu/busdma_dmar.c head/sys/x86/x86/busdma_bounce.c head/sys/x86/x86/busdma_machdep.c Modified: head/sys/amd64/include/bus_dma.h ============================================================================== --- head/sys/amd64/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/amd64/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -29,6 +29,6 @@ #ifndef _AMD64_BUS_DMA_H_ #define _AMD64_BUS_DMA_H_ -#include +#include #endif /* _AMD64_BUS_DMA_H_ */ Modified: head/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v4.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm/arm/busdma_machdep-v4.c Sat Jul 1 05:35:29 2017 (r320528) @@ -1008,7 +1008,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); return (EFBIG); /* XXX better return value here? */ } return (0); @@ -1129,14 +1129,14 @@ cleanup: * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); return (EFBIG); /* XXX better return value here? */ } return (0); } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { @@ -1161,7 +1161,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t * Release the mapping held by map. */ void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { struct bounce_page *bpage; struct bounce_zone *bz; @@ -1334,7 +1334,7 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, bus_dmamap_t m } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct sync_list *sl, *end; int bufaligned; Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm/arm/busdma_machdep-v6.c Sat Jul 1 05:35:29 2017 (r320528) @@ -1070,7 +1070,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); return (EFBIG); /* XXX better return value here? */ } return (0); @@ -1195,14 +1195,14 @@ cleanup: * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); return (EFBIG); /* XXX better return value here? */ } return (0); } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { @@ -1226,7 +1226,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t * Release the mapping held by map. */ void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { struct bounce_page *bpage; struct bounce_zone *bz; @@ -1326,7 +1326,7 @@ dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct bounce_page *bpage; struct sync_list *sl, *end; Modified: head/sys/arm/include/bus_dma.h ============================================================================== --- head/sys/arm/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -67,6 +67,7 @@ #define _ARM_BUS_DMA_H #include +#include /* Bus Space DMA macros */ Modified: head/sys/arm64/arm64/busdma_machdep.c ============================================================================== --- head/sys/arm64/arm64/busdma_machdep.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm64/arm64/busdma_machdep.c Sat Jul 1 05:35:29 2017 (r320528) @@ -223,133 +223,3 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (tc->impl->tag_destroy(dmat)); } -/* - * Allocate a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int -bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->map_create(dmat, flags, mapp)); -} - -/* - * Destroy a handle for mapping from kva/uva/physical - * address space into bus device space. - */ -int -bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->map_destroy(dmat, map)); -} - - -/* - * Allocate a piece of memory that can be efficiently mapped into - * bus device space based on the constraints listed in the dma tag. - * A dmamap to for use with dmamap_load is also allocated. - */ -int -bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->mem_alloc(dmat, vaddr, flags, mapp)); -} - -/* - * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. Make the same choice for free/contigfree. - */ -void -bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - tc->impl->mem_free(dmat, vaddr, map); -} - -int -_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, - bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->load_phys(dmat, map, buf, buflen, flags, segs, - segp)); -} - -int -_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma, - bus_size_t tlen, int ma_offs, int flags, bus_dma_segment_t *segs, - int *segp) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->load_ma(dmat, map, ma, tlen, ma_offs, flags, - segs, segp)); -} - -int -_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, - bus_size_t buflen, pmap_t pmap, int flags, bus_dma_segment_t *segs, - int *segp) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->load_buffer(dmat, map, buf, buflen, pmap, flags, segs, - segp)); -} - -void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, - struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - tc->impl->map_waitok(dmat, map, mem, callback, callback_arg); -} - -bus_dma_segment_t * -_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, - bus_dma_segment_t *segs, int nsegs, int error) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); -} - -/* - * Release the mapping held by map. - */ -void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - tc->impl->map_unload(dmat, map); -} - -void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) -{ - struct bus_dma_tag_common *tc; - - tc = (struct bus_dma_tag_common *)dmat; - tc->impl->map_sync(dmat, map, op); -} Modified: head/sys/arm64/include/bus_dma.h ============================================================================== --- head/sys/arm64/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm64/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -3,6 +3,139 @@ #ifndef _MACHINE_BUS_DMA_H_ #define _MACHINE_BUS_DMA_H_ +#define WANT_INLINE_DMAMAP #include + +#include + +/* + * Allocate a handle for mapping from kva/uva/physical + * address space into bus device space. + */ +static inline int +bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->map_create(dmat, flags, mapp)); +} + +/* + * Destroy a handle for mapping from kva/uva/physical + * address space into bus device space. + */ +static inline int +bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->map_destroy(dmat, map)); +} + +/* + * Allocate a piece of memory that can be efficiently mapped into + * bus device space based on the constraints listed in the dma tag. + * A dmamap to for use with dmamap_load is also allocated. + */ +static inline int +bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, + bus_dmamap_t *mapp) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->mem_alloc(dmat, vaddr, flags, mapp)); +} + +/* + * Free a piece of memory and it's allociated dmamap, that was allocated + * via bus_dmamem_alloc. Make the same choice for free/contigfree. + */ +static inline void +bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + tc->impl->mem_free(dmat, vaddr, map); +} + +/* + * Release the mapping held by map. + */ +static inline void +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + tc->impl->map_unload(dmat, map); +} + +static inline void +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + tc->impl->map_sync(dmat, map, op); +} + +static inline int +_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, + bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->load_phys(dmat, map, buf, buflen, flags, segs, + segp)); +} + +static inline int +_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma, + bus_size_t tlen, int ma_offs, int flags, bus_dma_segment_t *segs, + int *segp) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->load_ma(dmat, map, ma, tlen, ma_offs, flags, + segs, segp)); +} + +static inline int +_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, + bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs, + int *segp) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->load_buffer(dmat, map, buf, buflen, pmap, flags, segs, + segp)); +} + +static inline void +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, + struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + tc->impl->map_waitok(dmat, map, mem, callback, callback_arg); +} + +static inline bus_dma_segment_t * +_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, + bus_dma_segment_t *segs, int nsegs, int error) +{ + struct bus_dma_tag_common *tc; + + tc = (struct bus_dma_tag_common *)dmat; + return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); +} #endif /* !_MACHINE_BUS_DMA_H_ */ Modified: head/sys/arm64/include/bus_dma_impl.h ============================================================================== --- head/sys/arm64/include/bus_dma_impl.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/arm64/include/bus_dma_impl.h Sat Jul 1 05:35:29 2017 (r320528) @@ -70,7 +70,7 @@ struct bus_dma_impl { vm_paddr_t buf, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp); int (*load_buffer)(bus_dma_tag_t dmat, bus_dmamap_t map, - void *buf, bus_size_t buflen, pmap_t pmap, int flags, + void *buf, bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs, int *segp); void (*map_waitok)(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/aac/aac.c Sat Jul 1 05:35:29 2017 (r320528) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/aacraid/aacraid.c Sat Jul 1 05:35:29 2017 (r320528) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/bnxt/bnxt.h Sat Jul 1 05:35:29 2017 (r320528) @@ -32,12 +32,12 @@ __FBSDID("$FreeBSD$"); #ifndef _BNXT_H #define _BNXT_H -#include -#include -#include +#include #include #include #include + +#include #include #include Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/cxgb_adapter.h Sat Jul 1 05:35:29 2017 (r320528) @@ -54,7 +54,6 @@ $FreeBSD$ #include #include -#include #include #include Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/cxgb_main.c Sat Jul 1 05:35:29 2017 (r320528) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/cxgb_sge.c Sat Jul 1 05:35:29 2017 (r320528) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Sat Jul 1 05:35:29 2017 (r320528) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c Sat Jul 1 05:35:29 2017 (r320528) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c Sat Jul 1 05:35:29 2017 (r320528) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Sat Jul 1 05:35:29 2017 (r320528) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/mfi/mfi.c Sat Jul 1 05:35:29 2017 (r320528) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/mfi/mfi_cam.c ============================================================================== --- head/sys/dev/mfi/mfi_cam.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/mfi/mfi_cam.c Sat Jul 1 05:35:29 2017 (r320528) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/tsec/if_tsec.c Sat Jul 1 05:35:29 2017 (r320528) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/xdma/xdma.c ============================================================================== --- head/sys/dev/xdma/xdma.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/xdma/xdma.c Sat Jul 1 05:35:29 2017 (r320528) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/dev/xen/blkfront/blkfront.c Sat Jul 1 05:35:29 2017 (r320528) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/i386/include/bus_dma.h ============================================================================== --- head/sys/i386/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/i386/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -29,6 +29,6 @@ #ifndef _I386_BUS_DMA_H_ #define _I386_BUS_DMA_H_ -#include +#include #endif /* _I386_BUS_DMA_H_ */ Modified: head/sys/mips/include/bus_dma.h ============================================================================== --- head/sys/mips/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/mips/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -30,5 +30,6 @@ #define _MIPS_BUS_DMA_H_ #include +#include #endif /* _MIPS_BUS_DMA_H_ */ Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/mips/mips/busdma_machdep.c Sat Jul 1 05:35:29 2017 (r320528) @@ -930,7 +930,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); return (EFBIG); /* XXX better return value here? */ } return (0); @@ -1028,14 +1028,14 @@ cleanup: * Did we fit? */ if (buflen != 0) { - _bus_dmamap_unload(dmat, map); + bus_dmamap_unload(dmat, map); error = EFBIG; /* XXX better return value here? */ } return (error); } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { @@ -1060,7 +1060,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t * Release the mapping held by map. */ void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { struct bounce_page *bpage; @@ -1233,7 +1233,7 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, bus_dmamap_t m } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct sync_list *sl, *end; int aligned; Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/net/iflib.h Sat Jul 1 05:35:29 2017 (r320528) @@ -33,7 +33,6 @@ #include #include #include -#include #include #include Modified: head/sys/powerpc/include/bus_dma.h ============================================================================== --- head/sys/powerpc/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/powerpc/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -29,6 +29,7 @@ #define _POWERPC_BUS_DMA_H_ #include +#include struct device; Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/powerpc/powerpc/busdma_machdep.c Sat Jul 1 05:35:29 2017 (r320528) @@ -841,7 +841,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { @@ -879,7 +879,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t * Release the mapping held by map. */ void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { struct bounce_page *bpage; @@ -895,7 +895,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t ma } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct bounce_page *bpage; vm_offset_t datavaddr, tempvaddr; Modified: head/sys/riscv/include/bus_dma.h ============================================================================== --- head/sys/riscv/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/riscv/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -4,5 +4,6 @@ #define _MACHINE_BUS_DMA_H_ #include +#include #endif /* !_MACHINE_BUS_DMA_H_ */ Modified: head/sys/riscv/riscv/busdma_machdep.c ============================================================================== --- head/sys/riscv/riscv/busdma_machdep.c Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/riscv/riscv/busdma_machdep.c Sat Jul 1 05:35:29 2017 (r320528) @@ -69,7 +69,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) { @@ -88,14 +88,14 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t * Release the mapping held by map. */ void -_bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { panic("busdma"); } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { panic("busdma"); Modified: head/sys/sparc64/include/bus_dma.h ============================================================================== --- head/sys/sparc64/include/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/sparc64/include/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -68,6 +68,7 @@ #ifndef _SPARC64_BUS_DMA_H #define _SPARC64_BUS_DMA_H +#define WANT_INLINE_DMAMAP #include /* DMA support */ @@ -124,29 +125,95 @@ struct bus_dma_tag { struct bus_dma_methods *dt_mt; }; -#define bus_dmamap_create(t, f, p) \ - ((t)->dt_mt->dm_dmamap_create((t), (f), (p))) -#define bus_dmamap_destroy(t, p) \ - ((t)->dt_mt->dm_dmamap_destroy((t), (p))) -#define _bus_dmamap_load_phys(t, m, b, l, f, s, sp) \ - ((t)->dt_mt->dm_dmamap_load_phys((t), (m), (b), (l), \ - (f), (s), (sp))) -#define _bus_dmamap_load_buffer(t, m, b, l, p, f, s, sp) \ - ((t)->dt_mt->dm_dmamap_load_buffer((t), (m), (b), (l), (p), \ - (f), (s), (sp))) -#define _bus_dmamap_waitok(t, m, mem, c, ca) \ - ((t)->dt_mt->dm_dmamap_waitok((t), (m), (mem), (c), (ca))) -#define _bus_dmamap_complete(t, m, s, n, e) \ - ((t)->dt_mt->dm_dmamap_complete((t), (m), (s), (n), (e))) -#define bus_dmamap_unload(t, p) \ - ((t)->dt_mt->dm_dmamap_unload((t), (p))) -#define bus_dmamap_sync(t, m, op) \ - ((t)->dt_mt->dm_dmamap_sync((t), (m), (op))) -#define bus_dmamem_alloc(t, v, f, m) \ - ((t)->dt_mt->dm_dmamem_alloc((t), (v), (f), (m))) -#define bus_dmamem_free(t, v, m) \ - ((t)->dt_mt->dm_dmamem_free((t), (v), (m))) -#define _bus_dmamap_load_ma(t, m, a, tt, o, f, s, p) \ - bus_dmamap_load_ma_triv((t), (m), (a), (tt), (o), (f), (s), (p)) +static inline int +bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) +{ + + return (dmat->dt_mt->dm_dmamap_create(dmat, flags, mapp)); +} + +static inline int +bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) +{ + + return (dmat->dt_mt->dm_dmamap_destroy(dmat, map)); +} + +static inline void +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +{ + + dmat->dt_mt->dm_dmamap_sync(dmat, map, op); +} + +static inline void +bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) +{ + + dmat->dt_mt->dm_dmamap_unload(dmat, map); +} + +static inline int +bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp) +{ + + return (dmat->dt_mt->dm_dmamem_alloc(dmat, vaddr, flags, mapp)); +} + +static inline void +bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) +{ + + dmat->dt_mt->dm_dmamem_free(dmat, vaddr, map); +} + +static inline bus_dma_segment_t* +_bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, + bus_dma_segment_t *segs, int nsegs, int error) +{ + + return (dmat->dt_mt->dm_dmamap_complete(dmat, map, segs, + nsegs, error)); +} + +static inline int +_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, + void *buf, bus_size_t buflen, struct pmap *pmap, + int flags, bus_dma_segment_t *segs, int *segp) +{ + + return (dmat->dt_mt->dm_dmamap_load_buffer(dmat, map, buf, buflen, + pmap, flags, segs, segp)); +} + +static inline int +_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map, + struct vm_page **ma, bus_size_t tlen, int ma_offs, + int flags, bus_dma_segment_t *segs, int *segp) +{ + + return (bus_dmamap_load_ma_triv(dmat, map, ma, tlen, ma_offs, flags, + segs, segp)); +} + +static inline int +_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t paddr, bus_size_t buflen, + int flags, bus_dma_segment_t *segs, int *segp) +{ + + return (dmat->dt_mt->dm_dmamap_load_phys(dmat, map, paddr, buflen, + flags, segs, segp)); +} + +static inline void +_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, + struct memdesc *mem, bus_dmamap_callback_t *callback, + void *callback_arg) +{ + + return (dmat->dt_mt->dm_dmamap_waitok(dmat, map, mem, callback, + callback_arg)); +} #endif /* !_SPARC64_BUS_DMA_H_ */ Modified: head/sys/sys/bus_dma.h ============================================================================== --- head/sys/sys/bus_dma.h Sat Jul 1 05:27:40 2017 (r320527) +++ head/sys/sys/bus_dma.h Sat Jul 1 05:35:29 2017 (r320528) @@ -248,105 +248,49 @@ int bus_dmamap_load_ma_triv(bus_dma_tag_t dmat, bus_dm struct vm_page **ma, bus_size_t tlen, int ma_offs, int flags, bus_dma_segment_t *segs, int *segp); -/* - * XXX sparc64 uses the same interface, but a much different implementation. - * for the sparc64 arch contains the equivalent - * declarations. - */ -#if !defined(__sparc64__) +#ifdef WANT_INLINE_DMAMAP +#define BUS_DMAMAP_OP static inline +#else +#define BUS_DMAMAP_OP +#endif /* * Allocate a handle for mapping from kva/uva/physical * address space into bus device space. */ -int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); +BUS_DMAMAP_OP int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); /* * Destroy a handle for mapping from kva/uva/physical * address space into bus device space. */ -int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map); +BUS_DMAMAP_OP int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map); /* * Allocate a piece of memory that can be efficiently mapped into * bus device space based on the constraints listed in the dma tag. * A dmamap to for use with dmamap_load is also allocated. */ -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +BUS_DMAMAP_OP int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp); /* * Free a piece of memory and its allocated dmamap, that was allocated * via bus_dmamem_alloc. */ -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); +BUS_DMAMAP_OP void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); /* * Perform a synchronization operation on the given map. If the map - * is NULL we have a fully IO-coherent system. On every ARM architecture - * there must be a memory barrier placed to ensure that all data - * accesses are visible before going any further. + * is NULL we have a fully IO-coherent system. */ -void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); -#if defined(__arm__) - #define __BUS_DMAMAP_SYNC_DEFAULT mb() -#elif defined(__aarch64__) - #define __BUS_DMAMAP_SYNC_DEFAULT dmb(sy) -#else - #define __BUS_DMAMAP_SYNC_DEFAULT do {} while (0) -#endif -#define bus_dmamap_sync(dmat, dmamap, op) \ - do { \ - if ((dmamap) != NULL) \ - _bus_dmamap_sync(dmat, dmamap, op); \ - else \ - __BUS_DMAMAP_SYNC_DEFAULT; \ - } while (0) +BUS_DMAMAP_OP void bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t dmamap, bus_dmasync_op_t op); /* * Release the mapping held by map. */ -void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map); -#define bus_dmamap_unload(dmat, dmamap) \ - do { \ - if ((dmamap) != NULL) \ - _bus_dmamap_unload(dmat, dmamap); \ - } while (0) +BUS_DMAMAP_OP void bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t dmamap); -/* - * The following functions define the interface between the MD and MI - * busdma layers. These are not intended for consumption by driver - * software. - */ -void __bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, - struct memdesc *mem, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 1 09:38:53 2017 Return-Path: Delivered-To: svn-src-all@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 5E54FDA7158; Sat, 1 Jul 2017 09:38:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3530C7FD41; Sat, 1 Jul 2017 09:38:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v619cqjG028334; Sat, 1 Jul 2017 09:38:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v619cquC028333; Sat, 1 Jul 2017 09:38:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707010938.v619cquC028333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 1 Jul 2017 09:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320529 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 320529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 09:38:53 -0000 Author: andrew Date: Sat Jul 1 09:38:52 2017 New Revision: 320529 URL: https://svnweb.freebsd.org/changeset/base/320529 Log: Remove all calls to cpu_dcache_wb_range from the arm64 pmap code. These were unneeded as we tell the tlb the pagetables are in cached memory. This gives us a small, but statistically significant improvement over just removing the PTE_SYNC cases. While here remove PTE_SYNC, it's now unneeded. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sat Jul 1 05:35:29 2017 (r320528) +++ head/sys/arm64/arm64/pmap.c Sat Jul 1 09:38:52 2017 (r320529) @@ -504,12 +504,6 @@ pmap_l3_valid(pt_entry_t l3) CTASSERT(L1_BLOCK == L2_BLOCK); -#if 0 -#define PTE_SYNC(pte) cpu_dcache_wb_range((vm_offset_t)pte, sizeof(*pte)) -#else -#define PTE_SYNC(pte) (void)0 -#endif - /* * Checks if the page is dirty. We currently lack proper tracking of this on * arm64 so for now assume is a page mapped as rw was accessed it is. @@ -594,8 +588,6 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi dmap_phys_max = pa; dmap_max_addr = va; - cpu_dcache_wb_range((vm_offset_t)pagetable_dmap, - PAGE_SIZE * DMAP_TABLES); cpu_tlb_flushID(); } @@ -624,11 +616,7 @@ pmap_bootstrap_l2(vm_offset_t l1pt, vm_offset_t va, vm /* Clean the L2 page table */ memset((void *)l2_start, 0, l2pt - l2_start); - cpu_dcache_wb_range(l2_start, l2pt - l2_start); - /* Flush the l1 table to ram */ - cpu_dcache_wb_range((vm_offset_t)l1, PAGE_SIZE); - return l2pt; } @@ -659,10 +647,7 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm /* Clean the L2 page table */ memset((void *)l3_start, 0, l3pt - l3_start); - cpu_dcache_wb_range(l3_start, l3pt - l3_start); - cpu_dcache_wb_range((vm_offset_t)l2, PAGE_SIZE); - return l3pt; } @@ -1131,7 +1116,6 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_ pte = pmap_l2_to_l3(pde, va); pmap_load_store(pte, (pa & ~L3_OFFSET) | attr); - PTE_SYNC(pte); va += PAGE_SIZE; pa += PAGE_SIZE; @@ -1161,7 +1145,6 @@ pmap_kremove(vm_offset_t va) KASSERT(lvl == 3, ("pmap_kremove: Invalid pte level %d", lvl)); pmap_load_clear(pte); - PTE_SYNC(pte); pmap_invalidate_page(kernel_pmap, va); } @@ -1184,7 +1167,6 @@ pmap_kremove_device(vm_offset_t sva, vm_size_t size) KASSERT(lvl == 3, ("Invalid device pagetable level: %d != 3", lvl)); pmap_load_clear(pte); - PTE_SYNC(pte); va += PAGE_SIZE; size -= PAGE_SIZE; @@ -1244,7 +1226,6 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) pa |= ATTR_XN; pte = pmap_l2_to_l3(pde, va); pmap_load_store(pte, pa); - PTE_SYNC(pte); va += L3_SIZE; } @@ -1271,7 +1252,6 @@ pmap_qremove(vm_offset_t sva, int count) ("Invalid device pagetable level: %d != 3", lvl)); if (pte != NULL) { pmap_load_clear(pte); - PTE_SYNC(pte); } va += PAGE_SIZE; @@ -1343,21 +1323,18 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t l0 = pmap_l0(pmap, va); pmap_load_clear(l0); - PTE_SYNC(l0); } else if (m->pindex >= NUL2E) { /* l2 page */ pd_entry_t *l1; l1 = pmap_l1(pmap, va); pmap_load_clear(l1); - PTE_SYNC(l1); } else { /* l3 page */ pd_entry_t *l2; l2 = pmap_l2(pmap, va); pmap_load_clear(l2); - PTE_SYNC(l2); } pmap_resident_count_dec(pmap, 1); if (m->pindex < NUL2E) { @@ -1498,7 +1475,6 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, str l0index = ptepindex - (NUL2E + NUL1E); l0 = &pmap->pm_l0[l0index]; pmap_load_store(l0, VM_PAGE_TO_PHYS(m) | L0_TABLE); - PTE_SYNC(l0); } else if (ptepindex >= NUL2E) { vm_pindex_t l0index, l1index; pd_entry_t *l0, *l1; @@ -1527,7 +1503,6 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, str l1 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l0) & ~ATTR_MASK); l1 = &l1[ptepindex & Ln_ADDR_MASK]; pmap_load_store(l1, VM_PAGE_TO_PHYS(m) | L1_TABLE); - PTE_SYNC(l1); } else { vm_pindex_t l0index, l1index; pd_entry_t *l0, *l1, *l2; @@ -1574,7 +1549,6 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, str l2 = (pd_entry_t *)PHYS_TO_DMAP(pmap_load(l1) & ~ATTR_MASK); l2 = &l2[ptepindex & Ln_ADDR_MASK]; pmap_load_store(l2, VM_PAGE_TO_PHYS(m) | L2_TABLE); - PTE_SYNC(l2); } pmap_resident_count_inc(pmap, 1); @@ -1727,7 +1701,6 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); pmap_load_store(l1, paddr | L1_TABLE); - PTE_SYNC(l1); continue; /* try again */ } l2 = pmap_l1_to_l2(l1, kernel_vm_end); @@ -1749,7 +1722,6 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); pmap_load_store(l2, paddr | L2_TABLE); - PTE_SYNC(l2); pmap_invalidate_page(kernel_pmap, kernel_vm_end); kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; @@ -1883,7 +1855,6 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l if ((tpte & ATTR_SW_WIRED) != 0) continue; tpte = pmap_load_clear(pte); - PTE_SYNC(pte); pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); if (pmap_page_dirty(tpte)) @@ -2272,7 +2243,6 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ PMAP_LOCK_ASSERT(pmap, MA_OWNED); old_l3 = pmap_load_clear(l3); - PTE_SYNC(l3); pmap_invalidate_page(pmap, va); if (old_l3 & ATTR_SW_WIRED) pmap->pm_stats.wired_count -= 1; @@ -2493,7 +2463,6 @@ retry: pte = pmap_l2_to_l3(pde, pv->pv_va); tpte = pmap_load(pte); pmap_load_clear(pte); - PTE_SYNC(pte); pmap_invalidate_page(pmap, pv->pv_va); if (tpte & ATTR_SW_WIRED) pmap->pm_stats.wired_count--; @@ -2595,7 +2564,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t nbits |= ATTR_XN; pmap_set(l3p, nbits); - PTE_SYNC(l3p); /* XXX: Use pmap_invalidate_range */ pmap_invalidate_page(pmap, va); } @@ -2657,12 +2625,10 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_ent /* Clear the old mapping */ pmap_load_clear(pte); - PTE_SYNC(pte); pmap_invalidate_range(pmap, va, va + size); /* Create the new mapping */ pmap_load_store(pte, newpte); - PTE_SYNC(pte); critical_exit(); intr_restore(intr); @@ -2886,7 +2852,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v l1_pa = VM_PAGE_TO_PHYS(l1_m); pmap_load_store(pde, l1_pa | L0_TABLE); - PTE_SYNC(pde); /* FALLTHROUGH */ case 0: /* Get the l1 pde to update */ @@ -2903,7 +2868,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v l2_pa = VM_PAGE_TO_PHYS(l2_m); pmap_load_store(pde, l2_pa | L1_TABLE); - PTE_SYNC(pde); /* FALLTHROUGH */ case 1: /* Get the l2 pde to update */ @@ -2919,7 +2883,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v l3_pa = VM_PAGE_TO_PHYS(l3_m); pmap_load_store(pde, l3_pa | L2_TABLE); - PTE_SYNC(pde); break; } } @@ -3023,7 +2986,6 @@ validate: } } else { pmap_load_store(l3, new_l3); - PTE_SYNC(l3); pmap_invalidate_page(pmap, va); if (pmap_page_dirty(orig_l3) && (orig_l3 & ATTR_SW_MANAGED) != 0) @@ -3033,7 +2995,6 @@ validate: pmap_load_store(l3, new_l3); } - PTE_SYNC(l3); pmap_invalidate_page(pmap, va); if (pmap != pmap_kernel()) { @@ -3231,7 +3192,6 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v if ((m->oflags & VPO_UNMANAGED) == 0) pa |= ATTR_SW_MANAGED; pmap_load_store(l3, pa); - PTE_SYNC(l3); pmap_invalidate_page(pmap, va); return (mpte); } @@ -3641,7 +3601,6 @@ pmap_remove_pages(pmap_t pmap) (uintmax_t)tpte)); pmap_load_clear(pte); - PTE_SYNC(pte); /* * Update the vm_page_t clean/reference bits. @@ -4416,7 +4375,6 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_ l2[i] = newl2 | phys; phys += L2_SIZE; } - cpu_dcache_wb_range((vm_offset_t)l2, PAGE_SIZE); KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK), ("Invalid l2 page (%lx != %lx)", l2[0], (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK)); @@ -4494,7 +4452,6 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ l3[i] = newl3 | phys; phys += L3_SIZE; } - cpu_dcache_wb_range((vm_offset_t)l3, PAGE_SIZE); } KASSERT(l3[0] == ((oldl2 & ~ATTR_DESCR_MASK) | L3_PAGE), ("Invalid l3 page (%lx != %lx)", l3[0], From owner-svn-src-all@freebsd.org Sat Jul 1 10:04:44 2017 Return-Path: Delivered-To: svn-src-all@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 15FE2DA929D; Sat, 1 Jul 2017 10:04:44 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B893E80AF9; Sat, 1 Jul 2017 10:04:43 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61A4gcU040505; Sat, 1 Jul 2017 10:04:42 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61A4gW5040503; Sat, 1 Jul 2017 10:04:42 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201707011004.v61A4gW5040503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Sat, 1 Jul 2017 10:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320530 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: jlh X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 320530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 10:04:44 -0000 Author: jlh Date: Sat Jul 1 10:04:42 2017 New Revision: 320530 URL: https://svnweb.freebsd.org/changeset/base/320530 Log: Disable RCMDS by default. This was announced in this thread: https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html Applying plan proposed by ngie@ in: https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018249.html The port has been submitted as net/bsdrcmds in r444814. Approved by: bapt, roberto, and others Modified: head/UPDATING head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jul 1 09:38:52 2017 (r320529) +++ head/UPDATING Sat Jul 1 10:04:42 2017 (r320530) @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170701: + WITHOUT_RCMDS is now the default. Set WITH_RCMDS if you need them to be + built with the base system. + 20170625: The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is a very major ABI incompatible change, so users of FreeBSD/powerpc must Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Jul 1 09:38:52 2017 (r320529) +++ head/share/mk/src.opts.mk Sat Jul 1 10:04:42 2017 (r320530) @@ -144,7 +144,6 @@ __DEFAULT_YES_OPTIONS = \ PPP \ QUOTAS \ RADIUS_SUPPORT \ - RCMDS \ RBOOTD \ RESCUE \ ROUTED \ @@ -185,6 +184,7 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ OPENLDAP \ + RCMDS \ REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ From owner-svn-src-all@freebsd.org Sat Jul 1 10:36:51 2017 Return-Path: Delivered-To: svn-src-all@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 3D0B2DA9FD5 for ; Sat, 1 Jul 2017 10:36:51 +0000 (UTC) (envelope-from webtech4069@gmail.com) Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com [IPv6:2607:f8b0:400c:c05::236]) (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 DDD8381860 for ; Sat, 1 Jul 2017 10:36:50 +0000 (UTC) (envelope-from webtech4069@gmail.com) Received: by mail-vk0-x236.google.com with SMTP id 191so77115946vko.2 for ; Sat, 01 Jul 2017 03:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=18JiGvPXs20CPiQOWdeXhdBnVK3TB6dL8ztKKIyIos4=; b=GyWYzRhHGnP9g1mpDcuY2BWsEQG8RtV31WFulbyEYr3mpUu8Ew9bVKibSeEv45uAV0 ofNSdZO3d6xHQRZ1JJMFnsxOdzN5zjKGC2Sdf8FZb8C//4piKMMhje67QAgFct+WTQMe Ped2rro4RyKrWeVtuKwq6/0JwbVE3r6B0TDexjo65T9hVbt1pEpmgDyh2c4YyY4VXWJU XwSekkB2tKRskb0HpFwOr00tldDJDLN9QgKEXvVRRoAr9JOniJUeUb5/eRNjsN+PRn8o wRUfTe07W4V3Jv10XWd1S3g4f0Ee/hmSOHP0irBE2GCa8+oP/xW3ETPsKG/gHdxyQN0K bZDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=18JiGvPXs20CPiQOWdeXhdBnVK3TB6dL8ztKKIyIos4=; b=PEwsB+OKercW7jSyAmhK53dl76ssxiuyLuYoiAEfK6rZNa7DaW9nEBdcYpo4tkyof+ sfV9q/Ze2QL1FP0mGYtw8VqR8OygxuIcw8KtS+cv7YrJvE8ZXEugJyUSOAa09Tt1r7wE iHQuG78irXK9DrkO4ps+Udqm5siqKgbP9pV+RYJceuA0TILQ57acYPp19wv0U1DsTCXf gXotol14N3+tb88+mJS6UQepQmGNN3oJmzPTKWS75ua/PC2TiYJhvdKuMFVhJrEgMsLl d0UvFL2A8OD+iiFX49RgWJywZigCEUsfzeNJBECdh8NvUwTjHbxScw0migORHsKlSOKT ZoYg== X-Gm-Message-State: AKS2vOwoCBJ9DvFlsuf226aA77YthNrwiDEb5//e/FVUcB7egm24SvfT WqMxwEzd/NyFpvf1jqoui7USryTKzg== X-Received: by 10.31.95.140 with SMTP id t134mr14709916vkb.33.1498905409826; Sat, 01 Jul 2017 03:36:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.27.20 with HTTP; Sat, 1 Jul 2017 03:36:49 -0700 (PDT) From: web tech Date: Sat, 1 Jul 2017 16:06:49 +0530 Message-ID: Subject: Digital Marketing Services for your Online Business To: svn-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 10:36:51 -0000 Hello, Hope you are doing great! I am Austin- Marketing Manager, in a leading Web services provider company. We are a quality focused company that has attained predominance in Website Designing, Web Development, digital marketing & Mobile Application, and similar other disciplines. We use latest technology to provide you incredible services at very competitive prices. No wonder our client list is growing even as you are reading this. We owe this to our incomparable team of experts who develop high quality solutions as per our discerning customers=E2=80=99 needs. Be i= t top-notch PHP sites, workflow applications, eCommerce applications, or the social networks, we can work out the success story for your business!!! Our expertise in web design and development include the following areas: =E2=80=A2 Website Development (PHP Development, Alex Development, etc.) =E2=80=A2 Website Design & Redesign (HTML5 designing, corporate website des= ign, PSD to XHTML/HTML, etc) =E2=80=A2 Open Source Website Development & Customization / CMS Integration (Joomla, Drupal, Wordpress, etc) =E2=80=A2 E-commerce Website Development (Magento, Opencart, OS Commerce, Z= en Cart integration etc) =E2=80=A2 Web Programming (PHP MySQL Development, PHP Frameworks, JavaScrip= t Frameworks etc) =E2=80=A2 SEO (Get Your Website Top Ranking in Google. =E2=80=A2 Mobile Application (iOS & Android) Let me know if you are interested and I will send you our company details or create a proposal so you can see exactly where you rank compared to your competitors. Please share your Skype id and phone number to make the communication easily assessable. Let=E2=80=99s build success together! Thanking you and with best wishes, Thanks & Regards Austin|Sales & Marketing Manager Disclaimer: I do not mean to disturb you or invade your privacy through my email, I wish to engage for business purposes only and not SPAM you in any way. If you do not like my approach, please click on =E2=80=9CUNSUBSCRIBE= =E2=80=9D link. I will ensure that I do not send you further emails in this regard. From owner-svn-src-all@freebsd.org Sat Jul 1 12:57:02 2017 Return-Path: Delivered-To: svn-src-all@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 5BF0BD88E20; Sat, 1 Jul 2017 12:57:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 17A6B8494C; Sat, 1 Jul 2017 12:57:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61Cv111009872; Sat, 1 Jul 2017 12:57:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61Cv01m009869; Sat, 1 Jul 2017 12:57:00 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201707011257.v61Cv01m009869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 1 Jul 2017 12:57:00 +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: r320531 - in stable/10/bin/sh: . tests/builtins X-SVN-Group: stable-10 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/10/bin/sh: . tests/builtins X-SVN-Commit-Revision: 320531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 12:57:02 -0000 Author: jilles Date: Sat Jul 1 12:57:00 2017 New Revision: 320531 URL: https://svnweb.freebsd.org/changeset/base/320531 Log: MFC r317912: sh: Fix INTOFF leak after a builtin with different locale settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely. Added: stable/10/bin/sh/tests/builtins/locale2.0 - copied unchanged from r317912, head/bin/sh/tests/builtins/locale2.0 Modified: stable/10/bin/sh/tests/builtins/Makefile stable/10/bin/sh/var.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/10/bin/sh/tests/builtins/Makefile Sat Jul 1 10:04:42 2017 (r320530) +++ stable/10/bin/sh/tests/builtins/Makefile Sat Jul 1 12:57:00 2017 (r320531) @@ -100,6 +100,7 @@ FILES+= local4.0 .if ${MK_NLS} != "no" FILES+= locale1.0 .endif +FILES+= locale2.0 FILES+= printf1.0 FILES+= printf2.0 FILES+= printf3.0 Copied: stable/10/bin/sh/tests/builtins/locale2.0 (from r317912, head/bin/sh/tests/builtins/locale2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/builtins/locale2.0 Sat Jul 1 12:57:00 2017 (r320531, copy of r317912, head/bin/sh/tests/builtins/locale2.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: stable/10/bin/sh/var.c ============================================================================== --- stable/10/bin/sh/var.c Sat Jul 1 10:04:42 2017 (r320530) +++ stable/10/bin/sh/var.c Sat Jul 1 12:57:00 2017 (r320531) @@ -506,7 +506,7 @@ bltinunsetlocale(void) if (localevar(lp->text)) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; From owner-svn-src-all@freebsd.org Sat Jul 1 13:03:04 2017 Return-Path: Delivered-To: svn-src-all@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 424ACD8904D; Sat, 1 Jul 2017 13:03:04 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1078284D48; Sat, 1 Jul 2017 13:03:03 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61D33ca013853; Sat, 1 Jul 2017 13:03:03 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61D33bg013851; Sat, 1 Jul 2017 13:03:03 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201707011303.v61D33bg013851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 1 Jul 2017 13:03:03 +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: r320532 - in stable/10/usr.bin/compress: . tests X-SVN-Group: stable-10 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/10/usr.bin/compress: . tests X-SVN-Commit-Revision: 320532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:03:04 -0000 Author: jilles Date: Sat Jul 1 13:03:02 2017 New Revision: 320532 URL: https://svnweb.freebsd.org/changeset/base/320532 Log: MFC r318592: compress: Allow uncompress -c with multiple pathnames, as required by POSIX. Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating the uncompressed data. Passing multiple pathnames to compress -c remains disallowed, since the result cannot be decompressed. PR: 219387 Modified: stable/10/usr.bin/compress/compress.c stable/10/usr.bin/compress/tests/compress_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/compress/compress.c ============================================================================== --- stable/10/usr.bin/compress/compress.c Sat Jul 1 12:57:00 2017 (r320531) +++ stable/10/usr.bin/compress/compress.c Sat Jul 1 13:03:02 2017 (r320532) @@ -128,7 +128,7 @@ main(int argc, char *argv[]) exit (eval); } - if (cat == 1 && argc > 1) + if (cat == 1 && style == COMPRESS && argc > 1) errx(1, "the -c option permits only a single file argument"); for (; *argv; ++argv) Modified: stable/10/usr.bin/compress/tests/compress_test.sh ============================================================================== --- stable/10/usr.bin/compress/tests/compress_test.sh Sat Jul 1 12:57:00 2017 (r320531) +++ stable/10/usr.bin/compress/tests/compress_test.sh Sat Jul 1 13:03:02 2017 (r320532) @@ -161,6 +161,27 @@ compress_uncompress_file_2_body() atf_check cmp file2 expectfile2 } +atf_test_case compress_uncompress_file_minusc_1 +compress_uncompress_file_minusc_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, passing two filenames to uncompress -c" +} +compress_uncompress_file_minusc_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + printf '%01000d\n' 8 7 >expectfile2 + cp expectfile1 file1 + cp expectfile2 file2 + atf_check compress file1 file2 + atf_check -s exit:1 cmp -s file1.Z expectfile1 + atf_check -s exit:1 cmp -s file2.Z expectfile2 + atf_check -s exit:1 cmp -s file1.Z file2.Z + atf_check -x 'uncompress -c file1.Z file2.Z >all' + atf_check -x 'cat expectfile1 expectfile2 >expectall' + atf_check cmp all expectall +} + atf_init_test_cases() { atf_add_test_case uncompress_file_1 @@ -171,4 +192,5 @@ atf_init_test_cases() atf_add_test_case compress_uncompress_minusc_1 atf_add_test_case compress_uncompress_file_1 atf_add_test_case compress_uncompress_file_2 + atf_add_test_case compress_uncompress_file_minusc_1 } From owner-svn-src-all@freebsd.org Sat Jul 1 13:22:11 2017 Return-Path: Delivered-To: svn-src-all@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 E5240D895DB; Sat, 1 Jul 2017 13:22:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9AA647AC; Sat, 1 Jul 2017 13:22:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DMAfr021965; Sat, 1 Jul 2017 13:22:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DMANe021964; Sat, 1 Jul 2017 13:22:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011322.v61DMANe021964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320534 - vendor/llvm/llvm-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-trunk-r306956 X-SVN-Commit-Revision: 320534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:22:12 -0000 Author: dim Date: Sat Jul 1 13:22:10 2017 New Revision: 320534 URL: https://svnweb.freebsd.org/changeset/base/320534 Log: Tag llvm trunk r306956. Added: vendor/llvm/llvm-trunk-r306956/ - copied from r320533, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 13:22:06 2017 Return-Path: Delivered-To: svn-src-all@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 D4163D895D0; Sat, 1 Jul 2017 13:22:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 18A5F794; Sat, 1 Jul 2017 13:22:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DM5uD021919; Sat, 1 Jul 2017 13:22:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DM3V7021898; Sat, 1 Jul 2017 13:22:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011322.v61DM3V7021898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320533 - in vendor/llvm/dist: . bindings/ocaml/target docs docs/CommandGuide include/llvm include/llvm-c/Transforms include/llvm/Analysis include/llvm/BinaryFormat include/llvm/Bitcode... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist: . bindings/ocaml/target docs docs/CommandGuide include/llvm include/llvm-c/Transforms include/llvm/Analysis include/llvm/BinaryFormat include/llvm/Bitcode include/llvm/CodeGen inc... X-SVN-Commit-Revision: 320533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:22:06 -0000 Author: dim Date: Sat Jul 1 13:22:02 2017 New Revision: 320533 URL: https://svnweb.freebsd.org/changeset/base/320533 Log: Vendor import of llvm trunk r306956: https://llvm.org/svn/llvm-project/llvm/trunk@306956 Added: vendor/llvm/dist/docs/Docker.rst vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMScheduleM3.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrSystem.td vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-extracts.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-undef.mir vendor/llvm/dist/test/CodeGen/AArch64/ccmp-successor-probs.mir vendor/llvm/dist/test/CodeGen/AMDGPU/alignbit-pat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-and-sext-bool.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fold-fmul-to-neg-abs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/misched-killflags.mir vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs-mac-operands.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole-instr.mir vendor/llvm/dist/test/CodeGen/AMDGPU/setcc-sext.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-to-smem-m0.ll vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-O0-be.ll vendor/llvm/dist/test/CodeGen/BPF/remove_truncate_1.ll vendor/llvm/dist/test/CodeGen/BPF/remove_truncate_2.ll vendor/llvm/dist/test/CodeGen/Hexagon/addrmode-keepdeadphis.mir vendor/llvm/dist/test/CodeGen/Hexagon/expand-condsets-undefvni.ll vendor/llvm/dist/test/CodeGen/Hexagon/expand-vselect-kill.ll vendor/llvm/dist/test/CodeGen/Hexagon/fpelim-basic.ll vendor/llvm/dist/test/CodeGen/Hexagon/jt-in-text.ll vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump-kill2.mir vendor/llvm/dist/test/CodeGen/Hexagon/regalloc-liveout-undef.mir vendor/llvm/dist/test/CodeGen/PowerPC/merge_stores_dereferenceable.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls_get_addr_fence1.mir vendor/llvm/dist/test/CodeGen/PowerPC/tls_get_addr_fence2.mir vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-no-branch-predictor.ll vendor/llvm/dist/test/CodeGen/WebAssembly/exception.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/and-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fadd-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fdiv-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fmul-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fsub-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-and-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fadd-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fdiv-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fmul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fsub-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-or-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-xor-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/or-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-and-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fadd-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fdiv-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fmul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fsub-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-merge-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-merge-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-or-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-xor-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/xor-scalar.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-vec-masked-cmp.ll vendor/llvm/dist/test/CodeGen/X86/bswap-wide-int.ll vendor/llvm/dist/test/CodeGen/X86/peephole-recurrence.mir vendor/llvm/dist/test/CodeGen/X86/vector-truncate-combine.ll vendor/llvm/dist/test/DebugInfo/COFF/lines-bb-start.ll vendor/llvm/dist/test/LTO/Resolution/X86/Inputs/comdat-mixed-lto.ll vendor/llvm/dist/test/LTO/Resolution/X86/comdat-mixed-lto.ll vendor/llvm/dist/test/MC/AArch64/coff-basic.ll vendor/llvm/dist/test/MC/Mips/macro-dla-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/macro-dla-pic.s (contents, props changed) vendor/llvm/dist/test/MC/WebAssembly/weak-alias.ll vendor/llvm/dist/test/MC/WebAssembly/weak.ll vendor/llvm/dist/test/MC/X86/signed-coff-pcrel.s (contents, props changed) vendor/llvm/dist/test/Object/X86/irsymtab-asm.ll vendor/llvm/dist/test/Object/X86/irsymtab-bad-alias.ll vendor/llvm/dist/test/Object/X86/irsymtab.ll vendor/llvm/dist/test/Object/X86/yaml-elf-x86-rel-broken.yaml vendor/llvm/dist/test/Transforms/CodeExtractor/BlockAddressReference.ll vendor/llvm/dist/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll vendor/llvm/dist/test/Transforms/CodeGenPrepare/nonintegral.ll vendor/llvm/dist/test/Transforms/ConstantHoisting/ARM/gep-struct-index.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/inline-target-attr.ll vendor/llvm/dist/test/Transforms/Inline/inline-cold-callsite-pgo.ll vendor/llvm/dist/test/Transforms/Inline/pr33637.ll vendor/llvm/dist/test/Transforms/InstCombine/clamp-to-minmax.ll vendor/llvm/dist/test/Transforms/InstCombine/extractinsert-tbaa.ll vendor/llvm/dist/test/Transforms/JumpThreading/range-compare.ll vendor/llvm/dist/test/Transforms/LICM/dropped-tbaa.ll vendor/llvm/dist/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll vendor/llvm/dist/test/Transforms/LoopUnroll/unroll-maxcount.ll vendor/llvm/dist/test/Transforms/Reassociate/erase_inst_made_change.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/limit.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/ vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/lit.local.cfg vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/switch-to-lookup-table.ll vendor/llvm/dist/test/tools/llvm-cvtres/symbols.test vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_data.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/demangle.ll vendor/llvm/dist/test/tools/llvm-objdump/ARM/invalid-instruction.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/relocations.test vendor/llvm/dist/test/tools/llvm-pdbdump/partial-type-stream.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/trivial.obj.coff-arm64 (contents, props changed) vendor/llvm/dist/unittests/Support/ErrnoTest.cpp (contents, props changed) vendor/llvm/dist/utils/docker/ vendor/llvm/dist/utils/docker/README vendor/llvm/dist/utils/docker/build_docker_image.sh (contents, props changed) vendor/llvm/dist/utils/docker/debian8/ vendor/llvm/dist/utils/docker/debian8/build/ vendor/llvm/dist/utils/docker/debian8/build/Dockerfile vendor/llvm/dist/utils/docker/debian8/release/ vendor/llvm/dist/utils/docker/debian8/release/Dockerfile vendor/llvm/dist/utils/docker/example/ vendor/llvm/dist/utils/docker/example/build/ vendor/llvm/dist/utils/docker/example/build/Dockerfile vendor/llvm/dist/utils/docker/example/release/ vendor/llvm/dist/utils/docker/example/release/Dockerfile vendor/llvm/dist/utils/docker/nvidia-cuda/ vendor/llvm/dist/utils/docker/nvidia-cuda/build/ vendor/llvm/dist/utils/docker/nvidia-cuda/build/Dockerfile vendor/llvm/dist/utils/docker/nvidia-cuda/release/ vendor/llvm/dist/utils/docker/nvidia-cuda/release/Dockerfile vendor/llvm/dist/utils/docker/scripts/ vendor/llvm/dist/utils/docker/scripts/build_install_llvm.sh (contents, props changed) vendor/llvm/dist/utils/opt-viewer/optpmap.py (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStreamBuilder.h vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStreamBuilder.cpp vendor/llvm/dist/lib/Target/AMDGPU/SITypeRewriter.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs-invalid-mac-operands.mir vendor/llvm/dist/test/CodeGen/ARM/Windows/no-arm-mode.ll vendor/llvm/dist/test/CodeGen/Hexagon/frame.ll vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/adiw-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/in-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/lds-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/sbi-fail.s vendor/llvm/dist/test/Transforms/BBVectorize/X86/cmp-types.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/loop1.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/pr15289.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec2.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec3.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-types.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple-int.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple-ldstr.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/vs-cast.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/wr-aliases.ll vendor/llvm/dist/test/Transforms/BBVectorize/cycle.ll vendor/llvm/dist/test/Transforms/BBVectorize/func-alias.ll vendor/llvm/dist/test/Transforms/BBVectorize/ld1.ll vendor/llvm/dist/test/Transforms/BBVectorize/lit.local.cfg vendor/llvm/dist/test/Transforms/BBVectorize/loop1.ll vendor/llvm/dist/test/Transforms/BBVectorize/mem-op-depth.ll vendor/llvm/dist/test/Transforms/BBVectorize/metadata.ll vendor/llvm/dist/test/Transforms/BBVectorize/no-ldstr-conn.ll vendor/llvm/dist/test/Transforms/BBVectorize/req-depth.ll vendor/llvm/dist/test/Transforms/BBVectorize/search-limit.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-int.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-ldstr.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-sel.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-tst.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple3.ll vendor/llvm/dist/test/Transforms/BBVectorize/vector-sel.ll vendor/llvm/dist/test/Transforms/BBVectorize/xcore/no-vector-registers.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_buckets.s vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify_buckets.s Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/XRay.rst vendor/llvm/dist/docs/index.rst vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/RegionIterator.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/BinaryFormat/COFF.h vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.h vendor/llvm/dist/include/llvm/BinaryFormat/Wasm.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeReader.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/CallLowering.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/InstructionSelector.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Types.h vendor/llvm/dist/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachinePassRegistry.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/MacroFusion.h vendor/llvm/dist/include/llvm/CodeGen/PseudoSourceValue.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/TargetPassConfig.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossExSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossImpSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/EnumTables.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/Formatters.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringsAndChecksums.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeServerHandler.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBDataStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/Hash.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/HashTable.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDB.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBExtras.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBTypes.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/UDTLayout.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h vendor/llvm/dist/include/llvm/IR/Argument.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/Constant.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/DerivedTypes.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GlobalAlias.h vendor/llvm/dist/include/llvm/IR/GlobalIFunc.h vendor/llvm/dist/include/llvm/IR/GlobalIndirectSymbol.h vendor/llvm/dist/include/llvm/IR/GlobalObject.h vendor/llvm/dist/include/llvm/IR/GlobalVariable.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicInst.h vendor/llvm/dist/include/llvm/IR/IntrinsicsWebAssembly.td vendor/llvm/dist/include/llvm/IR/LLVMContext.h vendor/llvm/dist/include/llvm/IR/LegacyPassNameParser.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFObjectWriter.h vendor/llvm/dist/include/llvm/Object/Archive.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/COFFImportFile.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/IRObjectFile.h vendor/llvm/dist/include/llvm/Object/IRSymtab.h vendor/llvm/dist/include/llvm/Object/MachOUniversal.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/SymbolicFile.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/ObjectYAML/COFFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLTypes.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFEmitter.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/ELFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/MachOYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/ObjectYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/YAML.h vendor/llvm/dist/include/llvm/Passes/PassBuilder.h vendor/llvm/dist/include/llvm/ProfileData/Coverage/CoverageMapping.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/Support/CMakeLists.txt vendor/llvm/dist/include/llvm/Support/Errno.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/TargetParser.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/Target/GenericOpcodes.td vendor/llvm/dist/include/llvm/Target/GlobalISel/SelectionDAGCompat.td vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.def vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/include/llvm/Transforms/SampleProfile.h vendor/llvm/dist/include/llvm/Transforms/Scalar/ConstantHoisting.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/OrderedInstructions.h vendor/llvm/dist/include/llvm/Transforms/Utils/PredicateInfo.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/include/llvm/Transforms/Vectorize.h vendor/llvm/dist/lib/Analysis/CFLAndersAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CFLSteensAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/IteratedDominanceFrontier.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/OptimizationDiagnosticInfo.cpp vendor/llvm/dist/lib/Analysis/RegionInfo.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/BinaryFormat/Magic.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/LLVMBuild.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.h vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelector.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerHelper.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerInfo.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegBankSelect.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.h vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.cpp vendor/llvm/dist/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp vendor/llvm/dist/lib/CodeGen/MacroFusion.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RenameIndependentSubregs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/Formatters.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/StringsAndChecksums.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolSerializer.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeSerializer.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleList.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/Hash.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/HashTable.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeSession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDB.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBExtras.cpp vendor/llvm/dist/lib/DebugInfo/PDB/UDTLayout.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/Dominators.cpp vendor/llvm/dist/lib/IR/LLVMContext.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/IRSymtab.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/COFFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFEmitter.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/ELFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/MachOYAML.cpp vendor/llvm/dist/lib/ObjectYAML/ObjectYAML.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/ObjectYAML/YAML.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/Support/AMDGPUCodeObjectMetadata.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/TargetParser.cpp vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Support/Unix/Process.inc vendor/llvm/dist/lib/Target/AArch64/AArch64CondBrTuning.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ConditionalCompares.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstructionSelector.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64LegalizerInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.h vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SchedThunderX2T99.td vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMSchedule.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h vendor/llvm/dist/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonNewValueJump.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonOptAddrMode.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetTransformInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MicroMips64r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCCTRLoops.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTLSDynamicCall.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp vendor/llvm/dist/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h vendor/llvm/dist/lib/Target/SystemZ/README.txt vendor/llvm/dist/lib/Target/SystemZ/SystemZ.td vendor/llvm/dist/lib/Target/SystemZ/SystemZFeatures.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFormats.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ13.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ196.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZEC12.td vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.h vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrControl.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Transforms/Coroutines/CoroInstr.h vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/IPO/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantHoisting.cpp vendor/llvm/dist/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerMemIntrinsics.cpp vendor/llvm/dist/lib/Transforms/Utils/OrderedInstructions.cpp vendor/llvm/dist/lib/Transforms/Utils/PredicateInfo.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/lib/Transforms/Vectorize/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/lib/Transforms/Vectorize/Vectorize.cpp vendor/llvm/dist/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/limit-depth.ll vendor/llvm/dist/test/Bitcode/thinlto-alias.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-refgraph.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/irtranslator-exceptions.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-trunc.mir vendor/llvm/dist/test/CodeGen/AArch64/arm64-ccmp.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-spill-remarks.ll vendor/llvm/dist/test/CodeGen/AArch64/cond-br-tuning.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bug-vopc-commute.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-bitfield-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/code-object-metadata-from-llvm-ir-full.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-cond-add-sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.load.dword.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mubuf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ret_jump.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scheduler-subrange-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-vectors.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sgpr-copy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-i64-opts.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-lod-bias.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-sgpr-spill.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-spill-cf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/split-smrd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll vendor/llvm/dist/test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-isel.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir vendor/llvm/dist/test/CodeGen/ARM/Windows/chkstk-movw-movt-isel.ll vendor/llvm/dist/test/CodeGen/ARM/Windows/tls.ll vendor/llvm/dist/test/CodeGen/ARM/alloca.ll vendor/llvm/dist/test/CodeGen/ARM/arg-copy-elide.ll vendor/llvm/dist/test/CodeGen/ARM/arm-abi-attr.ll vendor/llvm/dist/test/CodeGen/ARM/arm-and-tst-peephole.ll vendor/llvm/dist/test/CodeGen/ARM/arm-position-independence-jump-table.ll vendor/llvm/dist/test/CodeGen/ARM/arm-shrink-wrapping-linux.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-cmpxchg.ll vendor/llvm/dist/test/CodeGen/ARM/bool-ext-inc.ll vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-weak.ll vendor/llvm/dist/test/CodeGen/ARM/code-placement.ll vendor/llvm/dist/test/CodeGen/ARM/constantfp.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/cortexr52-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/ctor_order.ll vendor/llvm/dist/test/CodeGen/ARM/ctors_dtors.ll vendor/llvm/dist/test/CodeGen/ARM/cttz.ll vendor/llvm/dist/test/CodeGen/ARM/cttz_vector.ll vendor/llvm/dist/test/CodeGen/ARM/cxx-tlscc.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-big-stack-frame.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-section.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only.ll vendor/llvm/dist/test/CodeGen/ARM/fp16-promote.ll vendor/llvm/dist/test/CodeGen/ARM/fp16-v3.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt7.ll vendor/llvm/dist/test/CodeGen/ARM/illegal-bitfield-loadstore.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/jump-table-islands.ll vendor/llvm/dist/test/CodeGen/ARM/jump-table-tbh.ll vendor/llvm/dist/test/CodeGen/ARM/ldm-stm-i256.ll vendor/llvm/dist/test/CodeGen/ARM/legalize-unaligned-load.ll vendor/llvm/dist/test/CodeGen/ARM/long-setcc.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/ARM/select_const.ll vendor/llvm/dist/test/CodeGen/ARM/shift-i64.ll vendor/llvm/dist/test/CodeGen/ARM/ssp-data-layout.ll vendor/llvm/dist/test/CodeGen/ARM/str_pre-2.ll vendor/llvm/dist/test/CodeGen/ARM/swifterror.ll vendor/llvm/dist/test/CodeGen/ARM/thumb2-it-block.ll vendor/llvm/dist/test/CodeGen/ARM/vcgt.ll vendor/llvm/dist/test/CodeGen/ARM/vector-DAGCombine.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/ARM/vfp.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vld2.ll vendor/llvm/dist/test/CodeGen/ARM/vld3.ll vendor/llvm/dist/test/CodeGen/ARM/vld4.ll vendor/llvm/dist/test/CodeGen/ARM/vlddup.ll vendor/llvm/dist/test/CodeGen/ARM/vldlane.ll vendor/llvm/dist/test/CodeGen/ARM/vpadd.ll vendor/llvm/dist/test/CodeGen/ARM/vst1.ll vendor/llvm/dist/test/CodeGen/ARM/vst4.ll vendor/llvm/dist/test/CodeGen/ARM/vstlane.ll vendor/llvm/dist/test/CodeGen/ARM/vuzp.ll vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump2.ll vendor/llvm/dist/test/CodeGen/MIR/Generic/multiRunPass.mir vendor/llvm/dist/test/CodeGen/Mips/2008-06-05-Carry.ll vendor/llvm/dist/test/CodeGen/Mips/dsp-patterns.ll vendor/llvm/dist/test/CodeGen/Mips/llcarry.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/add.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sub.ll vendor/llvm/dist/test/CodeGen/Mips/madd-msub.ll vendor/llvm/dist/test/CodeGen/NVPTX/lower-aggr-copies.ll vendor/llvm/dist/test/CodeGen/PowerPC/anon_aggr.ll vendor/llvm/dist/test/CodeGen/PowerPC/floatPSA.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmp.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmpIR.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-align-long-double.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls.ll vendor/llvm/dist/test/CodeGen/Thumb/long-setcc.ll vendor/llvm/dist/test/CodeGen/Thumb2/constant-islands-new-island.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt2.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub.mir vendor/llvm/dist/test/CodeGen/X86/atom-call-reg-indirect.ll vendor/llvm/dist/test/CodeGen/X86/atom-fixup-lea2.ll vendor/llvm/dist/test/CodeGen/X86/atom-sched.ll vendor/llvm/dist/test/CodeGen/X86/avx2-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx2-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx2-conversions.ll vendor/llvm/dist/test/CodeGen/X86/avx2-fma-fneg-combine.ll vendor/llvm/dist/test/CodeGen/X86/avx2-gather.ll vendor/llvm/dist/test/CodeGen/X86/avx2-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx2-phaddsub.ll vendor/llvm/dist/test/CodeGen/X86/avx2-shift.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vector-shifts.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vperm.ll vendor/llvm/dist/test/CodeGen/X86/avx512-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/bswap-vector.ll vendor/llvm/dist/test/CodeGen/X86/compress_expand.ll vendor/llvm/dist/test/CodeGen/X86/cpus.ll vendor/llvm/dist/test/CodeGen/X86/fp128-cast.ll vendor/llvm/dist/test/CodeGen/X86/insertelement-zero.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shift.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shuffle-bug.ll vendor/llvm/dist/test/CodeGen/X86/masked_memop.ll vendor/llvm/dist/test/CodeGen/X86/memcmp.ll vendor/llvm/dist/test/CodeGen/X86/palignr.ll vendor/llvm/dist/test/CodeGen/X86/sbb.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v8.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/DebugInfo/COFF/local-variables.ll vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/dwarfdump-accel.test vendor/llvm/dist/test/Feature/optnone-opt.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/msan_basic.ll vendor/llvm/dist/test/MC/AMDGPU/code-object-metadata-kernel-args.s vendor/llvm/dist/test/MC/AMDGPU/code-object-metadata-kernel-attrs.s vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns.txt vendor/llvm/dist/test/MC/Mips/micromips64r6/valid.s vendor/llvm/dist/test/MC/Mips/mips3/valid.s vendor/llvm/dist/test/MC/Mips/mips4/valid.s vendor/llvm/dist/test/MC/Mips/mips5/valid.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s vendor/llvm/dist/test/MC/Mips/mips64r3/valid.s vendor/llvm/dist/test/MC/Mips/mips64r5/valid.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-bad.s vendor/llvm/dist/test/MC/SystemZ/insn-good-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-good-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-good.s vendor/llvm/dist/test/MC/SystemZ/regs-bad.s vendor/llvm/dist/test/MC/SystemZ/regs-good.s vendor/llvm/dist/test/MC/WebAssembly/unnamed-data.ll vendor/llvm/dist/test/MC/X86/intel-syntax-bitwise-ops.s vendor/llvm/dist/test/ObjectYAML/wasm/weak_symbols.yaml vendor/llvm/dist/test/Other/new-pm-defaults.ll vendor/llvm/dist/test/Other/new-pm-thinlto-defaults.ll vendor/llvm/dist/test/ThinLTO/X86/autoupgrade.ll vendor/llvm/dist/test/Transforms/CodeGenPrepare/X86/memcmp.ll vendor/llvm/dist/test/Transforms/Inline/inline-cold-callsite.ll vendor/llvm/dist/test/Transforms/Inline/optimization-remarks-yaml.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-not.ll vendor/llvm/dist/test/Transforms/InstCombine/ffs-1.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll vendor/llvm/dist/test/Transforms/InstCombine/max-of-nots.ll vendor/llvm/dist/test/Transforms/InstCombine/memmove.ll vendor/llvm/dist/test/Transforms/InstCombine/memset.ll vendor/llvm/dist/test/Transforms/InstCombine/mul.ll vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/select-cmp-cttz-ctlz.ll vendor/llvm/dist/test/Transforms/InstCombine/select-with-bitwise-ops.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll vendor/llvm/dist/test/Transforms/LoopVectorize/first-order-recurrence.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conversion.ll vendor/llvm/dist/test/Transforms/LoopVectorize/minmax_reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/small-loop.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/export-icall.ll vendor/llvm/dist/test/Transforms/SROA/alloca-address-space.ll vendor/llvm/dist/test/Transforms/SROA/preserve-nonnull.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll vendor/llvm/dist/test/tools/llvm-nm/wasm/weak-symbols.yaml vendor/llvm/dist/test/tools/llvm-readobj/file-headers.test vendor/llvm/dist/test/tools/llvm-readobj/peplus.test vendor/llvm/dist/test/tools/llvm-readobj/symbols.test vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-lto2/CMakeLists.txt vendor/llvm/dist/tools/llvm-lto2/LLVMBuild.txt vendor/llvm/dist/tools/llvm-lto2/llvm-lto2.cpp vendor/llvm/dist/tools/llvm-nm/CMakeLists.txt vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalTypeDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/PdbYaml.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.h vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/WasmDumper.cpp vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/CMakeLists.txt vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DwarfGenerator.h vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/ProfileData/CoverageMappingTest.cpp vendor/llvm/dist/unittests/Support/CMakeLists.txt vendor/llvm/dist/unittests/Support/YAMLIOTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenSchedule.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/lit/lit/formats/__init__.py vendor/llvm/dist/utils/lit/lit/formats/base.py vendor/llvm/dist/utils/lit/lit/formats/googletest.py vendor/llvm/dist/utils/lit/lit/formats/shtest.py vendor/llvm/dist/utils/lit/lit/run.py vendor/llvm/dist/utils/lit/lit/util.py vendor/llvm/dist/utils/opt-viewer/opt-diff.py vendor/llvm/dist/utils/opt-viewer/opt-stats.py vendor/llvm/dist/utils/opt-viewer/opt-viewer.py vendor/llvm/dist/utils/opt-viewer/optrecord.py Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CMakeLists.txt Sat Jul 1 13:22:02 2017 (r320533) @@ -206,7 +206,7 @@ endif() include(VersionFromVCS) option(LLVM_APPEND_VC_REV - "Append the version control system revision id to LLVM version" OFF) + "Embed the version control system revision id in LLVM" ON) if( LLVM_APPEND_VC_REV ) add_version_info_from_vcs(PACKAGE_VERSION) Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CODE_OWNERS.TXT Sat Jul 1 13:22:02 2017 (r320533) @@ -70,7 +70,7 @@ D: Branch weights and BlockFrequencyInfo N: Hal Finkel E: hfinkel@anl.gov -D: BBVectorize, the loop reroller, alias analysis and the PowerPC target +D: The loop reroller, alias analysis and the PowerPC target N: Dan Gohman E: sunfish@mozilla.com Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CREDITS.TXT Sat Jul 1 13:22:02 2017 (r320533) @@ -318,11 +318,12 @@ D: Support for implicit TLS model used with MS VC runt D: Dumping of Win64 EH structures N: Takumi Nakamura +I: chapuni E: geek4civic@gmail.com E: chapuni@hf.rim.or.jp -D: Cygwin and MinGW support. -D: Win32 tweaks. -S: Yokohama, Japan +D: Maintaining the Git monorepo +W: https://github.com/llvm-project/ +S: Ebina, Japan N: Edward O'Callaghan E: eocallaghan@auroraux.org Modified: vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c Sat Jul 1 13:22:02 2017 (r320533) @@ -77,7 +77,7 @@ CAMLprim value llvm_datalayout_pointer_size(value DL) /* Llvm.llcontext -> DataLayout.t -> Llvm.lltype */ CAMLprim LLVMTypeRef llvm_datalayout_intptr_type(LLVMContextRef C, value DL) { - return LLVMIntPtrTypeInContext(C, DataLayout_val(DL));; + return LLVMIntPtrTypeInContext(C, DataLayout_val(DL)); } /* int -> DataLayout.t -> int */ Modified: vendor/llvm/dist/docs/CMake.rst ============================================================================== --- vendor/llvm/dist/docs/CMake.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/CMake.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -247,9 +247,10 @@ LLVM-specific variables tests. **LLVM_APPEND_VC_REV**:BOOL - Append version control revision info (svn revision number or Git revision id) - to LLVM version string (stored in the PACKAGE_VERSION macro). For this to work - cmake must be invoked before the build. Defaults to OFF. + Embed version control revision info (svn revision number or Git revision id). + This is used among other things in the LLVM version string (stored in the + PACKAGE_VERSION macro). For this to work cmake must be invoked before the + build. Defaults to ON. **LLVM_ENABLE_THREADS**:BOOL Build with threads support, if available. Defaults to ON. Modified: vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -134,9 +134,6 @@ OPTIONS BUGS ---- - * :program:`llvm-nm` cannot demangle C++ mangled names, like GNU :program:`nm` - can. - * :program:`llvm-nm` does not support the full set of arguments that GNU :program:`nm` does. Added: vendor/llvm/dist/docs/Docker.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/docs/Docker.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -0,0 +1,205 @@ +========================================= +A guide to Dockerfiles for building LLVM +========================================= + +Introduction +============ +You can find a number of sources to build docker images with LLVM components in +``llvm/utils/docker``. They can be used by anyone who wants to build the docker +images for their own use, or as a starting point for someone who wants to write +their own Dockerfiles. + +We currently provide Dockerfiles with ``debian8`` and ``nvidia-cuda`` base images. +We also provide an ``example`` image, which contains placeholders that one would need +to fill out in order to produce Dockerfiles for a new docker image. + +Why? +---- +Docker images provide a way to produce binary distributions of +software inside a controlled environment. Having Dockerfiles to builds docker images +inside LLVM repo makes them much more discoverable than putting them into any other +place. + +Docker basics +------------- +If you've never heard about Docker before, you might find this section helpful +to get a very basic explanation of it. +`Docker `_ is a popular solution for running programs in +an isolated and reproducible environment, especially to maintain releases for +software deployed to large distributed fleets. +It uses linux kernel namespaces and cgroups to provide a lightweight isolation +inside currently running linux kernel. +A single active instance of dockerized environment is called a *docker +container*. +A snapshot of a docker container filesystem is called a *docker image*. +One can start a container from a prebuilt docker image. + +Docker images are built from a so-called *Dockerfile*, a source file written in +a specialized language that defines instructions to be used when build +the docker image (see `official +documentation `_ for more +details). A minimal Dockerfile typically contains a base image and a number +of RUN commands that have to be executed to build the image. When building a new +image, docker will first download your base image, mount its filesystem as +read-only and then add a writable overlay on top of it to keep track of all +filesystem modifications, performed while building your image. When the build +process is finished, a diff between your image's final filesystem state and the +base image's filesystem is stored in the resulting image. + +Overview +======== +The ``llvm/utils/docker`` folder contains Dockerfiles and simple bash scripts to +serve as a basis for anyone who wants to create their own Docker image with +LLVM components, compiled from sources. The sources are checked out from the +upstream svn repository when building the image. + +Inside each subfolder we host Dockerfiles for two images: + +- ``build/`` image is used to compile LLVM, it installs a system compiler and all + build dependencies of LLVM. After the build process is finished, the build + image will have an archive with compiled components at ``/tmp/clang.tar.gz``. +- ``release/`` image usually only contains LLVM components, compiled by the + ``build/`` image, and also libstdc++ and binutils to make image minimally + useful for C++ development. The assumption is that you usually want clang to + be one of the provided components. + +To build both of those images, use ``build_docker_image.sh`` script. +It will checkout LLVM sources and build clang in the ``build`` container, copy results +of the build to the local filesystem and then build the ``release`` container using +those. The ``build_docker_image.sh`` accepts a list of LLVM repositories to +checkout, and arguments for CMake invocation. + +If you want to write your own docker image, start with an ``example/`` subfolder. +It provides incomplete Dockerfiles with (very few) FIXMEs explaining the steps +you need to take in order to make your Dockerfiles functional. + +Usage +===== +The ``llvm/utils/build_docker_image.sh`` script provides a rather high degree of +control on how to run the build. It allows you to specify the projects to +checkout from svn and provide a list of CMake arguments to use during when +building LLVM inside docker container. + +Here's a very simple example of getting a docker image with clang binary, +compiled by the system compiler in the debian8 image: + +.. code-block:: bash + + ./llvm/utils/docker/build_docker_image.sh \ + --source debian8 \ + --docker-repository clang-debian8 --docker-tag "staging" \ + -- \ + -p clang -i install-clang -i install-clang-headers \ + -- \ + -DCMAKE_BUILD_TYPE=Release + +Note there are two levels of ``--`` indirection. First one separates +``build_docker_image.sh`` arguments from ``llvm/utils/build_install_llvm.sh`` +arguments. Second one separates CMake arguments from ``build_install_llvm.sh`` +arguments. Note that build like that doesn't use a 2-stage build process that +you probably want for clang. Running a 2-stage build is a little more intricate, +this command will do that: + +.. code-block:: bash + + # Run a 2-stage build. + # LLVM_TARGETS_TO_BUILD=Native is to reduce stage1 compile time. + # Options, starting with BOOTSTRAP_* are passed to stage2 cmake invocation. + ./build_docker_image.sh \ + --source debian8 \ + --docker-repository clang-debian8 --docker-tag "staging" \ + -- \ + -p clang -i stage2-install-clang -i stage2-install-clang-headers \ + -- \ + -DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \ + -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \ + -DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers" + +This will produce two images, a release image ``clang-debian8:staging`` and a +build image ``clang-debian8-build:staging`` from the latest upstream revision. +After the image is built you can run bash inside a container based on your +image like this: + +.. code-block:: bash + + docker run -ti clang-debian8:staging bash + +Now you can run bash commands as you normally would: + +.. code-block:: bash + + root@80f351b51825:/# clang -v + clang version 5.0.0 (trunk 305064) + Target: x86_64-unknown-linux-gnu + Thread model: posix + InstalledDir: /bin + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2 + Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 + Candidate multilib: .;@m64 + Selected multilib: .;@m64 + + +Which image should I choose? +============================ +We currently provide two images: debian8-based and nvidia-cuda-based. They +differ in the base image that they use, i.e. they have a different set of +preinstalled binaries. Debian8 is very minimal, nvidia-cuda is larger, but has +preinstalled CUDA libraries and allows to access a GPU, installed on your +machine. + +If you need a minimal linux distribution with only clang and libstdc++ included, +you should try debian8-based image. + +If you want to use CUDA libraries and have access to a GPU on your machine, +you should choose nvidia-cuda-based image and use `nvidia-docker +`_ to run your docker containers. Note +that you don't need nvidia-docker to build the images, but you need it in order +to have an access to GPU from a docker container that is running the built +image. + +If you have a different use-case, you could create your own image based on +``example/`` folder. + +Any docker image can be built and run using only the docker binary, i.e. you can +run debian8 build on Fedora or any other Linux distribution. You don't need to +install CMake, compilers or any other clang dependencies. It is all handled +during the build process inside Docker's isolated environment. + +Stable build +============ +If you want a somewhat recent and somewhat stable build, use the +``branches/google/stable`` branch, i.e. the following command will produce a +debian8-based image using the latest ``google/stable`` sources for you: + +.. code-block:: bash + + ./llvm/utils/docker/build_docker_image.sh \ + -s debian8 --d clang-debian8 -t "staging" \ + -- \ + --branch branches/google/stable \ + -p clang -i install-clang -i install-clang-headers \ + -- \ + -DCMAKE_BUILD_TYPE=Release + + +Minimizing docker image size +============================ +Due to Docker restrictions we use two images (i.e., build and release folders) +for the release image to be as small as possible. It's much easier to achieve +that using two images, because Docker would store a filesystem layer for each +command in the Dockerfile, i.e. if you install some packages in one command, +then remove those in a separate command, the size of the resulting image will +still be proportinal to the size of an image with installed packages. +Therefore, we strive to provide a very simple release image which only copies +compiled clang and does not do anything else. + +Docker 1.13 added a ``--squash`` flag that allows to flatten the layers of the +image, i.e. remove the parts that were actually deleted. That is an easier way +to produce the smallest images possible by using just a single image. We do not +use it because as of today the flag is in experimental stage and not everyone +may have the latest docker version available. When the flag is out of +experimental stage, we should investigate replacing two images approach with +just a single image, built using ``--squash`` flag. Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -54,9 +54,10 @@ Non-comprehensive list of changes in this release its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. +* The ``BBVectorize`` pass has been removed. It was fully replaced and no + longer used back in 2014 but we didn't get around to removing it. Now it is + gone. The SLP vectorizer is the suggested non-loop vectorization pass. -* ... next change ... - .. NOTE If you would like to document a larger change, then you can add a subsection about it right here. You can copy the following boilerplate @@ -106,6 +107,15 @@ Changes to the OCaml bindings ----------------------------- During this release ... + + +Changes to the C API +-------------------- + +* Deprecated the ``LLVMAddBBVectorizePass`` interface since the ``BBVectorize`` + pass has been removed. It is now a no-op and will be removed in the next + release. Use ``LLVMAddSLPVectorizePass`` instead to get the supported SLP + vectorizer. External Open Source Projects Using LLVM 5 Modified: vendor/llvm/dist/docs/XRay.rst ============================================================================== --- vendor/llvm/dist/docs/XRay.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/XRay.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -150,7 +150,7 @@ variable, where we list down the options and their def | xray_logfile_base | ``const char*`` | ``xray-log.`` | Filename base for the | | | | | XRay logfile. | +-------------------+-----------------+---------------+------------------------+ -| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | +| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | | | | | Flight Data Recorder | | | | | (FDR) mode. | +-------------------+-----------------+---------------+------------------------+ Modified: vendor/llvm/dist/docs/index.rst ============================================================================== --- vendor/llvm/dist/docs/index.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/index.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -91,6 +91,7 @@ representation. CompileCudaWithLLVM ReportingGuide Benchmarking + Docker :doc:`GettingStarted` Discusses how to get up and running quickly with the LLVM infrastructure. @@ -160,6 +161,9 @@ representation. :doc:`Frontend/PerformanceTips` A collection of tips for frontend authors on how to generate IR which LLVM is able to effectively optimize. + +:doc:`Docker` + A reference for using Dockerfiles provided with LLVM. Programming Documentation Modified: vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h Sat Jul 1 13:22:02 2017 (r320533) @@ -33,7 +33,7 @@ extern "C" { * @{ */ -/** See llvm::createBBVectorizePass function. */ +/** DEPRECATED - Use LLVMAddSLPVectorizePass */ void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); /** See llvm::createLoopVectorizePass function. */ Modified: vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Sat Jul 1 13:22:02 2017 (r320533) @@ -69,10 +69,15 @@ class AliasSet : public ilist_node { if (AAInfo == DenseMapInfo::getEmptyKey()) // We don't have a AAInfo yet. Set it to NewAAInfo. AAInfo = NewAAInfo; - else if (AAInfo != NewAAInfo) - // NewAAInfo conflicts with AAInfo. - AAInfo = DenseMapInfo::getTombstoneKey(); - + else { + AAMDNodes Intersection(AAInfo.intersect(NewAAInfo)); + if (!Intersection) { + // NewAAInfo conflicts with AAInfo. + AAInfo = DenseMapInfo::getTombstoneKey(); + return SizeChanged; + } + AAInfo = Intersection; + } return SizeChanged; } Added: vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h Sat Jul 1 13:22:02 2017 (r320533) @@ -0,0 +1,58 @@ +//=- CFLAliasAnalysisUtils.h - Utilities for CFL Alias Analysis ----*- C++-*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// \file +// These are the utilities/helpers used by the CFL Alias Analyses available in +// tree, i.e. Steensgaard's and Andersens'. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H +#define LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H + +#include "llvm/IR/Function.h" +#include "llvm/IR/ValueHandle.h" + +namespace llvm { +namespace cflaa { + +template struct FunctionHandle final : public CallbackVH { + FunctionHandle(Function *Fn, AAResult *Result) + : CallbackVH(Fn), Result(Result) { + assert(Fn != nullptr); + assert(Result != nullptr); + } + + void deleted() override { removeSelfFromCache(); } + void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } + +private: + AAResult *Result; + + void removeSelfFromCache() { + assert(Result != nullptr); + auto *Val = getValPtr(); + Result->evict(cast(Val)); + setValPtr(nullptr); + } +}; + +static inline const Function *parentFunctionOfValue(const Value *Val) { + if (auto *Inst = dyn_cast(Val)) { + auto *Bb = Inst->getParent(); + return Bb->getParent(); + } + + if (auto *Arg = dyn_cast(Val)) + return Arg->getParent(); + return nullptr; +} // namespace cflaa +} // namespace llvm +} + +#endif // LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H Modified: vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h Sat Jul 1 13:22:02 2017 (r320533) @@ -18,8 +18,8 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/IR/Function.h" -#include "llvm/IR/ValueHandle.h" #include "llvm/Pass.h" #include @@ -47,7 +47,7 @@ class CFLAndersAAResult : public AAResultBaseevict(*cast(Val)); - setValPtr(nullptr); - } - }; - /// \brief Ensures that the given function is available in the cache. /// Returns the appropriate entry from the cache. const Optional &ensureCached(const Function &); @@ -97,7 +76,7 @@ class CFLAndersAAResult : public AAResultBase> Cache; - std::forward_list Handles; + std::forward_list> Handles; }; /// Analysis pass providing a never-invalidated alias analysis result. Modified: vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h Sat Jul 1 13:22:02 2017 (r320533) @@ -19,6 +19,7 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/IR/Function.h" #include "llvm/IR/Module.h" #include "llvm/IR/ValueHandle.h" @@ -85,27 +86,6 @@ class CFLSteensAAResult : public AAResultBaseevict(cast(Val)); - setValPtr(nullptr); - } - }; - const TargetLibraryInfo &TLI; /// \brief Cached mapping of Functions to their StratifiedSets. @@ -114,7 +94,7 @@ class CFLSteensAAResult : public AAResultBase> Cache; - std::forward_list Handles; + std::forward_list> Handles; FunctionInfo buildSetsFrom(Function *F); }; Modified: vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h Sat Jul 1 13:22:02 2017 (r320533) @@ -86,7 +86,6 @@ class IDFCalculator { (public) private: DominatorTreeBase &DT; bool useLiveIn; - DenseMap DomLevels; const SmallPtrSetImpl *LiveInBlocks; const SmallPtrSetImpl *DefBlocks; }; Modified: vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Sat Jul 1 13:22:02 2017 (r320533) @@ -139,7 +139,7 @@ class MemoryAccess (public) // Methods for support type inquiry through isa, cast, and // dyn_cast - static inline bool classof(const Value *V) { + static bool classof(const Value *V) { unsigned ID = V->getValueID(); return ID == MemoryUseVal || ID == MemoryPhiVal || ID == MemoryDefVal; } @@ -241,7 +241,7 @@ class MemoryUseOrDef : public MemoryAccess { (public) /// \brief Get the access that produces the memory state used by this Use. MemoryAccess *getDefiningAccess() const { return getOperand(0); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryUseVal || MA->getValueID() == MemoryDefVal; } @@ -297,7 +297,7 @@ class MemoryUse final : public MemoryUseOrDef { (publi // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryUseVal; } @@ -353,7 +353,7 @@ class MemoryDef final : public MemoryUseOrDef { (publi // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryDefVal; } @@ -526,7 +526,7 @@ class MemoryPhi final : public MemoryAccess { (public) return getIncomingValue(Idx); } - static inline bool classof(const Value *V) { + static bool classof(const Value *V) { return V->getValueID() == MemoryPhiVal; } Modified: vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h Sat Jul 1 13:22:02 2017 (r320533) @@ -34,7 +34,7 @@ class Value; /// /// It allows reporting when optimizations are performed and when they are not /// along with the reasons for it. Hotness information of the corresponding -/// code region can be included in the remark if DiagnosticHotnessRequested is +/// code region can be included in the remark if DiagnosticsHotnessRequested is /// enabled in the LLVM context. class OptimizationRemarkEmitter { public: @@ -45,10 +45,10 @@ class OptimizationRemarkEmitter { (public) /// analysis pass). /// /// Note that this ctor has a very different cost depending on whether - /// F->getContext().getDiagnosticHotnessRequested() is on or not. If it's off + /// F->getContext().getDiagnosticsHotnessRequested() is on or not. If it's off /// the operation is free. /// - /// Whereas if DiagnosticHotnessRequested is on, it is fairly expensive + /// Whereas if DiagnosticsHotnessRequested is on, it is fairly expensive /// operation since BFI and all its required analyses are computed. This is /// for example useful for CGSCC passes that can't use function analyses /// passes in the old PM. Modified: vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h Sat Jul 1 13:22:02 2017 (r320533) @@ -37,18 +37,38 @@ #ifndef LLVM_ANALYSIS_REGIONINFO_H #define LLVM_ANALYSIS_REGIONINFO_H +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/iterator_range.h" -#include "llvm/IR/CFG.h" +#include "llvm/IR/BasicBlock.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/PassManager.h" +#include "llvm/Pass.h" +#include "llvm/Support/raw_ostream.h" +#include +#include #include #include #include +#include +#include +#include namespace llvm { +class DominanceFrontier; +class DominatorTree; +class Loop; +class LoopInfo; +struct PostDominatorTree; +class Region; +template class RegionBase; +class RegionInfo; +template class RegionInfoBase; +class RegionNode; + // Class to be specialized for different users of RegionInfo // (i.e. BasicBlocks or MachineBasicBlocks). This is only to avoid needing to // pass around an unreasonable number of template parameters. @@ -59,37 +79,23 @@ struct RegionTraits { // RegionT // RegionNodeT // RegionInfoT - typedef typename FuncT_::UnknownRegionTypeError BrokenT; + using BrokenT = typename FuncT_::UnknownRegionTypeError; }; -class DominatorTree; -class DominanceFrontier; -class Loop; -class LoopInfo; -struct PostDominatorTree; -class raw_ostream; -class Region; -template -class RegionBase; -class RegionNode; -class RegionInfo; -template -class RegionInfoBase; - template <> struct RegionTraits { - typedef Function FuncT; - typedef BasicBlock BlockT; - typedef Region RegionT; - typedef RegionNode RegionNodeT; - typedef RegionInfo RegionInfoT; - typedef DominatorTree DomTreeT; - typedef DomTreeNode DomTreeNodeT; - typedef DominanceFrontier DomFrontierT; - typedef PostDominatorTree PostDomTreeT; - typedef Instruction InstT; - typedef Loop LoopT; - typedef LoopInfo LoopInfoT; + using FuncT = Function; + using BlockT = BasicBlock; + using RegionT = Region; + using RegionNodeT = RegionNode; + using RegionInfoT = RegionInfo; + using DomTreeT = DominatorTree; + using DomTreeNodeT = DomTreeNode; + using DomFrontierT = DominanceFrontier; + using PostDomTreeT = PostDominatorTree; + using InstT = Instruction; + using LoopT = Loop; + using LoopInfoT = LoopInfo; static unsigned getNumSuccessors(BasicBlock *BB) { return BB->getTerminator()->getNumSuccessors(); @@ -113,13 +119,10 @@ class RegionNodeBase { friend class RegionBase; public: - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionT RegionT; + using BlockT = typename Tr::BlockT; + using RegionT = typename Tr::RegionT; private: - RegionNodeBase(const RegionNodeBase &) = delete; - const RegionNodeBase &operator=(const RegionNodeBase &) = delete; - /// This is the entry basic block that starts this region node. If this is a /// BasicBlock RegionNode, then entry is just the basic block, that this /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode. @@ -150,6 +153,9 @@ class RegionNodeBase { : entry(Entry, isSubRegion), parent(Parent) {} public: + RegionNodeBase(const RegionNodeBase &) = delete; + RegionNodeBase &operator=(const RegionNodeBase &) = delete; + /// @brief Get the parent Region of this RegionNode. /// /// The parent Region is the Region this RegionNode belongs to. If for @@ -247,25 +253,23 @@ class RegionNodeBase { /// tree, the second one creates a graphical representation using graphviz. template class RegionBase : public RegionNodeBase { - typedef typename Tr::FuncT FuncT; - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionNodeT RegionNodeT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::LoopT LoopT; - typedef typename Tr::LoopInfoT LoopInfoT; - typedef typename Tr::InstT InstT; - - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - friend class RegionInfoBase; - RegionBase(const RegionBase &) = delete; - const RegionBase &operator=(const RegionBase &) = delete; + + using FuncT = typename Tr::FuncT; + using BlockT = typename Tr::BlockT; + using RegionInfoT = typename Tr::RegionInfoT; + using RegionT = typename Tr::RegionT; + using RegionNodeT = typename Tr::RegionNodeT; + using DomTreeT = typename Tr::DomTreeT; + using LoopT = typename Tr::LoopT; + using LoopInfoT = typename Tr::LoopInfoT; + using InstT = typename Tr::InstT; + using BlockTraits = GraphTraits; + using InvBlockTraits = GraphTraits>; + using SuccIterTy = typename BlockTraits::ChildIteratorType; + using PredIterTy = typename InvBlockTraits::ChildIteratorType; + // Information necessary to manage this Region. RegionInfoT *RI; DomTreeT *DT; @@ -274,12 +278,12 @@ class RegionBase : public RegionNodeBase { // (The entry BasicBlock is part of RegionNode) BlockT *exit; - typedef std::vector> RegionSet; + using RegionSet = std::vector>; // The subregions of this region. RegionSet children; - typedef std::map> BBNodeMapT; + using BBNodeMapT = std::map>; // Save the BasicBlock RegionNodes that are element of this Region. mutable BBNodeMapT BBNodeMap; @@ -308,6 +312,9 @@ class RegionBase : public RegionNodeBase { RegionBase(BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent = nullptr); + RegionBase(const RegionBase &) = delete; + RegionBase &operator=(const RegionBase &) = delete; + /// Delete the Region and all its subregions. ~RegionBase(); @@ -543,8 +550,8 @@ class RegionBase : public RegionNodeBase { /// /// These iterators iterator over all subregions of this Region. //@{ - typedef typename RegionSet::iterator iterator; - typedef typename RegionSet::const_iterator const_iterator; + using iterator = typename RegionSet::iterator; + using const_iterator = typename RegionSet::const_iterator; iterator begin() { return children.begin(); } iterator end() { return children.end(); } @@ -563,12 +570,13 @@ class RegionBase : public RegionNodeBase { class block_iterator_wrapper : public df_iterator< typename std::conditional::type *> { - typedef df_iterator< - typename std::conditional::type *> super; + using super = + df_iterator< + typename std::conditional::type *>; public: - typedef block_iterator_wrapper Self; - typedef typename super::value_type value_type; + using Self = block_iterator_wrapper; + using value_type = typename super::value_type; // Construct the begin iterator. block_iterator_wrapper(value_type Entry, value_type Exit) @@ -592,8 +600,8 @@ class RegionBase : public RegionNodeBase { } }; - typedef block_iterator_wrapper block_iterator; - typedef block_iterator_wrapper const_block_iterator; + using block_iterator = block_iterator_wrapper; + using const_block_iterator = block_iterator_wrapper; block_iterator block_begin() { return block_iterator(getEntry(), getExit()); } @@ -604,8 +612,8 @@ class RegionBase : public RegionNodeBase { } const_block_iterator block_end() const { return const_block_iterator(); } - typedef iterator_range block_range; - typedef iterator_range const_block_range; + using block_range = iterator_range; + using const_block_range = iterator_range; /// @brief Returns a range view of the basic blocks in the region. inline block_range blocks() { @@ -626,14 +634,14 @@ class RegionBase : public RegionNodeBase { /// are direct children of this Region. It does not iterate over any /// RegionNodes that are also element of a subregion of this Region. //@{ - typedef df_iterator, - false, GraphTraits> - element_iterator; + using element_iterator = + df_iterator, false, + GraphTraits>; - typedef df_iterator, false, - GraphTraits> - const_element_iterator; + using const_element_iterator = + df_iterator, false, + GraphTraits>; element_iterator element_begin(); element_iterator element_end(); @@ -661,36 +669,34 @@ inline raw_ostream &operator<<(raw_ostream &OS, const /// Tree. template class RegionInfoBase { - typedef typename Tr::BlockT BlockT; - typedef typename Tr::FuncT FuncT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::DomTreeNodeT DomTreeNodeT; - typedef typename Tr::PostDomTreeT PostDomTreeT; - typedef typename Tr::DomFrontierT DomFrontierT; - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - friend class RegionInfo; friend class MachineRegionInfo; - typedef DenseMap BBtoBBMap; - typedef DenseMap BBtoRegionMap; - RegionInfoBase(); - virtual ~RegionInfoBase(); + using BlockT = typename Tr::BlockT; + using FuncT = typename Tr::FuncT; + using RegionT = typename Tr::RegionT; + using RegionInfoT = typename Tr::RegionInfoT; + using DomTreeT = typename Tr::DomTreeT; + using DomTreeNodeT = typename Tr::DomTreeNodeT; + using PostDomTreeT = typename Tr::PostDomTreeT; + using DomFrontierT = typename Tr::DomFrontierT; + using BlockTraits = GraphTraits; + using InvBlockTraits = GraphTraits>; + using SuccIterTy = typename BlockTraits::ChildIteratorType; + using PredIterTy = typename InvBlockTraits::ChildIteratorType; - RegionInfoBase(const RegionInfoBase &) = delete; - const RegionInfoBase &operator=(const RegionInfoBase &) = delete; + using BBtoBBMap = DenseMap; + using BBtoRegionMap = DenseMap; + RegionInfoBase(); + RegionInfoBase(RegionInfoBase &&Arg) : DT(std::move(Arg.DT)), PDT(std::move(Arg.PDT)), DF(std::move(Arg.DF)), TopLevelRegion(std::move(Arg.TopLevelRegion)), BBtoRegion(std::move(Arg.BBtoRegion)) { Arg.wipe(); } + RegionInfoBase &operator=(RegionInfoBase &&RHS) { DT = std::move(RHS.DT); PDT = std::move(RHS.PDT); @@ -701,12 +707,14 @@ class RegionInfoBase { return *this; } + virtual ~RegionInfoBase(); + DomTreeT *DT; PostDomTreeT *PDT; DomFrontierT *DF; /// The top level region. - RegionT *TopLevelRegion; + RegionT *TopLevelRegion = nullptr; /// Map every BB to the smallest region, that contains BB. BBtoRegionMap BBtoRegion; @@ -785,6 +793,9 @@ class RegionInfoBase { void calculate(FuncT &F); public: + RegionInfoBase(const RegionInfoBase &) = delete; + RegionInfoBase &operator=(const RegionInfoBase &) = delete; + static bool VerifyRegionInfo; static typename RegionT::PrintStyle printStyle; @@ -887,21 +898,22 @@ class Region : public RegionBase> { public: - typedef RegionInfoBase> Base; + using Base = RegionInfoBase>; explicit RegionInfo(); - ~RegionInfo() override; - RegionInfo(RegionInfo &&Arg) : Base(std::move(static_cast(Arg))) { updateRegionTree(*this, TopLevelRegion); } + RegionInfo &operator=(RegionInfo &&RHS) { Base::operator=(std::move(static_cast(RHS))); updateRegionTree(*this, TopLevelRegion); return *this; } + ~RegionInfo() override; + /// Handle invalidation explicitly. bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &); @@ -931,8 +943,8 @@ class RegionInfoPass : public FunctionPass { public: static char ID; - explicit RegionInfoPass(); + explicit RegionInfoPass(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:09 2017 Return-Path: Delivered-To: svn-src-all@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 5457DD8971C; Sat, 1 Jul 2017 13:24:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 ECFB8AE5; Sat, 1 Jul 2017 13:24:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DO8at022102; Sat, 1 Jul 2017 13:24:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DO6PT022078; Sat, 1 Jul 2017 13:24:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DO6PT022078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320535 - in vendor/clang/dist: bindings/python/clang bindings/python/tests docs include/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/F... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist: bindings/python/clang bindings/python/tests docs include/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Format include/clang/Front... X-SVN-Commit-Revision: 320535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:09 -0000 Author: dim Date: Sat Jul 1 13:24:05 2017 New Revision: 320535 URL: https://svnweb.freebsd.org/changeset/base/320535 Log: Vendor import of clang trunk r306956: https://llvm.org/svn/llvm-project/cfe/trunk@306956 Added: vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py (contents, props changed) vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/ vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/RenamingAction.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFinder.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRLocFinder.h (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/ vendor/clang/dist/lib/Tooling/Refactoring/Rename/RenamingAction.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFinder.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/arm-execute-only.c (contents, props changed) vendor/clang/dist/test/CodeGen/lto-newpm-pipeline.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/dllexport-dtor-thunks.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/msabi-blocks.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/stret-lifetime.m vendor/clang/dist/test/CodeGenObjCXX/arc-indirect.mm vendor/clang/dist/test/Driver/nios2-cpu.c (contents, props changed) vendor/clang/dist/test/Driver/unavailable_aligned_allocation.cpp (contents, props changed) vendor/clang/dist/test/Index/ctor-init-source-loc.cpp (contents, props changed) vendor/clang/dist/test/Modules/Inputs/F.framework/ vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/F.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.private.modulemap vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/ vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/ vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Base.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Derive.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/H3.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/module.map vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/ vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.modulemap vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.modulemap vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/main.modulemap vendor/clang/dist/test/Modules/lookup-assert-protocol.m vendor/clang/dist/test/Modules/preprocess-decluse.cpp (contents, props changed) vendor/clang/dist/test/Modules/redefinition-c-tagtypes.m vendor/clang/dist/test/Profile/Inputs/cxx-missing-bodies.proftext vendor/clang/dist/test/Profile/cxx-missing-bodies.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/eval-crashes.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/unavailable_aligned_allocation.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ vendor/clang/dist/test/clang-rename/ClassAsTemplateArgument.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassFindByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassSimpleRenaming.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassTestMulti.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassTestMultiByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ComplexFunctionOverride.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ComplicatedClassType.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Ctor.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/CtorInitializer.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/DeclRefExpr.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Field.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionOverride.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionWithClassFindByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/IncludeHeaderWithSymbol.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Inputs/ vendor/clang/dist/test/clang-rename/Inputs/HeaderWithSymbol.h (contents, props changed) vendor/clang/dist/test/clang-rename/Inputs/OffsetToNewName.yaml vendor/clang/dist/test/clang-rename/Inputs/QualifiedNameToNewName.yaml vendor/clang/dist/test/clang-rename/InvalidNewName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/InvalidOffset.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/InvalidQualifiedName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/MemberExprMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Namespace.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/NoNewName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplateClassInstantiation.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplateTypename.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplatedClassFunction.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/UserDefinedConversion.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Variable.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/VariableMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/YAMLInput.cpp (contents, props changed) vendor/clang/dist/tools/clang-rename/ vendor/clang/dist/tools/clang-rename/CMakeLists.txt (contents, props changed) vendor/clang/dist/tools/clang-rename/ClangRename.cpp (contents, props changed) vendor/clang/dist/tools/clang-rename/clang-rename.el vendor/clang/dist/tools/clang-rename/clang-rename.py (contents, props changed) vendor/clang/dist/unittests/Rename/ vendor/clang/dist/unittests/Rename/CMakeLists.txt (contents, props changed) vendor/clang/dist/unittests/Rename/ClangRenameTest.h (contents, props changed) vendor/clang/dist/unittests/Rename/RenameClassTest.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/CastExprTest.cpp (contents, props changed) Modified: vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/NSAPI.h vendor/clang/dist/include/clang/AST/OpenMPClause.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Basic/OpenMPKinds.def vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/TargetBuiltins.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/Basic/Visibility.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/DiagnosticRenderer.h vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/PTHLexer.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/include/clang/module.modulemap vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/ODRHash.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/Basic/SourceLocation.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/CodeGenPGO.cpp vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/Arch/ARM.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/CommonArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp vendor/clang/dist/lib/Driver/ToolChains/Darwin.h vendor/clang/dist/lib/Driver/ToolChains/MipsLinux.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/NamespaceEndCommentsFixer.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.h vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/DiagnosticRenderer.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/ModuleDependencyCollector.cpp vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/lib/Tooling/Refactoring/AtomicChange.cpp vendor/clang/dist/lib/Tooling/Refactoring/CMakeLists.txt vendor/clang/dist/test/Analysis/malloc-overflow2.c vendor/clang/dist/test/Analysis/unix-fns.c vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CodeGen/arm-v8.1a-neon-intrinsics.c vendor/clang/dist/test/CodeGen/avx512f-builtins.c vendor/clang/dist/test/CodeGen/builtins-wasm.c vendor/clang/dist/test/CodeGen/mangle-ms.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/named_reg_global.c vendor/clang/dist/test/CodeGen/neon-immediate-ubsan.c vendor/clang/dist/test/CodeGen/pgo-sample-thinlto-summary.c vendor/clang/dist/test/CodeGen/xray-attributes-supported.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms.cpp vendor/clang/dist/test/CodeGenObjC/ivar-type-encoding.m vendor/clang/dist/test/CodeGenObjC/parameterized_classes.m vendor/clang/dist/test/CodeGenObjC/protocol-comdat.m vendor/clang/dist/test/CodeGenObjC/stret-1.m vendor/clang/dist/test/CodeGenOpenCL/addr-space-struct-arg.cl vendor/clang/dist/test/Driver/arm-execute-only.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/darwin-version.c vendor/clang/dist/test/Driver/fuzzer.c vendor/clang/dist/test/Driver/openmp-offload.c vendor/clang/dist/test/Driver/windows-cross.c vendor/clang/dist/test/FixIt/fixit-format-darwin.m vendor/clang/dist/test/FixIt/format-darwin.m vendor/clang/dist/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext vendor/clang/dist/test/Frontend/optimization-remark-with-hotness.c vendor/clang/dist/test/Index/get-cursor.cpp vendor/clang/dist/test/Index/linkage.c vendor/clang/dist/test/Modules/diag-flags.cpp vendor/clang/dist/test/Modules/elaborated-type-specifier-from-hidden-module.m vendor/clang/dist/test/Modules/odr_hash.cpp vendor/clang/dist/test/Modules/redefinition-same-header.m vendor/clang/dist/test/OpenMP/parallel_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen_global_capture.cpp vendor/clang/dist/test/OpenMP/target_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_data_use_device_ptr_codegen.cpp vendor/clang/dist/test/OpenMP/target_enter_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_exit_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/target_is_device_ptr_codegen.cpp vendor/clang/dist/test/OpenMP/target_map_codegen.cpp vendor/clang/dist/test/OpenMP/target_parallel_codegen.cpp vendor/clang/dist/test/OpenMP/target_teams_codegen.cpp vendor/clang/dist/test/OpenMP/target_update_codegen.cpp vendor/clang/dist/test/OpenMP/taskloop_ast_print.cpp vendor/clang/dist/test/OpenMP/taskloop_simd_ast_print.cpp vendor/clang/dist/test/PCH/attrs.c vendor/clang/dist/test/Preprocessor/aarch64-target-features.c vendor/clang/dist/test/Preprocessor/arm-target-features.c vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist/test/Preprocessor/predefined-macros.c vendor/clang/dist/test/Profile/cxx-structors.cpp vendor/clang/dist/test/Sema/diagnose_if.c vendor/clang/dist/test/Sema/integer-overflow.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaCXX/warn-throw-out-noexcept-func.cpp vendor/clang/dist/test/SemaOpenCL/extension-begin.cl vendor/clang/dist/test/SemaTemplate/destructor-template.cpp vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/c-index-test/core_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/unittests/CMakeLists.txt vendor/clang/dist/unittests/Driver/ToolChainTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJava.cpp vendor/clang/dist/unittests/Format/FormatTestProto.cpp vendor/clang/dist/unittests/Format/SortIncludesTest.cpp vendor/clang/dist/unittests/Tooling/CMakeLists.txt vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTest.cpp vendor/clang/dist/unittests/Tooling/RefactoringTest.cpp vendor/clang/dist/unittests/Tooling/TestVisitor.h vendor/clang/dist/utils/bash-autocomplete.sh Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/bindings/python/clang/cindex.py Sat Jul 1 13:24:05 2017 (r320535) @@ -1367,6 +1367,30 @@ TemplateArgumentKind.DECLARATION = TemplateArgumentKin TemplateArgumentKind.NULLPTR = TemplateArgumentKind(3) TemplateArgumentKind.INTEGRAL = TemplateArgumentKind(4) +### Exception Specification Kinds ### +class ExceptionSpecificationKind(BaseEnumeration): + """ + An ExceptionSpecificationKind describes the kind of exception specification + that a function has. + """ + + # The required BaseEnumeration declarations. + _kinds = [] + _name_map = None + + def __repr__(self): + return 'ExceptionSpecificationKind.{}'.format(self.name) + +ExceptionSpecificationKind.NONE = ExceptionSpecificationKind(0) +ExceptionSpecificationKind.DYNAMIC_NONE = ExceptionSpecificationKind(1) +ExceptionSpecificationKind.DYNAMIC = ExceptionSpecificationKind(2) +ExceptionSpecificationKind.MS_ANY = ExceptionSpecificationKind(3) +ExceptionSpecificationKind.BASIC_NOEXCEPT = ExceptionSpecificationKind(4) +ExceptionSpecificationKind.COMPUTED_NOEXCEPT = ExceptionSpecificationKind(5) +ExceptionSpecificationKind.UNEVALUATED = ExceptionSpecificationKind(6) +ExceptionSpecificationKind.UNINSTANTIATED = ExceptionSpecificationKind(7) +ExceptionSpecificationKind.UNPARSED = ExceptionSpecificationKind(8) + ### Cursors ### class Cursor(Structure): @@ -1587,6 +1611,18 @@ class Cursor(Structure): return self._result_type @property + def exception_specification_kind(self): + ''' + Retrieve the exception specification kind, which is one of the values + from the ExceptionSpecificationKind enumeration. + ''' + if not hasattr(self, '_exception_specification_kind'): + exc_kind = conf.lib.clang_getCursorExceptionSpecificationType(self) + self._exception_specification_kind = ExceptionSpecificationKind.from_id(exc_kind) + + return self._exception_specification_kind + + @property def underlying_typedef_type(self): """Return the underlying type of a typedef declaration. @@ -2253,6 +2289,14 @@ class Type(Structure): conf.lib.clang_Type_visitFields(self, callbacks['fields_visit'](visitor), fields) return iter(fields) + + def get_exception_specification_kind(self): + """ + Return the kind of the exception specification; a value from + the ExceptionSpecificationKind enumeration. + """ + return ExceptionSpecificationKind.from_id( + conf.lib.clang.getExceptionSpecificationType(self)) @property def spelling(self): Added: vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py Sat Jul 1 13:24:05 2017 (r320535) @@ -0,0 +1,27 @@ +import clang.cindex +from clang.cindex import ExceptionSpecificationKind +from .util import get_tu + + +def find_function_declarations(node, declarations=[]): + if node.kind == clang.cindex.CursorKind.FUNCTION_DECL: + declarations.append((node.spelling, node.exception_specification_kind)) + for child in node.get_children(): + declarations = find_function_declarations(child, declarations) + return declarations + + +def test_exception_specification_kind(): + source = """int square1(int x); + int square2(int x) noexcept; + int square3(int x) noexcept(noexcept(x * x));""" + + tu = get_tu(source, lang='cpp', flags=['-std=c++14']) + + declarations = find_function_declarations(tu.cursor) + expected = [ + ('square1', ExceptionSpecificationKind.NONE), + ('square2', ExceptionSpecificationKind.BASIC_NOEXCEPT), + ('square3', ExceptionSpecificationKind.COMPUTED_NOEXCEPT) + ] + assert declarations == expected Modified: vendor/clang/dist/docs/UsersManual.rst ============================================================================== --- vendor/clang/dist/docs/UsersManual.rst Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/docs/UsersManual.rst Sat Jul 1 13:24:05 2017 (r320535) @@ -322,18 +322,27 @@ output format of the diagnostics that it generates. by category, so it should be a high level category. We want dozens of these, not hundreds or thousands of them. +.. _opt_fsave-optimization-record: + +**-fsave-optimization-record** + Write optimization remarks to a YAML file. + + This option, which defaults to off, controls whether Clang writes + optimization reports to a YAML file. By recording diagnostics in a file, + using a structured YAML format, users can parse or sort the remarks in a + convenient way. + .. _opt_fdiagnostics-show-hotness: **-f[no-]diagnostics-show-hotness** Enable profile hotness information in diagnostic line. - This option, which defaults to off, controls whether Clang prints the - profile hotness associated with a diagnostics in the presence of - profile-guided optimization information. This is currently supported with - optimization remarks (see :ref:`Options to Emit Optimization Reports - `). The hotness information allows users to focus on the hot - optimization remarks that are likely to be more relevant for run-time - performance. + This option controls whether Clang prints the profile hotness associated + with diagnostics in the presence of profile-guided optimization information. + This is currently supported with optimization remarks (see + :ref:`Options to Emit Optimization Reports `). The hotness information + allows users to focus on the hot optimization remarks that are likely to be + more relevant for run-time performance. For example, in this output, the block containing the callsite of `foo` was executed 3000 times according to the profile data: @@ -343,6 +352,23 @@ output format of the diagnostics that it generates. s.c:7:10: remark: foo inlined into bar (hotness: 3000) [-Rpass-analysis=inline] sum += foo(x, x - 2); ^ + + This option is implied when + :ref:`-fsave-optimization-record ` is used. + Otherwise, it defaults to off. + +.. _opt_fdiagnostics-hotness-threshold: + +**-fdiagnostics-hotness-threshold** + Prevent optimization remarks from being output if they do not have at least + this hotness value. + + This option, which defaults to zero, controls the minimum hotness an + optimization remark would need in order to be output by Clang. This is + currently supported with optimization remarks (see :ref:`Options to Emit + Optimization Reports `) when profile hotness information in + diagnostics is enabled (see + :ref:`-fdiagnostics-show-hotness `). .. _opt_fdiagnostics-fixit-info: Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang-c/Index.h Sat Jul 1 13:24:05 2017 (r320535) @@ -171,8 +171,61 @@ typedef struct CXVersion { */ int Subminor; } CXVersion; - + /** + * \brief Describes the exception specification of a cursor. + * + * A negative value indicates that the cursor is not a function declaration. + */ +enum CXCursor_ExceptionSpecificationKind { + + /** + * \brief The cursor has no exception specification. + */ + CXCursor_ExceptionSpecificationKind_None, + + /** + * \brief The cursor has exception specification throw() + */ + CXCursor_ExceptionSpecificationKind_DynamicNone, + + /** + * \brief The cursor has exception specification throw(T1, T2) + */ + CXCursor_ExceptionSpecificationKind_Dynamic, + + /** + * \brief The cursor has exception specification throw(...). + */ + CXCursor_ExceptionSpecificationKind_MSAny, + + /** + * \brief The cursor has exception specification basic noexcept. + */ + CXCursor_ExceptionSpecificationKind_BasicNoexcept, + + /** + * \brief The cursor has exception specification computed noexcept. + */ + CXCursor_ExceptionSpecificationKind_ComputedNoexcept, + + /** + * \brief The exception specification has not yet been evaluated. + */ + CXCursor_ExceptionSpecificationKind_Unevaluated, + + /** + * \brief The exception specification has not yet been instantiated. + */ + CXCursor_ExceptionSpecificationKind_Uninstantiated, + + /** + * \brief The exception specification has not been parsed yet. + */ + CXCursor_ExceptionSpecificationKind_Unparsed +}; + +/** * \brief Provides a shared context for creating translation units. * * It provides two options: @@ -3471,6 +3524,13 @@ CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTyp CINDEX_LINKAGE CXType clang_getResultType(CXType T); /** + * \brief Retrieve the exception specification type associated with a function type. + * + * If a non-function type is passed in, an error code of -1 is returned. + */ +CINDEX_LINKAGE int clang_getExceptionSpecificationType(CXType T); + +/** * \brief Retrieve the number of non-variadic parameters associated with a * function type. * @@ -3497,6 +3557,13 @@ CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic(C * This only returns a valid type if the cursor refers to a function or method. */ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C); + +/** + * \brief Retrieve the exception specification type associated with a given cursor. + * + * This only returns a valid result if the cursor refers to a function or method. + */ +CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C); /** * \brief Return 1 if the CXType is a POD (plain old data) type, and 0 Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 1 13:24:05 2017 (r320535) @@ -2050,6 +2050,11 @@ class ASTContext : public RefCountedBase { /// Get the offset of a FieldDecl or IndirectFieldDecl, in bits. uint64_t getFieldOffset(const ValueDecl *FD) const; + /// Get the offset of an ObjCIvarDecl in bits. + uint64_t lookupFieldBitOffset(const ObjCInterfaceDecl *OID, + const ObjCImplementationDecl *ID, + const ObjCIvarDecl *Ivar) const; + bool isNearlyEmpty(const CXXRecordDecl *RD) const; VTableContextBase *getVTableContext(); Modified: vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h Sat Jul 1 13:24:05 2017 (r320535) @@ -62,9 +62,11 @@ struct StructuralEquivalenceContext { StructuralEquivalenceContext( ASTContext &FromCtx, ASTContext &ToCtx, llvm::DenseSet> &NonEquivalentDecls, - bool StrictTypeSpelling = false, bool Complain = true) + bool StrictTypeSpelling = false, bool Complain = true, + bool ErrorOnTagTypeMismatch = false) : FromCtx(FromCtx), ToCtx(ToCtx), NonEquivalentDecls(NonEquivalentDecls), - StrictTypeSpelling(StrictTypeSpelling), Complain(Complain), + StrictTypeSpelling(StrictTypeSpelling), + ErrorOnTagTypeMismatch(ErrorOnTagTypeMismatch), Complain(Complain), LastDiagFromC2(false) {} DiagnosticBuilder Diag1(SourceLocation Loc, unsigned DiagID); Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 1 13:24:05 2017 (r320535) @@ -2019,7 +2019,10 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// These functions have special behavior under C++1y [expr.new]: /// An implementation is allowed to omit a call to a replaceable global /// allocation function. [...] - bool isReplaceableGlobalAllocationFunction() const; + /// + /// If this function is an aligned allocation/deallocation function, return + /// true through IsAligned. + bool isReplaceableGlobalAllocationFunction(bool *IsAligned = nullptr) const; /// Compute the language linkage. LanguageLinkage getLanguageLinkage() const; Modified: vendor/clang/dist/include/clang/AST/NSAPI.h ============================================================================== --- vendor/clang/dist/include/clang/AST/NSAPI.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/NSAPI.h Sat Jul 1 13:24:05 2017 (r320535) @@ -49,7 +49,7 @@ class NSAPI { (public) NSStr_initWithString, NSStr_initWithUTF8String }; - static const unsigned NumNSStringMethods = 5; + static const unsigned NumNSStringMethods = 6; IdentifierInfo *getNSClassId(NSClassIdKindKind K) const; @@ -112,7 +112,7 @@ class NSAPI { (public) NSMutableDict_setObjectForKeyedSubscript, NSMutableDict_setValueForKey }; - static const unsigned NumNSDictionaryMethods = 14; + static const unsigned NumNSDictionaryMethods = 13; /// \brief The Objective-C NSDictionary selectors. Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const; Modified: vendor/clang/dist/include/clang/AST/OpenMPClause.h ============================================================================== --- vendor/clang/dist/include/clang/AST/OpenMPClause.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/OpenMPClause.h Sat Jul 1 13:24:05 2017 (r320535) @@ -20,6 +20,7 @@ #include "clang/AST/Stmt.h" #include "clang/Basic/OpenMPKinds.h" #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/MapVector.h" namespace clang { @@ -3001,7 +3002,7 @@ class OMPMappableExprListClause : public OMPVarListCla // Organize the components by declaration and retrieve the original // expression. Original expressions are always the first component of the // mappable component list. - llvm::DenseMap> + llvm::MapVector> ComponentListMap; { auto CI = ComponentLists.begin(); Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h ============================================================================== --- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Sat Jul 1 13:24:05 2017 (r320535) @@ -593,6 +593,16 @@ bool RecursiveASTVisitor::PostVisitStmt(Stmt #define STMT(CLASS, PARENT) \ case Stmt::CLASS##Class: \ TRY_TO(WalkUpFrom##CLASS(static_cast(S))); break; +#define INITLISTEXPR(CLASS, PARENT) \ + case Stmt::CLASS##Class: \ + { \ + auto ILE = static_cast(S); \ + if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE) \ + TRY_TO(WalkUpFrom##CLASS(Syn)); \ + if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm()) \ + TRY_TO(WalkUpFrom##CLASS(Sem)); \ + break; \ + } #include "clang/AST/StmtNodes.inc" } @@ -2220,13 +2230,15 @@ bool RecursiveASTVisitor::TraverseSynOrSemIni // the syntactic and the semantic form. // // There is no guarantee about which form \p S takes when this method is called. -DEF_TRAVERSE_STMT(InitListExpr, { +template +bool RecursiveASTVisitor::TraverseInitListExpr( + InitListExpr *S, DataRecursionQueue *Queue) { TRY_TO(TraverseSynOrSemInitListExpr( S->isSemanticForm() ? S->getSyntacticForm() : S, Queue)); TRY_TO(TraverseSynOrSemInitListExpr( S->isSemanticForm() ? S : S->getSemanticForm(), Queue)); - ShouldVisitChildren = false; -}) + return true; +} // GenericSelectionExpr is a special case because the types and expressions // are interleaved. We also need to watch out for null types (default Modified: vendor/clang/dist/include/clang/AST/Redeclarable.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Redeclarable.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/Redeclarable.h Sat Jul 1 13:24:05 2017 (r320535) @@ -21,6 +21,60 @@ namespace clang { class ASTContext; +// Some notes on redeclarables: +// +// - Every redeclarable is on a circular linked list. +// +// - Every decl has a pointer to the first element of the chain _and_ a +// DeclLink that may point to one of 3 possible states: +// - the "previous" (temporal) element in the chain +// - the "latest" (temporal) element in the chain +// - the an "uninitialized-latest" value (when newly-constructed) +// +// - The first element is also often called the canonical element. Every +// element has a pointer to it so that "getCanonical" can be fast. +// +// - Most links in the chain point to previous, except the link out of +// the first; it points to latest. +// +// - Elements are called "first", "previous", "latest" or +// "most-recent" when referring to temporal order: order of addition +// to the chain. +// +// - To make matters confusing, the DeclLink type uses the term "next" +// for its pointer-storage internally (thus functions like +// NextIsPrevious). It's easiest to just ignore the implementation of +// DeclLink when making sense of the redeclaration chain. +// +// - There's also a "definition" link for several types of +// redeclarable, where only one definition should exist at any given +// time (and the defn pointer is stored in the decl's "data" which +// is copied to every element on the chain when it's changed). +// +// Here is some ASCII art: +// +// "first" "latest" +// "canonical" "most recent" +// +------------+ first +--------------+ +// | | <--------------------------- | | +// | | | | +// | | | | +// | | +--------------+ | | +// | | first | | | | +// | | <---- | | | | +// | | | | | | +// | @class A | link | @interface A | link | @class A | +// | seen first | <---- | seen second | <---- | seen third | +// | | | | | | +// +------------+ +--------------+ +--------------+ +// | data | defn | data | defn | data | +// | | ----> | | <---- | | +// +------------+ +--------------+ +--------------+ +// | | ^ ^ +// | |defn | | +// | link +-----+ | +// +-->-------------------------------------------+ + /// \brief Provides common interface for the Decls that can be redeclared. template class Redeclarable { Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jul 1 13:24:05 2017 (r320535) @@ -605,20 +605,27 @@ semantics: for ``T`` and ``U`` to be incompatible. The declaration of ``overloadable`` functions is restricted to function -declarations and definitions. Most importantly, if any function with a given -name is given the ``overloadable`` attribute, then all function declarations -and definitions with that name (and in that scope) must have the -``overloadable`` attribute. This rule even applies to redeclarations of -functions whose original declaration had the ``overloadable`` attribute, e.g., +declarations and definitions. If a function is marked with the ``overloadable`` +attribute, then all declarations and definitions of functions with that name, +except for at most one (see the note below about unmarked overloads), must have +the ``overloadable`` attribute. In addition, redeclarations of a function with +the ``overloadable`` attribute must have the ``overloadable`` attribute, and +redeclarations of a function without the ``overloadable`` attribute must *not* +have the ``overloadable`` attribute. e.g., .. code-block:: c int f(int) __attribute__((overloadable)); float f(float); // error: declaration of "f" must have the "overloadable" attribute + int f(int); // error: redeclaration of "f" must have the "overloadable" attribute int g(int) __attribute__((overloadable)); int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute + int h(int); + int h(int) __attribute__((overloadable)); // error: declaration of "h" must not + // have the "overloadable" attribute + Functions marked ``overloadable`` must have prototypes. Therefore, the following code is ill-formed: @@ -651,7 +658,28 @@ caveats to this use of name mangling: linkage specification, it's name *will* be mangled in the same way as it would in C. -Query for this feature with ``__has_extension(attribute_overloadable)``. +For the purpose of backwards compatibility, at most one function with the same +name as other ``overloadable`` functions may omit the ``overloadable`` +attribute. In this case, the function without the ``overloadable`` attribute +will not have its name mangled. + +For example: + +.. code-block:: c + + // Notes with mangled names assume Itanium mangling. + int f(int); + int f(double) __attribute__((overloadable)); + void foo() { + f(5); // Emits a call to f (not _Z1fi, as it would with an overload that + // was marked with overloadable). + f(1.0); // Emits a call to _Z1fd. + } + +Support for unmarked overloads is not present in some versions of clang. You may +query for it using ``__has_extension(overloadable_unmarked)``. + +Query for this attribute with ``__has_attribute(overloadable)``. }]; } Added: vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def Sat Jul 1 13:24:05 2017 (r320535) @@ -0,0 +1,70 @@ +//===-- BuiltinsNios2.def - Nios2 Builtin function database --------*- C++ -*-==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the Nios2-specific builtin function database. Users of +// this file must define the BUILTIN macro to make use of this information. +// +//===----------------------------------------------------------------------===// + +// The format of this database matches clang/Basic/Builtins.def. + +#if defined(BUILTIN) && !defined(TARGET_BUILTIN) +# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS) +#endif + +// Nios2 R1 builtins: + +//int __builtin_ldbio(volatile const void *); +BUILTIN(__builtin_ldbio, "ivDC*", "") +//int __builtin_ldbuio(volatile const void *); +BUILTIN(__builtin_ldbuio, "ivDC*", "") +//int __builtin_ldhio(volatile const void *); +BUILTIN(__builtin_ldhio, "ivDC*", "") +//int __builtin_ldhuio(volatile const void *); +BUILTIN(__builtin_ldhuio, "ivDC*", "") +//int __builtin_ldwio(volatile const void *); +BUILTIN(__builtin_ldwio, "ivDC*", "") +//int __builtin_ldwuio(int); +BUILTIN(__builtin_ldwuio, "ii", "") +// int __builtin_rdctl(int); +BUILTIN(__builtin_rdctl, "iIi", "") +// void __builtin_wrctl(int, int); +BUILTIN(__builtin_wrctl, "vIii", "") +// int __builtin_rdprs(int, int); +BUILTIN(__builtin_rdprs, "iii", "") +//void __builtin_stbio(volatile void *, int); +BUILTIN(__builtin_stbio, "vvD*i", "") +//void __builtin_sthio(volatile void *, int); +BUILTIN(__builtin_sthio, "vvD*i", "") +//void __builtin_stwio(volatile void *, int); +BUILTIN(__builtin_stwio, "vvD*i", "") +//void __builtin_sync(void); +BUILTIN(__builtin_sync, "v", "") +// void __builtin_flushd(volatile void *); +BUILTIN(__builtin_flushd, "vvD*", "") +// void __builtin_flushda(volatile void *); +BUILTIN(__builtin_flushda, "vvD*", "") + +// Nios2 R2 builtins: + +// int __builtin_wrpie(int); +TARGET_BUILTIN(__builtin_wrpie, "ii", "", "nios2r2mandatory") +// void __builtin_eni(int); +TARGET_BUILTIN(__builtin_eni, "vi", "", "nios2r2mandatory") +// int __builtin_ldex(volatile const void *); +TARGET_BUILTIN(__builtin_ldex, "ivDC*", "", "nios2r2mandatory") +// int __builtin_stex(volatile void *, int); +TARGET_BUILTIN(__builtin_stex, "ivD*i", "", "nios2r2mandatory") +// int __builtin_ldsex(volatile const void *); +TARGET_BUILTIN(__builtin_ldsex, "ivDC*", "", "nios2r2mpx") +// int __builtin_stsex(volatile void *, int); +TARGET_BUILTIN(__builtin_stsex, "ivDC*i", "", "nios2r2mpx") + +#undef BUILTIN +#undef TARGET_BUILTIN Modified: vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def Sat Jul 1 13:24:05 2017 (r320535) @@ -21,4 +21,8 @@ BUILTIN(__builtin_wasm_current_memory, "z", "n") BUILTIN(__builtin_wasm_grow_memory, "zz", "n") +// Exception handling builtins. +BUILTIN(__builtin_wasm_throw, "vUiv*", "r") +BUILTIN(__builtin_wasm_rethrow, "v", "r") + #undef BUILTIN Modified: vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -200,12 +200,17 @@ def note_odr_defined_here : Note<"also defined here">; def err_odr_function_type_inconsistent : Error< "external function %0 declared with incompatible types in different " "translation units (%1 vs. %2)">; -def warn_odr_tag_type_inconsistent : Warning< - "type %0 has incompatible definitions in different translation units">, - InGroup>; +def warn_odr_tag_type_inconsistent + : Warning<"type %0 has incompatible definitions in different translation " + "units">, + InGroup>; +def err_odr_tag_type_inconsistent + : Error<"type %0 has incompatible definitions in different translation " + "units">; def note_odr_tag_kind_here: Note< "%0 is a %select{struct|interface|union|class|enum}1 here">; def note_odr_field : Note<"field %0 has type %1 here">; +def note_odr_field_name : Note<"field has name %0 here">; def note_odr_missing_field : Note<"no corresponding field here">; def note_odr_bit_field : Note<"bit-field %0 with type %1 and length %2 here">; def note_odr_not_bit_field : Note<"field %0 is not a bit-field">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -138,6 +138,9 @@ def err_drv_cc_print_options_failure : Error< def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">; def err_drv_preamble_format : Error< "incorrect format for -preamble-bytes=N,END">; +def err_invalid_ios_deployment_target : Error< + "invalid iOS deployment version '%0', iOS 10 is the maximum deployment " + "target for 32-bit targets">; def err_drv_conflicting_deployment_targets : Error< "conflicting deployment targets, both '%0' and '%1' are present in environment">; def err_arc_unsupported_on_runtime : Error< @@ -195,8 +198,8 @@ def warn_drv_unused_argument : Warning< def warn_drv_empty_joined_argument : Warning< "joined argument expects additional value: '%0'">, InGroup; -def warn_drv_fdiagnostics_show_hotness_requires_pgo : Warning< - "argument '-fdiagnostics-show-hotness' requires profile-guided optimization information">, +def warn_drv_diagnostics_hotness_requires_pgo : Warning< + "argument '%0' requires profile-guided optimization information">, InGroup; def warn_drv_clang_unsupported : Warning< "the clang compiler does not support '%0'">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jul 1 13:24:05 2017 (r320535) @@ -311,6 +311,7 @@ def : DiagGroup<"nonportable-cfstrings">; def NonVirtualDtor : DiagGroup<"non-virtual-dtor">; def : DiagGroup<"effc++", [NonVirtualDtor]>; def OveralignedType : DiagGroup<"over-aligned">; +def AlignedAllocationUnavailable : DiagGroup<"aligned-allocation-unavailable">; def OldStyleCast : DiagGroup<"old-style-cast">; def : DiagGroup<"old-style-definition">; def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -3294,13 +3294,15 @@ def warn_iboutletcollection_property_assign : Warning< "IBOutletCollection properties should be copy/strong and not assign">, InGroup; -def err_attribute_overloadable_missing : Error< - "%select{overloaded function|redeclaration of}0 %1 must have the " - "'overloadable' attribute">; +def err_attribute_overloadable_mismatch : Error< + "redeclaration of %0 must %select{not |}1have the 'overloadable' attribute">; def note_attribute_overloadable_prev_overload : Note< - "previous overload of function is here">; + "previous %select{unmarked |}0overload of function is here">; def err_attribute_overloadable_no_prototype : Error< "'overloadable' function %0 must have a prototype">; +def err_attribute_overloadable_multiple_unmarked_overloads : Error< + "at most one overload for a given name may lack the 'overloadable' " + "attribute">; def warn_ns_attribute_wrong_return_type : Warning< "%0 attribute only applies to %select{functions|methods|properties}1 that " "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">, @@ -6405,6 +6407,12 @@ def warn_overaligned_type : Warning< "type %0 requires %1 bytes of alignment and the default allocator only " "guarantees %2 bytes">, InGroup, DefaultIgnore; +def warn_aligned_allocation_unavailable :Warning< + "aligned %select{allocation|deallocation}0 function of type '%1' possibly " + "unavailable on %2">, InGroup, DefaultError; +def note_silence_unligned_allocation_unavailable : Note< + "if you supply your own aligned allocation functions, use " + "-Wno-aligned-allocation-unavailable to silence this diagnostic">; def err_conditional_void_nonvoid : Error< "%select{left|right}1 operand to ? is void, but %select{right|left}1 operand " @@ -8402,7 +8410,7 @@ def warn_opencl_attr_deprecated_ignored : Warning < def err_opencl_variadic_function : Error< "invalid prototype, variadic arguments are not allowed in OpenCL">; def err_opencl_requires_extension : Error< - "use of %select{type |declaration}0%1 requires %2 extension to be enabled">; + "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">; // OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions def err_opencl_builtin_pipe_first_arg : Error< Modified: vendor/clang/dist/include/clang/Basic/LangOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/LangOptions.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/LangOptions.def Sat Jul 1 13:24:05 2017 (r320535) @@ -199,6 +199,7 @@ LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using LANGOPT(SizedDeallocation , 1, 0, "sized deallocation") LANGOPT(AlignedAllocation , 1, 0, "aligned allocation") +LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable") LANGOPT(NewAlignOverride , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'") LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts") BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation") Modified: vendor/clang/dist/include/clang/Basic/OpenMPKinds.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/OpenMPKinds.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/OpenMPKinds.def Sat Jul 1 13:24:05 2017 (r320535) @@ -552,6 +552,7 @@ OPENMP_TASKLOOP_CLAUSE(priority) OPENMP_TASKLOOP_CLAUSE(grainsize) OPENMP_TASKLOOP_CLAUSE(nogroup) OPENMP_TASKLOOP_CLAUSE(num_tasks) +OPENMP_TASKLOOP_CLAUSE(reduction) // Clauses allowed for OpenMP directive 'taskloop simd'. OPENMP_TASKLOOP_SIMD_CLAUSE(if) @@ -572,6 +573,7 @@ OPENMP_TASKLOOP_SIMD_CLAUSE(simdlen) OPENMP_TASKLOOP_SIMD_CLAUSE(grainsize) OPENMP_TASKLOOP_SIMD_CLAUSE(nogroup) OPENMP_TASKLOOP_SIMD_CLAUSE(num_tasks) +OPENMP_TASKLOOP_SIMD_CLAUSE(reduction) // Clauses allowed for OpenMP directive 'critical'. OPENMP_CRITICAL_CLAUSE(hint) Modified: vendor/clang/dist/include/clang/Basic/SourceLocation.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceLocation.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/SourceLocation.h Sat Jul 1 13:24:05 2017 (r320535) @@ -262,6 +262,65 @@ class CharSourceRange { (public) bool isInvalid() const { return !isValid(); } }; +/// \brief Represents an unpacked "presumed" location which can be presented +/// to the user. +/// +/// A 'presumed' location can be modified by \#line and GNU line marker +/// directives and is always the expansion point of a normal location. +/// +/// You can get a PresumedLoc from a SourceLocation with SourceManager. +class PresumedLoc { + const char *Filename; + unsigned Line, Col; + SourceLocation IncludeLoc; + +public: + PresumedLoc() : Filename(nullptr) {} + PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL) + : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) {} + + /// \brief Return true if this object is invalid or uninitialized. + /// + /// This occurs when created with invalid source locations or when walking + /// off the top of a \#include stack. + bool isInvalid() const { return Filename == nullptr; } + bool isValid() const { return Filename != nullptr; } + + /// \brief Return the presumed filename of this location. + /// + /// This can be affected by \#line etc. + const char *getFilename() const { + assert(isValid()); + return Filename; + } + + /// \brief Return the presumed line number of this location. + /// + /// This can be affected by \#line etc. + unsigned getLine() const { + assert(isValid()); + return Line; + } + + /// \brief Return the presumed column number of this location. + /// + /// This cannot be affected by \#line, but is packaged here for convenience. + unsigned getColumn() const { + assert(isValid()); + return Col; + } + + /// \brief Return the presumed include location of this location. + /// + /// This can be affected by GNU linemarker directives. + SourceLocation getIncludeLoc() const { + assert(isValid()); + return IncludeLoc; + } +}; + +class FileEntry; + /// \brief A SourceLocation and its associated SourceManager. /// /// This is useful for argument passing to functions that expect both objects. @@ -274,6 +333,12 @@ class FullSourceLoc : public SourceLocation { (public) explicit FullSourceLoc(SourceLocation Loc, const SourceManager &SM) : SourceLocation(Loc), SrcMgr(&SM) {} + bool hasManager() const { + bool hasSrcMgr = SrcMgr != nullptr; + assert(hasSrcMgr == isValid() && "FullSourceLoc has location but no manager"); + return hasSrcMgr; + } + /// \pre This FullSourceLoc has an associated SourceManager. const SourceManager &getManager() const { assert(SrcMgr && "SourceManager is NULL."); @@ -284,6 +349,13 @@ class FullSourceLoc : public SourceLocation { (public) FullSourceLoc getExpansionLoc() const; FullSourceLoc getSpellingLoc() const; + FullSourceLoc getFileLoc() const; + std::pair getImmediateExpansionRange() const; + PresumedLoc getPresumedLoc(bool UseLineDirectives = true) const; + bool isMacroArgExpansion(FullSourceLoc *StartLoc = nullptr) const; + FullSourceLoc getImmediateMacroCallerLoc() const; + std::pair getModuleImportLoc() const; + unsigned getFileOffset() const; unsigned getExpansionLineNumber(bool *Invalid = nullptr) const; unsigned getExpansionColumnNumber(bool *Invalid = nullptr) const; @@ -293,7 +365,13 @@ class FullSourceLoc : public SourceLocation { (public) const char *getCharacterData(bool *Invalid = nullptr) const; + unsigned getLineNumber(bool *Invalid = nullptr) const; + unsigned getColumnNumber(bool *Invalid = nullptr) const; + std::pair getExpansionRange() const; + + const FileEntry *getFileEntry() const; + /// \brief Return a StringRef to the source buffer data for the /// specified FileID. StringRef getBufferData(bool *Invalid = nullptr) const; @@ -345,50 +423,6 @@ class FullSourceLoc : public SourceLocation { (public) }; -/// \brief Represents an unpacked "presumed" location which can be presented -/// to the user. -/// -/// A 'presumed' location can be modified by \#line and GNU line marker -/// directives and is always the expansion point of a normal location. -/// -/// You can get a PresumedLoc from a SourceLocation with SourceManager. -class PresumedLoc { - const char *Filename; - unsigned Line, Col; - SourceLocation IncludeLoc; -public: - PresumedLoc() : Filename(nullptr) {} - PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL) - : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) { - } - - /// \brief Return true if this object is invalid or uninitialized. - /// - /// This occurs when created with invalid source locations or when walking - /// off the top of a \#include stack. - bool isInvalid() const { return Filename == nullptr; } - bool isValid() const { return Filename != nullptr; } - - /// \brief Return the presumed filename of this location. - /// - /// This can be affected by \#line etc. - const char *getFilename() const { assert(isValid()); return Filename; } - - /// \brief Return the presumed line number of this location. - /// - /// This can be affected by \#line etc. - unsigned getLine() const { assert(isValid()); return Line; } - - /// \brief Return the presumed column number of this location. - /// - /// This cannot be affected by \#line, but is packaged here for convenience. - unsigned getColumn() const { assert(isValid()); return Col; } - - /// \brief Return the presumed include location of this location. - /// - /// This can be affected by GNU linemarker directives. - SourceLocation getIncludeLoc() const { assert(isValid()); return IncludeLoc; } -}; } // end namespace clang Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceManager.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/SourceManager.h Sat Jul 1 13:24:05 2017 (r320535) @@ -80,9 +80,19 @@ namespace SrcMgr { /// system_header is seen or in various other cases. /// enum CharacteristicKind { - C_User, C_System, C_ExternCSystem + C_User, C_System, C_ExternCSystem, C_User_ModuleMap, C_System_ModuleMap }; + /// Determine whether a file / directory characteristic is for system code. + inline bool isSystem(CharacteristicKind CK) { + return CK != C_User && CK != C_User_ModuleMap; + } + + /// Determine whether a file characteristic is for a module map. + inline bool isModuleMap(CharacteristicKind CK) { + return CK == C_User_ModuleMap || CK == C_System_ModuleMap; + } + /// \brief One instance of this struct is kept for every file loaded or used. /// /// This object owns the MemoryBuffer object. @@ -251,13 +261,15 @@ namespace SrcMgr { /// preprocessing of this \#include, including this SLocEntry. /// /// Zero means the preprocessor didn't provide such info for this SLocEntry. - unsigned NumCreatedFIDs; + unsigned NumCreatedFIDs : 31; - /// \brief Contains the ContentCache* and the bits indicating the - /// characteristic of the file and whether it has \#line info, all - /// bitmangled together. - uintptr_t Data; + /// \brief Whether this FileInfo has any \#line directives. + unsigned HasLineDirectives : 1; + /// \brief The content cache and the characteristic of the file. + llvm::PointerIntPair + ContentAndKind; + friend class clang::SourceManager; friend class clang::ASTWriter; friend class clang::ASTReader; @@ -269,10 +281,9 @@ namespace SrcMgr { FileInfo X; X.IncludeLoc = IL.getRawEncoding(); X.NumCreatedFIDs = 0; - X.Data = (uintptr_t)Con; - assert((X.Data & 7) == 0 &&"ContentCache pointer insufficiently aligned"); - assert((unsigned)FileCharacter < 4 && "invalid file character"); - X.Data |= (unsigned)FileCharacter; + X.HasLineDirectives = false; + X.ContentAndKind.setPointer(Con); + X.ContentAndKind.setInt(FileCharacter); return X; } @@ -280,22 +291,22 @@ namespace SrcMgr { return SourceLocation::getFromRawEncoding(IncludeLoc); } - const ContentCache* getContentCache() const { - return reinterpret_cast(Data & ~uintptr_t(7)); + const ContentCache *getContentCache() const { + return ContentAndKind.getPointer(); } /// \brief Return whether this is a system header or not. CharacteristicKind getFileCharacteristic() const { - return (CharacteristicKind)(Data & 3); + return ContentAndKind.getInt(); } /// \brief Return true if this FileID has \#line directives in it. - bool hasLineDirectives() const { return (Data & 4) != 0; } + bool hasLineDirectives() const { return HasLineDirectives; } /// \brief Set the flag that indicates that this FileID has /// line table entries associated with it. void setHasLineDirectives() { - Data |= 4; + HasLineDirectives = true; } }; @@ -407,6 +418,8 @@ namespace SrcMgr { }; public: + SLocEntry() : Offset(), IsExpansion(), File() {} + unsigned getOffset() const { return Offset; } bool isExpansion() const { return IsExpansion; } @@ -789,9 +802,8 @@ class SourceManager : public RefCountedBase Delivered-To: svn-src-all@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 BE6F2D89722; Sat, 1 Jul 2017 13:24:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 72B21AE6; Sat, 1 Jul 2017 13:24:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOCk7022148; Sat, 1 Jul 2017 13:24:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOCdx022147; Sat, 1 Jul 2017 13:24:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOCdx022147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320536 - vendor/clang/clang-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-trunk-r306956 X-SVN-Commit-Revision: 320536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:13 -0000 Author: dim Date: Sat Jul 1 13:24:12 2017 New Revision: 320536 URL: https://svnweb.freebsd.org/changeset/base/320536 Log: Tag clang trunk r306956. Added: vendor/clang/clang-trunk-r306956/ - copied from r320535, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:19 2017 Return-Path: Delivered-To: svn-src-all@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 2846BD8978E; Sat, 1 Jul 2017 13:24:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B6059B2A; Sat, 1 Jul 2017 13:24:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOHND022216; Sat, 1 Jul 2017 13:24:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOFvd022195; Sat, 1 Jul 2017 13:24:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOFvd022195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320537 - in vendor/compiler-rt/dist: lib lib/asan lib/lsan lib/msan lib/msan/tests lib/profile lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/tsan/rtl lib/tsan/tests lib... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/compiler-rt/dist: lib lib/asan lib/lsan lib/msan lib/msan/tests lib/profile lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/tsan/rtl lib/tsan/tests lib/xray test test/asan/Test... X-SVN-Commit-Revision: 320537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:19 -0000 Author: dim Date: Sat Jul 1 13:24:15 2017 New Revision: 320537 URL: https://svnweb.freebsd.org/changeset/base/320537 Log: Vendor import of compiler-rt trunk r306956: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306956 Added: vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c (contents, props changed) vendor/compiler-rt/dist/lib/xray/xray_always_instrument.txt (contents, props changed) vendor/compiler-rt/dist/lib/xray/xray_never_instrument.txt (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/nil-return-struct.mm vendor/compiler-rt/dist/test/lsan/TestCases/allocator_returns_null.cc (contents, props changed) vendor/compiler-rt/dist/test/xray/TestCases/Linux/always-never-instrument.cc (contents, props changed) Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/profile/CMakeLists.txt vendor/compiler-rt/dist/lib/profile/InstrProfiling.c vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary64.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h vendor/compiler-rt/dist/lib/scudo/scudo_new_delete.cpp vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_new_delete.cc vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/test/CMakeLists.txt vendor/compiler-rt/dist/test/asan/TestCases/Darwin/asan_gen_prefixes.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/allocator_oom_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-3.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/init_fini_sections.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/textdomain.c vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp vendor/compiler-rt/dist/test/asan/TestCases/allocator_returns_null.cc vendor/compiler-rt/dist/test/asan/TestCases/malloc-no-intercept.c vendor/compiler-rt/dist/test/asan/TestCases/throw_call_test.cc vendor/compiler-rt/dist/test/asan/android_commands/android_common.py vendor/compiler-rt/dist/test/builtins/Unit/fp_test.h vendor/compiler-rt/dist/test/cfi/sibling.cpp vendor/compiler-rt/dist/test/msan/allocator_returns_null.cc vendor/compiler-rt/dist/test/profile/instrprof-override-filename.c vendor/compiler-rt/dist/test/scudo/memalign.cpp vendor/compiler-rt/dist/test/scudo/sizes.cpp vendor/compiler-rt/dist/test/tsan/allocator_returns_null.cc Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/CMakeLists.txt Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/CMakeLists.txt Sat Jul 1 13:24:15 2017 (r320537) @@ -21,21 +21,12 @@ function(compiler_rt_build_runtime runtime) string(TOUPPER ${runtime} runtime_uppercase) if(COMPILER_RT_HAS_${runtime_uppercase}) add_subdirectory(${runtime}) - foreach(directory ${ARGN}) - add_subdirectory(${directory}) - endforeach() + if(${runtime} STREQUAL tsan) + add_subdirectory(tsan/dd) + endif() endif() endfunction() -function(compiler_rt_build_sanitizer sanitizer) - string(TOUPPER ${sanitizer} sanitizer_uppercase) - string(TOLOWER ${sanitizer} sanitizer_lowercase) - list(FIND COMPILER_RT_SANITIZERS_TO_BUILD ${sanitizer_lowercase} result) - if(NOT ${result} EQUAL -1) - compiler_rt_build_runtime(${sanitizer} ${ARGN}) - endif() -endfunction() - if(COMPILER_RT_BUILD_SANITIZERS) compiler_rt_build_runtime(interception) @@ -45,14 +36,9 @@ if(COMPILER_RT_BUILD_SANITIZERS) add_subdirectory(ubsan) endif() - compiler_rt_build_sanitizer(asan) - compiler_rt_build_sanitizer(dfsan) - compiler_rt_build_sanitizer(msan) - compiler_rt_build_sanitizer(tsan tsan/dd) - compiler_rt_build_sanitizer(safestack) - compiler_rt_build_sanitizer(cfi) - compiler_rt_build_sanitizer(esan) - compiler_rt_build_sanitizer(scudo) + foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) + compiler_rt_build_runtime(${sanitizer}) + endforeach() compiler_rt_build_runtime(profile) endif() Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -160,7 +160,11 @@ struct QuarantineCallback { } void *Allocate(uptr size) { - return get_allocator().Allocate(cache_, size, 1); + void *res = get_allocator().Allocate(cache_, size, 1); + // TODO(alekseys): Consider making quarantine OOM-friendly. + if (UNLIKELY(!res)) + return DieOnFailure::OnOOM(); + return res; } void Deallocate(void *p) { @@ -524,8 +528,7 @@ struct Allocator { // Expects the chunk to already be marked as quarantined by using // AtomicallySetQuarantineFlagIfAllocated. - void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack, - AllocType alloc_type) { + void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack) { CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); CHECK_GE(m->alloc_tid, 0); if (SANITIZER_WORDSIZE == 64) // On 32-bits this resides in user area. @@ -603,7 +606,7 @@ struct Allocator { ReportNewDeleteSizeMismatch(p, delete_size, stack); } - QuarantineChunk(m, ptr, stack, alloc_type); + QuarantineChunk(m, ptr, stack); } void *Reallocate(void *old_ptr, uptr new_size, BufferedStackTrace *stack) { @@ -632,7 +635,7 @@ struct Allocator { } void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) { - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) + if (CheckForCallocOverflow(size, nmemb)) return AsanAllocator::FailureHandler::OnBadRequest(); void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false); // If the memory comes from the secondary allocator no need to clear it Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -579,17 +579,6 @@ INTERCEPTOR(char*, __strdup, const char *s) { } #endif // ASAN_INTERCEPT___STRDUP -INTERCEPTOR(SIZE_T, wcslen, const wchar_t *s) { - void *ctx; - ASAN_INTERCEPTOR_ENTER(ctx, wcslen); - SIZE_T length = internal_wcslen(s); - if (!asan_init_is_running) { - ENSURE_ASAN_INITED(); - ASAN_READ_RANGE(ctx, s, (length + 1) * sizeof(wchar_t)); - } - return length; -} - INTERCEPTOR(char*, strncpy, char *to, const char *from, uptr size) { void *ctx; ASAN_INTERCEPTOR_ENTER(ctx, strncpy); @@ -722,7 +711,6 @@ void InitializeAsanInterceptors() { // Intercept str* functions. ASAN_INTERCEPT_FUNC(strcat); // NOLINT ASAN_INTERCEPT_FUNC(strcpy); // NOLINT - ASAN_INTERCEPT_FUNC(wcslen); ASAN_INTERCEPT_FUNC(strncat); ASAN_INTERCEPT_FUNC(strncpy); ASAN_INTERCEPT_FUNC(strdup); Modified: vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -25,23 +25,27 @@ // dllexport would normally do. We need to export them in order to make the // VS2015 dynamic CRT (MD) work. #if SANITIZER_WINDOWS -# define CXX_OPERATOR_ATTRIBUTE -# ifdef _WIN64 -# pragma comment(linker, "/export:??2@YAPEAX_K@Z") // operator new -# pragma comment(linker, "/export:??3@YAXPEAX@Z") // operator delete -# pragma comment(linker, "/export:??3@YAXPEAX_K@Z") // sized operator delete -# pragma comment(linker, "/export:??_U@YAPEAX_K@Z") // operator new[] -# pragma comment(linker, "/export:??_V@YAXPEAX@Z") // operator delete[] -# else -# pragma comment(linker, "/export:??2@YAPAXI@Z") // operator new -# pragma comment(linker, "/export:??3@YAXPAX@Z") // operator delete -# pragma comment(linker, "/export:??3@YAXPAXI@Z") // sized operator delete -# pragma comment(linker, "/export:??_U@YAPAXI@Z") // operator new[] -# pragma comment(linker, "/export:??_V@YAXPAX@Z") // operator delete[] -# endif +#define CXX_OPERATOR_ATTRIBUTE +#define COMMENT_EXPORT(sym) __pragma(comment(linker, "/export:"##sym)) +#ifdef _WIN64 +COMMENT_EXPORT("??2@YAPEAX_K@Z") // operator new +COMMENT_EXPORT("??2@YAPEAX_KAEBUnothrow_t@std@@@Z") // operator new nothrow +COMMENT_EXPORT("??3@YAXPEAX@Z") // operator delete +COMMENT_EXPORT("??3@YAXPEAX_K@Z") // sized operator delete +COMMENT_EXPORT("??_U@YAPEAX_K@Z") // operator new[] +COMMENT_EXPORT("??_V@YAXPEAX@Z") // operator delete[] #else -# define CXX_OPERATOR_ATTRIBUTE INTERCEPTOR_ATTRIBUTE +COMMENT_EXPORT("??2@YAPAXI@Z") // operator new +COMMENT_EXPORT("??2@YAPAXIABUnothrow_t@std@@@Z") // operator new nothrow +COMMENT_EXPORT("??3@YAXPAX@Z") // operator delete +COMMENT_EXPORT("??3@YAXPAXI@Z") // sized operator delete +COMMENT_EXPORT("??_U@YAPAXI@Z") // operator new[] +COMMENT_EXPORT("??_V@YAXPAX@Z") // operator delete[] #endif +#undef COMMENT_EXPORT +#else +#define CXX_OPERATOR_ATTRIBUTE INTERCEPTOR_ATTRIBUTE +#endif using namespace __asan; // NOLINT @@ -63,12 +67,17 @@ struct nothrow_t {}; enum class align_val_t: size_t {}; } // namespace std -#define OPERATOR_NEW_BODY(type) \ +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(type, nothrow) \ GET_STACK_TRACE_MALLOC;\ - return asan_memalign(0, size, &stack, type); -#define OPERATOR_NEW_BODY_ALIGN(type) \ + void *res = asan_memalign(0, size, &stack, type);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; +#define OPERATOR_NEW_BODY_ALIGN(type, nothrow) \ GET_STACK_TRACE_MALLOC;\ - return asan_memalign((uptr)align, size, &stack, type); + void *res = asan_memalign((uptr)align, size, &stack, type);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; // On OS X it's not enough to just provide our own 'operator new' and // 'operator delete' implementations, because they're going to be in the @@ -79,40 +88,42 @@ enum class align_val_t: size_t {}; // OS X we need to intercept them using their mangled names. #if !SANITIZER_MAC CXX_OPERATOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY(FROM_NEW); } +void *operator new(size_t size) +{ OPERATOR_NEW_BODY(FROM_NEW, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY(FROM_NEW_BR); } +void *operator new[](size_t size) +{ OPERATOR_NEW_BODY(FROM_NEW_BR, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::nothrow_t const&) -{ OPERATOR_NEW_BODY(FROM_NEW); } +{ OPERATOR_NEW_BODY(FROM_NEW, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::nothrow_t const&) -{ OPERATOR_NEW_BODY(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY(FROM_NEW_BR, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::align_val_t align) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::align_val_t align) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::align_val_t align, std::nothrow_t const&) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::align_val_t align, std::nothrow_t const&) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR, true /*nothrow*/); } #else // SANITIZER_MAC INTERCEPTOR(void *, _Znwm, size_t size) { - OPERATOR_NEW_BODY(FROM_NEW); + OPERATOR_NEW_BODY(FROM_NEW, false /*nothrow*/); } INTERCEPTOR(void *, _Znam, size_t size) { - OPERATOR_NEW_BODY(FROM_NEW_BR); + OPERATOR_NEW_BODY(FROM_NEW_BR, false /*nothrow*/); } INTERCEPTOR(void *, _ZnwmRKSt9nothrow_t, size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(FROM_NEW); + OPERATOR_NEW_BODY(FROM_NEW, true /*nothrow*/); } INTERCEPTOR(void *, _ZnamRKSt9nothrow_t, size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(FROM_NEW_BR); + OPERATOR_NEW_BODY(FROM_NEW_BR, true /*nothrow*/); } #endif Modified: vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -85,6 +85,7 @@ INTERCEPT_LIBRARY_FUNCTION(strstr); INTERCEPT_LIBRARY_FUNCTION(strtok); INTERCEPT_LIBRARY_FUNCTION(strtol); INTERCEPT_LIBRARY_FUNCTION(wcslen); +INTERCEPT_LIBRARY_FUNCTION(wcsnlen); #ifdef _WIN64 INTERCEPT_LIBRARY_FUNCTION(__C_specific_handler); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -74,7 +74,7 @@ void *Allocate(const StackTrace &stack, uptr size, upt size = 1; if (size > kMaxAllowedMallocSize) { Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", size); - return nullptr; + return Allocator::FailureHandler::OnBadRequest(); } void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); // Do not rely on the allocator to clear the memory (it's slow). @@ -99,7 +99,7 @@ void *Reallocate(const StackTrace &stack, void *p, upt if (new_size > kMaxAllowedMallocSize) { Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", new_size); allocator.Deallocate(GetAllocatorCache(), p); - return nullptr; + return Allocator::FailureHandler::OnBadRequest(); } p = allocator.Reallocate(GetAllocatorCache(), p, new_size, alignment); RegisterAllocation(stack, p, new_size); @@ -134,6 +134,8 @@ void *lsan_realloc(void *p, uptr size, const StackTrac } void *lsan_calloc(uptr nmemb, uptr size, const StackTrace &stack) { + if (CheckForCallocOverflow(size, nmemb)) + return Allocator::FailureHandler::OnBadRequest(); size *= nmemb; return Allocate(stack, size, 1, true); } Modified: vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -70,7 +70,6 @@ INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { CHECK(allocated < kCallocPoolSize); return mem; } - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return nullptr; ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; return lsan_calloc(nmemb, size, stack); @@ -199,34 +198,70 @@ INTERCEPTOR(int, mprobe, void *ptr) { } #endif // SANITIZER_INTERCEPT_MCHECK_MPROBE -#define OPERATOR_NEW_BODY \ - ENSURE_LSAN_INITED; \ - GET_STACK_TRACE_MALLOC; \ - return Allocate(stack, size, 1, kAlwaysClearMemory); -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(nothrow) \ + ENSURE_LSAN_INITED; \ + GET_STACK_TRACE_MALLOC; \ + void *res = Allocate(stack, size, 1, kAlwaysClearMemory);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; #define OPERATOR_DELETE_BODY \ ENSURE_LSAN_INITED; \ Deallocate(ptr); +// On OS X it's not enough to just provide our own 'operator new' and +// 'operator delete' implementations, because they're going to be in the runtime +// dylib, and the main executable will depend on both the runtime dylib and +// libstdc++, each of has its implementation of new and delete. +// To make sure that C++ allocation/deallocation operators are overridden on +// OS X we need to intercept them using their mangled names. +#if !SANITIZER_MAC + INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } + +INTERCEPTOR_ATTRIBUTE void operator delete(void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE void operator delete[](void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE void operator delete(void *ptr, std::nothrow_t const&) { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE -void operator delete[](void *ptr, std::nothrow_t const &) { - OPERATOR_DELETE_BODY; -} +void operator delete[](void *ptr, std::nothrow_t const &) +{ OPERATOR_DELETE_BODY; } + +#else // SANITIZER_MAC + +INTERCEPTOR(void *, _Znwm, size_t size) +{ OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR(void *, _Znam, size_t size) +{ OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR(void *, _ZnwmRKSt9nothrow_t, size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } +INTERCEPTOR(void *, _ZnamRKSt9nothrow_t, size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } + +INTERCEPTOR(void, _ZdlPv, void *ptr) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdaPv, void *ptr) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdlPvRKSt9nothrow_t, void *ptr, std::nothrow_t const&) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdaPvRKSt9nothrow_t, void *ptr, std::nothrow_t const&) +{ OPERATOR_DELETE_BODY; } + +#endif // !SANITIZER_MAC + ///// Thread initialization and finalization. ///// Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -195,7 +195,7 @@ void MsanDeallocate(StackTrace *stack, void *p) { } void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) + if (CheckForCallocOverflow(size, nmemb)) return Allocator::FailureHandler::OnBadRequest(); return MsanReallocate(stack, nullptr, nmemb * size, sizeof(u64), true); } Modified: vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -538,49 +538,6 @@ INTERCEPTOR(int, mbrtowc, wchar_t *dest, const char *s return res; } -INTERCEPTOR(SIZE_T, wcslen, const wchar_t *s) { - ENSURE_MSAN_INITED(); - SIZE_T res = REAL(wcslen)(s); - CHECK_UNPOISONED(s, sizeof(wchar_t) * (res + 1)); - return res; -} - -INTERCEPTOR(SIZE_T, wcsnlen, const wchar_t *s, SIZE_T n) { - ENSURE_MSAN_INITED(); - SIZE_T res = REAL(wcsnlen)(s, n); - CHECK_UNPOISONED(s, sizeof(wchar_t) * Min(res + 1, n)); - return res; -} - -// wchar_t *wcschr(const wchar_t *wcs, wchar_t wc); -INTERCEPTOR(wchar_t *, wcschr, void *s, wchar_t wc, void *ps) { - ENSURE_MSAN_INITED(); - wchar_t *res = REAL(wcschr)(s, wc, ps); - return res; -} - -// wchar_t *wcscpy(wchar_t *dest, const wchar_t *src); -INTERCEPTOR(wchar_t *, wcscpy, wchar_t *dest, const wchar_t *src) { - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - wchar_t *res = REAL(wcscpy)(dest, src); - CopyShadowAndOrigin(dest, src, sizeof(wchar_t) * (REAL(wcslen)(src) + 1), - &stack); - return res; -} - -INTERCEPTOR(wchar_t *, wcsncpy, wchar_t *dest, const wchar_t *src, - SIZE_T n) { // NOLINT - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - SIZE_T copy_size = REAL(wcsnlen)(src, n); - if (copy_size < n) copy_size++; // trailing \0 - wchar_t *res = REAL(wcsncpy)(dest, src, n); // NOLINT - CopyShadowAndOrigin(dest, src, copy_size * sizeof(wchar_t), &stack); - __msan_unpoison(dest + copy_size, (n - copy_size) * sizeof(wchar_t)); - return res; -} - // wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, SIZE_T n); INTERCEPTOR(wchar_t *, wmemcpy, wchar_t *dest, const wchar_t *src, SIZE_T n) { ENSURE_MSAN_INITED(); @@ -1344,11 +1301,11 @@ int OnExit() { return __msan_memcpy(to, from, size); \ } -#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ - do { \ - GET_STORE_STACK_TRACE; \ - CopyShadowAndOrigin(to, from, size, &stack); \ - __msan_unpoison(to + size, 1); \ +#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ + do { \ + GET_STORE_STACK_TRACE; \ + CopyShadowAndOrigin(to, from, size, &stack); \ + __msan_unpoison(to + size, 1); \ } while (false) #include "sanitizer_common/sanitizer_platform_interceptors.h" @@ -1421,6 +1378,35 @@ INTERCEPTOR(int, dl_iterate_phdr, dl_iterate_phdr_cb c cbdata.callback = callback; cbdata.data = data; int res = REAL(dl_iterate_phdr)(msan_dl_iterate_phdr_cb, (void *)&cbdata); + return res; +} + +// wchar_t *wcschr(const wchar_t *wcs, wchar_t wc); +INTERCEPTOR(wchar_t *, wcschr, void *s, wchar_t wc, void *ps) { + ENSURE_MSAN_INITED(); + wchar_t *res = REAL(wcschr)(s, wc, ps); + return res; +} + +// wchar_t *wcscpy(wchar_t *dest, const wchar_t *src); +INTERCEPTOR(wchar_t *, wcscpy, wchar_t *dest, const wchar_t *src) { + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + wchar_t *res = REAL(wcscpy)(dest, src); + CopyShadowAndOrigin(dest, src, sizeof(wchar_t) * (REAL(wcslen)(src) + 1), + &stack); + return res; +} + +INTERCEPTOR(wchar_t *, wcsncpy, wchar_t *dest, const wchar_t *src, + SIZE_T n) { // NOLINT + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + SIZE_T copy_size = REAL(wcsnlen)(src, n); + if (copy_size < n) copy_size++; // trailing \0 + wchar_t *res = REAL(wcsncpy)(dest, src, n); // NOLINT + CopyShadowAndOrigin(dest, src, copy_size * sizeof(wchar_t), &stack); + __msan_unpoison(dest + copy_size, (n - copy_size) * sizeof(wchar_t)); return res; } Modified: vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -14,6 +14,7 @@ #include "msan.h" #include "interception/interception.h" +#include "sanitizer_common/sanitizer_allocator.h" #if MSAN_REPLACE_OPERATORS_NEW_AND_DELETE @@ -27,18 +28,25 @@ namespace std { } // namespace std -#define OPERATOR_NEW_BODY \ +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(nothrow) \ GET_MALLOC_STACK_TRACE; \ - return MsanReallocate(&stack, 0, size, sizeof(u64), false) + void *res = MsanReallocate(&stack, 0, size, sizeof(u64), false);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY; } +void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY; } +void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +void *operator new(size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +void *operator new[](size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} #define OPERATOR_DELETE_BODY \ GET_MALLOC_STACK_TRACE; \ Modified: vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -1707,6 +1707,48 @@ TEST(MemorySanitizer, strncat_overflow) { // NOLINT EXPECT_POISONED(a[7]); } +TEST(MemorySanitizer, wcscat) { + wchar_t a[10]; + wchar_t b[] = L"def"; + wcscpy(a, L"abc"); + + wcscat(a, b); + EXPECT_EQ(6U, wcslen(a)); + EXPECT_POISONED(a[7]); + + a[3] = 0; + __msan_poison(b + 1, sizeof(wchar_t)); + EXPECT_UMR(wcscat(a, b)); + + __msan_unpoison(b + 1, sizeof(wchar_t)); + __msan_poison(a + 2, sizeof(wchar_t)); + EXPECT_UMR(wcscat(a, b)); +} + +TEST(MemorySanitizer, wcsncat) { + wchar_t a[10]; + wchar_t b[] = L"def"; + wcscpy(a, L"abc"); + + wcsncat(a, b, 5); + EXPECT_EQ(6U, wcslen(a)); + EXPECT_POISONED(a[7]); + + a[3] = 0; + __msan_poison(a + 4, sizeof(wchar_t) * 6); + wcsncat(a, b, 2); + EXPECT_EQ(5U, wcslen(a)); + EXPECT_POISONED(a[6]); + + a[3] = 0; + __msan_poison(b + 1, sizeof(wchar_t)); + EXPECT_UMR(wcsncat(a, b, 2)); + + __msan_unpoison(b + 1, sizeof(wchar_t)); + __msan_poison(a + 2, sizeof(wchar_t)); + EXPECT_UMR(wcsncat(a, b, 2)); +} + #define TEST_STRTO_INT(func_name, char_type, str_prefix) \ TEST(MemorySanitizer, func_name) { \ char_type *e; \ Modified: vendor/compiler-rt/dist/lib/profile/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/profile/CMakeLists.txt Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/CMakeLists.txt Sat Jul 1 13:24:15 2017 (r320537) @@ -48,6 +48,7 @@ set(PROFILE_SOURCES InstrProfilingFile.c InstrProfilingMerge.c InstrProfilingMergeFile.c + InstrProfilingNameVar.c InstrProfilingWriter.c InstrProfilingPlatformDarwin.c InstrProfilingPlatformLinux.c Modified: vendor/compiler-rt/dist/lib/profile/InstrProfiling.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfiling.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfiling.c Sat Jul 1 13:24:15 2017 (r320537) @@ -19,8 +19,6 @@ COMPILER_RT_WEAK uint64_t INSTR_PROF_RAW_VERSION_VAR = INSTR_PROF_RAW_VERSION; -COMPILER_RT_WEAK char INSTR_PROF_PROFILE_NAME_VAR[1] = {0}; - COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_magic(void) { return sizeof(void *) == sizeof(uint64_t) ? (INSTR_PROF_RAW_MAGIC_64) : (INSTR_PROF_RAW_MAGIC_32); Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c Sat Jul 1 13:24:15 2017 (r320537) @@ -45,15 +45,24 @@ uint64_t __llvm_profile_get_size_for_buffer_internal( (CountersEnd - CountersBegin) * sizeof(uint64_t) + NamesSize + Padding; } +COMPILER_RT_VISIBILITY +void initBufferWriter(ProfDataWriter *BufferWriter, char *Buffer) { + BufferWriter->Write = lprofBufferWriter; + BufferWriter->WriterCtx = Buffer; +} + COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer(char *Buffer) { - return lprofWriteData(lprofBufferWriter, Buffer, 0); + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, Buffer); + return lprofWriteData(&BufferWriter, 0, 0); } COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer_internal( char *Buffer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd) { - return lprofWriteDataImpl(lprofBufferWriter, Buffer, DataBegin, DataEnd, - CountersBegin, CountersEnd, 0, NamesBegin, - NamesEnd); + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, Buffer); + return lprofWriteDataImpl(&BufferWriter, DataBegin, DataEnd, CountersBegin, + CountersEnd, 0, NamesBegin, NamesEnd, 0); } Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c Sat Jul 1 13:24:15 2017 (r320537) @@ -91,24 +91,39 @@ static const char *getCurFilename(char *FilenameBuf); static unsigned doMerging() { return lprofCurFilename.MergePoolSize; } /* Return 1 if there is an error, otherwise return 0. */ -static uint32_t fileWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, - void **WriterCtx) { +static uint32_t fileWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs, + uint32_t NumIOVecs) { uint32_t I; - FILE *File = (FILE *)*WriterCtx; + FILE *File = (FILE *)This->WriterCtx; for (I = 0; I < NumIOVecs; I++) { - if (fwrite(IOVecs[I].Data, IOVecs[I].ElmSize, IOVecs[I].NumElm, File) != - IOVecs[I].NumElm) - return 1; + if (IOVecs[I].Data) { + if (fwrite(IOVecs[I].Data, IOVecs[I].ElmSize, IOVecs[I].NumElm, File) != + IOVecs[I].NumElm) + return 1; + } else { + if (fseek(File, IOVecs[I].ElmSize * IOVecs[I].NumElm, SEEK_CUR) == -1) + return 1; + } } return 0; } +static void initFileWriter(ProfDataWriter *This, FILE *File) { + This->Write = fileWriter; + This->WriterCtx = File; +} + COMPILER_RT_VISIBILITY ProfBufferIO * lprofCreateBufferIOInternal(void *File, uint32_t BufferSz) { FreeHook = &free; DynamicBufferIOBuffer = (uint8_t *)calloc(BufferSz, 1); VPBufferSize = BufferSz; - return lprofCreateBufferIO(fileWriter, File); + ProfDataWriter *fileWriter = + (ProfDataWriter *)calloc(sizeof(ProfDataWriter), 1); + initFileWriter(fileWriter, File); + ProfBufferIO *IO = lprofCreateBufferIO(fileWriter); + IO->OwnFileWriter = 1; + return IO; } static void setupIOBuffer() { @@ -122,9 +137,10 @@ static void setupIOBuffer() { /* Read profile data in \c ProfileFile and merge with in-memory profile counters. Returns -1 if there is fatal error, otheriwse - 0 is returned. + 0 is returned. Returning 0 does not mean merge is actually + performed. If merge is actually done, *MergeDone is set to 1. */ -static int doProfileMerging(FILE *ProfileFile) { +static int doProfileMerging(FILE *ProfileFile, int *MergeDone) { uint64_t ProfileFileSize; char *ProfileBuffer; @@ -169,6 +185,8 @@ static int doProfileMerging(FILE *ProfileFile) { __llvm_profile_merge_from_buffer(ProfileBuffer, ProfileFileSize); (void)munmap(ProfileBuffer, ProfileFileSize); + *MergeDone = 1; + return 0; } @@ -190,7 +208,7 @@ static void createProfileDir(const char *Filename) { * dumper. With profile merging enabled, each executable as well as any of * its instrumented shared libraries dump profile data into their own data file. */ -static FILE *openFileForMerging(const char *ProfileFileName) { +static FILE *openFileForMerging(const char *ProfileFileName, int *MergeDone) { FILE *ProfileFile; int rc; @@ -199,15 +217,14 @@ static FILE *openFileForMerging(const char *ProfileFil if (!ProfileFile) return NULL; - rc = doProfileMerging(ProfileFile); - if (rc || COMPILER_RT_FTRUNCATE(ProfileFile, 0L) || + rc = doProfileMerging(ProfileFile, MergeDone); + if (rc || (!*MergeDone && COMPILER_RT_FTRUNCATE(ProfileFile, 0L)) || fseek(ProfileFile, 0L, SEEK_SET) == -1) { PROF_ERR("Profile Merging of file %s failed: %s\n", ProfileFileName, strerror(errno)); fclose(ProfileFile); return NULL; } - fseek(ProfileFile, 0L, SEEK_SET); return ProfileFile; } @@ -216,17 +233,20 @@ static int writeFile(const char *OutputName) { int RetVal; FILE *OutputFile; + int MergeDone = 0; if (!doMerging()) OutputFile = fopen(OutputName, "ab"); else - OutputFile = openFileForMerging(OutputName); + OutputFile = openFileForMerging(OutputName, &MergeDone); if (!OutputFile) return -1; FreeHook = &free; setupIOBuffer(); - RetVal = lprofWriteData(fileWriter, OutputFile, lprofGetVPDataReader()); + ProfDataWriter fileWriter; + initFileWriter(&fileWriter, OutputFile); + RetVal = lprofWriteData(&fileWriter, lprofGetVPDataReader(), MergeDone); fclose(OutputFile); return RetVal; Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h Sat Jul 1 13:24:15 2017 (r320537) @@ -48,17 +48,21 @@ typedef struct ProfDataIOVec { size_t NumElm; } ProfDataIOVec; -typedef uint32_t (*WriterCallback)(ProfDataIOVec *, uint32_t NumIOVecs, - void **WriterCtx); +struct ProfDataWriter; +typedef uint32_t (*WriterCallback)(struct ProfDataWriter *This, ProfDataIOVec *, + uint32_t NumIOVecs); +typedef struct ProfDataWriter { + WriterCallback Write; + void *WriterCtx; +} ProfDataWriter; + /*! * The data structure for buffered IO of profile data. */ typedef struct ProfBufferIO { - /* File handle. */ - void *File; - /* Low level IO callback. */ - WriterCallback FileWriter; + ProfDataWriter *FileWriter; + uint32_t OwnFileWriter; /* The start of the buffer. */ uint8_t *BufferStart; /* Total size of the buffer. */ @@ -73,7 +77,7 @@ ProfBufferIO *lprofCreateBufferIOInternal(void *File, /*! * This is the interface to create a handle for buffered IO. */ -ProfBufferIO *lprofCreateBufferIO(WriterCallback FileWriter, void *File); +ProfBufferIO *lprofCreateBufferIO(ProfDataWriter *FileWriter); /*! * The interface to destroy the bufferIO handle and reclaim @@ -96,8 +100,9 @@ int lprofBufferIOFlush(ProfBufferIO *BufferIO); /* The low level interface to write data into a buffer. It is used as the * callback by other high level writer methods such as buffered IO writer * and profile data writer. */ -uint32_t lprofBufferWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, - void **WriterCtx); +uint32_t lprofBufferWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs, + uint32_t NumIOVecs); +void initBufferWriter(ProfDataWriter *BufferWriter, char *Buffer); struct ValueProfData; struct ValueProfRecord; @@ -133,15 +138,17 @@ typedef struct VPDataReaderType { uint32_t N); } VPDataReaderType; -int lprofWriteData(WriterCallback Writer, void *WriterCtx, - VPDataReaderType *VPDataReader); -int lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, +/* Write profile data to destinitation. If SkipNameDataWrite is set to 1, + the name data is already in destintation, we just skip over it. */ +int lprofWriteData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, + int SkipNameDataWrite); +int lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, VPDataReaderType *VPDataReader, const char *NamesBegin, - const char *NamesEnd); + const char *NamesEnd, int SkipNameDataWrite); /* Merge value profile data pointed to by SrcValueProfData into * in-memory profile counters pointed by to DstData. */ Added: vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c Sat Jul 1 13:24:15 2017 (r320537) @@ -0,0 +1,18 @@ +//===- InstrProfilingNameVar.c - profile name variable setup --------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "InstrProfiling.h" + +/* char __llvm_profile_filename[1] + * + * The runtime should only provide its own definition of this symbol when the + * user has not specified one. Set this up by moving the runtime's copy of this + * symbol to an object file within the archive. + */ +COMPILER_RT_WEAK char INSTR_PROF_PROFILE_NAME_VAR[1] = {0}; Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c Sat Jul 1 13:24:15 2017 (r320537) @@ -31,41 +31,44 @@ COMPILER_RT_VISIBILITY uint32_t VPBufferSize = 0; /* The buffer writer is reponsponsible in keeping writer state * across the call. */ -COMPILER_RT_VISIBILITY uint32_t lprofBufferWriter(ProfDataIOVec *IOVecs, - uint32_t NumIOVecs, - void **WriterCtx) { +COMPILER_RT_VISIBILITY uint32_t lprofBufferWriter(ProfDataWriter *This, + ProfDataIOVec *IOVecs, + uint32_t NumIOVecs) { uint32_t I; - char **Buffer = (char **)WriterCtx; + char **Buffer = (char **)&This->WriterCtx; for (I = 0; I < NumIOVecs; I++) { size_t Length = IOVecs[I].ElmSize * IOVecs[I].NumElm; - memcpy(*Buffer, IOVecs[I].Data, Length); + if (IOVecs[I].Data) + memcpy(*Buffer, IOVecs[I].Data, Length); *Buffer += Length; } return 0; } -static void llvmInitBufferIO(ProfBufferIO *BufferIO, WriterCallback FileWriter, - void *File, uint8_t *Buffer, uint32_t BufferSz) { - BufferIO->File = File; +static void llvmInitBufferIO(ProfBufferIO *BufferIO, ProfDataWriter *FileWriter, + uint8_t *Buffer, uint32_t BufferSz) { BufferIO->FileWriter = FileWriter; + BufferIO->OwnFileWriter = 0; BufferIO->BufferStart = Buffer; BufferIO->BufferSz = BufferSz; BufferIO->CurOffset = 0; } COMPILER_RT_VISIBILITY ProfBufferIO * -lprofCreateBufferIO(WriterCallback FileWriter, void *File) { +lprofCreateBufferIO(ProfDataWriter *FileWriter) { uint8_t *Buffer = DynamicBufferIOBuffer; uint32_t BufferSize = VPBufferSize; if (!Buffer) { Buffer = &BufferIOBuffer[0]; BufferSize = sizeof(BufferIOBuffer); } - llvmInitBufferIO(&TheBufferIO, FileWriter, File, Buffer, BufferSize); + llvmInitBufferIO(&TheBufferIO, FileWriter, Buffer, BufferSize); return &TheBufferIO; } COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) { + if (BufferIO->OwnFileWriter) + FreeHook(BufferIO->FileWriter); if (DynamicBufferIOBuffer) { FreeHook(DynamicBufferIOBuffer); DynamicBufferIOBuffer = 0; @@ -83,13 +86,16 @@ lprofBufferIOWrite(ProfBufferIO *BufferIO, const uint8 /* Special case, bypass the buffer completely. */ ProfDataIOVec IO[] = {{Data, sizeof(uint8_t), Size}}; if (Size > BufferIO->BufferSz) { - if (BufferIO->FileWriter(IO, 1, &BufferIO->File)) + if (BufferIO->FileWriter->Write(BufferIO->FileWriter, IO, 1)) return -1; } else { /* Write the data to buffer */ uint8_t *Buffer = BufferIO->BufferStart + BufferIO->CurOffset; - lprofBufferWriter(IO, 1, (void **)&Buffer); - BufferIO->CurOffset = Buffer - BufferIO->BufferStart; + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, (char *)Buffer); + lprofBufferWriter(&BufferWriter, IO, 1); + BufferIO->CurOffset = + (uint8_t *)BufferWriter.WriterCtx - BufferIO->BufferStart; } return 0; } @@ -98,7 +104,7 @@ COMPILER_RT_VISIBILITY int lprofBufferIOFlush(ProfBuff if (BufferIO->CurOffset) { ProfDataIOVec IO[] = { {BufferIO->BufferStart, sizeof(uint8_t), BufferIO->CurOffset}}; - if (BufferIO->FileWriter(IO, 1, &BufferIO->File)) + if (BufferIO->FileWriter->Write(BufferIO->FileWriter, IO, 1)) return -1; BufferIO->CurOffset = 0; } @@ -201,7 +207,7 @@ static int writeOneValueProfData(ProfBufferIO *BufferI return 0; } -static int writeValueProfData(WriterCallback Writer, void *WriterCtx, +static int writeValueProfData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd) { @@ -211,7 +217,7 @@ static int writeValueProfData(WriterCallback Writer, v if (!VPDataReader) return 0; - BufferIO = lprofCreateBufferIO(Writer, WriterCtx); + BufferIO = lprofCreateBufferIO(Writer); for (DI = DataBegin; DI < DataEnd; DI++) { if (writeOneValueProfData(BufferIO, VPDataReader, DI)) @@ -225,9 +231,9 @@ static int writeValueProfData(WriterCallback Writer, v return 0; } -COMPILER_RT_VISIBILITY int lprofWriteData(WriterCallback Writer, - void *WriterCtx, - VPDataReaderType *VPDataReader) { +COMPILER_RT_VISIBILITY int lprofWriteData(ProfDataWriter *Writer, + VPDataReaderType *VPDataReader, + int SkipNameDataWrite) { /* Match logic in __llvm_profile_write_buffer(). */ const __llvm_profile_data *DataBegin = __llvm_profile_begin_data(); const __llvm_profile_data *DataEnd = __llvm_profile_end_data(); @@ -235,18 +241,17 @@ COMPILER_RT_VISIBILITY int lprofWriteData(WriterCallba const uint64_t *CountersEnd = __llvm_profile_end_counters(); const char *NamesBegin = __llvm_profile_begin_names(); const char *NamesEnd = __llvm_profile_end_names(); - return lprofWriteDataImpl(Writer, WriterCtx, DataBegin, DataEnd, - CountersBegin, CountersEnd, VPDataReader, - NamesBegin, NamesEnd); + return lprofWriteDataImpl(Writer, DataBegin, DataEnd, CountersBegin, + CountersEnd, VPDataReader, NamesBegin, NamesEnd, + SkipNameDataWrite); } COMPILER_RT_VISIBILITY int -lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, - const __llvm_profile_data *DataBegin, +lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, VPDataReaderType *VPDataReader, const char *NamesBegin, - const char *NamesEnd) { + const char *NamesEnd, int SkipNameDataWrite) { /* Calculate size of sections. */ const uint64_t DataSize = __llvm_profile_get_data_size(DataBegin, DataEnd); @@ -268,14 +273,14 @@ lprofWriteDataImpl(WriterCallback Writer, void *Writer #include "InstrProfData.inc" /* Write the data. */ - ProfDataIOVec IOVec[] = {{&Header, sizeof(__llvm_profile_header), 1}, - {DataBegin, sizeof(__llvm_profile_data), DataSize}, - {CountersBegin, sizeof(uint64_t), CountersSize}, - {NamesBegin, sizeof(uint8_t), NamesSize}, - {Zeroes, sizeof(uint8_t), Padding}}; - if (Writer(IOVec, sizeof(IOVec) / sizeof(*IOVec), &WriterCtx)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:23 2017 Return-Path: Delivered-To: svn-src-all@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 2F32ED897AB; Sat, 1 Jul 2017 13:24:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D4444B9E; Sat, 1 Jul 2017 13:24:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOLdd022262; Sat, 1 Jul 2017 13:24:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOLtk022261; Sat, 1 Jul 2017 13:24:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOLtk022261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320538 - vendor/compiler-rt/compiler-rt-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-trunk-r306956 X-SVN-Commit-Revision: 320538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:23 -0000 Author: dim Date: Sat Jul 1 13:24:21 2017 New Revision: 320538 URL: https://svnweb.freebsd.org/changeset/base/320538 Log: Tag compiler-rt trunk r306956. Added: vendor/compiler-rt/compiler-rt-trunk-r306956/ - copied from r320537, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:39 2017 Return-Path: Delivered-To: svn-src-all@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 BBB7DD89889; Sat, 1 Jul 2017 13:24:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7E171D58; Sat, 1 Jul 2017 13:24:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOcno022321; Sat, 1 Jul 2017 13:24:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DObE1022314; Sat, 1 Jul 2017 13:24:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DObE1022314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320539 - in vendor/libc++/dist: include test/std/language.support/support.dynamic/new.delete/new.delete.placement test/std/utilities/utility/pairs/pair.astuple test/std/utilities/varia... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist: include test/std/language.support/support.dynamic/new.delete/new.delete.placement test/std/utilities/utility/pairs/pair.astuple test/std/utilities/variant/variant.helpers utils/... X-SVN-Commit-Revision: 320539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:39 -0000 Author: dim Date: Sat Jul 1 13:24:37 2017 New Revision: 320539 URL: https://svnweb.freebsd.org/changeset/base/320539 Log: Vendor import of libc++ trunk r306956: https://llvm.org/svn/llvm-project/libcxx/trunk@306956 Added: vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp (contents, props changed) Deleted: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/new vendor/libc++/dist/include/string vendor/libc++/dist/utils/libcxx/test/target_info.py vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/__config Sat Jul 1 13:24:37 2017 (r320539) @@ -1176,11 +1176,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) -#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION \ - __attribute__((availability(macosx,strict,introduced=10.13))) \ - __attribute__((availability(ios,strict,introduced=11.0))) \ - __attribute__((availability(tvos,strict,introduced=11.0))) \ - __attribute__((availability(watchos,strict,introduced=4.0))) #else #define _LIBCPP_AVAILABILITY_SHARED_MUTEX #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS @@ -1192,7 +1187,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR -#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION #endif // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/new Sat Jul 1 13:24:37 2017 (r320539) @@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE #endif #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif #endif Modified: vendor/libc++/dist/include/string ============================================================================== --- vendor/libc++/dist/include/string Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/string Sat Jul 1 13:24:37 2017 (r320539) @@ -4004,6 +4004,10 @@ basic_string<_CharT, _Traits, _Allocator>::__subscript #endif // _LIBCPP_DEBUG_LEVEL >= 2 +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) +_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&)) + #if _LIBCPP_STD_VER > 11 // Literal suffixes for basic_string [basic.string.literals] inline namespace literals @@ -4036,10 +4040,6 @@ inline namespace literals } } #endif - -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&)) _LIBCPP_END_NAMESPACE_STD Added: vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp Sat Jul 1 13:24:37 2017 (r320539) @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template struct pair + +// tuple_element >::type + +#include + +int main() +{ + typedef std::pair T; + typename std::tuple_element<2, T>::type foo; // expected-error@utility:* {{Index out of bounds in std::tuple_element>}} +} Added: vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp Sat Jul 1 13:24:37 2017 (r320539) @@ -0,0 +1,32 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// + +// template struct variant_alternative; // undefined +// template struct variant_alternative; +// template struct variant_alternative; +// template struct variant_alternative; +// template +// using variant_alternative_t = typename variant_alternative::type; +// +// template +// struct variant_alternative>; + +#include +#include +#include + +int main() { + using V = std::variant; + typename std::variant_alternative<4, V>::type foo; // expected-error@variant:* {{Index out of bounds in std::variant_alternative<>}} +} Modified: vendor/libc++/dist/utils/libcxx/test/target_info.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/test/target_info.py Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/utils/libcxx/test/target_info.py Sat Jul 1 13:24:37 2017 (r320539) @@ -8,11 +8,11 @@ #===----------------------------------------------------------------------===// import importlib -import lit.util # pylint: disable=import-error,no-name-in-module import locale import os import platform import re +import subprocess import sys class DefaultTargetInfo(object): @@ -73,12 +73,13 @@ class DarwinLocalTI(DefaultTargetInfo): super(DarwinLocalTI, self).__init__(full_config) def is_host_macosx(self): - name = lit.util.capture(['sw_vers', '-productName']).strip() + name = subprocess.check_output(['sw_vers', '-productName']).strip() return name == "Mac OS X" def get_macosx_version(self): assert self.is_host_macosx() - version = lit.util.capture(['sw_vers', '-productVersion']).strip() + version = subprocess.check_output( + ['sw_vers', '-productVersion']).strip() version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version) return version @@ -86,7 +87,7 @@ class DarwinLocalTI(DefaultTargetInfo): assert self.is_host_macosx() cmd = ['xcrun', '--sdk', name, '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() except OSError: pass @@ -127,7 +128,7 @@ class DarwinLocalTI(DefaultTargetInfo): else: cmd = ['xcrun', '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() res = 0 except OSError: res = -1 Modified: vendor/libc++/dist/www/upcoming_meeting.html ============================================================================== --- vendor/libc++/dist/www/upcoming_meeting.html Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/www/upcoming_meeting.html Sat Jul 1 13:24:37 2017 (r320539) @@ -90,10 +90,10 @@
  • 2954 - I don't think there's anything to do here.
  • 2961 - We haven't implemented the PMR stuff yet.
  • 2966 - Wording cleanup; no code or test changes needed.
  • -
  • 2974 - I have some code lying around that does this.
  • +
  • 2974 - I did this in r305196. Tests added in 306580
  • -

    Last Updated: 25-Jun-2017

    +

    Last Updated: 28-Jun-2017

    From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:42 2017 Return-Path: Delivered-To: svn-src-all@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 9418CD898A0; Sat, 1 Jul 2017 13:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 426C3D99; Sat, 1 Jul 2017 13:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOf5q022370; Sat, 1 Jul 2017 13:24:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOfLL022369; Sat, 1 Jul 2017 13:24:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOfLL022369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320540 - vendor/libc++/libc++-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-trunk-r306956 X-SVN-Commit-Revision: 320540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:42 -0000 Author: dim Date: Sat Jul 1 13:24:41 2017 New Revision: 320540 URL: https://svnweb.freebsd.org/changeset/base/320540 Log: Tag libc++ trunk r306956. Added: vendor/libc++/libc++-trunk-r306956/ - copied from r320539, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:49 2017 Return-Path: Delivered-To: svn-src-all@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 205B1D8991C; Sat, 1 Jul 2017 13:24:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A2430E51; Sat, 1 Jul 2017 13:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOlhM022443; Sat, 1 Jul 2017 13:24:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOjMm022416; Sat, 1 Jul 2017 13:24:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOjMm022416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320541 - in vendor/lld/dist: COFF ELF ELF/Arch lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist: COFF ELF ELF/Arch lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Commit-Revision: 320541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:49 -0000 Author: dim Date: Sat Jul 1 13:24:45 2017 New Revision: 320541 URL: https://svnweb.freebsd.org/changeset/base/320541 Log: Vendor import of lld trunk r306956: https://llvm.org/svn/llvm-project/lld/trunk@306956 Added: vendor/lld/dist/ELF/Arch/SPARCV9.cpp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc vendor/lld/dist/test/COFF/Inputs/combined-resources-2.res (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-cursor.bmp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-okay.bmp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources.rc vendor/lld/dist/test/COFF/Inputs/combined-resources.res (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb-import-gc.lib (contents, props changed) vendor/lld/dist/test/COFF/combined-resources.test vendor/lld/dist/test/COFF/pdb-global-gc.yaml vendor/lld/dist/test/COFF/pdb-import-gc.yaml vendor/lld/dist/test/COFF/reloc-discarded.s (contents, props changed) vendor/lld/dist/test/ELF/Inputs/dso-undef-size.s (contents, props changed) vendor/lld/dist/test/ELF/basic-sparcv9.s (contents, props changed) vendor/lld/dist/test/ELF/dso-undef-size.s (contents, props changed) vendor/lld/dist/test/ELF/relocatable-script.s (contents, props changed) vendor/lld/dist/test/ELF/version-script-symver.s (contents, props changed) Modified: vendor/lld/dist/COFF/Chunks.cpp vendor/lld/dist/COFF/Chunks.h vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/MarkLive.cpp vendor/lld/dist/COFF/Symbols.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/CMakeLists.txt vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/SymbolTable.cpp vendor/lld/dist/ELF/SymbolTable.h vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/Symbols.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Target.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/pdb-comdat.test vendor/lld/dist/test/COFF/pdb-safeseh.yaml vendor/lld/dist/test/COFF/pdb-secrel-absolute.yaml vendor/lld/dist/test/COFF/pdb-symbol-types.yaml vendor/lld/dist/test/COFF/resource.test vendor/lld/dist/test/COFF/secrel-absolute.s vendor/lld/dist/test/ELF/arm-exidx-canunwind.s vendor/lld/dist/test/ELF/arm-exidx-gc.s vendor/lld/dist/test/ELF/arm-exidx-shared.s vendor/lld/dist/test/ELF/linkerscript/data-commands-gc.s vendor/lld/dist/test/lit.cfg Modified: vendor/lld/dist/COFF/Chunks.cpp ============================================================================== --- vendor/lld/dist/COFF/Chunks.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Chunks.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -11,6 +11,7 @@ #include "Error.h" #include "InputFiles.h" #include "Symbols.h" +#include "Writer.h" #include "llvm/ADT/Twine.h" #include "llvm/BinaryFormat/COFF.h" #include "llvm/Object/COFF.h" @@ -52,18 +53,27 @@ static void add32(uint8_t *P, int32_t V) { write32le(P static void add64(uint8_t *P, int64_t V) { write64le(P, read64le(P) + V); } static void or16(uint8_t *P, uint16_t V) { write16le(P, read16le(P) | V); } -static void applySecRel(const SectionChunk *Sec, uint8_t *Off, Defined *Sym) { - // Don't apply section relative relocations to absolute symbols in codeview - // debug info sections. MSVC does not treat such relocations as fatal errors, - // and they can be found in the standard library for linker-provided symbols - // like __guard_fids_table and __safe_se_handler_table. - if (!(isa(Sym) && Sec->isCodeView())) - add32(Off, Sym->getSecrel()); +static void applySecRel(const SectionChunk *Sec, uint8_t *Off, + OutputSection *OS, uint64_t S) { + if (!OS) { + if (Sec->isCodeView()) + return; + fatal("SECREL relocation cannot be applied to absolute symbols"); + } + uint64_t SecRel = S - OS->getRVA(); + assert(SecRel < INT32_MAX && "overflow in SECREL relocation"); + add32(Off, SecRel); } -void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +static void applySecIdx(uint8_t *Off, OutputSection *OS) { + // If we have no output section, this must be an absolute symbol. Use the + // sentinel absolute symbol section index. + uint16_t SecIdx = OS ? OS->SectionIndex : DefinedAbsolute::OutputSectionIndex; + add16(Off, SecIdx); +} + +void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { switch (Type) { case IMAGE_REL_AMD64_ADDR32: add32(Off, S + Config->ImageBase); break; case IMAGE_REL_AMD64_ADDR64: add64(Off, S + Config->ImageBase); break; @@ -74,23 +84,22 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t case IMAGE_REL_AMD64_REL32_3: add32(Off, S - P - 7); break; case IMAGE_REL_AMD64_REL32_4: add32(Off, S - P - 8); break; case IMAGE_REL_AMD64_REL32_5: add32(Off, S - P - 9); break; - case IMAGE_REL_AMD64_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_AMD64_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } } -void SectionChunk::applyRelX86(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +void SectionChunk::applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { switch (Type) { case IMAGE_REL_I386_ABSOLUTE: break; case IMAGE_REL_I386_DIR32: add32(Off, S + Config->ImageBase); break; case IMAGE_REL_I386_DIR32NB: add32(Off, S); break; case IMAGE_REL_I386_REL32: add32(Off, S - P - 4); break; - case IMAGE_REL_I386_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_I386_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_I386_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_I386_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -137,20 +146,21 @@ static void applyBranch24T(uint8_t *Off, int32_t V) { write16le(Off + 2, (read16le(Off + 2) & 0xd000) | (J1 << 13) | (J2 << 11) | ((V >> 1) & 0x7ff)); } -void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { // Pointer to thumb code must have the LSB set. - if (Sym->isExecutable()) - S |= 1; + uint64_t SX = S; + if (OS && (OS->getPermissions() & IMAGE_SCN_MEM_EXECUTE)) + SX |= 1; switch (Type) { - case IMAGE_REL_ARM_ADDR32: add32(Off, S + Config->ImageBase); break; - case IMAGE_REL_ARM_ADDR32NB: add32(Off, S); break; - case IMAGE_REL_ARM_MOV32T: applyMOV32T(Off, S + Config->ImageBase); break; - case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break; - case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_ARM_ADDR32: add32(Off, SX + Config->ImageBase); break; + case IMAGE_REL_ARM_ADDR32NB: add32(Off, SX); break; + case IMAGE_REL_ARM_MOV32T: applyMOV32T(Off, SX + Config->ImageBase); break; + case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -166,18 +176,39 @@ void SectionChunk::writeTo(uint8_t *Buf) const { // Apply relocations. for (const coff_relocation &Rel : Relocs) { uint8_t *Off = Buf + OutputSectionOff + Rel.VirtualAddress; + + // Get the output section of the symbol for this relocation. The output + // section is needed to compute SECREL and SECTION relocations used in debug + // info. SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex); Defined *Sym = cast(Body); + Chunk *C = Sym->getChunk(); + OutputSection *OS = C ? C->getOutputSection() : nullptr; + + // Only absolute and __ImageBase symbols lack an output section. For any + // other symbol, this indicates that the chunk was discarded. Normally + // relocations against discarded sections are an error. However, debug info + // sections are not GC roots and can end up with these kinds of relocations. + // Skip these relocations. + if (!OS && !isa(Sym) && !isa(Sym)) { + if (isCodeView()) + continue; + fatal("relocation against symbol in discarded section: " + + Sym->getName()); + } + uint64_t S = Sym->getRVA(); + + // Compute the RVA of the relocation for relative relocations. uint64_t P = RVA + Rel.VirtualAddress; switch (Config->Machine) { case AMD64: - applyRelX64(Off, Rel.Type, Sym, P); + applyRelX64(Off, Rel.Type, OS, S, P); break; case I386: - applyRelX86(Off, Rel.Type, Sym, P); + applyRelX86(Off, Rel.Type, OS, S, P); break; case ARMNT: - applyRelARM(Off, Rel.Type, Sym, P); + applyRelARM(Off, Rel.Type, OS, S, P); break; default: llvm_unreachable("unknown machine type"); Modified: vendor/lld/dist/COFF/Chunks.h ============================================================================== --- vendor/lld/dist/COFF/Chunks.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Chunks.h Sat Jul 1 13:24:45 2017 (r320541) @@ -145,9 +145,12 @@ class SectionChunk : public Chunk { (public) StringRef getSectionName() const override { return SectionName; } void getBaserels(std::vector *Res) override; bool isCOMDAT() const; - void applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; - void applyRelX86(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; - void applyRelARM(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; + void applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; + void applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; + void applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; // Called if the garbage collector decides to not include this chunk // in a final output. It's supposed to print out a log message to stdout. Modified: vendor/lld/dist/COFF/Driver.h ============================================================================== --- vendor/lld/dist/COFF/Driver.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Driver.h Sat Jul 1 13:24:45 2017 (r320541) @@ -34,7 +34,6 @@ extern LinkerDriver *Driver; using llvm::COFF::MachineTypes; using llvm::COFF::WindowsSubsystem; using llvm::Optional; -class InputFile; // Implemented in MarkLive.cpp. void markLive(const std::vector &Chunks); Modified: vendor/lld/dist/COFF/MarkLive.cpp ============================================================================== --- vendor/lld/dist/COFF/MarkLive.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/MarkLive.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -52,6 +52,13 @@ void markLive(const std::vector &Chunks) { while (!Worklist.empty()) { SectionChunk *SC = Worklist.pop_back_val(); + + // If this section was discarded, there are relocations referring to + // discarded sections. Ignore these sections to avoid crashing. They will be + // diagnosed during relocation processing. + if (SC->isDiscarded()) + continue; + assert(SC->isLive() && "We mark as live when pushing onto the worklist!"); // Mark all symbols listed in the relocation table for this section. Modified: vendor/lld/dist/COFF/Symbols.h ============================================================================== --- vendor/lld/dist/COFF/Symbols.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Symbols.h Sat Jul 1 13:24:45 2017 (r320541) @@ -110,17 +110,9 @@ class Defined : public SymbolBody { (public) // writer sets and uses RVAs. uint64_t getRVA(); - // Returns the RVA relative to the beginning of the output section. - // Used to implement SECREL relocation type. - uint32_t getSecrel(); - - // Returns the output section index. - // Used to implement SECTION relocation type. - uint16_t getSectionIndex(); - - // Returns true if this symbol points to an executable (e.g. .text) section. - // Used to implement ARM relocations. - bool isExecutable(); + // Returns the chunk containing this symbol. Absolute symbols and __ImageBase + // do not have chunks, so this may return null. + Chunk *getChunk(); }; // Symbols defined via a COFF object file or bitcode file. For COFF files, this @@ -167,7 +159,6 @@ class DefinedRegular : public DefinedCOFF { (public) bool isCOMDAT() { return IsCOMDAT; } SectionChunk *getChunk() { return *Data; } uint32_t getValue() { return Sym->Value; } - uint32_t getSecrel(); private: SectionChunk **Data; @@ -187,8 +178,7 @@ class DefinedCommon : public DefinedCOFF { (public) } uint64_t getRVA() { return Data->getRVA(); } - uint32_t getSecrel() { return Data->OutputSectionOff; } - uint16_t getSectionIndex(); + Chunk *getChunk() { return Data; } private: friend SymbolTable; @@ -219,6 +209,7 @@ class DefinedAbsolute : public Defined { (public) // against absolute symbols resolve to this 16 bit number, and it is the // largest valid section index plus one. This is written by the Writer. static uint16_t OutputSectionIndex; + uint16_t getSecIdx() { return OutputSectionIndex; } private: uint64_t VA; @@ -237,9 +228,8 @@ class DefinedSynthetic : public Defined { (public) // A null chunk indicates that this is __ImageBase. Otherwise, this is some // other synthesized chunk, like SEHTableChunk. - uint32_t getRVA() const { return C ? C->getRVA() : 0; } - uint32_t getSecrel() const { return C ? C->OutputSectionOff : 0; } - Chunk *getChunk() const { return C; } + uint32_t getRVA() { return C ? C->getRVA() : 0; } + Chunk *getChunk() { return C; } private: Chunk *C; @@ -304,9 +294,11 @@ class DefinedImportData : public Defined { (public) } uint64_t getRVA() { return File->Location->getRVA(); } + Chunk *getChunk() { return File->Location; } + void setLocation(Chunk *AddressTable) { File->Location = AddressTable; } + StringRef getDLLName() { return File->DLLName; } StringRef getExternalName() { return File->ExternalName; } - void setLocation(Chunk *AddressTable) { File->Location = AddressTable; } uint16_t getOrdinal() { return File->Hdr->OrdinalHint; } ImportFile *File; @@ -374,6 +366,29 @@ inline uint64_t Defined::getRVA() { case LazyKind: case UndefinedKind: llvm_unreachable("Cannot get the address for an undefined symbol."); + } + llvm_unreachable("unknown symbol kind"); +} + +inline Chunk *Defined::getChunk() { + switch (kind()) { + case DefinedRegularKind: + return cast(this)->getChunk(); + case DefinedAbsoluteKind: + return nullptr; + case DefinedSyntheticKind: + return cast(this)->getChunk(); + case DefinedImportDataKind: + return cast(this)->getChunk(); + case DefinedImportThunkKind: + return cast(this)->getChunk(); + case DefinedLocalImportKind: + return cast(this)->getChunk(); + case DefinedCommonKind: + return cast(this)->getChunk(); + case LazyKind: + case UndefinedKind: + llvm_unreachable("Cannot get the chunk of an undefined symbol."); } llvm_unreachable("unknown symbol kind"); } Modified: vendor/lld/dist/COFF/Writer.cpp ============================================================================== --- vendor/lld/dist/COFF/Writer.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Writer.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -120,7 +120,6 @@ class Writer { (private) void writeSections(); void sortExceptionTable(); void writeBuildId(); - void applyRelocations(); llvm::Optional createSymbol(Defined *D); size_t addEntryToStringTable(StringRef Str); @@ -208,55 +207,6 @@ void OutputSection::writeHeaderTo(uint8_t *Buf) { strncpy(Hdr->Name, Name.data(), std::min(Name.size(), (size_t)COFF::NameSize)); } -} - -uint32_t Defined::getSecrel() { - assert(this); - switch (kind()) { - case DefinedRegularKind: - return cast(this)->getSecrel(); - case DefinedCommonKind: - return cast(this)->getSecrel(); - case DefinedSyntheticKind: - return cast(this)->getSecrel(); - default: - break; - } - fatal("SECREL relocation points to a non-regular symbol: " + toString(*this)); -} - -uint32_t DefinedRegular::getSecrel() { - assert(getChunk()->isLive() && "relocation against discarded section"); - uint64_t Diff = getRVA() - getChunk()->getOutputSection()->getRVA(); - assert(Diff < UINT32_MAX && "section offset too large"); - return (uint32_t)Diff; -} - -uint16_t Defined::getSectionIndex() { - if (auto *D = dyn_cast(this)) - return D->getChunk()->getOutputSection()->SectionIndex; - if (isa(this)) - return DefinedAbsolute::OutputSectionIndex; - if (auto *D = dyn_cast(this)) - return D->getSectionIndex(); - if (auto *D = dyn_cast(this)) { - if (!D->getChunk()) - return 0; - return D->getChunk()->getOutputSection()->SectionIndex; - } - fatal("SECTION relocation points to a non-regular symbol: " + - toString(*this)); -} - -uint16_t DefinedCommon::getSectionIndex() { - return Data->getOutputSection()->SectionIndex; -} - -bool Defined::isExecutable() { - const auto X = IMAGE_SCN_MEM_EXECUTE; - if (auto *D = dyn_cast(this)) - return D->getChunk()->getOutputSection()->getPermissions() & X; - return isa(this); } } // namespace coff Added: vendor/lld/dist/ELF/Arch/SPARCV9.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/ELF/Arch/SPARCV9.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,149 @@ +//===- SPARCV9.cpp --------------------------------------------------------===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "Error.h" +#include "InputFiles.h" +#include "Symbols.h" +#include "SyntheticSections.h" +#include "Target.h" +#include "llvm/Support/Endian.h" + +using namespace llvm; +using namespace llvm::support::endian; +using namespace llvm::ELF; +using namespace lld; +using namespace lld::elf; + +namespace { +class SPARCV9 final : public TargetInfo { +public: + SPARCV9(); + RelExpr getRelExpr(uint32_t Type, const SymbolBody &S, + const uint8_t *Loc) const override; + void writePlt(uint8_t *Buf, uint64_t GotEntryAddr, uint64_t PltEntryAddr, + int32_t Index, unsigned RelOff) const override; + void relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const override; +}; +} // namespace + +SPARCV9::SPARCV9() { + CopyRel = R_SPARC_COPY; + GotRel = R_SPARC_GLOB_DAT; + PltRel = R_SPARC_JMP_SLOT; + RelativeRel = R_SPARC_RELATIVE; + GotEntrySize = 8; + PltEntrySize = 32; + PltHeaderSize = 4 * PltEntrySize; + + PageSize = 8192; + DefaultMaxPageSize = 0x100000; + DefaultImageBase = 0x100000; +} + +RelExpr SPARCV9::getRelExpr(uint32_t Type, const SymbolBody &S, + const uint8_t *Loc) const { + switch (Type) { + case R_SPARC_32: + case R_SPARC_UA32: + case R_SPARC_64: + case R_SPARC_UA64: + return R_ABS; + case R_SPARC_PC10: + case R_SPARC_PC22: + case R_SPARC_DISP32: + case R_SPARC_WDISP30: + return R_PC; + case R_SPARC_GOT10: + return R_GOT_OFF; + case R_SPARC_GOT22: + return R_GOT_OFF; + case R_SPARC_WPLT30: + return R_PLT_PC; + case R_SPARC_NONE: + return R_NONE; + default: + error(toString(S.File) + ": unknown relocation type: " + toString(Type)); + return R_HINT; + } +} + +void SPARCV9::relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const { + switch (Type) { + case R_SPARC_32: + case R_SPARC_UA32: + // V-word32 + checkUInt<32>(Loc, Val, Type); + write32be(Loc, Val); + break; + case R_SPARC_DISP32: + // V-disp32 + checkInt<32>(Loc, Val, Type); + write32be(Loc, Val); + break; + case R_SPARC_WDISP30: + case R_SPARC_WPLT30: + // V-disp30 + checkInt<32>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x3fffffff) | ((Val >> 2) & 0x3fffffff)); + break; + case R_SPARC_22: + // V-imm22 + checkUInt<22>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x003fffff) | (Val & 0x003fffff)); + break; + case R_SPARC_GOT22: + case R_SPARC_PC22: + // T-imm22 + write32be(Loc, (read32be(Loc) & ~0x003fffff) | ((Val >> 10) & 0x003fffff)); + break; + case R_SPARC_WDISP19: + // V-disp19 + checkInt<21>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x0007ffff) | ((Val >> 2) & 0x0007ffff)); + break; + case R_SPARC_GOT10: + case R_SPARC_PC10: + // T-simm10 + write32be(Loc, (read32be(Loc) & ~0x000003ff) | (Val & 0x000003ff)); + break; + case R_SPARC_64: + case R_SPARC_UA64: + case R_SPARC_GLOB_DAT: + // V-xword64 + write64be(Loc, Val); + break; + default: + error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + } +} + +void SPARCV9::writePlt(uint8_t *Buf, uint64_t GotEntryAddr, + uint64_t PltEntryAddr, int32_t Index, + unsigned RelOff) const { + const uint8_t PltData[] = { + 0x03, 0x00, 0x00, 0x00, // sethi (. - .PLT0), %g1 + 0x30, 0x68, 0x00, 0x00, // ba,a %xcc, .PLT1 + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00 // nop + }; + memcpy(Buf, PltData, sizeof(PltData)); + + uint64_t Off = PltHeaderSize + Index * PltEntrySize; + relocateOne(Buf, R_SPARC_22, Off); + relocateOne(Buf + 4, R_SPARC_WDISP19, -(Off + 4 - PltEntrySize)); +} + +TargetInfo *elf::getSPARCV9TargetInfo() { + static SPARCV9 Target; + return &Target; +} Modified: vendor/lld/dist/ELF/CMakeLists.txt ============================================================================== --- vendor/lld/dist/ELF/CMakeLists.txt Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/CMakeLists.txt Sat Jul 1 13:24:45 2017 (r320541) @@ -15,6 +15,7 @@ add_lld_library(lldELF Arch/MipsArchTree.cpp Arch/PPC.cpp Arch/PPC64.cpp + Arch/SPARCV9.cpp Arch/X86.cpp Arch/X86_64.cpp Driver.cpp Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/InputFiles.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -79,9 +79,9 @@ template void elf::ObjectFile::init ObjectInfo ObjInfo; DWARFContextInMemory Dwarf(*Obj, &ObjInfo); - DwarfLine.reset(new DWARFDebugLine(&Dwarf.getLineSection().Relocs)); - DataExtractor LineData(Dwarf.getLineSection().Data, Config->IsLE, - Config->Wordsize); + DwarfLine.reset(new DWARFDebugLine); + DWARFDataExtractor LineData(Dwarf.getLineSection(), Config->IsLE, + Config->Wordsize); // The second parameter is offset in .debug_line section // for compilation unit (CU) of interest. We have only one Modified: vendor/lld/dist/ELF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SymbolTable.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -195,14 +195,8 @@ template void SymbolTable::applySym for (auto &KV : Config->RenamedSymbols) { Symbol *Dst = KV.first; Symbol *Src = KV.second.Target; + Dst->body()->copy(Src->body()); Dst->Binding = KV.second.OriginalBinding; - - // We rename symbols by replacing the old symbol's SymbolBody with - // the new symbol's SymbolBody. The only attribute we want to keep - // is the symbol name, so that two symbols don't have the same name. - StringRef S = Dst->body()->getName(); - memcpy(Dst->Body.buffer, Src->Body.buffer, sizeof(Symbol::Body)); - Dst->body()->setName(S); } } @@ -718,15 +712,31 @@ void SymbolTable::assignWildcardVersion(SymbolVe B->symbol()->VersionId = VersionId; } +static bool isDefaultVersion(SymbolBody *B) { + return B->isInCurrentDSO() && B->getName().find("@@") != StringRef::npos; +} + // This function processes version scripts by updating VersionId // member of symbols. template void SymbolTable::scanVersionScript() { // Symbol themselves might know their versions because symbols // can contain versions in the form of @. - // Let them parse their names. - if (!Config->VersionDefinitions.empty()) - for (Symbol *Sym : SymVector) - Sym->body()->parseSymbolVersion(); + // Let them parse and update their names to exclude version suffix. + for (Symbol *Sym : SymVector) { + SymbolBody *Body = Sym->body(); + bool IsDefault = isDefaultVersion(Body); + Body->parseSymbolVersion(); + + if (!IsDefault) + continue; + + // @@ means the symbol is the default version. If that's the + // case, the symbol is not used only to resolve of version + // but also undefined unversioned symbols with name . + SymbolBody *S = find(Body->getName()); + if (S && S->isUndefined()) + S->copy(Body); + } // Handle edge cases first. handleAnonymousVersion(); Modified: vendor/lld/dist/ELF/SymbolTable.h ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SymbolTable.h Sat Jul 1 13:24:45 2017 (r320541) @@ -18,7 +18,7 @@ namespace lld { namespace elf { -class Lazy; + struct Symbol; // SymbolTable is a bucket of all known symbols, including defined, Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Symbols.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -159,6 +159,21 @@ bool SymbolBody::isPreemptible() const { return true; } +// Overwrites all attributes except symbol name with Other's so that +// this symbol becomes an alias to Other. This is useful for handling +// some options such as --wrap. +// +// The reason why we want to keep the symbol name is because, if we +// copy symbol names, we'll end up having symbol tables in resulting +// executables or DSOs containing two or more identical symbols, which +// is just inconvenient. +void SymbolBody::copy(SymbolBody *Other) { + StringRef S = Name; + memcpy(symbol()->Body.buffer, Other->symbol()->Body.buffer, + sizeof(Symbol::Body)); + Name = S; +} + uint64_t SymbolBody::getVA(int64_t Addend) const { uint64_t OutVA = getSymVA(*this, Addend); return OutVA + Addend; Modified: vendor/lld/dist/ELF/Symbols.h ============================================================================== --- vendor/lld/dist/ELF/Symbols.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Symbols.h Sat Jul 1 13:24:45 2017 (r320541) @@ -69,9 +69,9 @@ class SymbolBody { (public) bool isLocal() const { return IsLocal; } bool isPreemptible() const; StringRef getName() const { return Name; } - void setName(StringRef S) { Name = S; } uint8_t getVisibility() const { return StOther & 0x3; } void parseSymbolVersion(); + void copy(SymbolBody *Other); bool isInGot() const { return GotIndex != -1U; } bool isInPlt() const { return PltIndex != -1U; } Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -1090,8 +1090,17 @@ template void DynamicSection::final if (In::RelaPlt->getParent()->Size > 0) { add({DT_JMPREL, In::RelaPlt}); add({DT_PLTRELSZ, In::RelaPlt->getParent()->Size}); - add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT, - InX::GotPlt}); + switch (Config->EMachine) { + case EM_MIPS: + add({DT_MIPS_PLTGOT, In::GotPlt}); + break; + case EM_SPARCV9: + add({DT_PLTGOT, In::Plt}); + break; + default: + add({DT_PLTGOT, In::GotPlt}); + break; + } add({DT_PLTREL, uint64_t(Config->IsRela ? DT_RELA : DT_REL)}); } @@ -1376,7 +1385,6 @@ template void SymbolTableSection::w } ESym->st_name = Ent.StrTabOffset; - ESym->st_size = Body->getSize(); // Set a section index. if (const OutputSection *OutSec = Body->getOutputSection()) @@ -1386,6 +1394,14 @@ template void SymbolTableSection::w else if (isa(Body)) ESym->st_shndx = SHN_COMMON; + // Copy symbol size if it is a defined symbol. st_size is not significant + // for undefined symbols, so whether copying it or not is up to us if that's + // the case. We'll leave it as zero because by not setting a value, we can + // get the exact same outputs for two sets of input files that differ only + // in undefined symbol size in DSOs. + if (ESym->st_shndx != SHN_UNDEF) + ESym->st_size = Body->getSize(); + // st_value is usually an address of a symbol, but that has a // special meaining for uninstantiated common symbols (this can // occur if -r is given). @@ -1625,7 +1641,12 @@ template void HashTableSection::wri PltSection::PltSection(size_t S) : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, 16, ".plt"), - HeaderSize(S) {} + HeaderSize(S) { + // The PLT needs to be writable on SPARC as the dynamic linker will + // modify the instructions in the PLT entries. + if (Config->EMachine == EM_SPARCV9) + this->Flags |= SHF_WRITE; +} void PltSection::writeTo(uint8_t *Buf) { // At beginning of PLT but not the IPLT, we have code to call the dynamic Modified: vendor/lld/dist/ELF/Target.cpp ============================================================================== --- vendor/lld/dist/ELF/Target.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Target.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -77,6 +77,8 @@ TargetInfo *elf::getTarget() { return getPPCTargetInfo(); case EM_PPC64: return getPPC64TargetInfo(); + case EM_SPARCV9: + return getSPARCV9TargetInfo(); case EM_X86_64: if (Config->EKind == ELF32LEKind) return getX32TargetInfo(); Modified: vendor/lld/dist/ELF/Target.h ============================================================================== --- vendor/lld/dist/ELF/Target.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Target.h Sat Jul 1 13:24:45 2017 (r320541) @@ -112,6 +112,7 @@ TargetInfo *getARMTargetInfo(); TargetInfo *getAVRTargetInfo(); TargetInfo *getPPC64TargetInfo(); TargetInfo *getPPCTargetInfo(); +TargetInfo *getSPARCV9TargetInfo(); TargetInfo *getX32TargetInfo(); TargetInfo *getX86TargetInfo(); TargetInfo *getX86_64TargetInfo(); Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Writer.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -104,7 +104,7 @@ StringRef elf::getOutputSectionName(StringRef Name) { for (StringRef V : {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.rel.ro.", ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.", - ".gcc_except_table.", ".tdata.", ".ARM.exidx."}) { + ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab."}) { StringRef Prefix = V.drop_back(); if (Name.startswith(V) || Name == Prefix) return Prefix; @@ -1014,13 +1014,13 @@ findOrphanPos(std::vector::iterator B, } template void Writer::sortSections() { + if (Script->Opt.HasSections) + Script->adjustSectionsBeforeSorting(); + // Don't sort if using -r. It is not necessary and we want to preserve the // relative order for SHF_LINK_ORDER sections. if (Config->Relocatable) return; - - if (Script->Opt.HasSections) - Script->adjustSectionsBeforeSorting(); for (BaseCommand *Base : Script->Opt.Commands) if (auto *Cmd = dyn_cast(Base)) Modified: vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -44,7 +44,6 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(DependentDylib) LLVM_YAML_IS_SEQUENCE_VECTOR(RebaseLocation) LLVM_YAML_IS_SEQUENCE_VECTOR(BindLocation) LLVM_YAML_IS_SEQUENCE_VECTOR(Export) -LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef) LLVM_YAML_IS_SEQUENCE_VECTOR(DataInCode) Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,36 @@ +#include "windows.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +randomdat RCDATA +{ + "this is a random bit of data that means nothing\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +randomdat RCDATA +{ + "zhe4 shi4 yi1ge4 sui2ji1 de shu4ju4, zhe4 yi4wei4zhe shen2me\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_LUXEMBOURG +randomdat RCDATA +{ + "Dies ist ein zufälliges Bit von Daten, die nichts bedeutet\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +myaccelerators ACCELERATORS +{ + "^C", 999, VIRTKEY, ALT + "D", 1100, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-2.res ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-cursor.bmp ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-okay.bmp ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/combined-resources.rc Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,50 @@ +#include "windows.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +myaccelerators ACCELERATORS +{ + "^C", 999, VIRTKEY, ALT + "D", 1100, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} + +cursor BITMAP "combined-resources-cursor.bmp" +okay BITMAP "combined-resources-okay.bmp" + +14432 MENU +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +{ + MENUITEM "yu", 100 + MENUITEM "shala", 101 + MENUITEM "kaoya", 102 +} + +testdialog DIALOG 10, 10, 200, 300 +STYLE WS_POPUP | WS_BORDER +CAPTION "Test" +{ + CTEXT "Continue:", 1, 10, 10, 230, 14 + PUSHBUTTON "&OK", 2, 66, 134, 161, 13 +} + +12 ACCELERATORS +{ + "X", 164, VIRTKEY, ALT + "H", 5678, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} + +"eat" MENU +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +{ + MENUITEM "fish", 100 + MENUITEM "salad", 101 + MENUITEM "duck", 102 +} + + +myresource stringarray { + "this is a user defined resource\0", + "it contains many strings\0", +} Added: vendor/lld/dist/test/COFF/Inputs/combined-resources.res ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,4 @@ +.section .data,"dw",one_only,__wc_mb_cur +.global __wc_mb_cur +__wc_mb_cur: +.long 42 Added: vendor/lld/dist/test/COFF/Inputs/pdb-import-gc.lib ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/combined-resources.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/combined-resources.test Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,17 @@ +// Check that lld properly handles merging multiple .res files. +// The inputs were generated with the following commands, using the original +// Windows rc.exe +// > rc /fo combined-resources.res /nologo combined-resources.rc +// > rc /fo combined-resources-2.res /nologo combined-resources-2.rc + +# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj +# RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/resource.res \ +# RUN: %p/Inputs/combined-resources.res %p/Inputs/combined-resources-2.res + +# RUN: llvm-readobj -coff-resources -file-headers %t.exe | FileCheck %s + + +CHECK: ResourceTableRVA: 0x1000 +CHECK-NEXT: ResourceTableSize: 0xC1C +CHECK-DAG: Resources [ +CHECK-NEXT: Total Number of Resources: 13 Modified: vendor/lld/dist/test/COFF/hello32.test ============================================================================== --- vendor/lld/dist/test/COFF/hello32.test Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/test/COFF/hello32.test Sat Jul 1 13:24:45 2017 (r320541) @@ -21,6 +21,7 @@ HEADER-NEXT: IMAGE_FILE_EXECUTABLE_IMAGE (0x2) HEADER-NEXT: ] HEADER-NEXT: } HEADER-NEXT: ImageOptionalHeader { +HEADER-NEXT: Magic: 0x10B HEADER-NEXT: MajorLinkerVersion: 14 HEADER-NEXT: MinorLinkerVersion: 0 HEADER-NEXT: SizeOfCode: 512 Modified: vendor/lld/dist/test/COFF/pdb-comdat.test ============================================================================== --- vendor/lld/dist/test/COFF/pdb-comdat.test Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/test/COFF/pdb-comdat.test Sat Jul 1 13:24:45 2017 (r320541) @@ -41,49 +41,48 @@ CHECK-LABEL: Mod 0002 | `* Linker *`: CHECK: Symbols CHECK: ============================================================ CHECK-LABEL: Mod 0000 | `{{.*}}pdb_comdat_main.obj`: -CHECK: - S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj` -CHECK: - S_COMPILE3 [size = 60] -CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c -CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 -CHECK: flags = security checks | hot patchable -CHECK: - S_GPROC32_ID [size = 44] `main` - FIXME: We need to fill in "end". -CHECK: parent = 0, addr = 0002:0000, code size = 24, end = 0 -CHECK: debug start = 4, debug end = 19, flags = none -CHECK: - S_FRAMEPROC [size = 32] -CHECK: size = 40, padding size = 0, offset to padding = 0 -CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 -CHECK: flags = has async eh | opt speed -CHECK: - S_END [size = 4] -CHECK: - S_GDATA32 [size = 24] `global` -CHECK: type = 0x0074 (int), addr = 0000:0000 -CHECK: - S_BUILDINFO [size = 8] BuildId = `4106` -CHECK: - S_GPROC32_ID [size = 44] `foo` -CHECK: parent = 0, addr = 0002:0032, code size = 15, end = 0 -CHECK: debug start = 0, debug end = 14, flags = none -CHECK: - S_FRAMEPROC [size = 32] -CHECK: size = 0, padding size = 0, offset to padding = 0 -CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 -CHECK: flags = marked inline | has async eh | opt speed -CHECK: - S_END [size = 4] +CHECK: 4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj` +CHECK: 60 | S_COMPILE3 [size = 60] +CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c +CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 +CHECK: flags = security checks | hot patchable +CHECK: 120 | S_GPROC32_ID [size = 44] `main` +CHECK: parent = 0, end = 0, addr = 0002:0000, code size = 24 +CHECK: debug start = 4, debug end = 19, flags = none +CHECK: 164 | S_FRAMEPROC [size = 32] +CHECK: size = 40, padding size = 0, offset to padding = 0 +CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 +CHECK: flags = has async eh | opt speed +CHECK: 196 | S_END [size = 4] +CHECK: 200 | S_GDATA32 [size = 24] `global` +CHECK: type = 0x0074 (int), addr = 0000:0000 +CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `4106` +CHECK: 232 | S_GPROC32_ID [size = 44] `foo` +CHECK: parent = 0, end = 0, addr = 0002:0032, code size = 15 +CHECK: debug start = 0, debug end = 14, flags = none +CHECK: 276 | S_FRAMEPROC [size = 32] +CHECK: size = 0, padding size = 0, offset to padding = 0 +CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 +CHECK: flags = marked inline | has async eh | opt speed +CHECK: 308 | S_END [size = 4] CHECK-LABEL: Mod 0001 | `{{.*}}pdb_comdat_bar.obj`: -CHECK: - S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_bar.obj` -CHECK: - S_COMPILE3 [size = 60] +CHECK: 4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_bar.obj` +CHECK: 60 | S_COMPILE3 [size = 60] CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 CHECK: flags = security checks | hot patchable -CHECK: - S_GPROC32_ID [size = 44] `bar` -CHECK: parent = 0, addr = 0002:0048, code size = 14, end = 0 +CHECK: 120 | S_GPROC32_ID [size = 44] `bar` +CHECK: parent = 0, end = 0, addr = 0002:0048, code size = 14 CHECK: debug start = 4, debug end = 9, flags = none -CHECK: - S_FRAMEPROC [size = 32] +CHECK: 164 | S_FRAMEPROC [size = 32] CHECK: size = 40, padding size = 0, offset to padding = 0 CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 CHECK: flags = has async eh | opt speed -CHECK: - S_END [size = 4] -CHECK: - S_GDATA32 [size = 24] `global` +CHECK: 196 | S_END [size = 4] +CHECK: 200 | S_GDATA32 [size = 24] `global` CHECK: type = 0x0074 (int), addr = 0000:0000 -CHECK: - S_BUILDINFO [size = 8] BuildId = `4109` -CHECK-NOT: - S_GPROC32_ID {{.*}} `foo` +CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `4109` +CHECK-NOT: S_GPROC32_ID {{.*}} `foo` CHECK-LABEL: Mod 0002 | `* Linker *`: Reorder the object files and verify that the other table is selected. Added: vendor/lld/dist/test/COFF/pdb-global-gc.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/pdb-global-gc.yaml Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,116 @@ +# RUN: yaml2obj %s -o %t.obj +# RUN: llvm-mc %S/Inputs/pdb-global-gc.s -triple x86_64-windows-msvc -filetype=obj -o %t2.obj +# RUN: lld-link %t.obj %t2.obj -debug -entry:main \ +# RUN: -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb -verbose +# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s + +# This tests the case where an __imp_ chunk is discarded by linker GC. The debug +# info may refer to the __imp_ symbol still. + +# Compile this code with MSVC to regenerate the test case: +# extern char __declspec(dllimport) __wc_mb_cur; +# int discarded() { return __wc_mb_cur; } +# int main() { return g2; } + +# CHECK: Symbols +# CHECK: ============================================================ +# CHECK: Mod 0000 | `{{.*}}pdb-global-gc.yaml.tmp.obj`: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 1 13:24:52 2017 Return-Path: Delivered-To: svn-src-all@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 0BAC0D89935; Sat, 1 Jul 2017 13:24:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B1EA6EA5; Sat, 1 Jul 2017 13:24:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOo4D022491; Sat, 1 Jul 2017 13:24:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOovA022490; Sat, 1 Jul 2017 13:24:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOovA022490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320542 - vendor/lld/lld-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-trunk-r306956 X-SVN-Commit-Revision: 320542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:52 -0000 Author: dim Date: Sat Jul 1 13:24:50 2017 New Revision: 320542 URL: https://svnweb.freebsd.org/changeset/base/320542 Log: Tag lld trunk r306956. Added: vendor/lld/lld-trunk-r306956/ - copied from r320541, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 13:25:04 2017 Return-Path: Delivered-To: svn-src-all@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 054A8D899DE; Sat, 1 Jul 2017 13:25:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 93279FE3; Sat, 1 Jul 2017 13:25:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DP2Hk022585; Sat, 1 Jul 2017 13:25:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOxu8022540; Sat, 1 Jul 2017 13:24:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOxu8022540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320543 - in vendor/lldb/dist: include/lldb include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Host include/lldb/Host/common include/lldb/Host/linux incl... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist: include/lldb include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Host include/lldb/Host/common include/lldb/Host/linux include/lldb/Host/posix inclu... X-SVN-Commit-Revision: 320543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:25:04 -0000 Author: dim Date: Sat Jul 1 13:24:58 2017 New Revision: 320543 URL: https://svnweb.freebsd.org/changeset/base/320543 Log: Vendor import of lldb trunk r306956: https://llvm.org/svn/llvm-project/lldb/trunk@306956 Added: vendor/lldb/dist/include/lldb/Utility/Connection.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/IOObject.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/StructuredData.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/Timer.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/TraceOptions.h (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Linux/ProcessorTrace.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Linux/ProcessorTrace.h (contents, props changed) vendor/lldb/dist/source/Utility/Connection.cpp (contents, props changed) vendor/lldb/dist/source/Utility/IOObject.cpp (contents, props changed) vendor/lldb/dist/source/Utility/StructuredData.cpp (contents, props changed) vendor/lldb/dist/source/Utility/Timer.cpp (contents, props changed) vendor/lldb/dist/unittests/Process/Linux/ vendor/lldb/dist/unittests/Process/Linux/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/Process/Linux/ProcessorTraceTest.cpp (contents, props changed) vendor/lldb/dist/unittests/Symbol/Inputs/ vendor/lldb/dist/unittests/Symbol/Inputs/basic-call-frame-info.yaml vendor/lldb/dist/unittests/Symbol/TestDWARFCallFrameInfo.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/ vendor/lldb/dist/unittests/Utility/Helpers/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/MockTildeExpressionResolver.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/MockTildeExpressionResolver.h (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/TestUtilities.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/TestUtilities.h (contents, props changed) vendor/lldb/dist/unittests/Utility/Inputs/ vendor/lldb/dist/unittests/Utility/Inputs/StructuredData-basic.json vendor/lldb/dist/unittests/Utility/StructuredDataTest.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/TimerTest.cpp (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/StructuredData.h vendor/lldb/dist/include/lldb/Core/Timer.h vendor/lldb/dist/include/lldb/Core/TraceOptions.h vendor/lldb/dist/include/lldb/Host/IOObject.h vendor/lldb/dist/source/Core/Connection.cpp vendor/lldb/dist/source/Core/StructuredData.cpp vendor/lldb/dist/source/Core/Timer.cpp vendor/lldb/dist/source/Host/common/IOObject.cpp vendor/lldb/dist/unittests/Core/StructuredDataTest.cpp vendor/lldb/dist/unittests/Core/TimerTest.cpp vendor/lldb/dist/unittests/Utility/Mocks/CMakeLists.txt vendor/lldb/dist/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp vendor/lldb/dist/unittests/Utility/Mocks/MockTildeExpressionResolver.h Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h vendor/lldb/dist/include/lldb/Core/Event.h vendor/lldb/dist/include/lldb/Core/SearchFilter.h vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/MainLoopBase.h vendor/lldb/dist/include/lldb/Host/Socket.h vendor/lldb/dist/include/lldb/Host/XML.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/linux/Support.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h vendor/lldb/dist/include/lldb/Target/ABI.h vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Target/StopInfo.h vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h vendor/lldb/dist/include/lldb/Target/SystemRuntime.h vendor/lldb/dist/include/lldb/Target/Thread.h vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h vendor/lldb/dist/include/lldb/Target/ThreadSpec.h vendor/lldb/dist/include/lldb/Utility/JSON.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-private-interfaces.h vendor/lldb/dist/lldb.xcodeproj/project.pbxproj vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py vendor/lldb/dist/packages/Python/lldbsuite/test/make/Android.rules vendor/lldb/dist/scripts/Xcode/build-llvm.py vendor/lldb/dist/scripts/Xcode/repo.py vendor/lldb/dist/scripts/analyze-project-deps.py vendor/lldb/dist/source/API/SBCommunication.cpp vendor/lldb/dist/source/API/SBStructuredData.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBThreadPlan.cpp vendor/lldb/dist/source/API/SBTraceOptions.cpp vendor/lldb/dist/source/API/SystemInitializerFull.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Commands/CommandObjectLog.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Core/CMakeLists.txt vendor/lldb/dist/source/Core/Communication.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Core/FormatEntity.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Host/CMakeLists.txt vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/Symbols.cpp vendor/lldb/dist/source/Host/freebsd/Host.cpp vendor/lldb/dist/source/Host/linux/Support.cpp vendor/lldb/dist/source/Host/macosx/Host.mm vendor/lldb/dist/source/Host/macosx/Symbols.cpp vendor/lldb/dist/source/Host/netbsd/Host.cpp vendor/lldb/dist/source/Host/openbsd/Host.cpp vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp vendor/lldb/dist/source/Host/windows/Host.cpp vendor/lldb/dist/source/Initialization/SystemInitializerCommon.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.h vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.h vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h vendor/lldb/dist/source/Plugins/Language/ObjC/Cocoa.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSSet.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp vendor/lldb/dist/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp vendor/lldb/dist/source/Plugins/Process/Linux/CMakeLists.txt vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.h vendor/lldb/dist/source/Plugins/Process/POSIX/CMakeLists.txt vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp vendor/lldb/dist/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h vendor/lldb/dist/source/Symbol/DWARFCallFrameInfo.cpp vendor/lldb/dist/source/Symbol/FuncUnwinders.cpp vendor/lldb/dist/source/Symbol/ObjectFile.cpp vendor/lldb/dist/source/Symbol/Symtab.cpp vendor/lldb/dist/source/Symbol/UnwindTable.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Target/ABI.cpp vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/Target.cpp vendor/lldb/dist/source/Target/TargetList.cpp vendor/lldb/dist/source/Target/ThreadSpec.cpp vendor/lldb/dist/source/Utility/CMakeLists.txt vendor/lldb/dist/source/Utility/JSON.cpp vendor/lldb/dist/tools/debugserver/source/RNBRemote.cpp vendor/lldb/dist/tools/debugserver/source/debugserver.cpp vendor/lldb/dist/tools/lldb-server/Acceptor.h vendor/lldb/dist/unittests/Core/CMakeLists.txt vendor/lldb/dist/unittests/Interpreter/CMakeLists.txt vendor/lldb/dist/unittests/Interpreter/TestCompletion.cpp vendor/lldb/dist/unittests/ObjectFile/ELF/CMakeLists.txt vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp vendor/lldb/dist/unittests/Process/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp vendor/lldb/dist/unittests/Process/minidump/CMakeLists.txt vendor/lldb/dist/unittests/Process/minidump/MinidumpParserTest.cpp vendor/lldb/dist/unittests/Symbol/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/DWARF/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp vendor/lldb/dist/unittests/SymbolFile/PDB/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp vendor/lldb/dist/unittests/Target/CMakeLists.txt vendor/lldb/dist/unittests/Target/ModuleCacheTest.cpp vendor/lldb/dist/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp vendor/lldb/dist/unittests/Utility/CMakeLists.txt vendor/lldb/dist/unittests/Utility/TildeExpressionResolverTest.cpp vendor/lldb/dist/unittests/tools/lldb-server/tests/MessageObjects.cpp vendor/lldb/dist/www/projects.html Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sat Jul 1 13:24:58 2017 (r320543) @@ -26,8 +26,8 @@ #include "lldb/Breakpoint/Stoppoint.h" #include "lldb/Core/Event.h" #include "lldb/Core/SearchFilter.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/StringList.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h Sat Jul 1 13:24:58 2017 (r320543) @@ -17,9 +17,9 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Baton.h" #include "lldb/Utility/StringList.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Core/Event.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Event.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/Event.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,9 +11,9 @@ #define liblldb_Event_h_ #include "lldb/Core/Broadcaster.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Host/Predicate.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN #include "lldb/lldb-forward.h" // for EventDataSP, ProcessSP, Struct... Modified: vendor/lldb/dist/include/lldb/Core/SearchFilter.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/SearchFilter.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/SearchFilter.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,7 +11,7 @@ #define liblldb_SearchFilter_h_ #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/FileSpec.h" // for FileSpec #include "lldb/lldb-forward.h" // for SearchFilterSP, TargetSP, Modu... Modified: vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,10 +11,10 @@ #define liblldb_StructuredDataImpl_h_ #include "lldb/Core/Event.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Target/StructuredDataPlugin.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/Stream.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" #include "llvm/ADT/StringRef.h" Modified: vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h Sat Jul 1 13:24:58 2017 (r320543) @@ -24,8 +24,8 @@ #include "lldb/lldb-public.h" #include "lldb/Core/FormatEntity.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { class TypeSummaryOptions { Modified: vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h Sat Jul 1 13:24:58 2017 (r320543) @@ -25,8 +25,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-public.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/ValueObject.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { class SyntheticChildrenFrontEnd { Modified: vendor/lldb/dist/include/lldb/Host/File.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/File.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/File.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,8 +10,8 @@ #ifndef liblldb_File_h_ #define liblldb_File_h_ -#include "lldb/Host/IOObject.h" #include "lldb/Host/PosixApi.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Host/Host.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Host.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/Host.h Sat Jul 1 13:24:58 2017 (r320543) @@ -238,6 +238,9 @@ class Host { (public) uint32_t line_no); static size_t GetEnvironment(StringList &env); + + static std::unique_ptr + CreateDefaultConnection(llvm::StringRef url); }; } // namespace lldb_private Modified: vendor/lldb/dist/include/lldb/Host/MainLoopBase.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/MainLoopBase.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/MainLoopBase.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,12 +10,10 @@ #ifndef lldb_Host_posix_MainLoopBase_h_ #define lldb_Host_posix_MainLoopBase_h_ -#include - -#include "llvm/Support/ErrorHandling.h" - -#include "lldb/Host/IOObject.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" +#include "llvm/Support/ErrorHandling.h" +#include namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/Socket.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Socket.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/Socket.h Sat Jul 1 13:24:58 2017 (r320543) @@ -15,9 +15,9 @@ #include "lldb/lldb-private.h" -#include "lldb/Host/IOObject.h" #include "lldb/Host/Predicate.h" #include "lldb/Host/SocketAddress.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" #ifdef _WIN32 Modified: vendor/lldb/dist/include/lldb/Host/XML.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/XML.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/XML.h Sat Jul 1 13:24:58 2017 (r320543) @@ -24,8 +24,8 @@ #include "llvm/ADT/StringRef.h" // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/StreamString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,10 +10,10 @@ #ifndef liblldb_NativeProcessProtocol_h_ #define liblldb_NativeProcessProtocol_h_ -#include "lldb/Core/TraceOptions.h" #include "lldb/Host/Host.h" #include "lldb/Host/MainLoop.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/TraceOptions.h" #include "lldb/lldb-private-forward.h" #include "lldb/lldb-types.h" #include "llvm/ADT/ArrayRef.h" @@ -333,7 +333,7 @@ class NativeProcessProtocol (public) //------------------------------------------------------------------ /// StopTracing API as the name suggests stops a tracing instance. /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the trace intended to be stopped. Now a /// user_id may map to multiple threads in which case this API /// could be used to stop the tracing for a specific thread by @@ -346,7 +346,7 @@ class NativeProcessProtocol (public) /// @return /// Status indicating what went wrong. //------------------------------------------------------------------ - virtual Status StopTrace(lldb::user_id_t uid, + virtual Status StopTrace(lldb::user_id_t traceid, lldb::tid_t thread = LLDB_INVALID_THREAD_ID) { return Status("Not implemented"); } @@ -355,8 +355,8 @@ class NativeProcessProtocol (public) /// This API provides the trace data collected in the form of raw /// data. /// - /// @param[in] uid thread - /// The uid and thread provide the context for the trace + /// @param[in] traceid thread + /// The traceid and thread provide the context for the trace /// instance. /// /// @param[in] buffer @@ -372,7 +372,7 @@ class NativeProcessProtocol (public) /// @return /// The size of the data actually read. //------------------------------------------------------------------ - virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -382,7 +382,7 @@ class NativeProcessProtocol (public) /// Similar API as above except it aims to provide any extra data /// useful for decoding the actual trace data. //------------------------------------------------------------------ - virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetMetaData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -391,7 +391,7 @@ class NativeProcessProtocol (public) //------------------------------------------------------------------ /// API to query the TraceOptions for a given user id /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the tracing instance. /// /// @param[in] config @@ -405,7 +405,7 @@ class NativeProcessProtocol (public) /// @param[out] config /// The actual configuration being used for tracing. //------------------------------------------------------------------ - virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &config) { + virtual Status GetTraceConfig(lldb::user_id_t traceid, TraceOptions &config) { return Status("Not implemented"); } Modified: vendor/lldb/dist/include/lldb/Host/linux/Support.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/linux/Support.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/linux/Support.h Sat Jul 1 13:24:58 2017 (r320543) @@ -22,6 +22,9 @@ getProcFile(::pid_t pid, ::pid_t tid, const llvm::Twin llvm::ErrorOr> getProcFile(::pid_t pid, const llvm::Twine &file); +llvm::ErrorOr> +getProcFile(const llvm::Twine &file); + } // namespace lldb_private #endif // #ifndef LLDB_HOST_LINUX_SUPPORT_H Modified: vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sat Jul 1 13:24:58 2017 (r320543) @@ -19,10 +19,10 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Connection.h" -#include "lldb/Host/IOObject.h" #include "lldb/Host/Pipe.h" #include "lldb/Host/Predicate.h" +#include "lldb/Utility/Connection.h" +#include "lldb/Utility/IOObject.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,8 +10,8 @@ #ifndef liblldb_Host_windows_ConnectionGenericFileWindows_h_ #define liblldb_Host_windows_ConnectionGenericFileWindows_h_ -#include "lldb/Core/Connection.h" #include "lldb/Host/windows/windows.h" +#include "lldb/Utility/Connection.h" #include "lldb/lldb-types.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h ============================================================================== --- vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h Sat Jul 1 13:24:58 2017 (r320543) @@ -19,8 +19,8 @@ #include "lldb/Breakpoint/BreakpointOptions.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Host/PseudoTerminal.h" Modified: vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -34,11 +34,12 @@ namespace lldb_private { class DWARFCallFrameInfo { public: - DWARFCallFrameInfo(ObjectFile &objfile, lldb::SectionSP §ion, - lldb::RegisterKind reg_kind, bool is_eh_frame); + enum Type { EH, DWARF }; - ~DWARFCallFrameInfo(); + DWARFCallFrameInfo(ObjectFile &objfile, lldb::SectionSP §ion, Type type); + ~DWARFCallFrameInfo() = default; + // Locate an AddressRange that includes the provided Address in this // object's eh_frame/debug_info // Returns true if a range is found to cover that address. @@ -74,12 +75,20 @@ class DWARFCallFrameInfo { (public) private: enum { CFI_AUG_MAX_SIZE = 8, CFI_HEADER_SIZE = 8 }; + enum CFIVersion { + CFI_VERSION1 = 1, // DWARF v.2 + CFI_VERSION3 = 3, // DWARF v.3 + CFI_VERSION4 = 4 // DWARF v.4, v.5 + }; struct CIE { dw_offset_t cie_offset; uint8_t version; char augmentation[CFI_AUG_MAX_SIZE]; // This is typically empty or very // short. + uint8_t address_size = sizeof(uint32_t); // The size of a target address. + uint8_t segment_size = 0; // The size of a segment selector. + uint32_t code_align; int32_t data_align; uint32_t return_addr_reg_num; @@ -134,21 +143,24 @@ class DWARFCallFrameInfo { (public) ObjectFile &m_objfile; lldb::SectionSP m_section_sp; - lldb::RegisterKind m_reg_kind; - Flags m_flags; + Flags m_flags = 0; cie_map_t m_cie_map; DataExtractor m_cfi_data; - bool m_cfi_data_initialized; // only copy the section into the DE once + bool m_cfi_data_initialized = false; // only copy the section into the DE once FDEEntryMap m_fde_index; - bool m_fde_index_initialized; // only scan the section for FDEs once + bool m_fde_index_initialized = false; // only scan the section for FDEs once std::mutex m_fde_index_mutex; // and isolate the thread that does it - bool m_is_eh_frame; + Type m_type; CIESP ParseCIE(const uint32_t cie_offset); + + lldb::RegisterKind GetRegisterKind() const { + return m_type == EH ? lldb::eRegisterKindEHFrame : lldb::eRegisterKindDWARF; + } }; } // namespace lldb_private Modified: vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h Sat Jul 1 13:24:58 2017 (r320543) @@ -99,6 +99,13 @@ class FuncUnwinders { (public) Thread &thread, int current_offset); + lldb::UnwindPlanSP GetDebugFrameUnwindPlan(Target &target, + int current_offset); + + lldb::UnwindPlanSP GetDebugFrameAugmentedUnwindPlan(Target &target, + Thread &thread, + int current_offset); + lldb::UnwindPlanSP GetCompactUnwindUnwindPlan(Target &target, int current_offset); @@ -126,10 +133,12 @@ class FuncUnwinders { (public) lldb::UnwindPlanSP m_unwind_plan_assembly_sp; lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp; - lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp; // augmented by - // assembly inspection - // so it's valid - // everywhere + lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp; + + // augmented by assembly inspection so it's valid everywhere + lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp; + lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp; + std::vector m_unwind_plan_compact_unwind; lldb::UnwindPlanSP m_unwind_plan_arm_unwind_sp; lldb::UnwindPlanSP m_unwind_plan_fast_sp; @@ -139,7 +148,9 @@ class FuncUnwinders { (public) // Fetching the UnwindPlans can be expensive - if we've already attempted // to get one & failed, don't try again. bool m_tried_unwind_plan_assembly : 1, m_tried_unwind_plan_eh_frame : 1, + m_tried_unwind_plan_debug_frame : 1, m_tried_unwind_plan_eh_frame_augmented : 1, + m_tried_unwind_plan_debug_frame_augmented : 1, m_tried_unwind_plan_compact_unwind : 1, m_tried_unwind_plan_arm_unwind : 1, m_tried_unwind_fast : 1, m_tried_unwind_arch_default : 1, Modified: vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h Sat Jul 1 13:24:58 2017 (r320543) @@ -27,6 +27,7 @@ class UnwindTable { (public) ~UnwindTable(); lldb_private::DWARFCallFrameInfo *GetEHFrameInfo(); + lldb_private::DWARFCallFrameInfo *GetDebugFrameInfo(); lldb_private::CompactUnwindInfo *GetCompactUnwindInfo(); @@ -58,6 +59,8 @@ class UnwindTable { (public) void Dump(Stream &s); void Initialize(); + llvm::Optional GetAddressRange(const Address &addr, + SymbolContext &sc); typedef std::map collection; typedef collection::iterator iterator; @@ -70,6 +73,7 @@ class UnwindTable { (public) std::mutex m_mutex; std::unique_ptr m_eh_frame_up; + std::unique_ptr m_debug_frame_up; std::unique_ptr m_compact_unwind_up; std::unique_ptr m_arm_unwind_up; Modified: vendor/lldb/dist/include/lldb/Target/ABI.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ABI.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ABI.h Sat Jul 1 13:24:58 2017 (r320543) @@ -92,6 +92,16 @@ class ABI : public PluginInterface { (protected) virtual lldb::ValueObjectSP GetReturnValueObjectImpl(Thread &thread, llvm::Type &ir_type) const; + //------------------------------------------------------------------ + /// Request to get a Process shared pointer. + /// + /// This ABI object may not have been created with a Process object, + /// or the Process object may no longer be alive. Be sure to handle + /// the case where the shared pointer returned does not have an + /// object inside it. + //------------------------------------------------------------------ + lldb::ProcessSP GetProcessSP() const { return m_process_wp.lock(); } + public: virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) = 0; @@ -131,13 +141,18 @@ class ABI : public PluginInterface { (protected) virtual bool GetPointerReturnRegister(const char *&name) { return false; } - static lldb::ABISP FindPlugin(const ArchSpec &arch); + static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch); protected: //------------------------------------------------------------------ // Classes that inherit from ABI can see and modify these //------------------------------------------------------------------ - ABI(); + ABI(lldb::ProcessSP process_sp) { + if (process_sp.get()) + m_process_wp = process_sp; + } + + lldb::ProcessWP m_process_wp; private: DISALLOW_COPY_AND_ASSIGN(ABI); Modified: vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h Sat Jul 1 13:24:58 2017 (r320543) @@ -18,7 +18,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-forward.h" #include "lldb/lldb-private.h" #include "lldb/lldb-types.h" Modified: vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -16,8 +16,8 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/StopInfo.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/Process.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/Process.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/Process.h Sat Jul 1 13:24:58 2017 (r320543) @@ -34,9 +34,7 @@ #include "lldb/Core/Listener.h" #include "lldb/Core/LoadedModuleInfoList.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/ThreadSafeValue.h" -#include "lldb/Core/TraceOptions.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ProcessRunLock.h" @@ -50,6 +48,8 @@ #include "lldb/Target/ThreadList.h" #include "lldb/Utility/NameMatches.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" +#include "lldb/Utility/TraceOptions.h" #include "lldb/lldb-private.h" #include "llvm/ADT/ArrayRef.h" Modified: vendor/lldb/dist/include/lldb/Target/StopInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/StopInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/StopInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -16,8 +16,8 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-public.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,7 +11,7 @@ #define StructuredDataPlugin_h #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/SystemRuntime.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/SystemRuntime.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/SystemRuntime.h Sat Jul 1 13:24:58 2017 (r320543) @@ -18,10 +18,10 @@ #include "lldb/Core/ModuleList.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Target/QueueItem.h" #include "lldb/Target/QueueList.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" #include "lldb/lldb-public.h" Modified: vendor/lldb/dist/include/lldb/Target/Thread.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/Thread.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/Thread.h Sat Jul 1 13:24:58 2017 (r320543) @@ -21,11 +21,11 @@ // Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Event.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/RegisterCheckpoint.h" #include "lldb/Target/StackFrameList.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h Sat Jul 1 13:24:58 2017 (r320543) @@ -17,13 +17,13 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/Process.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanTracer.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Target/ThreadSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadSpec.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ThreadSpec.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,13 +10,9 @@ #ifndef liblldb_ThreadSpec_h_ #define liblldb_ThreadSpec_h_ -// C Includes -// C++ Includes -#include - -// Other libraries and framework includes -// Project includes +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" +#include namespace lldb_private { Added: vendor/lldb/dist/include/lldb/Utility/Connection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/Connection.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,212 @@ +//===-- Connection.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Connection_h_ +#define liblldb_Connection_h_ + +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ConnectionStatus +#include "lldb/lldb-forward.h" // for IOObjectSP + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include // for micro +#include + +#include // for size_t + +namespace lldb_private { +class Status; +} +namespace lldb_private { +template class Timeout; +} + +namespace lldb_private { + +//---------------------------------------------------------------------- +/// @class Connection Connection.h "lldb/Utility/Connection.h" +/// @brief A communication connection class. +/// +/// A class that implements that actual communication functions for +/// connecting/disconnecting, reading/writing, and waiting for bytes +/// to become available from a two way communication connection. +/// +/// This class is designed to only do very simple communication +/// functions. Instances can be instantiated and given to a +/// Communication class to perform communications where clients can +/// listen for broadcasts, and perform other higher level communications. +//---------------------------------------------------------------------- +class Connection { +public: + //------------------------------------------------------------------ + /// Default constructor + //------------------------------------------------------------------ + Connection() = default; + + //------------------------------------------------------------------ + /// Virtual destructor since this class gets subclassed and handed + /// to a Communication object. + //------------------------------------------------------------------ + virtual ~Connection(); + + //------------------------------------------------------------------ + /// Connect using the connect string \a url. + /// + /// @param[in] url + /// A string that contains all information needed by the + /// subclass to connect to another client. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns false. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// \b True if the connect succeeded, \b false otherwise. The + /// internal error object should be filled in with an + /// appropriate value based on the result of this function. + /// + /// @see Status& Communication::GetError (); + //------------------------------------------------------------------ + virtual lldb::ConnectionStatus Connect(llvm::StringRef url, + Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Disconnect the communications connection if one is currently + /// connected. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns false. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// \b True if the disconnect succeeded, \b false otherwise. The + /// internal error object should be filled in with an + /// appropriate value based on the result of this function. + /// + /// @see Status& Communication::GetError (); + //------------------------------------------------------------------ + virtual lldb::ConnectionStatus Disconnect(Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Check if the connection is valid. + /// + /// @return + /// \b True if this object is currently connected, \b false + /// otherwise. + //------------------------------------------------------------------ + virtual bool IsConnected() const = 0; + + //------------------------------------------------------------------ + /// The read function that attempts to read from the connection. + /// + /// @param[in] dst + /// A destination buffer that must be at least \a dst_len bytes + /// long. + /// + /// @param[in] dst_len + /// The number of bytes to attempt to read, and also the max + /// number of bytes that can be placed into \a dst. + /// + /// @param[in] timeout + /// The number of microseconds to wait for the data. + /// + /// @param[out] status + /// On return, indicates whether the call was successful or terminated + /// due to some error condition. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns zero. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// The number of bytes actually read. + /// + /// @see size_t Communication::Read (void *, size_t, uint32_t); + //------------------------------------------------------------------ + virtual size_t Read(void *dst, size_t dst_len, + const Timeout &timeout, + lldb::ConnectionStatus &status, Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// The actual write function that attempts to write to the + /// communications protocol. + /// + /// Subclasses must override this function. + /// + /// @param[in] dst + /// A desination buffer that must be at least \a dst_len bytes + /// long. + /// + /// @param[in] dst_len + /// The number of bytes to attempt to write, and also the + /// number of bytes are currently available in \a dst. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns zero. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// The number of bytes actually Written. + //------------------------------------------------------------------ + virtual size_t Write(const void *dst, size_t dst_len, + lldb::ConnectionStatus &status, Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Returns a URI that describes this connection object + /// + /// Subclasses may override this function. + /// + /// @return + /// Returns URI or an empty string if disconnecteds + //------------------------------------------------------------------ + virtual std::string GetURI() = 0; + + //------------------------------------------------------------------ + /// Interrupts an ongoing Read() operation. + /// + /// If there is an ongoing read operation in another thread, this operation + /// return with status == eConnectionStatusInterrupted. Note that if there + /// data waiting to be read and an interrupt request is issued, the Read() + /// function will return the data immediately without processing the + /// interrupt request (which will remain queued for the next Read() + /// operation). + /// + /// @return + /// Returns true is the interrupt request was successful. + //------------------------------------------------------------------ + virtual bool InterruptRead() = 0; + + //------------------------------------------------------------------ + /// Returns the underlying IOObject used by the Connection. + /// + /// The IOObject can be used to wait for data to become available + /// on the connection. If the Connection does not use IOObjects (and + /// hence does not support waiting) this function should return a + /// null pointer. + /// + /// @return + /// The underlying IOObject used for reading. + //------------------------------------------------------------------ + virtual lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); } + +private: + //------------------------------------------------------------------ + // For Connection only + //------------------------------------------------------------------ + DISALLOW_COPY_AND_ASSIGN(Connection); +}; + +} // namespace lldb_private + +#endif // liblldb_Connection_h_ Added: vendor/lldb/dist/include/lldb/Utility/IOObject.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/IOObject.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,56 @@ +//===-- IOObject.h ----------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Host_Common_IOObject_h_ +#define liblldb_Host_Common_IOObject_h_ + +#include +#include +#include + +#include "lldb/lldb-private.h" + +namespace lldb_private { + +class IOObject { +public: + typedef enum { + eFDTypeFile, // Other FD requiring read/write + eFDTypeSocket, // Socket requiring send/recv + } FDType; + + // TODO: On Windows this should be a HANDLE, and wait should use + // WaitForMultipleObjects + typedef int WaitableHandle; + static const WaitableHandle kInvalidHandleValue; + + IOObject(FDType type, bool should_close) + : m_fd_type(type), m_should_close_fd(should_close) {} + virtual ~IOObject(); + + virtual Status Read(void *buf, size_t &num_bytes) = 0; + virtual Status Write(const void *buf, size_t &num_bytes) = 0; + virtual bool IsValid() const = 0; + virtual Status Close() = 0; + + FDType GetFdType() const { return m_fd_type; } + + virtual WaitableHandle GetWaitableHandle() = 0; + +protected: + FDType m_fd_type; + bool m_should_close_fd; // True if this class should close the file descriptor + // when it goes away. + +private: + DISALLOW_COPY_AND_ASSIGN(IOObject); +}; +} // namespace lldb_private + +#endif Modified: vendor/lldb/dist/include/lldb/Utility/JSON.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/JSON.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Utility/JSON.h Sat Jul 1 13:24:58 2017 (r320543) @@ -269,7 +269,7 @@ class JSONParser : public StringExtractor { (public) EndOfFile }; - JSONParser(const char *cstr); + JSONParser(llvm::StringRef data); int GetEscapedChar(bool &was_escaped); Added: vendor/lldb/dist/include/lldb/Utility/StructuredData.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/StructuredData.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,556 @@ +//===-- StructuredData.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_StructuredData_h_ +#define liblldb_StructuredData_h_ + +#include "llvm/ADT/StringRef.h" + +#include "lldb/Utility/ConstString.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-enumerations.h" // for StructuredDataType + +#include // for assert +#include // for size_t +#include // for uint64_t +#include +#include +#include +#include +#include // for move +#include +#include + +namespace lldb_private { +class Status; +} +namespace lldb_private { +class Stream; +} + +namespace lldb_private { + +//---------------------------------------------------------------------- +/// @class StructuredData StructuredData.h "lldb/Utility/StructuredData.h" +/// @brief A class which can hold structured data +/// +/// The StructuredData class is designed to hold the data from a JSON +/// or plist style file -- a serialized data structure with dictionaries +/// (maps, hashes), arrays, and concrete values like integers, floating +/// point numbers, strings, booleans. +/// +/// StructuredData does not presuppose any knowledge of the schema for +/// the data it is holding; it can parse JSON data, for instance, and +/// other parts of lldb can iterate through the parsed data set to find +/// keys and values that may be present. +//---------------------------------------------------------------------- + +class StructuredData { +public: + class Object; + class Array; + class Integer; + class Float; + class Boolean; + class String; + class Dictionary; + class Generic; + + typedef std::shared_ptr ObjectSP; + typedef std::shared_ptr ArraySP; + typedef std::shared_ptr IntegerSP; + typedef std::shared_ptr FloatSP; + typedef std::shared_ptr BooleanSP; + typedef std::shared_ptr StringSP; + typedef std::shared_ptr DictionarySP; + typedef std::shared_ptr GenericSP; + + class Object : public std::enable_shared_from_this { + public: + Object(lldb::StructuredDataType t = lldb::eStructuredDataTypeInvalid) + : m_type(t) {} + + virtual ~Object() = default; + + virtual bool IsValid() const { return true; } + + virtual void Clear() { m_type = lldb::eStructuredDataTypeInvalid; } + + lldb::StructuredDataType GetType() const { return m_type; } + + void SetType(lldb::StructuredDataType t) { m_type = t; } + + Array *GetAsArray() { + return ((m_type == lldb::eStructuredDataTypeArray) + ? static_cast(this) + : nullptr); + } + + Dictionary *GetAsDictionary() { + return ((m_type == lldb::eStructuredDataTypeDictionary) + ? static_cast(this) + : nullptr); + } + + Integer *GetAsInteger() { + return ((m_type == lldb::eStructuredDataTypeInteger) + ? static_cast(this) + : nullptr); + } + + uint64_t GetIntegerValue(uint64_t fail_value = 0) { + Integer *integer = GetAsInteger(); + return ((integer != nullptr) ? integer->GetValue() : fail_value); + } + + Float *GetAsFloat() { + return ((m_type == lldb::eStructuredDataTypeFloat) + ? static_cast(this) + : nullptr); + } + + double GetFloatValue(double fail_value = 0.0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 1 13:25:08 2017 Return-Path: Delivered-To: svn-src-all@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 201CBD899F9; Sat, 1 Jul 2017 13:25:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CA8A81056; Sat, 1 Jul 2017 13:25:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DP6n3022635; Sat, 1 Jul 2017 13:25:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DP6Ki022634; Sat, 1 Jul 2017 13:25:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011325.v61DP6Ki022634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320544 - vendor/lldb/lldb-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-trunk-r306956 X-SVN-Commit-Revision: 320544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:25:08 -0000 Author: dim Date: Sat Jul 1 13:25:06 2017 New Revision: 320544 URL: https://svnweb.freebsd.org/changeset/base/320544 Log: Tag lldb trunk r306956. Added: vendor/lldb/lldb-trunk-r306956/ - copied from r320543, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Jul 1 15:58:58 2017 Return-Path: Delivered-To: svn-src-all@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 D1DDBD8D111; Sat, 1 Jul 2017 15:58:58 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A188066049; Sat, 1 Jul 2017 15:58:58 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61FwvPY084613; Sat, 1 Jul 2017 15:58:57 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61Fwv0n084612; Sat, 1 Jul 2017 15:58:57 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201707011558.v61Fwv0n084612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 1 Jul 2017 15:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320545 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 320545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 15:58:58 -0000 Author: jah Date: Sat Jul 1 15:58:57 2017 New Revision: 320545 URL: https://svnweb.freebsd.org/changeset/base/320545 Log: Bump __FreeBSD_version due to r320528, cleanup and inlining of bus_dmamap* functions. Reported by: David Wolfskill Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Jul 1 13:25:06 2017 (r320544) +++ head/sys/sys/param.h Sat Jul 1 15:58:57 2017 (r320545) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200036 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200037 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sat Jul 1 16:42:11 2017 Return-Path: Delivered-To: svn-src-all@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 2DC88D8DF25; Sat, 1 Jul 2017 16:42:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E63E567407; Sat, 1 Jul 2017 16:42:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61Gg9p5005064; Sat, 1 Jul 2017 16:42:09 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61Gg9f6005062; Sat, 1 Jul 2017 16:42:09 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707011642.v61Gg9f6005062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 16:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320546 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 320546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 16:42:11 -0000 Author: alc Date: Sat Jul 1 16:42:09 2017 New Revision: 320546 URL: https://svnweb.freebsd.org/changeset/base/320546 Log: When "force" is specified to pmap_invalidate_cache_range(), the given start address is not required to be page aligned. However, the loop within pmap_invalidate_cache_range() that performs the actual cache line invalidations requires that the starting address be truncated to a multiple of the cache line size. This change corrects an error in that truncation. Submitted by: Brett Gutstein Reviewed by: kib MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jul 1 15:58:57 2017 (r320545) +++ head/sys/amd64/amd64/pmap.c Sat Jul 1 16:42:09 2017 (r320546) @@ -1868,7 +1868,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset { if (force) { - sva &= ~(vm_offset_t)cpu_clflush_line_size; + sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); } else { KASSERT((sva & PAGE_MASK) == 0, ("pmap_invalidate_cache_range: sva not page-aligned")); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jul 1 15:58:57 2017 (r320545) +++ head/sys/i386/i386/pmap.c Sat Jul 1 16:42:09 2017 (r320546) @@ -1289,7 +1289,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset { if (force) { - sva &= ~(vm_offset_t)cpu_clflush_line_size; + sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); } else { KASSERT((sva & PAGE_MASK) == 0, ("pmap_invalidate_cache_range: sva not page-aligned")); From owner-svn-src-all@freebsd.org Sat Jul 1 18:48:17 2017 Return-Path: Delivered-To: svn-src-all@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 34BBAD900C9; Sat, 1 Jul 2017 18:48:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E6C2C6E168; Sat, 1 Jul 2017 18:48:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61ImG0X053878; Sat, 1 Jul 2017 18:48:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61ImFlR053875; Sat, 1 Jul 2017 18:48:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707011848.v61ImFlR053875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 1 Jul 2017 18:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320547 - in head/sys/boot: arm/uboot efi/boot1 efi/loader X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/boot: arm/uboot efi/boot1 efi/loader X-SVN-Commit-Revision: 320547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 18:48:17 -0000 Author: emaste Date: Sat Jul 1 18:48:15 2017 New Revision: 320547 URL: https://svnweb.freebsd.org/changeset/base/320547 Log: Link EFI/uboot loaders with -znotext By default LLD links with relocations disallowed against readonly sections (e.g., .text), but the 32-bit ARM EFI & uboot boot bits require such relocations. -znotext is either ignored as an unknown -z option (in-tree lld 2.17.50) or is already the default (GNU ld or GNU gold from ports) so we can just add it unconditionally to allow building with LLD. This is similar to the change in r320179 for the kernel link. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/arm/uboot/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -100,6 +100,7 @@ CLEANFILES+= loader.help CFLAGS+= -ffreestanding -msoft-float LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +LDFLAGS+= -Wl,-znotext # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/efi/boot1/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -68,7 +68,7 @@ FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE} -LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared +LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/efi/loader/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -116,7 +116,7 @@ FILES+= loader.efi FILESMODE_loader.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE} -LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared +LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared CLEANFILES+= loader.efi From owner-svn-src-all@freebsd.org Sat Jul 1 19:06:16 2017 Return-Path: Delivered-To: svn-src-all@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 13BB1D90469; Sat, 1 Jul 2017 19:06:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D71656E824; Sat, 1 Jul 2017 19:06:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61J6FIU061865; Sat, 1 Jul 2017 19:06:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61J6F0n061864; Sat, 1 Jul 2017 19:06:15 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707011906.v61J6F0n061864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 19:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320548 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 19:06:16 -0000 Author: alc Date: Sat Jul 1 19:06:14 2017 New Revision: 320548 URL: https://svnweb.freebsd.org/changeset/base/320548 Log: MFC r319605 The variable "breakout" is used like a Boolean, so actually define it as one. Modified: stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Sat Jul 1 18:48:15 2017 (r320547) +++ stable/11/sys/vm/vm_pageout.c Sat Jul 1 19:06:14 2017 (r320548) @@ -1802,6 +1802,7 @@ vm_pageout_oom(int shortage) vm_offset_t size, bigsize; struct thread *td; struct vmspace *vm; + bool breakout; /* * We keep the process bigproc locked once we find it to keep anyone @@ -1815,8 +1816,6 @@ vm_pageout_oom(int shortage) bigsize = 0; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - int breakout; - PROC_LOCK(p); /* @@ -1833,7 +1832,7 @@ vm_pageout_oom(int shortage) * If the process is in a non-running type state, * don't touch it. Check all the threads individually. */ - breakout = 0; + breakout = false; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (!TD_ON_RUNQ(td) && @@ -1842,7 +1841,7 @@ vm_pageout_oom(int shortage) !TD_IS_SUSPENDED(td) && !TD_IS_SWAPPED(td)) { thread_unlock(td); - breakout = 1; + breakout = true; break; } thread_unlock(td); From owner-svn-src-all@freebsd.org Sat Jul 1 19:11:00 2017 Return-Path: Delivered-To: svn-src-all@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 C10FBD90539; Sat, 1 Jul 2017 19:11:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8702B6E9D3; Sat, 1 Jul 2017 19:11:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61JAxGI062750; Sat, 1 Jul 2017 19:10:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61JAxFU062749; Sat, 1 Jul 2017 19:10:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707011910.v61JAxFU062749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 1 Jul 2017 19:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320549 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 320549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 19:11:00 -0000 Author: emaste Date: Sat Jul 1 19:10:59 2017 New Revision: 320549 URL: https://svnweb.freebsd.org/changeset/base/320549 Log: Do not build clang for all riscv*, not just riscv64 Previous test matching on "riscv64" was invalidated by the addition of riscv64sf. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Jul 1 19:06:14 2017 (r320548) +++ head/share/mk/src.opts.mk Sat Jul 1 19:10:59 2017 (r320549) @@ -222,7 +222,7 @@ __TT=${MACHINE} # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC -.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64" +.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. From owner-svn-src-all@freebsd.org Sat Jul 1 19:24:55 2017 Return-Path: Delivered-To: svn-src-all@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 4261DD90AC7; Sat, 1 Jul 2017 19:24:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0C3F56F088; Sat, 1 Jul 2017 19:24:54 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61JOsje070118; Sat, 1 Jul 2017 19:24:54 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61JOshm070117; Sat, 1 Jul 2017 19:24:54 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707011924.v61JOshm070117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 19:24: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: r320550 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 19:24:55 -0000 Author: alc Date: Sat Jul 1 19:24:53 2017 New Revision: 320550 URL: https://svnweb.freebsd.org/changeset/base/320550 Log: MFC r319605 The variable "breakout" is used like a Boolean, so actually define it as one. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Sat Jul 1 19:10:59 2017 (r320549) +++ stable/10/sys/vm/vm_pageout.c Sat Jul 1 19:24:53 2017 (r320550) @@ -1611,6 +1611,7 @@ vm_pageout_oom(int shortage) vm_offset_t size, bigsize; struct thread *td; struct vmspace *vm; + bool breakout; /* * We keep the process bigproc locked once we find it to keep anyone @@ -1624,8 +1625,6 @@ vm_pageout_oom(int shortage) bigsize = 0; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - int breakout; - PROC_LOCK(p); /* @@ -1642,7 +1641,7 @@ vm_pageout_oom(int shortage) * If the process is in a non-running type state, * don't touch it. Check all the threads individually. */ - breakout = 0; + breakout = false; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (!TD_ON_RUNQ(td) && @@ -1651,7 +1650,7 @@ vm_pageout_oom(int shortage) !TD_IS_SUSPENDED(td) && !TD_IS_SWAPPED(td)) { thread_unlock(td); - breakout = 1; + breakout = true; break; } thread_unlock(td); From owner-svn-src-all@freebsd.org Sat Jul 1 19:47:14 2017 Return-Path: Delivered-To: svn-src-all@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 CA1C6D90FFA; Sat, 1 Jul 2017 19:47:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 996966F96C; Sat, 1 Jul 2017 19:47:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61JlDm5078574; Sat, 1 Jul 2017 19:47:13 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61JlD3f078573; Sat, 1 Jul 2017 19:47:13 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707011947.v61JlD3f078573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 19:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320551 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 19:47:14 -0000 Author: alc Date: Sat Jul 1 19:47:13 2017 New Revision: 320551 URL: https://svnweb.freebsd.org/changeset/base/320551 Log: MFC r320181 Eliminate an unused macro. Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Sat Jul 1 19:24:53 2017 (r320550) +++ stable/11/sys/vm/swap_pager.c Sat Jul 1 19:47:13 2017 (r320551) @@ -133,7 +133,6 @@ __FBSDID("$FreeBSD$"); * Unused disk addresses within a swap area are allocated and managed * using a blist. */ -#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) #define SWAP_META_PAGES (SWB_NPAGES * 2) #define SWAP_META_MASK (SWAP_META_PAGES - 1) From owner-svn-src-all@freebsd.org Sat Jul 1 20:08:47 2017 Return-Path: Delivered-To: svn-src-all@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 0A3EED9163D; Sat, 1 Jul 2017 20:08:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CB9A2701FC; Sat, 1 Jul 2017 20:08:46 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61K8khH086605; Sat, 1 Jul 2017 20:08:46 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61K8k7Y086604; Sat, 1 Jul 2017 20:08:46 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707012008.v61K8k7Y086604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 20:08: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: r320552 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 20:08:47 -0000 Author: alc Date: Sat Jul 1 20:08:45 2017 New Revision: 320552 URL: https://svnweb.freebsd.org/changeset/base/320552 Log: MFC r320181 Eliminate an unused macro. Modified: stable/10/sys/vm/swap_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Sat Jul 1 19:47:13 2017 (r320551) +++ stable/10/sys/vm/swap_pager.c Sat Jul 1 20:08:45 2017 (r320552) @@ -133,7 +133,6 @@ __FBSDID("$FreeBSD$"); * Unused disk addresses within a swap area are allocated and managed * using a blist. */ -#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) #define SWAP_META_PAGES (SWB_NPAGES * 2) #define SWAP_META_MASK (SWAP_META_PAGES - 1) From owner-svn-src-all@freebsd.org Sat Jul 1 20:25:23 2017 Return-Path: Delivered-To: svn-src-all@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 7ED3ED91B76; Sat, 1 Jul 2017 20:25:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4C66A70A56; Sat, 1 Jul 2017 20:25:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61KPMBw094741; Sat, 1 Jul 2017 20:25:22 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61KPMkh094740; Sat, 1 Jul 2017 20:25:22 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707012025.v61KPMkh094740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 1 Jul 2017 20:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320553 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 320553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 20:25:23 -0000 Author: allanjude Date: Sat Jul 1 20:25:22 2017 New Revision: 320553 URL: https://svnweb.freebsd.org/changeset/base/320553 Log: Integer underflow in efipart_realstrategy when I/O starts after end of disk This fixes an integer underflow in efipart_realstrategy, which causes crashes when an I/O operation's start point is after the end of the disk. This can happen when trying to detect filesystems on very small disks. This can occur if a BIOS freebsd-boot partition exists on a system when the EFI loader is being used. PR: 219000 Submitted by: Eric McCorkle Reviewed by: cem (previous version), tsoome (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10559 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Sat Jul 1 20:08:45 2017 (r320552) +++ head/sys/boot/efi/libefi/efipart.c Sat Jul 1 20:25:22 2017 (r320553) @@ -888,6 +888,7 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl char *blkbuf; size_t blkoff, blksz; int error; + size_t diskend, readstart; if (dev == NULL || blk < 0) return (EINVAL); @@ -925,7 +926,15 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl /* make sure we don't read past disk end */ if ((off + size) / blkio->Media->BlockSize > d_offset + disk_blocks) { - size = d_offset + disk_blocks - off / blkio->Media->BlockSize; + diskend = d_offset + disk_blocks; + readstart = off / blkio->Media->BlockSize; + + if (diskend <= readstart) { + *rsize = 0; + + return (EIO); + } + size = diskend - readstart; size = size * blkio->Media->BlockSize; } From owner-svn-src-all@freebsd.org Sat Jul 1 21:18:07 2017 Return-Path: Delivered-To: svn-src-all@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 F16B6D92FE5; Sat, 1 Jul 2017 21:18:07 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BD73E731B2; Sat, 1 Jul 2017 21:18:07 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61LI6as018110; Sat, 1 Jul 2017 21:18:06 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61LI61I018108; Sat, 1 Jul 2017 21:18:06 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707012118.v61LI61I018108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 1 Jul 2017 21:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320554 - in head: lib/libmd sys/modules/crypto X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head: lib/libmd sys/modules/crypto X-SVN-Commit-Revision: 320554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 21:18:08 -0000 Author: allanjude Date: Sat Jul 1 21:18:06 2017 New Revision: 320554 URL: https://svnweb.freebsd.org/changeset/base/320554 Log: Increase loop unrolling for skein hashes This patch was inspired by an opposite change made to shrink the code for the boot loader. On my i7-4770, it increases the skein1024 speed from 470 to 550 MB/s Reviewed by: sbruno MFC after: 1 month Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7824 Modified: head/lib/libmd/Makefile head/sys/modules/crypto/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Sat Jul 1 20:25:22 2017 (r320553) +++ head/lib/libmd/Makefile Sat Jul 1 21:18:06 2017 (r320554) @@ -88,6 +88,8 @@ sys/md5.h: ${SRCTOP}/sys/${.TARGET} .NOMETA CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 CFLAGS+= -I${SRCTOP}/sys/crypto/skein CFLAGS+= -DWEAK_REFS +# unroll the 256 and 512 loops, half unroll the 1024 +CFLAGS+= -DSKEIN_LOOP=995 .PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 .PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} @@ -101,6 +103,8 @@ CFLAGS+= -DRMD160_ASM .endif .if exists(${MACHINE_ARCH}/skein_block_asm.s) AFLAGS += --strip-local-absolute +# Fully unroll all loops in the assembly optimized version +AFLAGS+= --defsym SKEIN_LOOP=0 SRCS+= skein_block_asm.s CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 .endif Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Sat Jul 1 20:25:22 2017 (r320553) +++ head/sys/modules/crypto/Makefile Sat Jul 1 21:18:06 2017 (r320554) @@ -19,11 +19,15 @@ SRCS += camellia.c camellia-api.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha256c.c sha512c.c SRCS += skein.c skein_block.c +# unroll the 256 and 512 loops, half unroll the 1024 +CFLAGS+= -DSKEIN_LOOP=995 .if exists(${MACHINE_ARCH}/skein_block_asm.s) .PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} SRCS += skein_block_asm.s CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 ACFLAGS += -DELF -Wa,--noexecstack +# Fully unroll all loops in the assembly optimized version +AFLAGS+= --defsym SKEIN_LOOP=0 .endif SRCS += siphash.c SRCS += gmac.c gfmult.c From owner-svn-src-all@freebsd.org Sat Jul 1 21:34:58 2017 Return-Path: Delivered-To: svn-src-all@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 D8377D933C0; Sat, 1 Jul 2017 21:34:58 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AE9AA73834; Sat, 1 Jul 2017 21:34:58 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61LYv5K026066; Sat, 1 Jul 2017 21:34:57 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61LYvFc026064; Sat, 1 Jul 2017 21:34:57 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707012134.v61LYvFc026064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 1 Jul 2017 21:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320555 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 320555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 21:34:59 -0000 Author: allanjude Date: Sat Jul 1 21:34:57 2017 New Revision: 320555 URL: https://svnweb.freebsd.org/changeset/base/320555 Log: Add -s (serial) and -p (physpath) to diskinfo Return the bare requested information, intended for scripting. The serial number of a SAS/SCSI device can be returned with 'camcontrol inquiry disk -S', but there is no similar switch for SATA. This provides a way to get this information from both SAS and SATA disks the -s and -p flags are mutually exclusive, and cannot be used with any other flags. Reviewed by: rpokala, wblock MFC after: 1 month Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7828 Modified: head/usr.sbin/diskinfo/diskinfo.8 head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.8 ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.8 Sat Jul 1 21:18:06 2017 (r320554) +++ head/usr.sbin/diskinfo/diskinfo.8 Sat Jul 1 21:34:57 2017 (r320555) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2016 +.Dd July 1, 2017 .Dt DISKINFO 8 .Os .Sh NAME @@ -38,6 +38,12 @@ .Nm .Op Fl citv .Ar disk ... +.Nm +.Op Fl p +.Ar disk ... +.Nm +.Op Fl s +.Ar disk ... .Sh DESCRIPTION The .Nm @@ -52,6 +58,12 @@ Print fields one per line with a descriptive comment. Perform a simple measurement of the I/O read command overhead. .It Fl i Perform a simple IOPS benchmark. +.It Fl p +Return the physical path of the disk. +This is a string that identifies the physical path to the disk in the +storage enclsoure. +.It Fl s +Return the disk serial number .It Fl t Perform a simple and rather naive benchmark of the disks seek and transfer performance. @@ -62,6 +74,13 @@ with the following fields: device name, sectorsize, me media size in sectors, stripe size, stripe offset, firmware cylinders, firmware heads, and firmware sectors. The last three fields are only present if the information is available. +.It Fl i +Return the disk ident, usually the serial number. +.It Fl p +Return the physical path of the disk. +This is a string that identifies the physical path to the disk in the +storage enclsoure. +.El .Sh HISTORY The .Nm Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Sat Jul 1 21:18:06 2017 (r320554) +++ head/usr.sbin/diskinfo/diskinfo.c Sat Jul 1 21:34:57 2017 (r320555) @@ -55,7 +55,7 @@ usage(void) exit (1); } -static int opt_c, opt_i, opt_t, opt_v; +static int opt_c, opt_i, opt_p, opt_s, opt_t, opt_v; static void speeddisk(int fd, off_t mediasize, u_int sectorsize); static void commandtime(int fd, off_t mediasize, u_int sectorsize); @@ -74,7 +74,7 @@ main(int argc, char **argv) u_int sectorsize, fwsectors, fwheads, zoned = 0; uint32_t zone_mode; - while ((ch = getopt(argc, argv, "citv")) != -1) { + while ((ch = getopt(argc, argv, "cipstv")) != -1) { switch (ch) { case 'c': opt_c = 1; @@ -84,6 +84,12 @@ main(int argc, char **argv) opt_i = 1; opt_v = 1; break; + case 'p': + opt_p = 1; + break; + case 's': + opt_s = 1; + break; case 't': opt_t = 1; opt_v = 1; @@ -101,6 +107,11 @@ main(int argc, char **argv) if (argc < 1) usage(); + if ((opt_p && opt_s) || ((opt_p || opt_s) && (opt_c || opt_i || opt_t || opt_v))) { + warnx("-p or -s cannot be used with other options"); + usage(); + } + for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { @@ -124,7 +135,27 @@ main(int argc, char **argv) fwheads = 0; stripesize = sb.st_blksize; stripeoffset = 0; + if (opt_p || opt_s) { + warnx("-p and -s only operate on physical devices: %s", argv[i]); + goto out; + } } else { + if (opt_p) { + if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) { + printf("%s\n", physpath); + } else { + warnx("Failed to determine physpath for: %s", argv[i]); + } + goto out; + } + if (opt_s) { + if (ioctl(fd, DIOCGIDENT, ident) == 0) { + printf("%s\n", ident); + } else { + warnx("Failed to determine serial number for: %s", argv[i]); + } + goto out; + } error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); if (error) { warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); From owner-svn-src-all@freebsd.org Sat Jul 1 21:54:12 2017 Return-Path: Delivered-To: svn-src-all@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 E5720D93A67; Sat, 1 Jul 2017 21:54:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AEE0E740C3; Sat, 1 Jul 2017 21:54:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61LsBaV034168; Sat, 1 Jul 2017 21:54:11 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61LsBFG034167; Sat, 1 Jul 2017 21:54:11 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707012154.v61LsBFG034167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 21:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320556 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 320556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 21:54:13 -0000 Author: alc Date: Sat Jul 1 21:54:11 2017 New Revision: 320556 URL: https://svnweb.freebsd.org/changeset/base/320556 Log: MFC r320049 Pages that are passed to swap_pager_putpages() should already be fully dirty. Assert that they are fully dirty rather than redundantly calling vm_page_dirty() on them. Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Sat Jul 1 21:34:57 2017 (r320555) +++ stable/11/sys/vm/swap_pager.c Sat Jul 1 21:54:11 2017 (r320556) @@ -1370,7 +1370,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *m, mreq->pindex, blk + j ); - vm_page_dirty(mreq); + MPASS(mreq->dirty == VM_PAGE_BITS_ALL); mreq->oflags |= VPO_SWAPINPROG; bp->b_pages[j] = mreq; } From owner-svn-src-all@freebsd.org Sat Jul 1 22:21:12 2017 Return-Path: Delivered-To: svn-src-all@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 C626DD940E2; Sat, 1 Jul 2017 22:21:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8FF9C74BDE; Sat, 1 Jul 2017 22:21:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61MLBmv044664; Sat, 1 Jul 2017 22:21:11 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61MLBcm044663; Sat, 1 Jul 2017 22:21:11 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707012221.v61MLBcm044663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 22:21: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: r320557 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 22:21:12 -0000 Author: alc Date: Sat Jul 1 22:21:11 2017 New Revision: 320557 URL: https://svnweb.freebsd.org/changeset/base/320557 Log: MFC r320049 Pages that are passed to swap_pager_putpages() should already be fully dirty. Assert that they are fully dirty rather than redundantly calling vm_page_dirty() on them. Modified: stable/10/sys/vm/swap_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Sat Jul 1 21:54:11 2017 (r320556) +++ stable/10/sys/vm/swap_pager.c Sat Jul 1 22:21:11 2017 (r320557) @@ -1400,7 +1400,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *m, mreq->pindex, blk + j ); - vm_page_dirty(mreq); + MPASS(mreq->dirty == VM_PAGE_BITS_ALL); rtvals[i+j] = VM_PAGER_OK; mreq->oflags |= VPO_SWAPINPROG; From owner-svn-src-all@freebsd.org Sat Jul 1 22:52:19 2017 Return-Path: Delivered-To: svn-src-all@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 4D00CD9489E; Sat, 1 Jul 2017 22:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1A68475999; Sat, 1 Jul 2017 22:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61MqIoK058349; Sat, 1 Jul 2017 22:52:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61MqIts058346; Sat, 1 Jul 2017 22:52:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707012252.v61MqIts058346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 22:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320558 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 320558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 22:52:19 -0000 Author: kib Date: Sat Jul 1 22:52:17 2017 New Revision: 320558 URL: https://svnweb.freebsd.org/changeset/base/320558 Log: Port PowerPC kqueue(2) compat32 fix in r320500 to MIPS. All 32bit MIPS ABIs align uint64_t on 8-byte. Since struct kevent32 is defined using 32bit types to avoid extra alignment on amd64/i386, layout of the structure needs paddings on PowerPC and apparently MIPS. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D11434 Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32.h Sat Jul 1 22:52:17 2017 (r320558) @@ -141,12 +141,12 @@ struct kevent32 { short filter; /* filter for event */ u_short flags; u_int fflags; -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad0; #endif int32_t data1, data2; uint32_t udata; /* opaque user data identifier */ -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad1; #endif uint32_t ext64[8]; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:52:17 2017 (r320558) @@ -119,10 +119,10 @@ CTASSERT(sizeof(struct statfs32) == 256); CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); -#ifdef __powerpc__ -CTASSERT(sizeof(struct kevent32) == 64); -#else +#ifdef __amd64__ CTASSERT(sizeof(struct kevent32) == 56); +#else +CTASSERT(sizeof(struct kevent32) == 64); #endif CTASSERT(sizeof(struct iovec32) == 8); CTASSERT(sizeof(struct msghdr32) == 28); From owner-svn-src-all@freebsd.org Sat Jul 1 22:54:53 2017 Return-Path: Delivered-To: svn-src-all@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 961A6D94A78; Sat, 1 Jul 2017 22:54:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6064275BA8; Sat, 1 Jul 2017 22:54:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61MsqfI059366; Sat, 1 Jul 2017 22:54:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61MsquI059365; Sat, 1 Jul 2017 22:54:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707012254.v61MsquI059365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 22:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r320559 - releng/11.1/sys/vm X-SVN-Group: releng X-SVN-Commit-Author: kib X-SVN-Commit-Paths: releng/11.1/sys/vm X-SVN-Commit-Revision: 320559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 22:54:53 -0000 Author: kib Date: Sat Jul 1 22:54:52 2017 New Revision: 320559 URL: https://svnweb.freebsd.org/changeset/base/320559 Log: MFC r320316: Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread. Approved by: re (gjb) Modified: releng/11.1/sys/vm/vm_map.c Directory Properties: releng/11.1/ (props changed) Modified: releng/11.1/sys/vm/vm_map.c ============================================================================== --- releng/11.1/sys/vm/vm_map.c Sat Jul 1 22:52:17 2017 (r320558) +++ releng/11.1/sys/vm/vm_map.c Sat Jul 1 22:54:52 2017 (r320559) @@ -2712,9 +2712,6 @@ done: } for (entry = first_entry; entry != &map->header && entry->start < end; entry = entry->next) { - if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) - goto next_entry_done; - /* * If VM_MAP_WIRE_HOLESOK was specified, an empty * space in the unwired region could have been mapped @@ -2722,7 +2719,7 @@ done: * pages or draining MAP_ENTRY_IN_TRANSITION. * Moreover, another thread could be simultaneously * wiring this new mapping entry. Detect these cases - * and skip any entries marked as in transition by us. + * and skip any entries marked as in transition not by us. */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { @@ -2730,6 +2727,9 @@ done: ("vm_map_wire: !HOLESOK and new/changed entry")); continue; } + + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) + goto next_entry_done; if (rv == KERN_SUCCESS) { if (user_wire) From owner-svn-src-all@freebsd.org Sat Jul 1 23:39:51 2017 Return-Path: Delivered-To: svn-src-all@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 90D36D95320; Sat, 1 Jul 2017 23:39:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 550AC76AD0; Sat, 1 Jul 2017 23:39:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61Ndo8S076164; Sat, 1 Jul 2017 23:39:50 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61NdoE9076163; Sat, 1 Jul 2017 23:39:50 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707012339.v61NdoE9076163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 1 Jul 2017 23:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320560 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 320560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 23:39:51 -0000 Author: alc Date: Sat Jul 1 23:39:49 2017 New Revision: 320560 URL: https://svnweb.freebsd.org/changeset/base/320560 Log: Modify vm_map_growstack() to protect itself from the possibility of the gap entry in the vm map being smaller than the sysctl-derived stack guard size. Otherwise, the value of max_grow can suffer from overflow, and the roundup(grow_amount, sgrowsiz) will not be properly capped, resulting in an assertion failure. In collaboration with: kib MFC after: 3 days Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jul 1 22:54:52 2017 (r320559) +++ head/sys/vm/vm_map.c Sat Jul 1 23:39:49 2017 (r320560) @@ -3685,7 +3685,7 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_ma struct vmspace *vm; struct ucred *cred; vm_offset_t gap_end, gap_start, grow_start; - size_t grow_amount, max_grow; + size_t grow_amount, guard, max_grow; rlim_t lmemlim, stacklim, vmemlim; int rv, rv1; bool gap_deleted, grow_down, is_procstack; @@ -3701,6 +3701,7 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_ma MPASS(map == &p->p_vmspace->vm_map); MPASS(!map->system_map); + guard = stack_guard_page * PAGE_SIZE; lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK); stacklim = lim_cur(curthread, RLIMIT_STACK); vmemlim = lim_cur(curthread, RLIMIT_VMEM); @@ -3727,8 +3728,10 @@ retry: } else { return (KERN_FAILURE); } - max_grow = gap_entry->end - gap_entry->start - stack_guard_page * - PAGE_SIZE; + max_grow = gap_entry->end - gap_entry->start; + if (guard > max_grow) + return (KERN_NO_SPACE); + max_grow -= guard; if (grow_amount > max_grow) return (KERN_NO_SPACE);