From owner-svn-src-stable-11@freebsd.org Sun Jan 29 00:32:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A833ECBBC82; Sun, 29 Jan 2017 00:32:29 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E6EAF9C; Sun, 29 Jan 2017 00:32:29 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v0T0WKVk032470; Sat, 28 Jan 2017 16:32:20 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v0T0WHLF032469; Sat, 28 Jan 2017 16:32:17 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201701290032.v0T0WHLF032469@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r312871 - stable/11/share/zoneinfo In-Reply-To: <722a5ab1-f997-fa44-4f67-91430673622d@freebsd.org> To: Julian Elischer Date: Sat, 28 Jan 2017 16:32:17 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:32:29 -0000 > Hi Rod, Hello Julian, > On 27/1/17 11:25 pm, Rodney W. Grimes wrote: > >> Author: julian > >> Date: Fri Jan 27 09:11:44 2017 > >> New Revision: 312871 > >> URL: https://svnweb.freebsd.org/changeset/base/312871 > >> > >> Log: > >> MFH: r308671 > >> > >> When you select make OLDTIMEZONES=1 then you need a few added directories > >> to be made or the command fails > >> > >> Sponsored by: panzura > >> > >> MFH: r310426 > >> > >> If you are going to be run individually to make a new timezone set > >> then ensure the destination directories exist. > >> Especially if you define OLDTIMEZONES because the mtree pass > >> doesn't do it for you. > > Perhaps it is time to start pre-processing mtree files so this > > would no longer be the case? > A much bigger question than I can handle at this time.. :-) Fair enough. I did run (cd /usr/src; find . -name Makefile | xargs grep mkdir | more) to see how much of this has occured, and was happy to see that only a few places. When I did all the early mtree work I had to remove mkdir/chown/chmod's in the Makefiles. > >> Sponsored by: Panzura > >> > >> Modified: > >> stable/11/share/zoneinfo/Makefile > >> Directory Properties: > >> stable/11/ (props changed) > >> > >> Modified: stable/11/share/zoneinfo/Makefile > >> ============================================================================== > >> --- stable/11/share/zoneinfo/Makefile Fri Jan 27 09:07:11 2017 (r312870) > >> +++ stable/11/share/zoneinfo/Makefile Fri Jan 27 09:11:44 2017 (r312871) > >> @@ -67,6 +67,10 @@ TZBUILDSUBDIRS= \ > >> Pacific \ > >> SystemV > >> > >> +.if defined(OLDTIMEZONES) > >> +TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil > >> +.endif > >> + > >> .if !defined(_SKIP_BUILD) > >> all: zoneinfo > >> .endif > >> @@ -81,6 +85,8 @@ zoneinfo: yearistype ${TDATA} > >> > >> beforeinstall: install-zoneinfo > >> install-zoneinfo: > >> + mkdir -p ${DESTDIR}/usr/share/zoneinfo > >> + cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > This has the failure mode that your current uid and umask, etc are > > used in creating the directories. Please add appropriate chown/chmod > > commands to reflect what mtree would of done had it done this. > This is mostly because it failed when run as an individual operation > to update zoninfo files. I think it would also fail on a complete installworld if you had OLDTIMEZONES set would it not? > which would probably be done as root, or someone who wants the files > owned by them. > You can't write here unless you are root, so I'm not sure what the > right thing to do would be. > and chown doesn't work if you are not root, so what would you suggest? This is an install phase thing, so is only expected to work as root, and hence should be coded assuming it is running as root, so chown/chmod are fine, though still a sic bandaide. > (what is needed for the offline permissions tool)? > should we assume ${DESTDIR}/usr/share exists already? Probably, I dont like the -p on mkdir cause if any of the components are missing you can easy create ones with wrong permissions using this. > > the following might be a very slight improvement, but ... > > mkdir -p -m 755 ${DESTDIR}/usr/share Never, clearly the space of etc/mtree/BSD.usr.dist, and if this directoy does not exist your make install SHOULD fail. > mkdir -p -m 755 ${DESTDIR}/usr/share/zoneinfo Ditto > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p -m 755 ${TZBUILDSUBDIRS} This one I am ok with. Though I think the code in the Makefile already does a umask override so not sure what is going on now. > -cd ${DESTDIR}/usr/share/zoneinfo; chown -R ${BINOWN}:${BINGRP} . < would fail if you are not root. No need for the -, it should fail if you are not root, running install as non root inside /usr/src has never been supported. Another, simple, and cleaner solution would be to write etc/mtree/BSD.oldtz, properly populate it, and invoke it, when appropriate, from the make hierarchy target. Sorry you stumbled into one of my pedantic things about the src tree not having mkdir -p in the Makefiles. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-11@freebsd.org Sun Jan 29 10:33:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5DB9CC6DE7; Sun, 29 Jan 2017 10:33:43 +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 A7E83200; Sun, 29 Jan 2017 10:33:43 +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 v0TAXgWP014198; Sun, 29 Jan 2017 10:33:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TAXg60014197; Sun, 29 Jan 2017 10:33:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701291033.v0TAXg60014197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Jan 2017 10:33:42 +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: r312945 - 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 10:33:44 -0000 Author: kib Date: Sun Jan 29 10:33:42 2017 New Revision: 312945 URL: https://svnweb.freebsd.org/changeset/base/312945 Log: MFC r312647: Add comments explaining unobvious td_critnest adjustments in critical_exit(). Modified: stable/11/sys/kern/kern_switch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_switch.c ============================================================================== --- stable/11/sys/kern/kern_switch.c Sun Jan 29 03:34:49 2017 (r312944) +++ stable/11/sys/kern/kern_switch.c Sun Jan 29 10:33:42 2017 (r312945) @@ -206,7 +206,22 @@ critical_exit(void) if (td->td_critnest == 1) { td->td_critnest = 0; + + /* + * Interrupt handlers execute critical_exit() on + * leave, and td_owepreempt may be left set by an + * interrupt handler only when td_critnest > 0. If we + * are decrementing td_critnest from 1 to 0, read + * td_owepreempt after decrementing, to not miss the + * preempt. Disallow compiler to reorder operations. + */ + __compiler_membar(); if (td->td_owepreempt && !kdb_active) { + /* + * Microoptimization: we committed to switch, + * disable preemption in interrupt handlers + * while spinning for the thread lock. + */ td->td_critnest = 1; thread_lock(td); td->td_critnest--; From owner-svn-src-stable-11@freebsd.org Sun Jan 29 14:28:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0126CC6319; Sun, 29 Jan 2017 14:28:30 +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 8E64215BA; Sun, 29 Jan 2017 14:28:30 +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 v0TESTfa011125; Sun, 29 Jan 2017 14:28:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TESTCi011124; Sun, 29 Jan 2017 14:28:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701291428.v0TESTCi011124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Jan 2017 14:28: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: r312950 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 14:28:31 -0000 Author: mav Date: Sun Jan 29 14:28:29 2017 New Revision: 312950 URL: https://svnweb.freebsd.org/changeset/base/312950 Log: MFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes. Previously code ignored resid field and returned extra zeroes in case of data underflow. Now it returns only real bytes received from target. Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Sun Jan 29 13:31:56 2017 (r312949) +++ stable/11/sbin/camcontrol/camcontrol.c Sun Jan 29 14:28:29 2017 (r312950) @@ -4150,7 +4150,7 @@ scsicmd(struct cam_device *device, int a u_int8_t cdb[20]; u_int8_t atacmd[12]; struct get_hook hook; - int c, data_bytes = 0; + int c, data_bytes = 0, valid_bytes; int cdb_len = 0; int atacmd_len = 0; int dmacmd = 0; @@ -4454,16 +4454,20 @@ scsicmd(struct cam_device *device, int a } } + if (cdb_len) + valid_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + else + valid_bytes = ccb->ataio.dxfer_len - ccb->ataio.resid; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) && (arglist & CAM_ARG_CMD_IN) - && (data_bytes > 0)) { + && (valid_bytes > 0)) { if (fd_data == 0) { - buff_decode_visit(data_ptr, data_bytes, datastr, + buff_decode_visit(data_ptr, valid_bytes, datastr, arg_put, NULL); fprintf(stdout, "\n"); } else { ssize_t amt_written; - int amt_to_write = data_bytes; + int amt_to_write = valid_bytes; u_int8_t *buf_ptr = data_ptr; for (amt_written = 0; (amt_to_write > 0) && @@ -4478,7 +4482,7 @@ scsicmd(struct cam_device *device, int a } else if ((amt_written == 0) && (amt_to_write > 0)) { warnx("only wrote %u bytes out of %u", - data_bytes - amt_to_write, data_bytes); + valid_bytes - amt_to_write, valid_bytes); } } } From owner-svn-src-stable-11@freebsd.org Mon Jan 30 14:33:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4EDBCC8908; Mon, 30 Jan 2017 14:33:54 +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 A43559FD; Mon, 30 Jan 2017 14:33:54 +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 v0UEXrp8006548; Mon, 30 Jan 2017 14:33:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UEXrij006547; Mon, 30 Jan 2017 14:33:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701301433.v0UEXrij006547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 30 Jan 2017 14:33:53 +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: r312989 - stable/11/sys/amd64/vmm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 14:33:54 -0000 Author: avg Date: Mon Jan 30 14:33:53 2017 New Revision: 312989 URL: https://svnweb.freebsd.org/changeset/base/312989 Log: MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0 Modified: stable/11/sys/amd64/vmm/vmm_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/11/sys/amd64/vmm/vmm_dev.c Mon Jan 30 12:57:22 2017 (r312988) +++ stable/11/sys/amd64/vmm/vmm_dev.c Mon Jan 30 14:33:53 2017 (r312989) @@ -258,7 +258,7 @@ alloc_memseg(struct vmmdev_softc *sc, st if (VM_MEMSEG_NAME(mseg)) { sysmem = false; name = malloc(SPECNAMELEN + 1, M_VMMDEV, M_WAITOK); - error = copystr(VM_MEMSEG_NAME(mseg), name, SPECNAMELEN + 1, 0); + error = copystr(mseg->name, name, SPECNAMELEN + 1, 0); if (error) goto done; } From owner-svn-src-stable-11@freebsd.org Wed Feb 1 04:53:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4221CCA8CE; Wed, 1 Feb 2017 04:53:53 +0000 (UTC) (envelope-from rpokala@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 78D21C0D; Wed, 1 Feb 2017 04:53:53 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v114rq3e073903; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v114rqdG073902; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702010453.v114rqdG073902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 1 Feb 2017 04:53:52 +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: r313038 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 04:53:53 -0000 Author: rpokala Date: Wed Feb 1 04:53:52 2017 New Revision: 313038 URL: https://svnweb.freebsd.org/changeset/base/313038 Log: MFC r312678: Eliminate misleading comments and dead code in lacp_port_create() Variables "fast" and "active" are both constant in lacp_port_create(), but comments mispleadingly suggest that "fast" can be changed via ioctl. The constant values control the value of "lp->lp_state", so it too is constant, and the code for assigning different value to it is essentially dead. Remove both "fast" and "active", and set "lp->lp_state" unconditionally; that gets rid of the dead code and misleading comments. Modified: stable/11/sys/net/ieee8023ad_lacp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 03:32:49 2017 (r313037) +++ stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 04:53:52 2017 (r313038) @@ -526,9 +526,6 @@ lacp_port_create(struct lagg_port *lgp) struct ifmultiaddr *rifma = NULL; int error; - boolean_t active = TRUE; /* XXX should be configurable */ - boolean_t fast = FALSE; /* Configurable via ioctl */ - link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); sdl.sdl_alen = ETHER_ADDR_LEN; @@ -557,9 +554,7 @@ lacp_port_create(struct lagg_port *lgp) lacp_fill_actorinfo(lp, &lp->lp_actor); lacp_fill_markerinfo(lp, &lp->lp_marker); - lp->lp_state = - (active ? LACP_STATE_ACTIVITY : 0) | - (fast ? LACP_STATE_TIMEOUT : 0); + lp->lp_state = LACP_STATE_ACTIVITY; lp->lp_aggregator = NULL; lacp_sm_rx_set_expired(lp); LACP_UNLOCK(lsc); From owner-svn-src-stable-11@freebsd.org Wed Feb 1 20:27:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFC6CCCCA85; Wed, 1 Feb 2017 20:27:39 +0000 (UTC) (envelope-from kp@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 653E21925; Wed, 1 Feb 2017 20:27:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11KRcXl070069; Wed, 1 Feb 2017 20:27:38 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KRciL070067; Wed, 1 Feb 2017 20:27:38 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201702012027.v11KRciL070067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Feb 2017 20:27:38 +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: r313050 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:27:39 -0000 Author: kp Date: Wed Feb 1 20:27:38 2017 New Revision: 313050 URL: https://svnweb.freebsd.org/changeset/base/313050 Log: MFC 312782 bridge: Release the bridge lock when calling bridge_set_ifcap() This calls ioctl() handlers for the different interfaces in the bridge. These handlers expect to get called in an ioctl context where it's safe for them to sleep. We may not sleep with the bridge lock held. However, we still need to protect the interface list, to ensure it doesn't get changed while we iterate over it. Use BRIDGE_XLOCK(), which prevents bridge members from being removed. Adding bridge members is safe, because it uses LIST_INSERT_HEAD(). This caused panics when adding xen interfaces to a bridge. PR: 216304 Reviewed by: ae Sponsored by: RootBSD Differential Revision: https://reviews.freebsd.org/D9290 Modified: stable/11/sys/net/if_bridge.c stable/11/sys/net/if_bridgevar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Wed Feb 1 20:27:07 2017 (r313049) +++ stable/11/sys/net/if_bridge.c Wed Feb 1 20:27:38 2017 (r313050) @@ -909,14 +909,18 @@ bridge_mutecaps(struct bridge_softc *sc) mask &= bif->bif_savedcaps; } + BRIDGE_XLOCK(sc); LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ enabled &= ~BRIDGE_IFCAPS_MASK; enabled |= mask; + BRIDGE_UNLOCK(sc); bridge_set_ifcap(sc, bif, enabled); + BRIDGE_LOCK(sc); } + BRIDGE_XDROP(sc); } @@ -927,6 +931,8 @@ bridge_set_ifcap(struct bridge_softc *sc struct ifreq ifr; int error; + BRIDGE_UNLOCK_ASSERT(sc); + bzero(&ifr, sizeof(ifr)); ifr.ifr_reqcap = set; Modified: stable/11/sys/net/if_bridgevar.h ============================================================================== --- stable/11/sys/net/if_bridgevar.h Wed Feb 1 20:27:07 2017 (r313049) +++ stable/11/sys/net/if_bridgevar.h Wed Feb 1 20:27:38 2017 (r313050) @@ -280,6 +280,7 @@ struct ifbpstpconf { #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) #define BRIDGE_LOCK2REF(_sc, _err) do { \ mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ if ((_sc)->sc_iflist_xcnt > 0) \ From owner-svn-src-stable-11@freebsd.org Thu Feb 2 00:12:26 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3142DCCC899; Thu, 2 Feb 2017 00:12:26 +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 EDCC911CB; Thu, 2 Feb 2017 00:12: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 v120CPXF067551; Thu, 2 Feb 2017 00:12:25 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120COwV067543; Thu, 2 Feb 2017 00:12:24 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201702020012.v120COwV067543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 2 Feb 2017 00:12: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: r313070 - 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:12:26 -0000 Author: davidcs Date: Thu Feb 2 00:12:24 2017 New Revision: 313070 URL: https://svnweb.freebsd.org/changeset/base/313070 Log: MFC r312728 Added support for if_transmit and if_qflush Removed if_start updated version to 3.10.33 Modified: stable/11/sys/dev/qlxgbe/ql_def.h stable/11/sys/dev/qlxgbe/ql_glbl.h stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_hw.h stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_os.c stable/11/sys/dev/qlxgbe/ql_os.h stable/11/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_def.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:12:24 2017 (r313070) @@ -112,6 +112,16 @@ typedef struct _qla_tx_ring { uint64_t count; } qla_tx_ring_t; +typedef struct _qla_tx_fp { + struct mtx tx_mtx; + char tx_mtx_name[32]; + struct buf_ring *tx_br; + struct task fp_task; + struct taskqueue *fp_taskqueue; + void *ha; + uint32_t txr_idx; +} qla_tx_fp_t; + /* * Adapter structure contains the hardware independent information of the * pci function. @@ -178,10 +188,9 @@ struct qla_host { qla_tx_ring_t tx_ring[NUM_TX_RINGS]; bus_dma_tag_t tx_tag; - struct task tx_task; - struct taskqueue *tx_tq; struct callout tx_callout; - struct mtx tx_lock; + + qla_tx_fp_t tx_fp[MAX_SDS_RINGS]; qla_rx_ring_t rx_ring[MAX_RDS_RINGS]; bus_dma_tag_t rx_tag; Modified: stable/11/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_glbl.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:12:24 2017 (r313070) @@ -39,6 +39,7 @@ */ extern void ql_mbx_isr(void *arg); extern void ql_isr(void *arg); +extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count); /* * from ql_os.c @@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t extern int ql_set_allmulti(qla_host_t *ha); extern void qla_reset_allmulti(qla_host_t *ha); extern void ql_update_link_state(qla_host_t *ha); -extern void ql_hw_tx_done(qla_host_t *ha); +extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id); extern void ql_hw_stop_rcv(qla_host_t *ha); extern void ql_get_stats(qla_host_t *ha); @@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_ extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb, uint32_t *num_rcvq); -extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); +extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); extern void ql_minidump(qla_host_t *ha); extern int ql_minidump_init(qla_host_t *ha); Modified: stable/11/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:12:24 2017 (r313070) @@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t static int qla_init_rcv_cntxt(qla_host_t *ha); static void qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); -static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx, @@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme ha->hw.iscsi_pkt_count++; if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { - qla_hw_tx_done_locked(ha, txr_idx); + ql_hw_tx_done_locked(ha, txr_idx); if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= " @@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha) qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr); rcntxt->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16((i)); - } else { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[i]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); - } + rcntxt->sds[i].intr_id = qla_host_to_le16(hw->intr_id[i]); + rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); } for (i = 0; i < rcntxt_rds_rings; i++) { @@ -2672,17 +2664,11 @@ qla_add_rcv_rings(qla_host_t *ha, uint32 add_rcv->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(j); - } else { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[j]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); - } + add_rcv->sds[i].intr_id = qla_host_to_le16(hw->intr_id[j]); + add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); } + for (i = 0; (i < nsds); i++) { j = i + sds_idx; @@ -2803,6 +2789,7 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin q80_rsp_tx_cntxt_t *tcntxt_rsp; uint32_t err; qla_hw_tx_cntxt_t *hw_tx_cntxt; + uint32_t intr_idx; hw_tx_cntxt = &hw->tx_cntxt[txr_idx]; @@ -2818,6 +2805,8 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->count_version = (sizeof (q80_rq_tx_cntxt_t) >> 2); tcntxt->count_version |= Q8_MBX_CMD_VERSION; + intr_idx = txr_idx; + #ifdef QL_ENABLE_ISCSI_TLV tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO | @@ -2827,8 +2816,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->traffic_class = 1; } -#else + intr_idx = txr_idx % (ha->hw.num_tx_rings >> 1); +#else tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO; #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ @@ -2841,10 +2831,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin qla_host_to_le64(hw_tx_cntxt->tx_cons_paddr); tcntxt->tx_ring[0].nentries = qla_host_to_le16(NUM_TX_DESCRIPTORS); - tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[0]); + tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[intr_idx]); tcntxt->tx_ring[0].intr_src_bit = qla_host_to_le16(0); - hw_tx_cntxt->txr_free = NUM_TX_DESCRIPTORS; hw_tx_cntxt->txr_next = hw_tx_cntxt->txr_comp = 0; @@ -3166,11 +3155,11 @@ ql_hw_set_multi(qla_host_t *ha, uint8_t } /* - * Name: qla_hw_tx_done_locked + * Name: ql_hw_tx_done_locked * Function: Handle Transmit Completions */ -static void -qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) +void +ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) { qla_tx_buf_t *txb; qla_hw_t *hw = &ha->hw; @@ -3208,34 +3197,6 @@ qla_hw_tx_done_locked(qla_host_t *ha, ui return; } -/* - * Name: ql_hw_tx_done - * Function: Handle Transmit Completions - */ -void -ql_hw_tx_done(qla_host_t *ha) -{ - int i; - uint32_t flag = 0; - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: !mtx_trylock(&ha->tx_lock)\n", __func__)); - return; - } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - qla_hw_tx_done_locked(ha, i); - if (ha->hw.tx_cntxt[i].txr_free <= (NUM_TX_DESCRIPTORS >> 1)) - flag = 1; - } - - if (!flag) - ha->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - QLA_TX_UNLOCK(ha); - return; -} - void ql_update_link_state(qla_host_t *ha) { @@ -3655,7 +3616,7 @@ qla_get_port_config(qla_host_t *ha, uint } int -qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) +ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) { struct ether_vlan_header *eh; uint16_t etype; Modified: stable/11/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:12:24 2017 (r313070) @@ -1543,7 +1543,6 @@ typedef struct _qla_hw_tx_cntxt { uint32_t tx_prod_reg; uint16_t tx_cntxt_id; - uint8_t frame_hdr[QL_FRAME_HDR_SIZE]; } qla_hw_tx_cntxt_t; Modified: stable/11/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_isr.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:12:24 2017 (r313070) @@ -159,7 +159,12 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); mpf->m_pkthdr.flowid = sgc->rss_hash; + +#if __FreeBSD_version >= 1100000 M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE_HASH); +#else + M_HASHTYPE_SET(mpf, M_HASHTYPE_NONE); +#endif /* #if __FreeBSD_version >= 1100000 */ (*ifp->if_input)(ifp, mpf); @@ -449,11 +454,11 @@ qla_rcv_cont_sds(qla_host_t *ha, uint32_ } /* - * Name: qla_rcv_isr + * Name: ql_rcv_isr * Function: Main Interrupt Service Routine */ -static uint32_t -qla_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) +uint32_t +ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) { device_t dev; qla_hw_t *hw; @@ -703,7 +708,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds } if (ha->flags.stop_rcv) - goto qla_rcv_isr_exit; + goto ql_rcv_isr_exit; if (hw->sds[sds_idx].sdsr_next != comp_idx) { QL_UPDATE_SDS_CONSUMER_INDEX(ha, sds_idx, comp_idx); @@ -726,7 +731,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds if (opcode) ret = -1; -qla_rcv_isr_exit: +ql_rcv_isr_exit: hw->sds[sds_idx].rcv_active = 0; return (ret); @@ -930,7 +935,7 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t ret = 0; + qla_tx_fp_t *fp; ha = ivec->ha; hw = &ha->hw; @@ -939,17 +944,12 @@ ql_isr(void *arg) if ((idx = ivec->sds_idx) >= ha->hw.num_sds_rings) return; - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - ret = qla_rcv_isr(ha, idx, -1); - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + fp = &ha->tx_fp[idx]; + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - if (!ha->flags.stop_rcv) { - QL_ENABLE_INTERRUPTS(ha, idx); - } return; } Modified: stable/11/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:12:24 2017 (r313070) @@ -76,11 +76,11 @@ static void qla_release(qla_host_t *ha); static void qla_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void qla_stop(qla_host_t *ha); -static int qla_send(qla_host_t *ha, struct mbuf **m_headp); -static void qla_tx_done(void *context, int pending); static void qla_get_peer(qla_host_t *ha); static void qla_error_recovery(void *context, int pending); static void qla_async_event(void *context, int pending); +static int qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu); /* * Hooks to the Operating Systems @@ -93,7 +93,14 @@ static void qla_init(void *arg); static int qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qla_media_change(struct ifnet *ifp); static void qla_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); -static void qla_start(struct ifnet *ifp); + +static int qla_transmit(struct ifnet *ifp, struct mbuf *mp); +static void qla_qflush(struct ifnet *ifp); +static int qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static void qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static int qla_create_fp_taskqueues(qla_host_t *ha); +static void qla_destroy_fp_taskqueues(qla_host_t *ha); +static void qla_drain_fp_taskqueues(qla_host_t *ha); static device_method_t qla_pci_methods[] = { /* Device interface */ @@ -225,7 +232,6 @@ qla_watchdog(void *arg) qla_hw_t *hw; struct ifnet *ifp; uint32_t i; - qla_hw_tx_cntxt_t *hw_tx_cntxt; hw = &ha->hw; ifp = ha->ifp; @@ -254,19 +260,14 @@ qla_watchdog(void *arg) &ha->async_event_task); } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - hw_tx_cntxt = &hw->tx_cntxt[i]; - if (qla_le32_to_host(*(hw_tx_cntxt->tx_cons)) != - hw_tx_cntxt->txr_comp) { - taskqueue_enqueue(ha->tx_tq, - &ha->tx_task); - break; - } - } + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; - if ((ifp->if_snd.ifq_head != NULL) && QL_RUNNING(ifp)) { - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, + &fp->fp_task); } + ha->qla_watchdog_paused = 0; } else { ha->qla_watchdog_paused = 0; @@ -322,9 +323,7 @@ qla_pci_attach(device_t dev) rsrc_len = (uint32_t) bus_get_resource_count(dev, SYS_RES_MEMORY, ha->reg_rid); - mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_SPIN); - - mtx_init(&ha->tx_lock, "qla83xx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); + mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); qla_add_sysctls(ha); ql_hw_add_sysctls(ha); @@ -344,8 +343,9 @@ qla_pci_attach(device_t dev) } QL_DPRINT2(ha, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg)); + " msix_count 0x%x pci_reg %p pci_reg1 %p\n", __func__, ha, + ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, + ha->pci_reg1)); /* initialize hardware */ if (ql_init_hw(ha)) { @@ -366,14 +366,15 @@ qla_pci_attach(device_t dev) goto qla_pci_attach_err; } device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p num_rcvq = %d\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, num_rcvq); + " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", + __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, + ha->pci_reg, ha->pci_reg1, num_rcvq); #ifdef QL_ENABLE_ISCSI_TLV if ((ha->msix_count < 64) || (num_rcvq != 32)) { ha->hw.num_sds_rings = 15; - ha->hw.num_tx_rings = 32; + ha->hw.num_tx_rings = ha->hw.num_sds_rings * 2; } #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ ha->hw.num_rds_rings = ha->hw.num_sds_rings; @@ -421,8 +422,20 @@ qla_pci_attach(device_t dev) device_printf(dev, "could not setup interrupt\n"); goto qla_pci_attach_err; } + + ha->tx_fp[i].ha = ha; + ha->tx_fp[i].txr_idx = i; + + if (qla_alloc_tx_br(ha, &ha->tx_fp[i])) { + device_printf(dev, "%s: could not allocate tx_br[%d]\n", + __func__, i); + goto qla_pci_attach_err; + } } + if (qla_create_fp_taskqueues(ha) != 0) + goto qla_pci_attach_err; + printf("%s: mp__ncpus %d sds %d rds %d msi-x %d\n", __func__, mp_ncpus, ha->hw.num_sds_rings, ha->hw.num_rds_rings, ha->msix_count); @@ -452,13 +465,6 @@ qla_pci_attach(device_t dev) ha->flags.qla_watchdog_active = 1; ha->flags.qla_watchdog_pause = 0; - - TASK_INIT(&ha->tx_task, 0, qla_tx_done, ha); - ha->tx_tq = taskqueue_create("qla_txq", M_NOWAIT, - taskqueue_thread_enqueue, &ha->tx_tq); - taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", - device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); ha->flags.qla_callout_init = 1; @@ -584,11 +590,6 @@ qla_release(qla_host_t *ha) taskqueue_free(ha->err_tq); } - if (ha->tx_tq) { - taskqueue_drain(ha->tx_tq, &ha->tx_task); - taskqueue_free(ha->tx_tq); - } - ql_del_cdev(ha); if (ha->flags.qla_watchdog_active) { @@ -626,13 +627,15 @@ qla_release(qla_host_t *ha) ha->irq_vec[i].irq_rid, ha->irq_vec[i].irq); } + + qla_free_tx_br(ha, &ha->tx_fp[i]); } + qla_destroy_fp_taskqueues(ha); if (ha->msix_count) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -807,7 +810,9 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_softc = ha; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = qla_ioctl; - ifp->if_start = qla_start; + + ifp->if_transmit = qla_transmit; + ifp->if_qflush = qla_qflush; IFQ_SET_MAXLEN(&ifp->if_snd, qla_get_ifq_snd_maxlen(ha)); ifp->if_snd.ifq_drv_maxlen = qla_get_ifq_snd_maxlen(ha); @@ -817,12 +822,13 @@ qla_init_ifnet(device_t dev, qla_host_t ether_ifattach(ifp, qla_get_mac_addr(ha)); - ifp->if_capabilities = IFCAP_HWCSUM | + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_JUMBO_MTU; - - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; + IFCAP_JUMBO_MTU | + IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTSO | + IFCAP_LRO; ifp->if_capenable = ifp->if_capabilities; @@ -917,10 +923,13 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - if (QLA_LOCK(ha, __func__, 1) == 0) { - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); - } + //if (QLA_LOCK(ha, __func__, 1) == 0) { + // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + // QLA_UNLOCK(ha, __func__); + //} + QLA_LOCK(ha, __func__, 1); + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + QLA_UNLOCK(ha, __func__); return (ret); } @@ -1125,64 +1134,10 @@ qla_media_status(struct ifnet *ifp, stru return; } -static void -qla_start(struct ifnet *ifp) -{ - struct mbuf *m_head; - qla_host_t *ha = (qla_host_t *)ifp->if_softc; - - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: mtx_trylock(&ha->tx_lock) failed\n", __func__)); - return; - } - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) { - QL_DPRINT8(ha, - (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - if (!ha->hw.link_up || !ha->watchdog_ticks) - ql_update_link_state(ha); - - if (!ha->hw.link_up) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: link down\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - while (ifp->if_snd.ifq_head != NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); - - if (m_head == NULL) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: m_head == NULL\n", - __func__)); - break; - } - - if (qla_send(ha, &m_head)) { - if (m_head == NULL) - break; - QL_DPRINT8(ha, (ha->pci_dev, "%s: PREPEND\n", __func__)); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); - break; - } - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m_head); - } - QLA_TX_UNLOCK(ha); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); - return; -} static int -qla_send(qla_host_t *ha, struct mbuf **m_headp) +qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu) { bus_dma_segment_t segs[QLA_MAX_SEGMENTS]; bus_dmamap_t map; @@ -1190,29 +1145,9 @@ qla_send(qla_host_t *ha, struct mbuf **m int ret = -1; uint32_t tx_idx; struct mbuf *m_head = *m_headp; - uint32_t txr_idx = ha->txr_idx; - uint32_t iscsi_pdu = 0; QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - /* check if flowid is set */ - - if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) { -#ifdef QL_ENABLE_ISCSI_TLV - if (qla_iscsi_pdu(ha, m_head) == 0) { - iscsi_pdu = 1; - txr_idx = m_head->m_pkthdr.flowid & - ((ha->hw.num_tx_rings >> 1) - 1); - } else { - txr_idx = m_head->m_pkthdr.flowid & - (ha->hw.num_tx_rings - 1); - } -#else - txr_idx = m_head->m_pkthdr.flowid & (ha->hw.num_tx_rings - 1); -#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ - } - - tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next; map = ha->tx_ring[txr_idx].tx_buf[tx_idx].map; @@ -1290,16 +1225,302 @@ qla_send(qla_host_t *ha, struct mbuf **m return (ret); } +static int +qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name), + "qla%d_fp%d_tx_mq_lock", ha->pci_func, fp->txr_idx); + + mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF); + + fp->tx_br = buf_ring_alloc(NUM_TX_DESCRIPTORS, M_DEVBUF, + M_NOWAIT, &fp->tx_mtx); + if (fp->tx_br == NULL) { + QL_DPRINT1(ha, (ha->pci_dev, "buf_ring_alloc failed for " + " fp[%d, %d]\n", ha->pci_func, fp->txr_idx)); + return (-ENOMEM); + } + return 0; +} + +static void +qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + struct mbuf *mp; + struct ifnet *ifp = ha->ifp; + + if (mtx_initialized(&fp->tx_mtx)) { + + if (fp->tx_br != NULL) { + + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + + mtx_unlock(&fp->tx_mtx); + + buf_ring_free(fp->tx_br, M_DEVBUF); + fp->tx_br = NULL; + } + mtx_destroy(&fp->tx_mtx); + } + return; +} + +static void +qla_fp_taskqueue(void *context, int pending) +{ + qla_tx_fp_t *fp; + qla_host_t *ha; + struct ifnet *ifp; + struct mbuf *mp; + int ret; + uint32_t txr_idx; + uint32_t iscsi_pdu = 0; + uint32_t rx_pkts_left; + + fp = context; + + if (fp == NULL) + return; + + ha = (qla_host_t *)fp->ha; + + ifp = ha->ifp; + + txr_idx = fp->txr_idx; + + mtx_lock(&fp->tx_mtx); + + if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) || (!ha->hw.link_up)) { + mtx_unlock(&fp->tx_mtx); + goto qla_fp_taskqueue_exit; + } + + rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64); + +#ifdef QL_ENABLE_ISCSI_TLV + ql_hw_tx_done_locked(ha, fp->txr_idx); + ql_hw_tx_done_locked(ha, (fp->txr_idx + (ha->hw.num_tx_rings >> 1))); + txr_idx = txr_idx + (ha->hw.num_tx_rings >> 1); +#else + ql_hw_tx_done_locked(ha, fp->txr_idx); +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + + mp = drbr_peek(ifp, fp->tx_br); + + while (mp != NULL) { + + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) { +#ifdef QL_ENABLE_ISCSI_TLV + if (ql_iscsi_pdu(ha, mp) == 0) { + iscsi_pdu = 1; + } +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + } + + ret = qla_send(ha, &mp, txr_idx, iscsi_pdu); + + if (ret) { + if (mp != NULL) + drbr_putback(ifp, fp->tx_br, mp); + else { + drbr_advance(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + + goto qla_fp_taskqueue_exit0; + } else { + drbr_advance(ifp, fp->tx_br); + } + + mp = drbr_peek(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + +qla_fp_taskqueue_exit0: + + if (rx_pkts_left || ((mp != NULL) && ret)) { + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (!ha->flags.stop_rcv) { + QL_ENABLE_INTERRUPTS(ha, fp->txr_idx); + } + } + +qla_fp_taskqueue_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return; +} + +static int +qla_create_fp_taskqueues(qla_host_t *ha) +{ + int i; + uint8_t tq_name[32]; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + bzero(tq_name, sizeof (tq_name)); + snprintf(tq_name, sizeof (tq_name), "ql_fp_tq_%d", i); + + TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); + + fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT, + taskqueue_thread_enqueue, + &fp->fp_taskqueue); + + if (fp->fp_taskqueue == NULL) + return (-1); + + taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", + tq_name); + + QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, + fp->fp_taskqueue)); + } + + return (0); +} + +static void +qla_destroy_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + taskqueue_free(fp->fp_taskqueue); + fp->fp_taskqueue = NULL; + } + } + return; +} + +static void +qla_drain_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + } + } + return; +} + +static int +qla_transmit(struct ifnet *ifp, struct mbuf *mp) +{ + qla_host_t *ha = (qla_host_t *)ifp->if_softc; + qla_tx_fp_t *fp; + int rss_id = 0; + int ret = 0; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + +#if __FreeBSD_version >= 1100000 + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) +#else + if (mp->m_flags & M_FLOWID) +#endif + rss_id = (mp->m_pkthdr.flowid & Q8_RSS_IND_TBL_MAX_IDX) % + ha->hw.num_sds_rings; + fp = &ha->tx_fp[rss_id]; + + if (fp->tx_br == NULL) { + ret = EINVAL; + goto qla_transmit_exit; + } + + if (mp != NULL) { + ret = drbr_enqueue(ifp, fp->tx_br, mp); + } + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + + ret = 0; + +qla_transmit_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return ret; +} + +static void +qla_qflush(struct ifnet *ifp) +{ + int i; + qla_tx_fp_t *fp; + struct mbuf *mp; + qla_host_t *ha; + + ha = (qla_host_t *)ifp->if_softc; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br) { + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + mtx_unlock(&fp->tx_mtx); + } + } + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + + return; +} + + static void qla_stop(qla_host_t *ha) { struct ifnet *ifp = ha->ifp; device_t dev; + int i = 0; dev = ha->pci_dev; ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } ha->flags.qla_watchdog_pause = 1; @@ -1308,6 +1529,8 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + qla_drain_fp_taskqueues(ha); + ql_hw_stop_rcv(ha); ql_del_hw_if(ha); @@ -1648,25 +1871,6 @@ exit_ql_get_mbuf: return (ret); } -static void -qla_tx_done(void *context, int pending) -{ - qla_host_t *ha = context; - struct ifnet *ifp; - - ifp = ha->ifp; - - if (!ifp) - return; - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - return; - } - ql_hw_tx_done(ha); - - qla_start(ha->ifp); -} static void qla_get_peer(qla_host_t *ha) @@ -1709,18 +1913,32 @@ qla_error_recovery(void *context, int pe qla_host_t *ha = context; uint32_t msecs_100 = 100; struct ifnet *ifp = ha->ifp; + int i = 0; (void)QLA_LOCK(ha, __func__, 0); if (ha->flags.qla_interface_up) { - ha->hw.imd_compl = 1; - qla_mdelay(__func__, 300); + ha->hw.imd_compl = 1; + qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); + ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } } QLA_UNLOCK(ha, __func__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Thu Feb 2 01:11:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5A81CCB9C3; Thu, 2 Feb 2017 01:11: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 9654312DF; Thu, 2 Feb 2017 01:11:50 +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 v121Bnak092076; Thu, 2 Feb 2017 01:11:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121Bnw5092072; Thu, 2 Feb 2017 01:11:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020111.v121Bnw5092072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:11: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: r313075 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:11:50 -0000 Author: kib Date: Thu Feb 2 01:11:49 2017 New Revision: 313075 URL: https://svnweb.freebsd.org/changeset/base/313075 Log: MFC r312428: Refcount tmpfs nodes and mount structures. Modified: stable/11/sys/fs/tmpfs/tmpfs.h stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/fs/tmpfs/tmpfs_vfsops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:11:49 2017 (r313075) @@ -158,9 +158,11 @@ struct tmpfs_node { * Doubly-linked list entry which links all existing nodes for * a single file system. This is provided to ease the removal * of all nodes during the unmount operation, and to support - * the implementation of VOP_VNTOCNP(). + * the implementation of VOP_VNTOCNP(). tn_attached is false + * when the node is removed from list and unlocked. */ LIST_ENTRY(tmpfs_node) tn_entries; /* (m) */ + bool tn_attached; /* (m) */ /* * The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', @@ -231,6 +233,9 @@ struct tmpfs_node { */ int tn_vpstate; /* (i) */ + /* Transient refcounter on this node. */ + u_int tn_refcount; /* (m) + (i) */ + /* misc data field for different tn_type node */ union { /* Valid when tn_type == VBLK || tn_type == VCHR. */ @@ -358,6 +363,9 @@ struct tmpfs_mount { /* Number of nodes currently that are in use. */ ino_t tm_nodes_inuse; + /* Refcounter on this struct tmpfs_mount. */ + uint64_t tm_refcount; + /* maximum representable file size */ u_int64_t tm_maxfilesize; @@ -402,10 +410,14 @@ struct tmpfs_dir_cursor { * Prototypes for tmpfs_subr.c. */ +void tmpfs_ref_node(struct tmpfs_node *node); +void tmpfs_ref_node_locked(struct tmpfs_node *node); int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); +bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool); +void tmpfs_free_tmp(struct tmpfs_mount *); int tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *, const char *, u_int, struct tmpfs_dirent **); void tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *); Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:11:49 2017 (r313075) @@ -132,6 +132,26 @@ tmpfs_pages_check_avail(struct tmpfs_mou return (1); } +void +tmpfs_ref_node(struct tmpfs_node *node) +{ + + TMPFS_NODE_LOCK(node); + tmpfs_ref_node_locked(node); + TMPFS_NODE_UNLOCK(node); +} + +void +tmpfs_ref_node_locked(struct tmpfs_node *node) +{ + + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p zero refcount", node)); + KASSERT(node->tn_refcount < UINT_MAX, ("node %p refcount %u", node, + node->tn_refcount)); + node->tn_refcount++; +} + /* * Allocates a new node of type 'type' inside the 'tmp' mount point, with * its owner set to 'uid', its group to 'gid' and its mode set to 'mode', @@ -206,6 +226,7 @@ tmpfs_alloc_node(struct mount *mp, struc nnode->tn_gid = gid; nnode->tn_mode = mode; nnode->tn_id = alloc_unr(tmp->tm_ino_unr); + nnode->tn_refcount = 1; /* Type-specific initialization. */ switch (nnode->tn_type) { @@ -259,7 +280,9 @@ tmpfs_alloc_node(struct mount *mp, struc TMPFS_LOCK(tmp); LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries); + nnode->tn_attached = true; tmp->tm_nodes_inuse++; + tmp->tm_refcount++; TMPFS_UNLOCK(tmp); *node = nnode; @@ -273,18 +296,40 @@ tmpfs_alloc_node(struct mount *mp, struc void tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node) { + + TMPFS_LOCK(tmp); + TMPFS_NODE_LOCK(node); + if (!tmpfs_free_node_locked(tmp, node, false)) { + TMPFS_NODE_UNLOCK(node); + TMPFS_UNLOCK(tmp); + } +} + +bool +tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct tmpfs_node *node, + bool detach) +{ vm_object_t uobj; + TMPFS_MP_ASSERT_LOCKED(tmp); + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p refcount zero", node)); + + node->tn_refcount--; + if (node->tn_attached && (detach || node->tn_refcount == 0)) { + MPASS(tmp->tm_nodes_inuse > 0); + tmp->tm_nodes_inuse--; + LIST_REMOVE(node, tn_entries); + node->tn_attached = false; + } + if (node->tn_refcount > 0) + return (false); + #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); MPASS(node->tn_vnode == NULL); MPASS((node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0); - TMPFS_NODE_UNLOCK(node); #endif - - TMPFS_LOCK(tmp); - LIST_REMOVE(node, tn_entries); - tmp->tm_nodes_inuse--; + TMPFS_NODE_UNLOCK(node); TMPFS_UNLOCK(tmp); switch (node->tn_type) { @@ -324,6 +369,9 @@ tmpfs_free_node(struct tmpfs_mount *tmp, free_unr(tmp->tm_ino_unr, node->tn_id); uma_zfree(tmp->tm_node_pool, node); + TMPFS_LOCK(tmp); + tmpfs_free_tmp(tmp); + return (true); } static __inline uint32_t @@ -469,13 +517,16 @@ tmpfs_alloc_vp(struct mount *mp, struct struct vnode **vpp) { struct vnode *vp; + struct tmpfs_mount *tm; vm_object_t object; int error; error = 0; -loop: + tm = VFS_TO_TMPFS(mp); TMPFS_NODE_LOCK(node); -loop1: + tmpfs_ref_node_locked(node); +loop: + TMPFS_NODE_ASSERT_LOCKED(node); if ((vp = node->tn_vnode) != NULL) { MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); @@ -495,12 +546,14 @@ loop1: msleep(&node->tn_vnode, TMPFS_NODE_MTX(node), 0, "tmpfsE", 0); } - goto loop1; + goto loop; } TMPFS_NODE_UNLOCK(node); error = vget(vp, lkflag | LK_INTERLOCK, curthread); - if (error == ENOENT) + if (error == ENOENT) { + TMPFS_NODE_LOCK(node); goto loop; + } if (error != 0) { vp = NULL; goto out; @@ -512,6 +565,7 @@ loop1: */ if (node->tn_vnode == NULL || node->tn_vnode != vp) { vput(vp); + TMPFS_NODE_LOCK(node); goto loop; } @@ -533,11 +587,9 @@ loop1: if (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) { node->tn_vpstate |= TMPFS_VNODE_WANT; error = msleep((caddr_t) &node->tn_vpstate, - TMPFS_NODE_MTX(node), PDROP | PCATCH, - "tmpfs_alloc_vp", 0); - if (error) - return error; - + TMPFS_NODE_MTX(node), 0, "tmpfs_alloc_vp", 0); + if (error != 0) + goto out; goto loop; } else node->tn_vpstate |= TMPFS_VNODE_ALLOCATING; @@ -611,16 +663,17 @@ unlock: TMPFS_NODE_UNLOCK(node); out: - *vpp = vp; + if (error == 0) { + *vpp = vp; #ifdef INVARIANTS - if (error == 0) { MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); TMPFS_NODE_LOCK(node); MPASS(*vpp == node->tn_vnode); TMPFS_NODE_UNLOCK(node); - } #endif + } + tmpfs_free_node(tm, node); return (error); } Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:11:49 2017 (r313075) @@ -222,6 +222,7 @@ tmpfs_mount(struct mount *mp) mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; + tmp->tm_refcount = 1; tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); @@ -304,11 +305,35 @@ tmpfs_unmount(struct mount *mp, int mntf TMPFS_LOCK(tmp); while ((node = LIST_FIRST(&tmp->tm_nodes_used)) != NULL) { - TMPFS_UNLOCK(tmp); + TMPFS_NODE_LOCK(node); if (node->tn_type == VDIR) tmpfs_dir_destroy(tmp, node); - tmpfs_free_node(tmp, node); - TMPFS_LOCK(tmp); + if (tmpfs_free_node_locked(tmp, node, true)) + TMPFS_LOCK(tmp); + else + TMPFS_NODE_UNLOCK(node); + } + + mp->mnt_data = NULL; + tmpfs_free_tmp(tmp); + vfs_write_resume(mp, VR_START_WRITE); + + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_LOCAL; + MNT_IUNLOCK(mp); + + return (0); +} + +void +tmpfs_free_tmp(struct tmpfs_mount *tmp) +{ + + MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; + if (tmp->tm_refcount > 0) { + TMPFS_UNLOCK(tmp); + return; } TMPFS_UNLOCK(tmp); @@ -320,16 +345,7 @@ tmpfs_unmount(struct mount *mp, int mntf MPASS(tmp->tm_pages_used == 0); MPASS(tmp->tm_nodes_inuse == 0); - /* Throw away the tmpfs_mount structure. */ - free(mp->mnt_data, M_TMPFSMNT); - mp->mnt_data = NULL; - vfs_write_resume(mp, VR_START_WRITE); - - MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_LOCAL; - MNT_IUNLOCK(mp); - - return (0); + free(tmp, M_TMPFSMNT); } static int @@ -347,36 +363,36 @@ static int tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { - boolean_t found; struct tmpfs_fid *tfhp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + int error; tmp = VFS_TO_TMPFS(mp); tfhp = (struct tmpfs_fid *)fhp; if (tfhp->tf_len != sizeof(struct tmpfs_fid)) - return EINVAL; + return (EINVAL); if (tfhp->tf_id >= tmp->tm_nodes_max) - return EINVAL; - - found = FALSE; + return (EINVAL); TMPFS_LOCK(tmp); LIST_FOREACH(node, &tmp->tm_nodes_used, tn_entries) { if (node->tn_id == tfhp->tf_id && node->tn_gen == tfhp->tf_gen) { - found = TRUE; + tmpfs_ref_node(node); break; } } TMPFS_UNLOCK(tmp); - if (found) - return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp)); - - return (EINVAL); + if (node != NULL) { + error = tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp); + tmpfs_free_node(tmp, node); + } else + error = EINVAL; + return (error); } /* ARGSUSED2 */ Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:11:49 2017 (r313075) @@ -82,7 +82,8 @@ tmpfs_lookup(struct vop_cachedlookup_arg struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; - struct tmpfs_node *dnode; + struct tmpfs_node *dnode, *pnode; + struct tmpfs_mount *tm; int error; dnode = VP_TO_TMPFS_DIR(dvp); @@ -104,8 +105,12 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; } if (cnp->cn_flags & ISDOTDOT) { + tm = VFS_TO_TMPFS(dvp->v_mount); + pnode = dnode->tn_dir.tn_parent; + tmpfs_ref_node(pnode); error = vn_vget_ino_gen(dvp, tmpfs_vn_get_ino_alloc, - dnode->tn_dir.tn_parent, cnp->cn_lkflags, vpp); + pnode, cnp->cn_lkflags, vpp); + tmpfs_free_node(tm, pnode); if (error != 0) goto out; } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { From owner-svn-src-stable-11@freebsd.org Thu Feb 2 01:14:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E720CCBB94; Thu, 2 Feb 2017 01:14:45 +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 4DBC31721; Thu, 2 Feb 2017 01:14:45 +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 v121Eilt092237; Thu, 2 Feb 2017 01:14:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121EiSM092236; Thu, 2 Feb 2017 01:14:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020114.v121EiSM092236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:14:44 +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: r313076 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:14:45 -0000 Author: kib Date: Thu Feb 2 01:14:44 2017 New Revision: 313076 URL: https://svnweb.freebsd.org/changeset/base/313076 Log: MFC r312429: VNON nodes cannot exist. Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:11:49 2017 (r313075) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:14:44 2017 (r313076) @@ -333,11 +333,6 @@ tmpfs_free_node_locked(struct tmpfs_moun TMPFS_UNLOCK(tmp); switch (node->tn_type) { - case VNON: - /* Do not do anything. VNON is provided to let the - * allocation routine clean itself easily by avoiding - * duplicating code in it. */ - /* FALLTHROUGH */ case VBLK: /* FALLTHROUGH */ case VCHR: From owner-svn-src-stable-11@freebsd.org Thu Feb 2 01:17:05 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91BB9CCBE93; Thu, 2 Feb 2017 01: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 6C53E199A; Thu, 2 Feb 2017 01: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 v121H4tY092386; Thu, 2 Feb 2017 01:17:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121H4Qv092385; Thu, 2 Feb 2017 01:17:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020117.v121H4Qv092385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01: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: r313077 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:17:05 -0000 Author: kib Date: Thu Feb 2 01:17:04 2017 New Revision: 313077 URL: https://svnweb.freebsd.org/changeset/base/313077 Log: MFC r312430: Implement VOP_VPTOCNP() for tmpfs. Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:14:44 2017 (r313076) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:17:04 2017 (r313077) @@ -1406,6 +1406,132 @@ tmpfs_whiteout(struct vop_whiteout_args } } +static int +tmpfs_vptocnp_dir(struct tmpfs_node *tn, struct tmpfs_node *tnp, + struct tmpfs_dirent **pde) +{ + struct tmpfs_dir_cursor dc; + struct tmpfs_dirent *de; + + for (de = tmpfs_dir_first(tnp, &dc); de != NULL; + de = tmpfs_dir_next(tnp, &dc)) { + if (de->td_node == tn) { + *pde = de; + return (0); + } + } + return (ENOENT); +} + +static int +tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn, + struct tmpfs_node *tnp, char *buf, int *buflen, struct vnode **dvp) +{ + struct tmpfs_dirent *de; + int error, i; + + error = vn_vget_ino_gen(vp, tmpfs_vn_get_ino_alloc, tnp, LK_SHARED, + dvp); + if (error != 0) + return (error); + error = tmpfs_vptocnp_dir(tn, tnp, &de); + if (error == 0) { + i = *buflen; + i -= de->td_namelen; + if (i < 0) { + error = ENOMEM; + } else { + bcopy(de->ud.td_name, buf + i, de->td_namelen); + *buflen = i; + } + } + if (error == 0) { + if (vp != *dvp) + VOP_UNLOCK(*dvp, 0); + } else { + if (vp != *dvp) + vput(*dvp); + else + vrele(vp); + } + return (error); +} + +static int +tmpfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp, **dvp; + struct tmpfs_node *tn, *tnp, *tnp1; + struct tmpfs_dirent *de; + struct tmpfs_mount *tm; + char *buf; + int *buflen; + int error; + + vp = ap->a_vp; + dvp = ap->a_vpp; + buf = ap->a_buf; + buflen = ap->a_buflen; + + tm = VFS_TO_TMPFS(vp->v_mount); + tn = VP_TO_TMPFS_NODE(vp); + if (tn->tn_type == VDIR) { + tnp = tn->tn_dir.tn_parent; + if (tnp == NULL) + return (ENOENT); + tmpfs_ref_node(tnp); + error = tmpfs_vptocnp_fill(vp, tn, tn->tn_dir.tn_parent, buf, + buflen, dvp); + tmpfs_free_node(tm, tnp); + return (error); + } +restart: + TMPFS_LOCK(tm); + LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) { + if (tnp->tn_type != VDIR) + continue; + TMPFS_NODE_LOCK(tnp); + tmpfs_ref_node_locked(tnp); + + /* + * tn_vnode cannot be instantiated while we hold the + * node lock, so the directory cannot be changed while + * we iterate over it. Do this to avoid instantiating + * vnode for directories which cannot point to our + * node. + */ + error = tnp->tn_vnode == NULL ? tmpfs_vptocnp_dir(tn, tnp, + &de) : 0; + + if (error == 0) { + TMPFS_NODE_UNLOCK(tnp); + TMPFS_UNLOCK(tm); + error = tmpfs_vptocnp_fill(vp, tn, tnp, buf, buflen, + dvp); + if (error == 0) { + tmpfs_free_node(tm, tnp); + return (0); + } + if ((vp->v_iflag & VI_DOOMED) != 0) { + tmpfs_free_node(tm, tnp); + return (ENOENT); + } + TMPFS_LOCK(tm); + TMPFS_NODE_LOCK(tnp); + } + if (tmpfs_free_node_locked(tm, tnp, false)) { + goto restart; + } else { + KASSERT(tnp->tn_refcount > 0, + ("node %p refcount zero", tnp)); + tnp1 = LIST_NEXT(tnp, tn_entries); + TMPFS_NODE_UNLOCK(tnp); + } + } + TMPFS_UNLOCK(tm); + return (ENOENT); +} + /* * Vnode operations vector used for files stored in a tmpfs file system. */ @@ -1438,5 +1564,6 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptofh = tmpfs_vptofh, .vop_whiteout = tmpfs_whiteout, .vop_bmap = VOP_EOPNOTSUPP, + .vop_vptocnp = tmpfs_vptocnp, }; From owner-svn-src-stable-11@freebsd.org Thu Feb 2 01:18:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87F6DCCC0D9; Thu, 2 Feb 2017 01:18:56 +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 628C41BD9; Thu, 2 Feb 2017 01:18:56 +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 v121ItR8092512; Thu, 2 Feb 2017 01:18:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121Itei092507; Thu, 2 Feb 2017 01:18:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020118.v121Itei092507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:18:55 +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: r313078 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:18:56 -0000 Author: kib Date: Thu Feb 2 01:18:54 2017 New Revision: 313078 URL: https://svnweb.freebsd.org/changeset/base/313078 Log: MFC r312432: Add a mount option for tmpfs(5) to not use namecache. Modified: stable/11/sys/fs/tmpfs/tmpfs.h stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/fs/tmpfs/tmpfs_vfsops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:18:54 2017 (r313078) @@ -383,7 +383,9 @@ struct tmpfs_mount { uma_zone_t tm_node_pool; /* Read-only status. */ - int tm_ronly; + bool tm_ronly; + /* Do not use namecache. */ + bool tm_nonc; }; #define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock) #define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock) @@ -528,4 +530,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp) return (node); } +static inline bool +tmpfs_use_nc(struct vnode *vp) +{ + + return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc)); +} + #endif /* _FS_TMPFS_TMPFS_H_ */ Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:18:54 2017 (r313078) @@ -592,7 +592,8 @@ loop: TMPFS_NODE_UNLOCK(node); /* Get a new vnode and associate it with our node. */ - error = getnewvnode("tmpfs", mp, &tmpfs_vnodeop_entries, &vp); + error = getnewvnode("tmpfs", mp, VFS_TO_TMPFS(mp)->tm_nonc ? + &tmpfs_vnodeop_nonc_entries : &tmpfs_vnodeop_entries, &vp); if (error != 0) goto unlock; MPASS(vp != NULL); Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:18:54 2017 (r313078) @@ -79,7 +79,7 @@ static void tmpfs_susp_clean(struct moun static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", - "union", NULL + "union", "nonc", NULL }; static const char *tmpfs_updateopts[] = { @@ -138,6 +138,7 @@ tmpfs_mount(struct mount *mp) struct tmpfs_node *root; struct thread *td = curthread; int error; + bool nonc; /* Size counters. */ u_quad_t pages; off_t nodes_max, size_max, maxfilesize; @@ -186,6 +187,7 @@ tmpfs_mount(struct mount *mp) size_max = 0; if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; + nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0; /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ @@ -236,6 +238,7 @@ tmpfs_mount(struct mount *mp) sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + tmp->tm_nonc = nonc; /* Allocate the root node. */ error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid, Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:18:54 2017 (r313078) @@ -76,11 +76,8 @@ tmpfs_vn_get_ino_alloc(struct mount *mp, } static int -tmpfs_lookup(struct vop_cachedlookup_args *v) +tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { - struct vnode *dvp = v->a_dvp; - struct vnode **vpp = v->a_vpp; - struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; struct tmpfs_node *dnode, *pnode; struct tmpfs_mount *tm; @@ -213,7 +210,7 @@ tmpfs_lookup(struct vop_cachedlookup_arg * request was for creation, as it does not improve timings on * emprical tests. */ - if ((cnp->cn_flags & MAKEENTRY) != 0) + if ((cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); out: @@ -227,6 +224,20 @@ out: } static int +tmpfs_cached_lookup(struct vop_cachedlookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int +tmpfs_lookup(struct vop_lookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int tmpfs_create(struct vop_create_args *v) { struct vnode *dvp = v->a_dvp; @@ -238,7 +249,7 @@ tmpfs_create(struct vop_create_args *v) MPASS(vap->va_type == VREG || vap->va_type == VSOCK); error = tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); - if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); return (error); } @@ -1013,10 +1024,12 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_dir_attach(tdvp, de); - cache_purge(fvp); - if (tvp != NULL) - cache_purge(tvp); - cache_purge_negative(tdvp); + if (tmpfs_use_nc(fvp)) { + cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); + cache_purge_negative(tdvp); + } error = 0; @@ -1129,8 +1142,10 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(dnode); - cache_purge(dvp); - cache_purge(vp); + if (tmpfs_use_nc(dvp)) { + cache_purge(dvp); + cache_purge(vp); + } /* Free the directory entry we just deleted. Note that the node * referred by it will not be removed until the vnode is really @@ -1274,7 +1289,8 @@ tmpfs_reclaim(struct vop_reclaim_args *v else vnode_destroy_vobject(vp); vp->v_object = NULL; - cache_purge(vp); + if (tmpfs_use_nc(vp)) + cache_purge(vp); TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); @@ -1538,7 +1554,7 @@ restart: struct vop_vector tmpfs_vnodeop_entries = { .vop_default = &default_vnodeops, .vop_lookup = vfs_cache_lookup, - .vop_cachedlookup = tmpfs_lookup, + .vop_cachedlookup = tmpfs_cached_lookup, .vop_create = tmpfs_create, .vop_mknod = tmpfs_mknod, .vop_open = tmpfs_open, @@ -1567,3 +1583,10 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptocnp = tmpfs_vptocnp, }; +/* + * Same vector for mounts which do not use namecache. + */ +struct vop_vector tmpfs_vnodeop_nonc_entries = { + .vop_default = &tmpfs_vnodeop_entries, + .vop_lookup = tmpfs_lookup, +}; Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 01:18:54 2017 (r313078) @@ -44,6 +44,7 @@ */ extern struct vop_vector tmpfs_vnodeop_entries; +extern struct vop_vector tmpfs_vnodeop_nonc_entries; vop_access_t tmpfs_access; vop_getattr_t tmpfs_getattr; From owner-svn-src-stable-11@freebsd.org Thu Feb 2 01:21:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE43CCC382; Thu, 2 Feb 2017 01:21:57 +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 EC9B01FF4; Thu, 2 Feb 2017 01:21:56 +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 v121Luf4096368; Thu, 2 Feb 2017 01:21:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121LuZM096367; Thu, 2 Feb 2017 01:21:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020121.v121LuZM096367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:21: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: r313079 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:21:57 -0000 Author: kib Date: Thu Feb 2 01:21:55 2017 New Revision: 313079 URL: https://svnweb.freebsd.org/changeset/base/313079 Log: MFC r312649: Document mount option "nonc" for tmpfs. Modified: stable/11/share/man/man5/tmpfs.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/tmpfs.5 ============================================================================== --- stable/11/share/man/man5/tmpfs.5 Thu Feb 2 01:18:54 2017 (r313078) +++ stable/11/share/man/man5/tmpfs.5 Thu Feb 2 01:21:55 2017 (r313079) @@ -54,7 +54,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2017 +.Dd January 20, 2017 .Dt TMPFS 5 .Os .Sh NAME @@ -120,6 +120,10 @@ Defaults to the mount point's UID. .It Cm mode Specifies the mode (in octal notation) of the root inode of the file system. Defaults to the mount point's mode. +.It Cm nonc +Do not use namecache to resolve names to files for the created mount. +This saves memory, but currently might impair scalability for highly +used mounts on large machines. .It Cm inodes Specifies the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on From owner-svn-src-stable-11@freebsd.org Thu Feb 2 18:27:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77244CCE6D9; Thu, 2 Feb 2017 18:27:22 +0000 (UTC) (envelope-from asomers@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 51B4E14D6; Thu, 2 Feb 2017 18:27:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12IRLR3020425; Thu, 2 Feb 2017 18:27:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12IRKxC020418; Thu, 2 Feb 2017 18:27:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702021827.v12IRKxC020418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 18:27:20 +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: r313100 - in stable/11: sbin/dhclient sys/dev/mpr usr.bin/chat usr.bin/rpcgen usr.bin/tail usr.sbin/diskinfo X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 18:27:22 -0000 Author: asomers Date: Thu Feb 2 18:27:20 2017 New Revision: 313100 URL: https://svnweb.freebsd.org/changeset/base/313100 Log: MFC r311160, r311210, r311288, r311292, r311298, r311340 r311160: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 r311210: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311288: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311292: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311298: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311340: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: stable/11/sbin/dhclient/dispatch.c stable/11/sys/dev/mpr/mpr_sas.c stable/11/sys/dev/mpr/mpr_sas_lsi.c stable/11/usr.bin/chat/chat.c stable/11/usr.bin/rpcgen/rpc_parse.c stable/11/usr.bin/tail/reverse.c stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/dispatch.c ============================================================================== --- stable/11/sbin/dhclient/dispatch.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sbin/dhclient/dispatch.c Thu Feb 2 18:27:20 2017 (r313100) @@ -453,16 +453,12 @@ add_protocol(char *name, int fd, void (* void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } Modified: stable/11/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/11/sys/dev/mpr/mpr_sas.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sys/dev/mpr/mpr_sas.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1846,8 +1846,12 @@ mprsas_action_scsiio(struct mprsas_softc if (csio->ccb_h.flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); - else + else { + KASSERT(csio->cdb_len <= IOCDBLEN, + ("cdb_len %d is greater than IOCDBLEN but CAM_CDB_POINTER is not set", + csio->cdb_len)); bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); + } req->IoFlags = htole16(csio->cdb_len); /* @@ -2429,6 +2433,7 @@ mprsas_scsiio_complete(struct mpr_softc * driver is being shutdown. */ if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && + (csio->data_ptr != NULL) && ((csio->data_ptr[0] & 0x1f) == T_DIRECT) && (sc->mapping_table[target_id].device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && Modified: stable/11/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/11/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1056,6 +1056,7 @@ out: mpr_free_command(sc, cm); else if (error == 0) error = EWOULDBLOCK; + cm->cm_data = NULL; free(buffer, M_MPR); return (error); } @@ -1196,18 +1197,18 @@ mprsas_SSU_to_SATA_devices(struct mpr_so continue; } - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " - "unit.\n"); - return; - } - /* * The stop_at_shutdown flag will be set if this device is * a SATA direct-access end device. */ if (target->stop_at_shutdown) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " + "unit.\n"); + return; + } + if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid, targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { Modified: stable/11/usr.bin/chat/chat.c ============================================================================== --- stable/11/usr.bin/chat/chat.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/chat/chat.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1173,7 +1173,7 @@ int get_string(char *string) { char temp[STR_LEN]; - int c, printed = 0; + int c; size_t len, minlen; char *s = temp, *end = s + STR_LEN; char *logged = temp; @@ -1306,13 +1306,6 @@ get_string(char *string) alarm(0); - if (verbose && printed) { - if (alarmed) - chat_logf(" -- read timed out"); - else - chat_logf(" -- read failed: %m"); - } - exit_code = 3; alarmed = 0; return (0); Modified: stable/11/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- stable/11/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 18:27:20 2017 (r313100) @@ -290,7 +290,6 @@ def_union(definition *defp) declaration dec; case_list *cases; case_list **tailp; - int flag; defp->def_kind = DEF_UNION; scan(TOK_IDENT, &tok); @@ -309,7 +308,6 @@ def_union(definition *defp) cases->case_name = tok.str; scan(TOK_COLON, &tok); /* now peek at next token */ - flag = 0; if (peekscan(TOK_CASE, &tok)){ do { scan2(TOK_IDENT, TOK_CHARCONST, &tok); @@ -322,14 +320,6 @@ def_union(definition *defp) scan(TOK_COLON, &tok); } while (peekscan(TOK_CASE, &tok)); } - else - if (flag) - { - - *tailp = cases; - tailp = &cases->next; - cases = XALLOC(case_list); - } get_declaration(&dec, DEF_UNION); cases->case_decl = dec; Modified: stable/11/usr.bin/tail/reverse.c ============================================================================== --- stable/11/usr.bin/tail/reverse.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/tail/reverse.c Thu Feb 2 18:27:20 2017 (r313100) @@ -117,6 +117,7 @@ r_reg(FILE *fp, const char *fn, enum STY map.start = NULL; map.mapoff = map.maxoff = size; map.fd = fileno(fp); + map.maplen = 0; /* * Last char is special, ignore whether newline or not. Note that @@ -205,7 +206,13 @@ r_buf(FILE *fp, const char *fn) (tl->l = malloc(BSZ)) == NULL) { if (!mark) err(1, "malloc"); - tl = enomem ? tl->next : mark; + if (enomem) + tl = tl->next; + else { + if (tl) + free(tl); + tl = mark; + } enomem += tl->len; } else if (mark) { tl->next = mark; Modified: stable/11/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- stable/11/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 18:27:20 2017 (r313100) @@ -94,13 +94,12 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { - sprintf(buf, "%s%s", _PATH_DEV, argv[i]); + snprintf(buf, BUFSIZ, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); } if (fd < 0) { warn("%s", argv[i]); - exitval = 1; - goto out; + exit(1); } error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); if (error) { @@ -186,7 +185,8 @@ rdsect(int fd, off_t blockno, u_int sect { int error; - lseek(fd, (off_t)blockno * sectorsize, SEEK_SET); + if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1) + err(1, "lseek"); error = read(fd, sector, sectorsize); if (error == -1) err(1, "read"); @@ -251,6 +251,9 @@ speeddisk(int fd, off_t mediasize, u_int off_t b0, b1, sectorcount, step; sectorcount = mediasize / sectorsize; + if (sectorcount <= 0) + return; /* Can't test devices with no sectors */ + step = 1ULL << (flsll(sectorcount / (4 * 200)) - 1); if (step > 16384) step = 16384; From owner-svn-src-stable-11@freebsd.org Thu Feb 2 21:05:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F3FCCE08C; Thu, 2 Feb 2017 21:05:56 +0000 (UTC) (envelope-from asomers@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 2B305136E; Thu, 2 Feb 2017 21:05:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12L5tPY086107; Thu, 2 Feb 2017 21:05:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12L5tWn086106; Thu, 2 Feb 2017 21:05:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702022105.v12L5tWn086106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 21:05:55 +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: r313108 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 21:05:56 -0000 Author: asomers Date: Thu Feb 2 21:05:55 2017 New Revision: 313108 URL: https://svnweb.freebsd.org/changeset/base/313108 Log: MFC r310180, r310327 r310180: Fix panic during lagg destruction with simultaneous status check If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a page fault may result. The first process will destroy ifp->if_lagg in lagg_clone_destroy (called by if_clone_destroy). Then the second process will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and goto fallback: where it will promptly dereference ifp->if_lagg anyway. The solution is to repeat the NULL check for ifp->if_lagg MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8512 r310327: Remove stray debugging code from r310180 Reported by: rstone Pointy hat to: asomers MFC after: 3 weeks X-MFC-with: 310180 Sponsored by: Spectra Logic Corp Modified: stable/11/sys/net/if_lagg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Thu Feb 2 20:30:50 2017 (r313107) +++ stable/11/sys/net/if_lagg.c Thu Feb 2 21:05:55 2017 (r313108) @@ -1022,7 +1022,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon return (error); fallback: - if (lp->lp_ioctl != NULL) + if (lp != NULL && lp->lp_ioctl != NULL) return ((*lp->lp_ioctl)(ifp, cmd, data)); return (EINVAL); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 00:50:43 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09570CCCB7A; Fri, 3 Feb 2017 00:50:43 +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 A1720CD1; Fri, 3 Feb 2017 00:50:42 +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 v130ofq9077417; Fri, 3 Feb 2017 00:50:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130ofcD077416; Fri, 3 Feb 2017 00:50:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030050.v130ofcD077416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:50:41 +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: r313117 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:50:43 -0000 Author: markj Date: Fri Feb 3 00:50:41 2017 New Revision: 313117 URL: https://svnweb.freebsd.org/changeset/base/313117 Log: MFC r310332: Avoid modifying the object string table when patching USDT probes. Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 3 00:46:40 2017 (r313116) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 3 00:50:41 2017 (r313117) @@ -1223,6 +1223,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; static const char dt_symfmt[] = "%s%ld.%s"; + char probename[DTRACE_NAMELEN]; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; GElf_Ehdr ehdr; @@ -1576,8 +1577,6 @@ process_obj(dtrace_hdl_t *dtp, const cha bcopy(s, pname, p - s); pname[p - s] = '\0'; - p = strhyphenate(p + 3); /* strlen("___") */ - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), elf) != 0) @@ -1628,10 +1627,14 @@ process_obj(dtrace_hdl_t *dtp, const cha "no such provider %s", pname)); } - if ((prp = dt_probe_lookup(pvp, p)) == NULL) { + if (strlcpy(probename, p + 3, sizeof (probename)) >= + sizeof (probename)) return (dt_link_error(dtp, elf, fd, bufs, - "no such probe %s", p)); - } + "invalid probe name %s", probename)); + (void) strhyphenate(probename); + if ((prp = dt_probe_lookup(pvp, probename)) == NULL) + return (dt_link_error(dtp, elf, fd, bufs, + "no such probe %s", probename)); assert(fsym.st_value <= rela.r_offset); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 00:53:34 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 909B9CCCD7B; Fri, 3 Feb 2017 00:53: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 516EC105D; Fri, 3 Feb 2017 00:53: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 v130rXUa081251; Fri, 3 Feb 2017 00:53:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130rXaK081250; Fri, 3 Feb 2017 00:53:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030053.v130rXaK081250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:53:33 +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: r313118 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:53:34 -0000 Author: markj Date: Fri Feb 3 00:53:33 2017 New Revision: 313118 URL: https://svnweb.freebsd.org/changeset/base/313118 Log: MFC r312307: Improve some of the sysctl descriptions added in r299827. Modified: stable/11/sys/netinet6/in6_proto.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/in6_proto.c ============================================================================== --- stable/11/sys/netinet6/in6_proto.c Fri Feb 3 00:50:41 2017 (r313117) +++ stable/11/sys/netinet6/in6_proto.c Fri Feb 3 00:53:33 2017 (r313118) @@ -507,19 +507,21 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_forwarding), 0, - "Enable IPv6 forwarding between interfaces"); + "Enable forwarding of IPv6 packets between interfaces"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_sendredirects), 0, - "Send a redirect message when forwarding back to a source link"); + "Send ICMPv6 redirects for unforwardable IPv6 packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defhlim), 0, - "Default hop limit"); + "Default hop limit to use for outgoing IPv6 packets"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, - "Maximum allowed number of outstanding fragmented IPv6 packets"); + "Default maximum number of outstanding fragmented IPv6 packets. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); @@ -541,7 +543,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_I "Frequency in seconds at which to log IPv6 forwarding errors"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, hdrnestlimit, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_hdrnestlimit), 0, - "Maximum allowed number of nested protocol headers"); + "Default maximum number of IPv6 extension headers permitted on " + "incoming IPv6 packets, 0 for no artificial limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, dad_count, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_dad_count), 0, "Number of ICMPv6 NS messages sent during duplicate address detection"); @@ -550,7 +553,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_ "Provide an IPv6 flowlabel in outbound packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, defmcasthlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defmcasthlim), 0, - "Default hop limit for multicast packets"); + "Default hop limit for IPv6 multicast packets originating from this " + "node"); SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, kame_version, CTLFLAG_RD, __KAME_VERSION, 0, "KAME version string"); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 00:54:28 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F295BCCCE45; Fri, 3 Feb 2017 00:54:28 +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 C1FAF119A; Fri, 3 Feb 2017 00:54:28 +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 v130sRMY081348; Fri, 3 Feb 2017 00:54:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130sRKs081347; Fri, 3 Feb 2017 00:54:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030054.v130sRKs081347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:54: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: r313119 - 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:54:29 -0000 Author: markj Date: Fri Feb 3 00:54:27 2017 New Revision: 313119 URL: https://svnweb.freebsd.org/changeset/base/313119 Log: MFC r312199: Stop the scheduler upon panic even in non-SMP kernels. Modified: stable/11/sys/kern/kern_shutdown.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_shutdown.c ============================================================================== --- stable/11/sys/kern/kern_shutdown.c Fri Feb 3 00:53:33 2017 (r313118) +++ stable/11/sys/kern/kern_shutdown.c Fri Feb 3 00:54:27 2017 (r313119) @@ -713,13 +713,13 @@ vpanic(const char *fmt, va_list ap) CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); } +#endif /* * Ensure that the scheduler is stopped while panicking, even if panic * has been entered from kdb. */ td->td_stopsched = 1; -#endif bootopt = RB_AUTOBOOT; newpanic = 0; From owner-svn-src-stable-11@freebsd.org Fri Feb 3 00:55:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0590CCCED3; Fri, 3 Feb 2017 00:55:32 +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 AF4B512E9; Fri, 3 Feb 2017 00:55:32 +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 v130tVXd081473; Fri, 3 Feb 2017 00:55:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130tVke081472; Fri, 3 Feb 2017 00:55:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030055.v130tVke081472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:55:31 +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: r313120 - stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:55:33 -0000 Author: markj Date: Fri Feb 3 00:55:31 2017 New Revision: 313120 URL: https://svnweb.freebsd.org/changeset/base/313120 Log: MFC r312893: Fix an off-by-one in an assertion on fasttrap tracepoint sizes. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Fri Feb 3 00:54:27 2017 (r313119) +++ stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Fri Feb 3 00:55:31 2017 (r313120) @@ -1627,7 +1627,7 @@ fasttrap_pid_probe(struct reg *rp) * a signal we can reset the value of the scratch register. */ - ASSERT(tp->ftt_size < FASTTRAP_MAX_INSTR_SIZE); + ASSERT(tp->ftt_size <= FASTTRAP_MAX_INSTR_SIZE); curthread->t_dtrace_scrpc = addr; bcopy(tp->ftt_instr, &scratch[i], tp->ftt_size); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 00:58:09 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77A54CCCF59; Fri, 3 Feb 2017 00:58:09 +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 524931479; Fri, 3 Feb 2017 00:58:09 +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 v130w8hZ081708; Fri, 3 Feb 2017 00:58:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130w8hG081706; Fri, 3 Feb 2017 00:58:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030058.v130w8hG081706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:58:08 +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: r313121 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:58:09 -0000 Author: markj Date: Fri Feb 3 00:58:08 2017 New Revision: 313121 URL: https://svnweb.freebsd.org/changeset/base/313121 Log: MFC r311902: Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/i386/i386/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 00:55:31 2017 (r313120) +++ stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 00:58:08 2017 (r313121) @@ -6054,7 +6054,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva pdp_entry_t *pdpe; pd_entry_t oldpde, *pde; pt_entry_t *pte, PG_A, PG_G, PG_M, PG_RW, PG_V; - vm_offset_t va_next; + vm_offset_t va, va_next; vm_page_t m; boolean_t anychanged; @@ -6134,11 +6134,11 @@ pmap_advise(pmap_t pmap, vm_offset_t sva } if (va_next > eva) va_next = eva; + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | - PG_V)) - continue; + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V)) + goto maybe_invlrng; else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { if (advice == MADV_DONTNEED) { /* @@ -6153,12 +6153,22 @@ pmap_advise(pmap_t pmap, vm_offset_t sva } else if ((*pte & PG_A) != 0) atomic_clear_long(pte, PG_A); else - continue; - if ((*pte & PG_G) != 0) - pmap_invalidate_page(pmap, sva); - else + goto maybe_invlrng; + + if ((*pte & PG_G) != 0) { + if (va == va_next) + va = sva; + } else anychanged = TRUE; + continue; +maybe_invlrng: + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } if (anychanged) pmap_invalidate_all(pmap); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 3 00:55:31 2017 (r313120) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 3 00:58:08 2017 (r313121) @@ -4959,7 +4959,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva { pd_entry_t oldpde, *pde; pt_entry_t *pte; - vm_offset_t pdnxt; + vm_offset_t va, pdnxt; vm_page_t m; boolean_t anychanged, pv_lists_locked; @@ -5020,11 +5020,11 @@ resume: } if (pdnxt > eva) pdnxt = eva; + va = pdnxt; for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, sva += PAGE_SIZE) { - if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | - PG_V)) - continue; + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V)) + goto maybe_invlrng; else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { if (advice == MADV_DONTNEED) { /* @@ -5039,12 +5039,21 @@ resume: } else if ((*pte & PG_A) != 0) atomic_clear_int((u_int *)pte, PG_A); else - continue; - if ((*pte & PG_G) != 0) - pmap_invalidate_page(pmap, sva); - else + goto maybe_invlrng; + if ((*pte & PG_G) != 0) { + if (va == pdnxt) + va = sva; + } else anychanged = TRUE; + continue; +maybe_invlrng: + if (va != pdnxt) { + pmap_invalidate_range(pmap, va, sva); + va = pdnxt; + } } + if (va != pdnxt) + pmap_invalidate_range(pmap, va, sva); } if (anychanged) pmap_invalidate_all(pmap); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:04:24 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30A28CBE384; Fri, 3 Feb 2017 01:04:24 +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 000711B07; Fri, 3 Feb 2017 01:04:23 +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 v1314NAS085815; Fri, 3 Feb 2017 01:04:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1314Nf0085814; Fri, 3 Feb 2017 01:04:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030104.v1314Nf0085814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:04:23 +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: r313122 - 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:04:24 -0000 Author: markj Date: Fri Feb 3 01:04:22 2017 New Revision: 313122 URL: https://svnweb.freebsd.org/changeset/base/313122 Log: MFC r312209: Suppress a warning about m_assertbuf being unused. Modified: stable/11/sys/kern/uipc_mbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_mbuf.c ============================================================================== --- stable/11/sys/kern/uipc_mbuf.c Fri Feb 3 00:58:08 2017 (r313121) +++ stable/11/sys/kern/uipc_mbuf.c Fri Feb 3 01:04:22 2017 (r313122) @@ -169,7 +169,7 @@ CTASSERT(sizeof(struct m_ext) == 28); * plain pointer does. */ #ifdef INVARIANTS -static struct mbuf m_assertbuf; +static struct mbuf __used m_assertbuf; CTASSERT(sizeof(m_assertbuf.m_slist) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_stailq) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_slistpkt) == sizeof(m_assertbuf.m_nextpkt)); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:10:39 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92CFCCBE6E4; Fri, 3 Feb 2017 01:10:39 +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 5A9A11ECB; Fri, 3 Feb 2017 01:10:39 +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 v131AcDO086151; Fri, 3 Feb 2017 01:10:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131AcJM086150; Fri, 3 Feb 2017 01:10:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030110.v131AcJM086150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:10:38 +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: r313123 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:10:39 -0000 Author: markj Date: Fri Feb 3 01:10:38 2017 New Revision: 313123 URL: https://svnweb.freebsd.org/changeset/base/313123 Log: MFC r310316: Consistently print D variable indices in decimal when disassembling. Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Fri Feb 3 01:04:22 2017 (r313122) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Fri Feb 3 01:10:38 2017 (r313123) @@ -499,7 +499,7 @@ dt_dis(const dtrace_difo_t *dp, FILE *fp if (v->dtdv_flags & DIFV_F_MOD) (void) strcat(flags, "/w"); - (void) fprintf(fp, "%-16s %-4x %-3s %-3s %-4s %s\n", + (void) fprintf(fp, "%-16s %-4u %-3s %-3s %-4s %s\n", &dp->dtdo_strtab[v->dtdv_name], v->dtdv_id, kind, scope, flags + 1, dt_dis_typestr(&v->dtdv_type, type, sizeof (type))); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:15:32 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9B3CBEB31; Fri, 3 Feb 2017 01:15:32 +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 A0324401; Fri, 3 Feb 2017 01:15:32 +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 v131FV7m090029; Fri, 3 Feb 2017 01:15:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131FV0C090027; Fri, 3 Feb 2017 01:15:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030115.v131FV0C090027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:15:31 +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: r313124 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:15:33 -0000 Author: markj Date: Fri Feb 3 01:15:31 2017 New Revision: 313124 URL: https://svnweb.freebsd.org/changeset/base/313124 Log: MFC r310420, r310421, r310422: Fix races and logic errors around dlclose(). Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Fri Feb 3 01:10:38 2017 (r313123) +++ stable/11/libexec/rtld-elf/rtld.c Fri Feb 3 01:15:31 2017 (r313124) @@ -87,7 +87,10 @@ static char *errmsg_save(void); static void *fill_search_info(const char *, size_t, void *); static char *find_library(const char *, const Obj_Entry *, int *); static const char *gethints(bool); +static void hold_object(Obj_Entry *); +static void unhold_object(Obj_Entry *); static void init_dag(Obj_Entry *); +static void init_marker(Obj_Entry *); static void init_pagesizes(Elf_Auxinfo **aux_info); static void init_rtld(caddr_t, Elf_Auxinfo **); static void initlist_add_neededs(Needed_Entry *, Objlist *); @@ -113,6 +116,7 @@ static void objlist_put_after(Objlist *, static void objlist_remove(Objlist *, Obj_Entry *); static int parse_libdir(const char *); static void *path_enumerate(const char *, path_enum_proc, void *); +static void release_object(Obj_Entry *); static int relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, @@ -1827,6 +1831,14 @@ init_dag(Obj_Entry *root) root->dag_inited = true; } +static void +init_marker(Obj_Entry *marker) +{ + + bzero(marker, sizeof(*marker)); + marker->marker = true; +} + Obj_Entry * globallist_curr(const Obj_Entry *obj) { @@ -1853,6 +1865,23 @@ globallist_next(const Obj_Entry *obj) } } +/* Prevent the object from being unmapped while the bind lock is dropped. */ +static void +hold_object(Obj_Entry *obj) +{ + + obj->holdcount++; +} + +static void +unhold_object(Obj_Entry *obj) +{ + + assert(obj->holdcount > 0); + if (--obj->holdcount == 0 && obj->unholdfree) + release_object(obj); +} + static void process_z(Obj_Entry *root) { @@ -2210,7 +2239,7 @@ load_object(const char *name, int fd_u, fd = -1; if (name != NULL) { TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) + if (obj->marker || obj->doomed) continue; if (object_match_name(obj, name)) return (obj); @@ -2257,7 +2286,7 @@ load_object(const char *name, int fd_u, return NULL; } TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) + if (obj->marker || obj->doomed) continue; if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) break; @@ -2399,6 +2428,9 @@ objlist_call_fini(Objlist *list, Obj_Ent assert(root == NULL || root->refcount == 1); + if (root != NULL) + root->doomed = true; + /* * Preserve the current error message since a fini function might * call into the dynamic linker and overwrite it. @@ -2411,15 +2443,11 @@ objlist_call_fini(Objlist *list, Obj_Ent continue; /* Remove object from fini list to prevent recursive invocation. */ STAILQ_REMOVE(list, elm, Struct_Objlist_Entry, link); - /* - * XXX: If a dlopen() call references an object while the - * fini function is in progress, we might end up trying to - * unload the referenced object in dlclose() or the object - * won't be unloaded although its fini function has been - * called. - */ - lock_release(rtld_bind_lock, lockstate); + /* Ensure that new references cannot be acquired. */ + elm->obj->doomed = true; + hold_object(elm->obj); + lock_release(rtld_bind_lock, lockstate); /* * It is legal to have both DT_FINI and DT_FINI_ARRAY defined. * When this happens, DT_FINI_ARRAY is processed first. @@ -2445,6 +2473,7 @@ objlist_call_fini(Objlist *list, Obj_Ent call_initfini_pointer(elm->obj, elm->obj->fini); } wlock_acquire(rtld_bind_lock, lockstate); + unhold_object(elm->obj); /* No need to free anything if process is going down. */ if (root != NULL) free(elm); @@ -2498,6 +2527,7 @@ objlist_call_init(Objlist *list, RtldLoc * without better locking. */ elm->obj->init_done = true; + hold_object(elm->obj); lock_release(rtld_bind_lock, lockstate); /* @@ -2524,6 +2554,7 @@ objlist_call_init(Objlist *list, RtldLoc } } wlock_acquire(rtld_bind_lock, lockstate); + unhold_object(elm->obj); } errmsg_restore(saved_msg); } @@ -3539,8 +3570,7 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac RtldLockState bind_lockstate, phdr_lockstate; int error; - bzero(&marker, sizeof(marker)); - marker.marker = true; + init_marker(&marker); error = 0; wlock_acquire(rtld_phdr_lock, &phdr_lockstate); @@ -3548,11 +3578,13 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac for (obj = globallist_curr(TAILQ_FIRST(&obj_list)); obj != NULL;) { TAILQ_INSERT_AFTER(&obj_list, obj, &marker, next); rtld_fill_dl_phdr_info(obj, &phdr_info); + hold_object(obj); lock_release(rtld_bind_lock, &bind_lockstate); error = callback(&phdr_info, sizeof phdr_info, param); wlock_acquire(rtld_bind_lock, &bind_lockstate); + unhold_object(obj); obj = globallist_next(&marker); TAILQ_REMOVE(&obj_list, &marker, next); if (error != 0) { @@ -3807,6 +3839,19 @@ _r_debug_postinit(struct link_map *m) __compiler_membar(); } +static void +release_object(Obj_Entry *obj) +{ + + if (obj->holdcount > 0) { + obj->unholdfree = true; + return; + } + munmap(obj->mapbase, obj->mapsize); + linkmap_delete(obj); + obj_free(obj); +} + /* * Get address of the pointer variable in the main program. * Prefer non-weak symbol over the weak one. @@ -4377,7 +4422,7 @@ trace_loaded_objects(Obj_Entry *obj) static void unload_object(Obj_Entry *root) { - Obj_Entry *obj, *obj1; + Obj_Entry marker, *obj, *next; assert(root->refcount == 0); @@ -4388,18 +4433,32 @@ unload_object(Obj_Entry *root) unlink_object(root); /* Unmap all objects that are no longer referenced. */ - TAILQ_FOREACH_SAFE(obj, &obj_list, next, obj1) { + for (obj = TAILQ_FIRST(&obj_list); obj != NULL; obj = next) { + next = TAILQ_NEXT(obj, next); if (obj->marker || obj->refcount != 0) continue; LD_UTRACE(UTRACE_UNLOAD_OBJECT, obj, obj->mapbase, obj->mapsize, 0, obj->path); dbg("unloading \"%s\"", obj->path); - unload_filtees(root); - munmap(obj->mapbase, obj->mapsize); - linkmap_delete(obj); + /* + * Unlink the object now to prevent new references from + * being acquired while the bind lock is dropped in + * recursive dlclose() invocations. + */ TAILQ_REMOVE(&obj_list, obj, next); obj_count--; - obj_free(obj); + + if (obj->filtees_loaded) { + if (next != NULL) { + init_marker(&marker); + TAILQ_INSERT_BEFORE(next, &marker, next); + unload_filtees(obj); + next = TAILQ_NEXT(&marker, next); + TAILQ_REMOVE(&obj_list, &marker, next); + } else + unload_filtees(obj); + } + release_object(obj); } } Modified: stable/11/libexec/rtld-elf/rtld.h ============================================================================== --- stable/11/libexec/rtld-elf/rtld.h Fri Feb 3 01:10:38 2017 (r313123) +++ stable/11/libexec/rtld-elf/rtld.h Fri Feb 3 01:15:31 2017 (r313124) @@ -142,7 +142,8 @@ typedef struct Struct_Obj_Entry { TAILQ_ENTRY(Struct_Obj_Entry) next; char *path; /* Pathname of underlying file (%) */ char *origin_path; /* Directory path of origin file */ - int refcount; + int refcount; /* DAG references */ + int holdcount; /* Count of transient references */ int dl_refcount; /* Number of times loaded by dlopen */ /* These items are computed by map_object() or by digest_phdr(). */ @@ -265,6 +266,8 @@ typedef struct Struct_Obj_Entry { bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ bool dlopened : 1; /* dlopen()-ed (vs. load statically) */ bool marker : 1; /* marker on the global obj list */ + bool unholdfree : 1; /* unmap upon last unhold */ + bool doomed : 1; /* Object cannot be referenced */ struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:16:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E516CCBEC1E; Fri, 3 Feb 2017 01:16:55 +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 B42557D2; Fri, 3 Feb 2017 01:16:55 +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 v131GsVC090135; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Gswm090133; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030116.v131Gswm090133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:16:54 +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: r313125 - in stable/11: lib/libc/sys 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:16:56 -0000 Author: markj Date: Fri Feb 3 01:16:54 2017 New Revision: 313125 URL: https://svnweb.freebsd.org/changeset/base/313125 Log: MFC r309200: Launder VPO_NOSYNC pages upon vnode deactivation. Modified: stable/11/lib/libc/sys/mmap.2 stable/11/sys/kern/vfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mmap.2 ============================================================================== --- stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:16:54 2017 (r313125) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 18, 2015 +.Dd November 25, 2016 .Dt MMAP 2 .Os .Sh NAME @@ -189,6 +189,8 @@ this option any VM pages you dirty may b (every 30-60 seconds usually) which can create performance problems if you do not need that to occur (such as when you are using shared file-backed mmap regions for IPC purposes). +Dirty data will be flushed automatically when all mappings of an object are +removed and all descriptors referencing the object are closed. Note that VM/file system coherency is maintained whether you use .Dv MAP_NOSYNC Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:16:54 2017 (r313125) @@ -2948,7 +2948,7 @@ vinactive(struct vnode *vp, struct threa obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); + vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); } VOP_INACTIVE(vp, td); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:18:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E86CBED2B; Fri, 3 Feb 2017 01:18:48 +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 8CA96988; Fri, 3 Feb 2017 01:18:48 +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 v131Il4N090279; Fri, 3 Feb 2017 01:18:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131IlC3090274; Fri, 3 Feb 2017 01:18:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030118.v131IlC3090274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:18: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: r313126 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/pid contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n usr.sbin/dtrace/tests/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:18:48 -0000 Author: markj Date: Fri Feb 3 01:18:47 2017 New Revision: 313126 URL: https://svnweb.freebsd.org/changeset/base/313126 Log: MFC r309698, r309699, r309700: DTrace test fixes. Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -56,7 +56,7 @@ prov.h: prov.d $dtrace -h -s prov.d prov.o: prov.d main.o - $dtrace -G -32 -s prov.d main.o + $dtrace -G -s prov.d main.o EOF cat > prov.d < /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -45,7 +45,7 @@ EOF spinny() { while true; do - /usr/bin/date > /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -45,7 +45,7 @@ EOF spinny() { while true; do - /usr/bin/date > /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Fri Feb 3 01:18:47 2017 (r313126) @@ -70,7 +70,7 @@ runtest() err.*.ksh|tst.*.ksh) expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 - ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + tst=$TFILE ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR status=$? if [ $status -ne $exstatus ]; then From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:19:50 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D5E3CBED9C; Fri, 3 Feb 2017 01:19: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 F08E8B1F; Fri, 3 Feb 2017 01:19: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 v131Jn1L090415; Fri, 3 Feb 2017 01:19:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Jn3D090414; Fri, 3 Feb 2017 01:19:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030119.v131Jn3D090414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:19: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: r313127 - 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:19:50 -0000 Author: markj Date: Fri Feb 3 01:19:48 2017 New Revision: 313127 URL: https://svnweb.freebsd.org/changeset/base/313127 Log: MFC r307693: Simplify keg_drain() a bit by using LIST_FOREACH_SAFE. Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Fri Feb 3 01:18:47 2017 (r313126) +++ stable/11/sys/vm/uma_core.c Fri Feb 3 01:19:48 2017 (r313127) @@ -845,8 +845,7 @@ static void keg_drain(uma_keg_t keg) { struct slabhead freeslabs = { 0 }; - uma_slab_t slab; - uma_slab_t n; + uma_slab_t slab, tmp; /* * We don't want to take pages from statically allocated kegs at this @@ -862,15 +861,10 @@ keg_drain(uma_keg_t keg) if (keg->uk_free == 0) goto finished; - slab = LIST_FIRST(&keg->uk_free_slab); - while (slab) { - n = LIST_NEXT(slab, us_link); - - /* We have no where to free these to */ - if (slab->us_flags & UMA_SLAB_BOOT) { - slab = n; + LIST_FOREACH_SAFE(slab, &keg->uk_free_slab, us_link, tmp) { + /* We have nowhere to free these to. */ + if (slab->us_flags & UMA_SLAB_BOOT) continue; - } LIST_REMOVE(slab, us_link); keg->uk_pages -= keg->uk_ppera; @@ -880,8 +874,6 @@ keg_drain(uma_keg_t keg) UMA_HASH_REMOVE(&keg->uk_hash, slab, slab->us_data); SLIST_INSERT_HEAD(&freeslabs, slab, us_hlink); - - slab = n; } finished: KEG_UNLOCK(keg); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:21:57 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9C96CCD0FF; Fri, 3 Feb 2017 01:21:57 +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 94498FFA; Fri, 3 Feb 2017 01:21:57 +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 v131LutO094151; Fri, 3 Feb 2017 01:21:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131LuRP094150; Fri, 3 Feb 2017 01:21:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030121.v131LuRP094150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:21: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: r313128 - stable/11/sys/x86/acpica X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:21:57 -0000 Author: markj Date: Fri Feb 3 01:21:56 2017 New Revision: 313128 URL: https://svnweb.freebsd.org/changeset/base/313128 Log: MFC r302793: Allow ACPI wakeup code and page tables to be stored in non-contiguous pages. Modified: stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Fri Feb 3 01:19:48 2017 (r313127) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Fri Feb 3 01:21:56 2017 (r313128) @@ -88,7 +88,7 @@ static cpuset_t suspcpus; static struct susppcb **susppcbs; #endif -static void *acpi_alloc_wakeup_handler(void); +static void *acpi_alloc_wakeup_handler(void **); static void acpi_stop_beep(void *); #ifdef SMP @@ -97,18 +97,14 @@ static void acpi_wakeup_cpus(struct acp #endif #ifdef __amd64__ -#define ACPI_PAGETABLES 3 +#define ACPI_WAKEPAGES 4 #else -#define ACPI_PAGETABLES 0 +#define ACPI_WAKEPAGES 1 #endif -#define WAKECODE_VADDR(sc) \ - ((sc)->acpi_wakeaddr + (ACPI_PAGETABLES * PAGE_SIZE)) -#define WAKECODE_PADDR(sc) \ - ((sc)->acpi_wakephys + (ACPI_PAGETABLES * PAGE_SIZE)) #define WAKECODE_FIXUP(offset, type, val) do { \ type *addr; \ - addr = (type *)(WAKECODE_VADDR(sc) + offset); \ + addr = (type *)(sc->acpi_wakeaddr + (offset)); \ *addr = val; \ } while (0) @@ -125,7 +121,7 @@ static int acpi_wakeup_ap(struct acpi_softc *sc, int cpu) { struct pcb *pcb; - int vector = (WAKECODE_PADDR(sc) >> 12) & 0xff; + int vector = (sc->acpi_wakephys >> 12) & 0xff; int apic_id = cpu_apic_ids[cpu]; int ms; @@ -168,7 +164,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc) /* setup a vector to our boot code */ *((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET; - *((volatile u_short *)WARMBOOT_SEG) = WAKECODE_PADDR(sc) >> 4; + *((volatile u_short *)WARMBOOT_SEG) = sc->acpi_wakephys >> 4; outb(CMOS_REG, BIOS_RESET); outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ @@ -209,7 +205,7 @@ acpi_sleep_machdep(struct acpi_softc *sc if (acpi_resume_beep != 0) timer_spkr_acquire(); - AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc), 0); + AcpiSetFirmwareWakingVector(sc->acpi_wakephys, 0); intr_suspend(); @@ -309,11 +305,12 @@ acpi_wakeup_machdep(struct acpi_softc *s } static void * -acpi_alloc_wakeup_handler(void) +acpi_alloc_wakeup_handler(void *wakepages[ACPI_WAKEPAGES]) { - void *wakeaddr; int i; + memset(wakepages, 0, ACPI_WAKEPAGES * sizeof(*wakepages)); + /* * Specify the region for our wakeup code. We want it in the low 1 MB * region, excluding real mode IVT (0-0x3ff), BDA (0x400-0x4ff), EBDA @@ -321,18 +318,18 @@ acpi_alloc_wakeup_handler(void) * and ROM area (0xa0000 and above). The temporary page tables must be * page-aligned. */ - wakeaddr = contigmalloc((ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF, - M_NOWAIT, 0x500, 0xa0000, PAGE_SIZE, 0ul); - if (wakeaddr == NULL) { - printf("%s: can't alloc wake memory\n", __func__); - return (NULL); + for (i = 0; i < ACPI_WAKEPAGES; i++) { + wakepages[i] = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT, + 0x500, 0xa0000, PAGE_SIZE, 0ul); + if (wakepages[i] == NULL) { + printf("%s: can't alloc wake memory\n", __func__); + goto freepages; + } } if (EVENTHANDLER_REGISTER(power_resume, acpi_stop_beep, NULL, EVENTHANDLER_PRI_LAST) == NULL) { printf("%s: can't register event handler\n", __func__); - contigfree(wakeaddr, (ACPI_PAGETABLES + 1) * PAGE_SIZE, - M_DEVBUF); - return (NULL); + goto freepages; } susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); for (i = 0; i < mp_ncpus; i++) { @@ -340,39 +337,56 @@ acpi_alloc_wakeup_handler(void) susppcbs[i]->sp_fpususpend = alloc_fpusave(M_WAITOK); } - return (wakeaddr); + return (wakepages); + +freepages: + for (i = 0; i < ACPI_WAKEPAGES; i++) + if (wakepages[i] != NULL) + contigfree(wakepages[i], PAGE_SIZE, M_DEVBUF); + return (NULL); } void acpi_install_wakeup_handler(struct acpi_softc *sc) { - static void *wakeaddr = NULL; + static void *wakeaddr; + void *wakepages[ACPI_WAKEPAGES]; #ifdef __amd64__ uint64_t *pt4, *pt3, *pt2; + vm_paddr_t pt4pa, pt3pa, pt2pa; int i; #endif if (wakeaddr != NULL) return; - wakeaddr = acpi_alloc_wakeup_handler(); - if (wakeaddr == NULL) + if (acpi_alloc_wakeup_handler(wakepages) == NULL) return; + wakeaddr = wakepages[0]; sc->acpi_wakeaddr = (vm_offset_t)wakeaddr; sc->acpi_wakephys = vtophys(wakeaddr); - bcopy(wakecode, (void *)WAKECODE_VADDR(sc), sizeof(wakecode)); +#ifdef __amd64__ + pt4 = wakepages[1]; + pt3 = wakepages[2]; + pt2 = wakepages[3]; + pt4pa = vtophys(pt4); + pt3pa = vtophys(pt3); + pt2pa = vtophys(pt2); +#endif + + bcopy(wakecode, (void *)sc->acpi_wakeaddr, sizeof(wakecode)); /* Patch GDT base address, ljmp targets. */ WAKECODE_FIXUP((bootgdtdesc + 2), uint32_t, - WAKECODE_PADDR(sc) + bootgdt); + sc->acpi_wakephys + bootgdt); WAKECODE_FIXUP((wakeup_sw32 + 2), uint32_t, - WAKECODE_PADDR(sc) + wakeup_32); + sc->acpi_wakephys + wakeup_32); #ifdef __amd64__ WAKECODE_FIXUP((wakeup_sw64 + 1), uint32_t, - WAKECODE_PADDR(sc) + wakeup_64); - WAKECODE_FIXUP(wakeup_pagetables, uint32_t, sc->acpi_wakephys); + sc->acpi_wakephys + wakeup_64); + WAKECODE_FIXUP(wakeup_pagetables, uint32_t, pt4pa); #endif /* Save pointers to some global data. */ @@ -384,33 +398,28 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_cr3, register_t, vtophys(kernel_pmap->pm_pdir)); #endif -#else - /* Build temporary page tables below realmode code. */ - pt4 = wakeaddr; - pt3 = pt4 + (PAGE_SIZE) / sizeof(uint64_t); - pt2 = pt3 + (PAGE_SIZE) / sizeof(uint64_t); - +#else /* __amd64__ */ /* Create the initial 1GB replicated page tables */ for (i = 0; i < 512; i++) { /* * Each slot of the level 4 pages points * to the same level 3 page */ - pt4[i] = (uint64_t)(sc->acpi_wakephys + PAGE_SIZE); + pt4[i] = (uint64_t)pt3pa; pt4[i] |= PG_V | PG_RW | PG_U; /* * Each slot of the level 3 pages points * to the same level 2 page */ - pt3[i] = (uint64_t)(sc->acpi_wakephys + (2 * PAGE_SIZE)); + pt3[i] = (uint64_t)pt2pa; pt3[i] |= PG_V | PG_RW | PG_U; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ pt2[i] = i * (2 * 1024 * 1024); pt2[i] |= PG_V | PG_RW | PG_PS | PG_U; } -#endif +#endif /* !__amd64__ */ if (bootverbose) device_printf(sc->acpi_dev, "wakeup code va %#jx pa %#jx\n", From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:23:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6951CCD322; Fri, 3 Feb 2017 01:23:40 +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 6BD94122B; Fri, 3 Feb 2017 01:23:40 +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 v131NdH4094369; Fri, 3 Feb 2017 01:23:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Ndww094368; Fri, 3 Feb 2017 01:23:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030123.v131Ndww094368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:23: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: r313129 - stable/11/cddl/contrib/opensolaris/common/ctf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:23:40 -0000 Author: markj Date: Fri Feb 3 01:23:39 2017 New Revision: 313129 URL: https://svnweb.freebsd.org/changeset/base/313129 Log: MFC r305055: Recursively enumerate anonymous structs and unions in ctf_member_info(). Modified: stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Fri Feb 3 01:21:56 2017 (r313128) +++ stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Fri Feb 3 01:23:39 2017 (r313129) @@ -644,11 +644,8 @@ ctf_type_compat(ctf_file_t *lfp, ctf_id_ } } -/* - * Return the type and offset for a given member of a STRUCT or UNION. - */ -int -ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, +static int +_ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, ulong_t off, ctf_membinfo_t *mip) { ctf_file_t *ofp = fp; @@ -673,9 +670,13 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t ((uintptr_t)tp + increment); for (n = LCTF_INFO_VLEN(fp, tp->ctt_info); n != 0; n--, mp++) { + if (mp->ctm_name == 0 && + _ctf_member_info(fp, mp->ctm_type, name, + mp->ctm_offset + off, mip) == 0) + return (0); if (strcmp(ctf_strptr(fp, mp->ctm_name), name) == 0) { mip->ctm_type = mp->ctm_type; - mip->ctm_offset = mp->ctm_offset; + mip->ctm_offset = mp->ctm_offset + off; return (0); } } @@ -684,9 +685,14 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t ((uintptr_t)tp + increment); for (n = LCTF_INFO_VLEN(fp, tp->ctt_info); n != 0; n--, lmp++) { + if (lmp->ctlm_name == 0 && + _ctf_member_info(fp, lmp->ctlm_name, name, + (ulong_t)CTF_LMEM_OFFSET(lmp) + off, mip) == 0) + return (0); if (strcmp(ctf_strptr(fp, lmp->ctlm_name), name) == 0) { mip->ctm_type = lmp->ctlm_type; - mip->ctm_offset = (ulong_t)CTF_LMEM_OFFSET(lmp); + mip->ctm_offset = + (ulong_t)CTF_LMEM_OFFSET(lmp) + off; return (0); } } @@ -696,6 +702,17 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t } /* + * Return the type and offset for a given member of a STRUCT or UNION. + */ +int +ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, + ctf_membinfo_t *mip) +{ + + return (_ctf_member_info(fp, type, name, 0, mip)); +} + +/* * Return the array type, index, and size information for the specified ARRAY. */ int From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:28:59 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31776CCD404; Fri, 3 Feb 2017 01:28:59 +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 E90C7143B; Fri, 3 Feb 2017 01:28:58 +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 v131SwM0094822; Fri, 3 Feb 2017 01:28:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131SvJI094820; Fri, 3 Feb 2017 01:28:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030128.v131SvJI094820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:28:57 +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: r313130 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/pid usr.sbin/dtrace/tests/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:28:59 -0000 Author: markj Date: Fri Feb 3 01:28:57 2017 New Revision: 313130 URL: https://svnweb.freebsd.org/changeset/base/313130 Log: MFC r307400, r307401: DTrace test fixes. Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Feb 3 01:23:39 2017 (r313129) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Feb 3 01:28:57 2017 (r313130) @@ -31,8 +31,8 @@ #include int -go(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, - int arg7, int arg8, int arg9) +go(long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, + long arg7, long arg8, long arg9) { return (arg1); } Modified: stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Feb 3 01:23:39 2017 (r313129) +++ stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Feb 3 01:28:57 2017 (r313130) @@ -73,6 +73,7 @@ exclude EXFAIL common/mib/tst.udp.ksh exclude SKIP common/privs/tst.fds.ksh exclude SKIP common/privs/tst.func_access.ksh exclude SKIP common/privs/tst.getf.ksh +exclude SKIP common/privs/tst.kpriv.ksh exclude SKIP common/privs/tst.op_access.ksh exclude SKIP common/privs/tst.procpriv.ksh exclude SKIP common/privs/tst.providers.ksh From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:30:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0B29CCD4F3; Fri, 3 Feb 2017 01:30:52 +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 8FD79161B; Fri, 3 Feb 2017 01:30:52 +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 v131Upw3094977; Fri, 3 Feb 2017 01:30:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131UpoV094976; Fri, 3 Feb 2017 01:30:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030130.v131UpoV094976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:30:51 +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: r313131 - stable/11/cddl/lib/libdtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:30:52 -0000 Author: markj Date: Fri Feb 3 01:30:51 2017 New Revision: 313131 URL: https://svnweb.freebsd.org/changeset/base/313131 Log: MFC r308773: Define dependencies for some auto-generated source files in libdtrace. Modified: stable/11/cddl/lib/libdtrace/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/11/cddl/lib/libdtrace/Makefile Fri Feb 3 01:28:57 2017 (r313130) +++ stable/11/cddl/lib/libdtrace/Makefile Fri Feb 3 01:30:51 2017 (r313131) @@ -120,12 +120,10 @@ LIBADD= ctf elf proc pthread rtld_db CLEANFILES= dt_errtags.c dt_names.c -dt_errtags.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h > dt_errtags.c - -dt_names.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h > dt_names.c +.include -beforedepend: dt_errtags.c dt_names.c +dt_errtags.c: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${.ALLSRC} > ${.TARGET} -.include +dt_names.c: ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${.ALLSRC} > ${.TARGET} From owner-svn-src-stable-11@freebsd.org Fri Feb 3 01:32:05 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C222CCD6AE; Fri, 3 Feb 2017 01:32:05 +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 46D4D1A3D; Fri, 3 Feb 2017 01:32:05 +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 v131W4sm098851; Fri, 3 Feb 2017 01:32:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131W4Yt098849; Fri, 3 Feb 2017 01:32:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030132.v131W4Yt098849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:32: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: r313132 - stable/11/contrib/elftoolchain/libdwarf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:32:05 -0000 Author: markj Date: Fri Feb 3 01:32:04 2017 New Revision: 313132 URL: https://svnweb.freebsd.org/changeset/base/313132 Log: MFC r310724: Follow DW_AT_specification when looking up DW_AT_type attributes. PR: 215350, 215395 Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c Fri Feb 3 01:30:51 2017 (r313131) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c Fri Feb 3 01:32:04 2017 (r313132) @@ -145,6 +145,7 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw Dwarf_Die die1; Dwarf_Unsigned val; Dwarf_Debug dbg; + int first; dbg = die != NULL ? die->die_dbg : NULL; @@ -155,14 +156,16 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = 0; - if ((at = _dwarf_attr_find(die, attr)) == NULL && attr != DW_AT_type) { - DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); - return (DW_DLV_NO_ENTRY); - } - die1 = NULL; - if (at == NULL && - (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL) { + for (;;) { + if ((at = _dwarf_attr_find(die, attr)) != NULL || + attr != DW_AT_type) + break; + if ((at = _dwarf_attr_find(die, DW_AT_abstract_origin)) == + NULL && + (at = _dwarf_attr_find(die, DW_AT_specification)) == NULL) + break; + switch (at->at_form) { case DW_FORM_ref1: case DW_FORM_ref2: @@ -170,13 +173,15 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw case DW_FORM_ref8: case DW_FORM_ref_udata: val = at->u[0].u64; - if ((die1 = _dwarf_die_find(die, val)) == NULL || - (at = _dwarf_attr_find(die1, attr)) == NULL) { - if (die1 != NULL) - dwarf_dealloc(dbg, die1, DW_DLA_DIE); + first = (die1 == NULL); + die1 = _dwarf_die_find(die, val); + if (!first) + dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die1 == NULL) { DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); return (DW_DLV_NO_ENTRY); } + die = die1; break; default: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); @@ -184,6 +189,11 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } } + if (at == NULL) { + DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); + return (DW_DLV_NO_ENTRY); + } + switch (at->at_form) { case DW_FORM_addr: case DW_FORM_data1: Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Fri Feb 3 01:30:51 2017 (r313131) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Fri Feb 3 01:32:04 2017 (r313132) @@ -24,7 +24,7 @@ .\" .\" $Id: dwarf_attrval_signed.3 2980 2014-01-21 20:15:54Z kaiwang27 $ .\" -.Dd January 18, 2014 +.Dd December 26, 2016 .Os .Dt DWARF_ATTRVAL_SIGNED 3 .Sh NAME @@ -168,17 +168,22 @@ or .Pp If the attribute named by argument .Ar attr -is not present in the debugging information entry referenced by -argument +is +.Dv DW_AT_type +and is not present in the debugging information entry referenced by argument .Ar die , and if a .Dv DW_AT_abstract_origin +or +.Dv DW_AT_specification attribute is present in the debugging information entry, function .Fn dwarf_attrval_unsigned will search for the named attribute in the debugging information entry referenced by the .Dv DW_AT_abstract_origin +or +.Dv DW_AT_specification attribute. .Sh RETURN VALUES On success, these functions returns From owner-svn-src-stable-11@freebsd.org Fri Feb 3 11:04:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70DA9CCE76A; Fri, 3 Feb 2017 11:04:51 +0000 (UTC) (envelope-from sevan@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 3D6D633D; Fri, 3 Feb 2017 11:04:51 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13B4oeY033906; Fri, 3 Feb 2017 11:04:50 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13B4oAG033905; Fri, 3 Feb 2017 11:04:50 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031104.v13B4oAG033905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 11:04:50 +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: r313142 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:04:51 -0000 Author: sevan (doc committer) Date: Fri Feb 3 11:04:50 2017 New Revision: 313142 URL: https://svnweb.freebsd.org/changeset/base/313142 Log: Fix the previous commit to the family tree file. It is too early to list 11.0, and we do not list -CURRENT here. Submitted by: maxim Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Fri Feb 3 10:04:17 2017 (r313141) +++ stable/11/share/misc/bsd-family-tree Fri Feb 3 11:04:50 2017 (r313142) @@ -339,7 +339,11 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | -FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current + *--FreeBSD | | | | + | 11.0 | | | | + | | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -687,6 +691,8 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +FreeBSD 11.0 2016-06-08 [FBD] +FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Fri Feb 3 11:17:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8625CCEA5B; Fri, 3 Feb 2017 11:17:45 +0000 (UTC) (envelope-from sevan@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 97C1CA19; Fri, 3 Feb 2017 11:17:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13BHiS7038462; Fri, 3 Feb 2017 11:17:44 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13BHiEg038461; Fri, 3 Feb 2017 11:17:44 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031117.v13BHiEg038461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 11:17:44 +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: r313143 - stable/11/bin/kill X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:17:45 -0000 Author: sevan (doc committer) Date: Fri Feb 3 11:17:44 2017 New Revision: 313143 URL: https://svnweb.freebsd.org/changeset/base/313143 Log: In v3 UNIX, the kill utility is documented in category 8, not 1. Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/11/bin/kill/kill.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/kill/kill.1 ============================================================================== --- stable/11/bin/kill/kill.1 Fri Feb 3 11:04:50 2017 (r313142) +++ stable/11/bin/kill/kill.1 Fri Feb 3 11:17:44 2017 (r313143) @@ -32,7 +32,7 @@ .\" @(#)kill.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd October 3, 2016 .Dt KILL 1 .Os .Sh NAME @@ -147,7 +147,8 @@ compatible. A .Nm command appeared in -.At v3 . +.At v3 +in section 8 of the manual. .Sh BUGS A replacement for the command .Dq Li kill 0 From owner-svn-src-stable-11@freebsd.org Fri Feb 3 12:03:12 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62E47CCC40D; Fri, 3 Feb 2017 12:03:12 +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 23A621E5A; Fri, 3 Feb 2017 12:03: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 v13C3Bh8058844; Fri, 3 Feb 2017 12:03:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13C3Aki058840; Fri, 3 Feb 2017 12:03:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702031203.v13C3Aki058840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 3 Feb 2017 12:03:10 +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: r313148 - in stable/11/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:03:12 -0000 Author: kib Date: Fri Feb 3 12:03:10 2017 New Revision: 313148 URL: https://svnweb.freebsd.org/changeset/base/313148 Log: MFC r312555: Use SFENCE for ordering CLFLUSHOPT. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/include/cpufunc.h stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/include/cpufunc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 12:03:10 2017 (r313148) @@ -1863,16 +1863,16 @@ pmap_invalidate_cache_range(vm_offset_t return; /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { if (pmap_kextract(sva) == lapic_paddr) @@ -1916,7 +1916,9 @@ pmap_invalidate_cache_pages(vm_page_t *p ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt)) pmap_invalidate_cache(); else { - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (i = 0; i < count; i++) { daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); @@ -1928,7 +1930,9 @@ pmap_invalidate_cache_pages(vm_page_t *p clflush(daddr); } } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); } } Modified: stable/11/sys/amd64/include/cpufunc.h ============================================================================== --- stable/11/sys/amd64/include/cpufunc.h Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/amd64/include/cpufunc.h Fri Feb 3 12:03:10 2017 (r313148) @@ -327,6 +327,13 @@ mfence(void) } static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + +static __inline void ia32_pause(void) { __asm __volatile("pause"); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 3 12:03:10 2017 (r313148) @@ -1284,16 +1284,16 @@ pmap_invalidate_cache_range(vm_offset_t return; #endif /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { #ifdef DEV_APIC @@ -5348,12 +5348,14 @@ pmap_flush_page(vm_page_t m) eva = sva + PAGE_SIZE; /* - * Use mfence despite the ordering implied by + * Use mfence or sfence despite the ordering implied by * mtx_{un,}lock() because clflush on non-Intel CPUs * and clflushopt are not guaranteed to be ordered by * any other instruction. */ - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (; sva < eva; sva += cpu_clflush_line_size) { if (useclflushopt) @@ -5361,7 +5363,9 @@ pmap_flush_page(vm_page_t m) else clflush(sva); } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); *cmap_pte2 = 0; sched_unpin(); Modified: stable/11/sys/i386/include/cpufunc.h ============================================================================== --- stable/11/sys/i386/include/cpufunc.h Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/i386/include/cpufunc.h Fri Feb 3 12:03:10 2017 (r313148) @@ -158,6 +158,13 @@ mfence(void) __asm __volatile("mfence" : : : "memory"); } +static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + #ifdef _KERNEL #define HAVE_INLINE_FFS From owner-svn-src-stable-11@freebsd.org Fri Feb 3 12:47:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A649ACCD5AF; Fri, 3 Feb 2017 12:47:25 +0000 (UTC) (envelope-from sevan@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 72AEF1B96; Fri, 3 Feb 2017 12:47:25 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13ClO3G075689; Fri, 3 Feb 2017 12:47:24 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13ClObF075688; Fri, 3 Feb 2017 12:47:24 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031247.v13ClObF075688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 12:47: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: r313152 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:47:25 -0000 Author: sevan (doc committer) Date: Fri Feb 3 12:47:24 2017 New Revision: 313152 URL: https://svnweb.freebsd.org/changeset/base/313152 Log: Revert previous merge as it contained incorrect commit message. Modified: stable/11/share/misc/bsd-family-tree Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Fri Feb 3 12:21:15 2017 (r313151) +++ stable/11/share/misc/bsd-family-tree Fri Feb 3 12:47:24 2017 (r313152) @@ -339,11 +339,7 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | - *--FreeBSD | | | | - | 11.0 | | | | - | | | | | - | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -691,8 +687,6 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] -FreeBSD 11.0 2016-06-08 [FBD] -FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Fri Feb 3 16:35:11 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73E84CCFD60; Fri, 3 Feb 2017 16:35:11 +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 3FF0FE8B; Fri, 3 Feb 2017 16:35:11 +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 v13GZAIE073777; Fri, 3 Feb 2017 16:35:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GZApx073776; Fri, 3 Feb 2017 16:35:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702031635.v13GZApx073776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 3 Feb 2017 16:35:10 +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: r313164 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:35:11 -0000 Author: pfg Date: Fri Feb 3 16:35:10 2017 New Revision: 313164 URL: https://svnweb.freebsd.org/changeset/base/313164 Log: MFC r312001: Remove __nonnull() attributes from x86 machine check architecture. In this case the attributes serve little purpose as they just don't enforce run time checks, If anything the attributes would cause NULL pointer checks to be ignored but there are no such checks so the only effect is cosmetic. Reviewed by: jhb, avg Modified: stable/11/sys/x86/x86/mca.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mca.c ============================================================================== --- stable/11/sys/x86/x86/mca.c Fri Feb 3 16:27:23 2017 (r313163) +++ stable/11/sys/x86/x86/mca.c Fri Feb 3 16:35:10 2017 (r313164) @@ -247,7 +247,7 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } -static int __nonnull(1) +static int mca_mute(const struct mca_record *rec) { @@ -276,7 +276,7 @@ mca_mute(const struct mca_record *rec) } /* Dump details about a single machine check. */ -static void __nonnull(1) +static void mca_log(const struct mca_record *rec) { uint16_t mca_error; @@ -415,7 +415,7 @@ mca_log(const struct mca_record *rec) printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); } -static int __nonnull(2) +static int mca_check_status(int bank, struct mca_record *rec) { uint64_t status; @@ -482,7 +482,7 @@ mca_refill(void *context, int pending) mca_fill_freelist(); } -static void __nonnull(2) +static void mca_record_entry(enum scan_mode mode, const struct mca_record *record) { struct mca_internal *rec; From owner-svn-src-stable-11@freebsd.org Fri Feb 3 16:57:15 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 746D3CCE831; Fri, 3 Feb 2017 16:57:15 +0000 (UTC) (envelope-from sevan@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 40FC77C3; Fri, 3 Feb 2017 16:57:15 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GvE4E081781; Fri, 3 Feb 2017 16:57:14 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GvEWV081780; Fri, 3 Feb 2017 16:57:14 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031657.v13GvEWV081780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 16:57:14 +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: r313167 - stable/11/bin/dd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:57:15 -0000 Author: sevan (doc committer) Date: Fri Feb 3 16:57:14 2017 New Revision: 313167 URL: https://svnweb.freebsd.org/changeset/base/313167 Log: Add history section for dd(1) First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104 Modified: stable/11/bin/dd/dd.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/dd/dd.1 ============================================================================== --- stable/11/bin/dd/dd.1 Fri Feb 3 16:39:10 2017 (r313166) +++ stable/11/bin/dd/dd.1 Fri Feb 3 16:57:14 2017 (r313167) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd February 28, 2016 +.Dd October 5, 2016 .Dt DD 1 .Os .Sh NAME @@ -447,6 +447,11 @@ and values are extensions to the .Tn POSIX standard. +.Sh HISTORY +A +.Nm +command appeared in +.At v5 . .Sh BUGS Protection mechanisms in the .Xr geom 4 From owner-svn-src-stable-11@freebsd.org Fri Feb 3 19:12:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C293CCF7DA; Fri, 3 Feb 2017 19:12:56 +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 2475AAFB; Fri, 3 Feb 2017 19:12: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 v13JCtYd039696; Fri, 3 Feb 2017 19:12:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13JCsAS039690; Fri, 3 Feb 2017 19:12:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702031912.v13JCsAS039690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Feb 2017 19:12:54 +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: r313170 - in stable/11/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:12:56 -0000 Author: dim Date: Fri Feb 3 19:12:54 2017 New Revision: 313170 URL: https://svnweb.freebsd.org/changeset/base/313170 Log: MFC r312832: Pull in r278160 from upstream llvm trunk (by Wei Mi): Recommit "Use ValueOffsetPair to enhance value reuse during SCEV expansion". The fix for PR28705 will be committed consecutively. In D12090, the ExprValueMap was added to reuse existing value during SCEV expansion. However, const folding and sext/zext distribution can make the reuse still difficult. A simplified case is: suppose we know S1 expands to V1 in ExprValueMap, and S1 = S2 + C_a S3 = S2 + C_b where C_a and C_b are different SCEVConstants. Then we'd like to expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is helpful when S2 is a complex SCEV expr and S2 has no entry in ExprValueMap, which is usually caused by the fact that S3 is generated from S1 after const folding. In order to do that, we represent ExprValueMap as a mapping from SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a} into the ExprValueMap when we create SCEV for V1. When S3 is expanded, it will first expand S2 to V1 - C_a because of S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. Differential Revision: https://reviews.llvm.org/D21313 Pull in r278161 from upstream llvm trunk (by Wei Mi): Fix the runtime error caused by "Use ValueOffsetPair to enhance value reuse during SCEV expansion". The patch is to fix the bug in PR28705. It was caused by setting wrong return value for SCEVExpander::findExistingExpansion. The return values of findExistingExpansion have different meanings when the function is used in different ways so it is easy to make mistake. The fix creates two new interfaces to replace SCEVExpander::findExistingExpansion, and specifies where each interface is expected to be used. Differential Revision: https://reviews.llvm.org/D22942 Pull in r281439 from upstream llvm trunk (by Wei Mi): Create a getelementptr instead of sub expr for ValueOffsetPair if the value is a pointer. This patch is to fix PR30213. When expanding an expr based on ValueOffsetPair, if the value is of pointer type, we can only create a getelementptr instead of sub expr. Differential Revision: https://reviews.llvm.org/D24088 This should fix assertion failures when building OpenCV >= 3.1, and also allow building lang/spidermonkey24 without any further assertions. PR: 215649 Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Fri Feb 3 19:12:54 2017 (r313170) @@ -495,10 +495,29 @@ namespace llvm { /// The typedef for ExprValueMap. /// - typedef DenseMap> ExprValueMapType; + typedef std::pair ValueOffsetPair; + typedef DenseMap> ExprValueMapType; /// ExprValueMap -- This map records the original values from which /// the SCEV expr is generated from. + /// + /// We want to represent the mapping as SCEV -> ValueOffsetPair instead + /// of SCEV -> Value: + /// Suppose we know S1 expands to V1, and + /// S1 = S2 + C_a + /// S3 = S2 + C_b + /// where C_a and C_b are different SCEVConstants. Then we'd like to + /// expand S3 as V1 - C_a + C_b instead of expanding S2 literally. + /// It is helpful when S2 is a complex SCEV expr. + /// + /// In order to do that, we represent ExprValueMap as a mapping from + /// SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and + /// S2->{V1, C_a} into the map when we create SCEV for V1. When S3 + /// is expanded, it will first expand S2 to V1 - C_a because of + /// S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. + /// + /// Note: S->{V, Offset} in the ExprValueMap means S can be expanded + /// to V - Offset. ExprValueMapType ExprValueMap; /// The typedef for ValueExprMap. @@ -1181,7 +1200,7 @@ namespace llvm { bool containsAddRecurrence(const SCEV *S); /// Return the Value set from which the SCEV expr is generated. - SetVector *getSCEVValues(const SCEV *S); + SetVector *getSCEVValues(const SCEV *S); /// Erase Value from ValueExprMap and ExprValueMap. void eraseValueFromMap(Value *V); Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Fri Feb 3 19:12:54 2017 (r313170) @@ -14,6 +14,7 @@ #ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H #define LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H +#include "llvm/ADT/Optional.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" #include "llvm/Analysis/TargetFolder.h" @@ -284,7 +285,15 @@ namespace llvm { void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); } - /// \brief Try to find LLVM IR value for S available at the point At. + /// Try to find existing LLVM IR value for S available at the point At. + Value *getExactExistingExpansion(const SCEV *S, const Instruction *At, + Loop *L); + + /// Try to find the ValueOffsetPair for S. The function is mainly + /// used to check whether S can be expanded cheaply. + /// If this returns a non-None value, we know we can codegen the + /// `ValueOffsetPair` into a suitable expansion identical with S + /// so that S can be expanded cheaply. /// /// L is a hint which tells in which loop to look for the suitable value. /// On success return value which is equivalent to the expanded S at point @@ -292,7 +301,9 @@ namespace llvm { /// /// Note that this function does not perform an exhaustive search. I.e if it /// didn't find any value it does not mean that there is no such value. - Value *findExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); + /// + Optional + getRelatedExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); private: LLVMContext &getContext() const { return SE.getContext(); } @@ -325,7 +336,8 @@ namespace llvm { PointerType *PTy, Type *Ty, Value *V); /// \brief Find a previous Value in ExprValueMap for expand. - Value *FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt); + ScalarEvolution::ValueOffsetPair + FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt); Value *expand(const SCEV *S); Modified: stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -3378,8 +3378,28 @@ bool ScalarEvolution::containsAddRecurre return F.FoundOne; } -/// Return the Value set from S. -SetVector *ScalarEvolution::getSCEVValues(const SCEV *S) { +/// Try to split a SCEVAddExpr into a pair of {SCEV, ConstantInt}. +/// If \p S is a SCEVAddExpr and is composed of a sub SCEV S' and an +/// offset I, then return {S', I}, else return {\p S, nullptr}. +static std::pair splitAddExpr(const SCEV *S) { + const auto *Add = dyn_cast(S); + if (!Add) + return {S, nullptr}; + + if (Add->getNumOperands() != 2) + return {S, nullptr}; + + auto *ConstOp = dyn_cast(Add->getOperand(0)); + if (!ConstOp) + return {S, nullptr}; + + return {Add->getOperand(1), ConstOp->getValue()}; +} + +/// Return the ValueOffsetPair set for \p S. \p S can be represented +/// by the value and offset from any ValueOffsetPair in the set. +SetVector * +ScalarEvolution::getSCEVValues(const SCEV *S) { ExprValueMapType::iterator SI = ExprValueMap.find_as(S); if (SI == ExprValueMap.end()) return nullptr; @@ -3387,24 +3407,31 @@ SetVector *ScalarEvolution::get if (VerifySCEVMap) { // Check there is no dangling Value in the set returned. for (const auto &VE : SI->second) - assert(ValueExprMap.count(VE)); + assert(ValueExprMap.count(VE.first)); } #endif return &SI->second; } -/// Erase Value from ValueExprMap and ExprValueMap. If ValueExprMap.erase(V) is -/// not used together with forgetMemoizedResults(S), eraseValueFromMap should be -/// used instead to ensure whenever V->S is removed from ValueExprMap, V is also -/// removed from the set of ExprValueMap[S]. +/// Erase Value from ValueExprMap and ExprValueMap. ValueExprMap.erase(V) +/// cannot be used separately. eraseValueFromMap should be used to remove +/// V from ValueExprMap and ExprValueMap at the same time. void ScalarEvolution::eraseValueFromMap(Value *V) { ValueExprMapType::iterator I = ValueExprMap.find_as(V); if (I != ValueExprMap.end()) { const SCEV *S = I->second; - SetVector *SV = getSCEVValues(S); - // Remove V from the set of ExprValueMap[S] - if (SV) - SV->remove(V); + // Remove {V, 0} from the set of ExprValueMap[S] + if (SetVector *SV = getSCEVValues(S)) + SV->remove({V, nullptr}); + + // Remove {V, Offset} from the set of ExprValueMap[Stripped] + const SCEV *Stripped; + ConstantInt *Offset; + std::tie(Stripped, Offset) = splitAddExpr(S); + if (Offset != nullptr) { + if (SetVector *SV = getSCEVValues(Stripped)) + SV->remove({V, Offset}); + } ValueExprMap.erase(V); } } @@ -3419,11 +3446,26 @@ const SCEV *ScalarEvolution::getSCEV(Val S = createSCEV(V); // During PHI resolution, it is possible to create two SCEVs for the same // V, so it is needed to double check whether V->S is inserted into - // ValueExprMap before insert S->V into ExprValueMap. + // ValueExprMap before insert S->{V, 0} into ExprValueMap. std::pair Pair = ValueExprMap.insert({SCEVCallbackVH(V, this), S}); - if (Pair.second) - ExprValueMap[S].insert(V); + if (Pair.second) { + ExprValueMap[S].insert({V, nullptr}); + + // If S == Stripped + Offset, add Stripped -> {V, Offset} into + // ExprValueMap. + const SCEV *Stripped = S; + ConstantInt *Offset = nullptr; + std::tie(Stripped, Offset) = splitAddExpr(S); + // If stripped is SCEVUnknown, don't bother to save + // Stripped -> {V, offset}. It doesn't simplify and sometimes even + // increase the complexity of the expansion code. + // If V is GetElementPtrInst, don't save Stripped -> {V, offset} + // because it may generate add/sub instead of GEP in SCEV expansion. + if (Offset != nullptr && !isa(Stripped) && + !isa(V)) + ExprValueMap[Stripped].insert({V, Offset}); + } } return S; } @@ -3436,8 +3478,8 @@ const SCEV *ScalarEvolution::getExisting const SCEV *S = I->second; if (checkValidity(S)) return S; + eraseValueFromMap(V); forgetMemoizedResults(S); - ValueExprMap.erase(I); } return nullptr; } @@ -3675,8 +3717,8 @@ void ScalarEvolution::forgetSymbolicName if (!isa(I) || !isa(Old) || (I != PN && Old == SymName)) { + eraseValueFromMap(It->first); forgetMemoizedResults(Old); - ValueExprMap.erase(It); } } @@ -4055,7 +4097,7 @@ const SCEV *ScalarEvolution::createAddRe // to create an AddRecExpr for this PHI node. We can not keep this temporary // as it will prevent later (possibly simpler) SCEV expressions to be added // to the ValueExprMap. - ValueExprMap.erase(PN); + eraseValueFromMap(PN); } return nullptr; @@ -5435,8 +5477,8 @@ ScalarEvolution::getBackedgeTakenInfo(co // case, createNodeForPHI will perform the necessary updates on its // own when it gets to that point. if (!isa(I) || !isa(Old)) { + eraseValueFromMap(It->first); forgetMemoizedResults(Old); - ValueExprMap.erase(It); } if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); @@ -5481,8 +5523,8 @@ void ScalarEvolution::forgetLoop(const L ValueExprMapType::iterator It = ValueExprMap.find_as(static_cast(I)); if (It != ValueExprMap.end()) { + eraseValueFromMap(It->first); forgetMemoizedResults(It->second); - ValueExprMap.erase(It); if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); } @@ -5515,8 +5557,8 @@ void ScalarEvolution::forgetValue(Value ValueExprMapType::iterator It = ValueExprMap.find_as(static_cast(I)); if (It != ValueExprMap.end()) { + eraseValueFromMap(It->first); forgetMemoizedResults(It->second); - ValueExprMap.erase(It); if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); } Modified: stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -1625,9 +1625,10 @@ Value *SCEVExpander::expandCodeFor(const return V; } -Value *SCEVExpander::FindValueInExprValueMap(const SCEV *S, - const Instruction *InsertPt) { - SetVector *Set = SE.getSCEVValues(S); +ScalarEvolution::ValueOffsetPair +SCEVExpander::FindValueInExprValueMap(const SCEV *S, + const Instruction *InsertPt) { + SetVector *Set = SE.getSCEVValues(S); // If the expansion is not in CanonicalMode, and the SCEV contains any // sub scAddRecExpr type SCEV, it is required to expand the SCEV literally. if (CanonicalMode || !SE.containsAddRecurrence(S)) { @@ -1636,21 +1637,21 @@ Value *SCEVExpander::FindValueInExprValu // Choose a Value from the set which dominates the insertPt. // insertPt should be inside the Value's parent loop so as not to break // the LCSSA form. - for (auto const &Ent : *Set) { + for (auto const &VOPair : *Set) { + Value *V = VOPair.first; + ConstantInt *Offset = VOPair.second; Instruction *EntInst = nullptr; - if (Ent && isa(Ent) && - (EntInst = cast(Ent)) && - S->getType() == Ent->getType() && + if (V && isa(V) && (EntInst = cast(V)) && + S->getType() == V->getType() && EntInst->getFunction() == InsertPt->getFunction() && SE.DT.dominates(EntInst, InsertPt) && (SE.LI.getLoopFor(EntInst->getParent()) == nullptr || - SE.LI.getLoopFor(EntInst->getParent())->contains(InsertPt))) { - return Ent; - } + SE.LI.getLoopFor(EntInst->getParent())->contains(InsertPt))) + return {V, Offset}; } } } - return nullptr; + return {nullptr, nullptr}; } // The expansion of SCEV will either reuse a previous Value in ExprValueMap, @@ -1698,11 +1699,33 @@ Value *SCEVExpander::expand(const SCEV * Builder.SetInsertPoint(InsertPt); // Expand the expression into instructions. - Value *V = FindValueInExprValueMap(S, InsertPt); + ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, InsertPt); + Value *V = VO.first; if (!V) V = visit(S); - + else if (VO.second) { + if (PointerType *Vty = dyn_cast(V->getType())) { + Type *Ety = Vty->getPointerElementType(); + int64_t Offset = VO.second->getSExtValue(); + int64_t ESize = SE.getTypeSizeInBits(Ety); + if ((Offset * 8) % ESize == 0) { + ConstantInt *Idx = + ConstantInt::getSigned(VO.second->getType(), -(Offset * 8) / ESize); + V = Builder.CreateGEP(Ety, V, Idx, "scevgep"); + } else { + ConstantInt *Idx = + ConstantInt::getSigned(VO.second->getType(), -Offset); + unsigned AS = Vty->getAddressSpace(); + V = Builder.CreateBitCast(V, Type::getInt8PtrTy(SE.getContext(), AS)); + V = Builder.CreateGEP(Type::getInt8Ty(SE.getContext()), V, Idx, + "uglygep"); + V = Builder.CreateBitCast(V, Vty); + } + } else { + V = Builder.CreateSub(V, VO.second); + } + } // Remember the expanded value for this SCEV at this location. // // This is independent of PostIncLoops. The mapped value simply materializes @@ -1887,8 +1910,18 @@ unsigned SCEVExpander::replaceCongruentI return NumElim; } -Value *SCEVExpander::findExistingExpansion(const SCEV *S, - const Instruction *At, Loop *L) { +Value *SCEVExpander::getExactExistingExpansion(const SCEV *S, + const Instruction *At, Loop *L) { + Optional VO = + getRelatedExistingExpansion(S, At, L); + if (VO && VO.getValue().second == nullptr) + return VO.getValue().first; + return nullptr; +} + +Optional +SCEVExpander::getRelatedExistingExpansion(const SCEV *S, const Instruction *At, + Loop *L) { using namespace llvm::PatternMatch; SmallVector ExitingBlocks; @@ -1906,22 +1939,23 @@ Value *SCEVExpander::findExistingExpansi continue; if (SE.getSCEV(LHS) == S && SE.DT.dominates(LHS, At)) - return LHS; + return ScalarEvolution::ValueOffsetPair(LHS, nullptr); if (SE.getSCEV(RHS) == S && SE.DT.dominates(RHS, At)) - return RHS; + return ScalarEvolution::ValueOffsetPair(RHS, nullptr); } // Use expand's logic which is used for reusing a previous Value in // ExprValueMap. - if (Value *Val = FindValueInExprValueMap(S, At)) - return Val; + ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, At); + if (VO.first) + return VO; // There is potential to make this significantly smarter, but this simple // heuristic already gets some interesting cases. // Can not find suitable value. - return nullptr; + return None; } bool SCEVExpander::isHighCostExpansionHelper( @@ -1930,7 +1964,7 @@ bool SCEVExpander::isHighCostExpansionHe // If we can find an existing value for this scev avaliable at the point "At" // then consider the expression cheap. - if (At && findExistingExpansion(S, At, L) != nullptr) + if (At && getRelatedExistingExpansion(S, At, L)) return false; // Zero/One operand expressions @@ -1978,7 +2012,7 @@ bool SCEVExpander::isHighCostExpansionHe // involving division. This is just a simple search heuristic. if (!At) At = &ExitingBB->back(); - if (!findExistingExpansion( + if (!getRelatedExistingExpansion( SE.getAddExpr(S, SE.getConstant(S->getType(), 1)), At, L)) return true; } Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -481,7 +481,7 @@ Value *IndVarSimplify::expandSCEVIfNeede Type *ResultTy) { // Before expanding S into an expensive LLVM expression, see if we can use an // already existing value as the expansion for S. - if (Value *ExistingValue = Rewriter.findExistingExpansion(S, InsertPt, L)) + if (Value *ExistingValue = Rewriter.getExactExistingExpansion(S, InsertPt, L)) if (ExistingValue->getType() == ResultTy) return ExistingValue; From owner-svn-src-stable-11@freebsd.org Fri Feb 3 19:15:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 167C0CCF926; Fri, 3 Feb 2017 19:15:55 +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 D9C0DD3B; Fri, 3 Feb 2017 19:15:54 +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 v13JFrHW039881; Fri, 3 Feb 2017 19:15:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13JFrWO039880; Fri, 3 Feb 2017 19:15:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702031915.v13JFrWO039880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Feb 2017 19:15:53 +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: r313171 - stable/11/contrib/llvm/lib/Transforms/Scalar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:15:55 -0000 Author: dim Date: Fri Feb 3 19:15:53 2017 New Revision: 313171 URL: https://svnweb.freebsd.org/changeset/base/313171 Log: MFC r312993: Pull in r279454 from upstream llvm trunk (by James Molloy): [SROA] Remove incorrect assertion Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over. Original differential: http://reviews.llvm.org/D16187 aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html This should fix assertions when building the math/opensolaris-libm port. Reported by: marino Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Fri Feb 3 19:12:54 2017 (r313170) +++ stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Fri Feb 3 19:15:53 2017 (r313171) @@ -4040,9 +4040,6 @@ bool SROA::splitAlloca(AllocaInst &AI, A Size = std::min(Size, AbsEnd - Start); } PieceExpr = DIB.createBitPieceExpression(Start, Size); - } else { - assert(Pieces.size() == 1 && - "partition is as large as original alloca"); } // Remove any existing dbg.declare intrinsic describing the same alloca. From owner-svn-src-stable-11@freebsd.org Fri Feb 3 21:37:29 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5190CCCF0FB; Fri, 3 Feb 2017 21:37:29 +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 F318BC1D; Fri, 3 Feb 2017 21:37:28 +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 v13LbS3E097064; Fri, 3 Feb 2017 21:37:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13LbSKt097063; Fri, 3 Feb 2017 21:37:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032137.v13LbSKt097063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 21:37: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: r313175 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 21:37:29 -0000 Author: jhb Date: Fri Feb 3 21:37:27 2017 New Revision: 313175 URL: https://svnweb.freebsd.org/changeset/base/313175 Log: MFC 313020: Fix a couple of issues with t4iov probe and attach. - Check for Chelsio vendor ID in probe routines. - Fail attach instead of faulting if pci_find_dbsf() doesn't find a device. PR: 216539 Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_iov.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Fri Feb 3 20:33:23 2017 (r313174) +++ stable/11/sys/dev/cxgbe/t4_iov.c Fri Feb 3 21:37:27 2017 (r313175) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include "common/common.h" #include "t4_if.h" struct t4iov_softc { @@ -106,6 +107,9 @@ t4iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t4iov_pciids); i++) { if (d == t4iov_pciids[i].device) { @@ -123,6 +127,9 @@ t5iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t5iov_pciids); i++) { if (d == t5iov_pciids[i].device) { @@ -140,6 +147,9 @@ t6iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t6iov_pciids); i++) { if (d == t6iov_pciids[i].device) { @@ -161,6 +171,8 @@ t4iov_attach(device_t dev) sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), 4); + if (sc->sc_main == NULL) + return (ENXIO); if (T4_IS_MAIN_READY(sc->sc_main) == 0) return (t4iov_attach_child(dev)); return (0); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 23:33:08 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15D6CCE3D5; Fri, 3 Feb 2017 23:33:08 +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 8A8AD1AA9; Fri, 3 Feb 2017 23:33:08 +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 v13NX7C8046630; Fri, 3 Feb 2017 23:33:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13NX7m9046625; Fri, 3 Feb 2017 23:33:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032333.v13NX7m9046625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 23:33:07 +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: r313178 - in stable: 10/sys/dev/cxgbe/tom 11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 23:33:08 -0000 Author: jhb Date: Fri Feb 3 23:33:06 2017 New Revision: 313178 URL: https://svnweb.freebsd.org/changeset/base/313178 Log: MFC 312906: Unregister CPL handlers for TOE-related messages when unloading TOM. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 23:33:06 2017 (r313178) @@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void) t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl); } +void +t4_uninit_connect_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL); + t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL); +} + #define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \ reason = __LINE__; \ rc = (x); \ Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1848,12 +1848,12 @@ void t4_uninit_cpl_io_handlers(void) { - t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close); - t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl); - t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req); - t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl); - t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); - t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); + t4_register_cpl_handler(CPL_PEER_CLOSE, NULL); + t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL); + t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL); + t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL); + t4_register_cpl_handler(CPL_RX_DATA, NULL); + t4_register_cpl_handler(CPL_FW4_ACK, NULL); } /* Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1622,4 +1622,14 @@ t4_init_listen_cpl_handlers(void) t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req); t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish); } + +void +t4_uninit_listen_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL); + t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL); + t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL); + t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL); +} #endif Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1229,6 +1229,10 @@ t4_tom_mod_unload(void) t4_ddp_mod_unload(); + t4_uninit_connect_cpl_handlers(); + t4_uninit_listen_cpl_handlers(); + t4_uninit_cpl_io_handlers(); + return (0); } #endif /* TCP_OFFLOAD */ Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 23:33:06 2017 (r313178) @@ -326,12 +326,14 @@ void release_lip(struct tom_data *, stru /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); +void t4_uninit_connect_cpl_handlers(void); int t4_connect(struct toedev *, struct socket *, struct rtentry *, struct sockaddr *); void act_open_failure_cleanup(struct adapter *, u_int, u_int); /* t4_listen.c */ void t4_init_listen_cpl_handlers(void); +void t4_uninit_listen_cpl_handlers(void); int t4_listen_start(struct toedev *, struct tcpcb *); int t4_listen_stop(struct toedev *, struct tcpcb *); void t4_syncache_added(struct toedev *, void *); From owner-svn-src-stable-11@freebsd.org Fri Feb 3 23:48:58 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44410CCE7CC; Fri, 3 Feb 2017 23:48:58 +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 139AE1E9; Fri, 3 Feb 2017 23:48:58 +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 v13NmviX050779; Fri, 3 Feb 2017 23:48:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13NmvEk050778; Fri, 3 Feb 2017 23:48:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032348.v13NmvEk050778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 23:48:57 +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: r313179 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 23:48:58 -0000 Author: jhb Date: Fri Feb 3 23:48:56 2017 New Revision: 313179 URL: https://svnweb.freebsd.org/changeset/base/313179 Log: MFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket(). undo_offload_socket() is only called by t4_connect() during a connection setup failure, but t4_connect() still owns the TOE PCB and frees ita after undo_offload_socket() returns. Release a reference in undo_offload_socket() resulted in a double-free which panicked when t4_connect() performed the second free. The reference release was added to undo_offload_socket() incorrectly in r299210. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:33:06 2017 (r313178) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:48:56 2017 (r313179) @@ -273,8 +273,6 @@ undo_offload_socket(struct socket *so) mtx_lock(&td->toep_list_lock); TAILQ_REMOVE(&td->toep_list, toep, link); mtx_unlock(&td->toep_list_lock); - - free_toepcb(toep); } static void From owner-svn-src-stable-11@freebsd.org Sat Feb 4 01:24:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549CDCCF6C8; Sat, 4 Feb 2017 01:24:22 +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 239821538; Sat, 4 Feb 2017 01:24:22 +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 v141OLRv091562; Sat, 4 Feb 2017 01:24:21 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v141OL6J091561; Sat, 4 Feb 2017 01:24:21 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201702040124.v141OL6J091561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 4 Feb 2017 01:24: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: r313183 - stable/11/sys/boot/arm/uboot X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 01:24:22 -0000 Author: gonzo Date: Sat Feb 4 01:24:21 2017 New Revision: 313183 URL: https://svnweb.freebsd.org/changeset/base/313183 Log: MFC r310124 (by andrew): Add -fPIC to the ubldr build. Without this the self relocation code will try to use an absolute address in a switch statement, jumping to an invalid memory location. Sponsored by: ABT Systems Ltd PR: 216504 Modified: stable/11/sys/boot/arm/uboot/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/11/sys/boot/arm/uboot/Makefile Sat Feb 4 01:21:48 2017 (r313182) +++ stable/11/sys/boot/arm/uboot/Makefile Sat Feb 4 01:24:21 2017 (r313183) @@ -109,6 +109,8 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +CFLAGS+= -fPIC + # clang doesn't understand %D as a specifier to printf NO_WERROR.clang= From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:41:46 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25543CD0055; Sat, 4 Feb 2017 15:41:46 +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 E8E381CDB; Sat, 4 Feb 2017 15:41:45 +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 v14FfjOs046252; Sat, 4 Feb 2017 15:41:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Ffj3h046251; Sat, 4 Feb 2017 15:41:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041541.v14Ffj3h046251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:41:45 +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: r313196 - stable/11/sys/modules X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:41:46 -0000 Author: ngie Date: Sat Feb 4 15:41:44 2017 New Revision: 313196 URL: https://svnweb.freebsd.org/changeset/base/313196 Log: MFC r312935: Remove duplicate bhnd SUBDIR entry PR: 216413 Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Sat Feb 4 14:10:16 2017 (r313195) +++ stable/11/sys/modules/Makefile Sat Feb 4 15:41:44 2017 (r313196) @@ -50,7 +50,6 @@ SUBDIR= \ ${_auxio} \ ${_bce} \ bfe \ - bhnd \ bge \ bhnd \ ${_bxe} \ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:42:01 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 195F9CD00AA; Sat, 4 Feb 2017 15:42:01 +0000 (UTC) (envelope-from sevan@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 DCFBE1EED; Sat, 4 Feb 2017 15:42:00 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fg0Ql047191; Sat, 4 Feb 2017 15:42:00 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Ffx77047190; Sat, 4 Feb 2017 15:41:59 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041541.v14Ffx77047190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:41:59 +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: r313197 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:42:01 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:41:59 2017 New Revision: 313197 URL: https://svnweb.freebsd.org/changeset/base/313197 Log: Belatedly add FreeBSD 11.0 and 12.0 to the family tree file. Submitted by: des (a while back) Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:41:44 2017 (r313196) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:41:59 2017 (r313197) @@ -339,7 +339,11 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | -FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current + *--FreeBSD | | | | + | 11.0 | | | | + | | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -687,6 +691,8 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +FreeBSD 11.0 2016-06-08 [FBD] +FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:43:55 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E450CD027F; Sat, 4 Feb 2017 15:43:55 +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 29F5E25A; Sat, 4 Feb 2017 15:43:55 +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 v14Fhsde048000; Sat, 4 Feb 2017 15:43:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FhseR047999; Sat, 4 Feb 2017 15:43:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041543.v14FhseR047999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:43:54 +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: r313198 - stable/11/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:43:55 -0000 Author: ngie Date: Sat Feb 4 15:43:54 2017 New Revision: 313198 URL: https://svnweb.freebsd.org/changeset/base/313198 Log: MFC r312937: Fix typo in lib/Makefile The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss PR: 216409 Modified: stable/11/lib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat Feb 4 15:41:59 2017 (r313197) +++ stable/11/lib/Makefile Sat Feb 4 15:43:54 2017 (r313198) @@ -142,7 +142,7 @@ SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses SUBDIR_DEPEND_libgeom= libexpat libsbuf -SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi +SUBDIR_DEPEND_librpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:45:40 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC7B6CD036E; Sat, 4 Feb 2017 15:45:40 +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 8BDC3779; Sat, 4 Feb 2017 15:45:40 +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 v14FjdO2048338; Sat, 4 Feb 2017 15:45:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FjdE7048337; Sat, 4 Feb 2017 15:45:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041545.v14FjdE7048337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:45: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: r313200 - stable/11/contrib/bsnmp/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:45:40 -0000 Author: ngie Date: Sat Feb 4 15:45:39 2017 New Revision: 313200 URL: https://svnweb.freebsd.org/changeset/base/313200 Log: MFC r311263: Use calloc instead of malloc with buffers in snmp_{recv,send}_packet This doesn't fix the issue noted in the PR, but at the very least it cleans up the error so it looks a bit more sane, and in the event that bsnmp did wander off into the weeds, the likelihood of it crashing with more sensible output is greater, in my opinion MFC counter set high so I have enough time to resolve the real underlying bug in bsnmpwalk PR: 215721 Modified: stable/11/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/11/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:44:49 2017 (r313199) +++ stable/11/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:45:39 2017 (r313200) @@ -1234,7 +1234,7 @@ snmp_send_packet(struct snmp_pdu * pdu) struct asn_buf b; ssize_t ret; - if ((buf = malloc(snmp_client.txbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.txbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } @@ -1259,7 +1259,7 @@ snmp_send_packet(struct snmp_pdu * pdu) } free(buf); - return pdu->request_id; + return (pdu->request_id); } /* @@ -1355,7 +1355,7 @@ snmp_receive_packet(struct snmp_pdu *pdu socklen_t optlen; #endif - if ((buf = malloc(snmp_client.rxbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.rxbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:48:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F54CD0522; Sat, 4 Feb 2017 15:48:54 +0000 (UTC) (envelope-from sevan@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 3FC5FB01; Sat, 4 Feb 2017 15:48:54 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FmrCL048783; Sat, 4 Feb 2017 15:48:53 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FmrxJ048782; Sat, 4 Feb 2017 15:48:53 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041548.v14FmrxJ048782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:48:53 +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: r313202 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:48:54 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:48:53 2017 New Revision: 313202 URL: https://svnweb.freebsd.org/changeset/base/313202 Log: Fix the previous commit to the family tree file. It is too early to list 11.0, and we do not list -CURRENT here. Submitted by: maxim Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:45:51 2017 (r313201) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:48:53 2017 (r313202) @@ -691,8 +691,6 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] -FreeBSD 11.0 2016-06-08 [FBD] -FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:49:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E08C7CD0641; Sat, 4 Feb 2017 15:49:51 +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 92E47DFD; Sat, 4 Feb 2017 15:49:51 +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 v14Fno3Q049012; Sat, 4 Feb 2017 15:49:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FnopW049010; Sat, 4 Feb 2017 15:49:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041549.v14FnopW049010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:49:50 +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: r313203 - stable/11/usr.sbin/inetd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:49:52 -0000 Author: ngie Date: Sat Feb 4 15:49:50 2017 New Revision: 313203 URL: https://svnweb.freebsd.org/changeset/base/313203 Log: MFC r312105,r312162: r312105: Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS This will allow inetd to stand by itself without libwrap. Relnotes: yes r312162: Fix up r312105 - Only #include tcpd.h when LIBWRAP is true to avoid header include errors - Only define whichaf when LIBWRAP is true to avoid -Wunused warning and to avoid issues with structs being defined that should only be defined when tcpd.h is included. Pointyhat to: ngie Modified: stable/11/usr.sbin/inetd/Makefile stable/11/usr.sbin/inetd/inetd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/inetd/Makefile ============================================================================== --- stable/11/usr.sbin/inetd/Makefile Sat Feb 4 15:48:53 2017 (r313202) +++ stable/11/usr.sbin/inetd/Makefile Sat Feb 4 15:49:50 2017 (r313203) @@ -16,7 +16,12 @@ CFLAGS+= -DLOGIN_CAP CFLAGS+= -DINET6 .endif -LIBADD= util wrap +LIBADD= util + +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif # XXX for src/release/picobsd .if !defined(RELEASE_CRUNCH) Modified: stable/11/usr.sbin/inetd/inetd.c ============================================================================== --- stable/11/usr.sbin/inetd/inetd.c Sat Feb 4 15:48:53 2017 (r313202) +++ stable/11/usr.sbin/inetd/inetd.c Sat Feb 4 15:49:50 2017 (r313203) @@ -138,7 +138,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef LIBWRAP #include +#endif #include #include "inetd.h" @@ -297,6 +299,7 @@ getvalue(const char *arg, int *value, co return 0; /* success */ } +#ifdef LIBWRAP static sa_family_t whichaf(struct request_info *req) { @@ -310,6 +313,7 @@ whichaf(struct request_info *req) return AF_INET; return sa->sa_family; } +#endif int main(int argc, char **argv) @@ -324,9 +328,11 @@ main(int argc, char **argv) #ifdef LOGIN_CAP login_cap_t *lc = NULL; #endif +#ifdef LIBWRAP struct request_info req; int denied; char *service = NULL; +#endif struct sockaddr_storage peer; int i; struct addrinfo hints, *res; @@ -736,6 +742,7 @@ main(int argc, char **argv) _exit(0); } } +#ifdef LIBWRAP if (ISWRAP(sep)) { inetd_setproctitle("wrapping", ctrl); service = sep->se_server_name ? @@ -764,6 +771,7 @@ main(int argc, char **argv) (whichaf(&req) == AF_INET6) ? "6" : ""); } } +#endif if (sep->se_bi) { (*sep->se_bi->bi_fn)(ctrl, sep); } else { From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:50:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A614CD07AA; Sat, 4 Feb 2017 15:50:48 +0000 (UTC) (envelope-from sevan@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 66DC1FAD; Sat, 4 Feb 2017 15:50:48 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fol2R049123; Sat, 4 Feb 2017 15:50:47 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Folio049122; Sat, 4 Feb 2017 15:50:47 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041550.v14Folio049122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:50: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: r313204 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:50:48 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:50:47 2017 New Revision: 313204 URL: https://svnweb.freebsd.org/changeset/base/313204 Log: DragonFly 4.6.0 release added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:49:50 2017 (r313203) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:50:47 2017 (r313204) @@ -338,7 +338,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | - | | | | | + | | | | DragonFly 4.6.0 *--FreeBSD | | | | | 11.0 | | | | | | | | | @@ -691,6 +691,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +DragonFly 4.6.0 2016-08-02 [DFB] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:51:46 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4387CD0A9C; Sat, 4 Feb 2017 15:51:46 +0000 (UTC) (envelope-from sevan@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 80B6A1226; Sat, 4 Feb 2017 15:51:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FpjuS049878; Sat, 4 Feb 2017 15:51:45 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FpjV8049877; Sat, 4 Feb 2017 15:51:45 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041551.v14FpjV8049877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:51:45 +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: r313205 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:51:46 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:51:45 2017 New Revision: 313205 URL: https://svnweb.freebsd.org/changeset/base/313205 Log: OpenBSD 6.0 added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:50:47 2017 (r313204) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:51:45 2017 (r313205) @@ -339,7 +339,7 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | DragonFly 4.6.0 - *--FreeBSD | | | | + *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | | | | | | | | | | | @@ -692,6 +692,7 @@ DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] DragonFly 4.6.0 2016-08-02 [DFB] +OpenBSD 6.0 2016-09-01 [OBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:52:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F0ABCD0B8F; Sat, 4 Feb 2017 15:52:51 +0000 (UTC) (envelope-from sevan@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 C4CFE16AA; Sat, 4 Feb 2017 15:52:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FqnST053155; Sat, 4 Feb 2017 15:52:49 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Fqnum053154; Sat, 4 Feb 2017 15:52:49 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041552.v14Fqnum053154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:52: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: r313207 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:52:51 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:52:49 2017 New Revision: 313207 URL: https://svnweb.freebsd.org/changeset/base/313207 Log: Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree. Ammend the position of NetBSD 6.0.2 release in the tree as it came after OpenBSD[1] & DragonFlyBSD[2] release according to the release information. The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from NetBSD CVS copy) and confirmed with history page[3] [1] http://www.openbsd.org/53.html [2] https://www.dragonflybsd.org/releases/ [3] http://netbsd.org/releases/formal.html#history Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8099 Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:08 2017 (r313206) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:49 2017 (r313207) @@ -258,6 +258,9 @@ FreeBSD 5.2 | | | | 8.3 | | | | | | | | | | | | NetBSD | | | | | | | | 5.1.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.4 | | | | | | | | OpenBSD 5.1 | | | | Mac OS X | `----. | | | | | 10.8 | \ | | @@ -268,14 +271,17 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | | 5.2.1 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.2 | | | | | | | | | | | | | | | | | \ | | | | | | | | NetBSD | | | | | | | | 6.0.1 | | - | | | | | | | | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -338,6 +344,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | + | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | @@ -661,12 +668,14 @@ Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] FreeBSD 10.0 2014-01-20 [FBD] -NetBSD 6.0.4 2014-01-27 [NBD] -NetBSD 6.1.3 2014-01-27 [NBD] +NetBSD 5.1.4 2014-01-25 [NBD] +NetBSD 5.2.2 2014-01-25 [NBD] +NetBSD 6.0.4 2014-01-25 [NBD] +NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-19 [NDB] -NetBSD 6.1.4 2014-04-19 [NDB] +NetBSD 6.0.5 2014-04-12 [NDB] +NetBSD 6.1.4 2014-04-12 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] DragonFly 3.8.1 2014-06-16 [DFB] @@ -691,6 +700,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:53:36 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D206CD0C48; Sat, 4 Feb 2017 15:53:36 +0000 (UTC) (envelope-from sevan@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 E7181181A; Sat, 4 Feb 2017 15:53:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FrYg8053271; Sat, 4 Feb 2017 15:53:34 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FrYAU053270; Sat, 4 Feb 2017 15:53:34 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041553.v14FrYAU053270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:53:34 +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: r313208 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:53:36 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:53:34 2017 New Revision: 313208 URL: https://svnweb.freebsd.org/changeset/base/313208 Log: FreeBSD 11.0 release date added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:49 2017 (r313207) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:53:34 2017 (r313208) @@ -703,6 +703,7 @@ FreeBSD 10.3 2016-04-04 [FBD] NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] +FreeBSD 11.0 2016-10-10 [FBD] Bibliography ------------------------ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 15:56:25 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6469CD0D6C; Sat, 4 Feb 2017 15:56:25 +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 72FBC1BC1; Sat, 4 Feb 2017 15:56:25 +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 v14FuOB0053615; Sat, 4 Feb 2017 15:56:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FuOI6053614; Sat, 4 Feb 2017 15:56:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041556.v14FuOI6053614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:56: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: r313210 - stable/11/usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:56:25 -0000 Author: ngie Date: Sat Feb 4 15:56:24 2017 New Revision: 313210 URL: https://svnweb.freebsd.org/changeset/base/313210 Log: MFC r311470: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind. Modified: stable/11/usr.sbin/rpcbind/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/11/usr.sbin/rpcbind/Makefile Sat Feb 4 15:55:31 2017 (r313209) +++ stable/11/usr.sbin/rpcbind/Makefile Sat Feb 4 15:56:24 2017 (r313210) @@ -8,18 +8,21 @@ MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c -CFLAGS+= -DPORTMAP -DLIBWRAP +CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif WARNS?= 1 -LIBADD= wrap - .include From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:00:20 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF3C2CD0E05; Sat, 4 Feb 2017 16:00:20 +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 AE2231D0D; Sat, 4 Feb 2017 16:00:20 +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 v14G0Jg5053883; Sat, 4 Feb 2017 16:00:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G0Jf4053880; Sat, 4 Feb 2017 16:00:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041600.v14G0Jf4053880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:00:19 +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: r313211 - in stable/11/usr.sbin/amd: amd include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:00:21 -0000 Author: ngie Date: Sat Feb 4 16:00:19 2017 New Revision: 313211 URL: https://svnweb.freebsd.org/changeset/base/313211 Log: MFC r311472: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8). Modified: stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/include/config.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/amd/amd/Makefile ============================================================================== --- stable/11/usr.sbin/amd/amd/Makefile Sat Feb 4 15:56:24 2017 (r313210) +++ stable/11/usr.sbin/amd/amd/Makefile Sat Feb 4 16:00:19 2017 (r313211) @@ -30,7 +30,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/a -I${SRCTOP}/contrib/amd/include \ -I${.OBJDIR}/../../../include/rpcsvc -LIBADD= amu wrap +LIBADD= amu SRCS+= conf_parse.c conf_parse.h conf_tok.c SRCS+= sun_map_parse.c sun_map_parse.h sun_map_tok.c @@ -73,4 +73,9 @@ CFLAGS+= -DHAVE_MAP_HESIOD SRCS+= info_nis.c .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DHAVE_LIBWRAP -DHAVE_TCPD_H +LIBADD+= wrap +.endif + .include Modified: stable/11/usr.sbin/amd/include/config.h ============================================================================== --- stable/11/usr.sbin/amd/include/config.h Sat Feb 4 15:56:24 2017 (r313210) +++ stable/11/usr.sbin/amd/include/config.h Sat Feb 4 16:00:19 2017 (r313211) @@ -530,7 +530,7 @@ /* #undef HAVE_LIBRT */ /* does libwrap exist? */ -#define HAVE_LIBWRAP 1 +/* #undef HAVE_LIBWRAP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -1207,7 +1207,7 @@ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_TCPD_H 1 +/* #undef HAVE_TCPD_H */ /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:02:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F571CD0011; Sat, 4 Feb 2017 16:02:49 +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 4EA4E278; Sat, 4 Feb 2017 16:02:49 +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 v14G2mqq057835; Sat, 4 Feb 2017 16:02:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G2mUT057834; Sat, 4 Feb 2017 16:02:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041602.v14G2mUT057834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:02:48 +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: r313213 - stable/11/tests/sys/kern/acct X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:02:49 -0000 Author: ngie Date: Sat Feb 4 16:02:48 2017 New Revision: 313213 URL: https://svnweb.freebsd.org/changeset/base/313213 Log: MFC r312119,r312216,r312226: r312119: encode_long, encode_timeval: mechanically replace `exp` with `exponent` This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test, which include math.h, which in turn defines exp(3) Tested with: clang, gcc 4.2.1, gcc 4.9 r312216: Revert r312119 and reword the intent to fix -Wshadow issues between exp(3) and `exp` var. The approach taken previously was not ideal for multiple functional and stylistic reasons. Add to existing sed call in Makefile to replace `exp` with `exponent` instead. Requested by: bde r312226: Fix typo in r312216 I meant to replace "exp" with "exponent", not "expected" Pointyhat to: ngie Modified: stable/11/tests/sys/kern/acct/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/acct/Makefile ============================================================================== --- stable/11/tests/sys/kern/acct/Makefile Sat Feb 4 16:00:51 2017 (r313212) +++ stable/11/tests/sys/kern/acct/Makefile Sat Feb 4 16:02:48 2017 (r313213) @@ -13,6 +13,7 @@ acct_test.o: convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ + -e 's/exp/exponent/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:48:00 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9B3ACD0FC9; Sat, 4 Feb 2017 16:48:00 +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 80D32890; Sat, 4 Feb 2017 16:48:00 +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 v14GlxjA075092; Sat, 4 Feb 2017 16:47:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Glu2w075061; Sat, 4 Feb 2017 16:47:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041647.v14Glu2w075061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:47: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: r313227 - in stable/11: contrib/netbsd-tests/lib/libc contrib/netbsd-tests/lib/libc/c063 contrib/netbsd-tests/lib/libc/gen contrib/netbsd-tests/lib/libc/gen/posix_spawn contrib/netbsd-t... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:48:01 -0000 Author: ngie Date: Sat Feb 4 16:47:56 2017 New Revision: 313227 URL: https://svnweb.freebsd.org/changeset/base/313227 Log: MFC r311925,r311968,r311969,r312102,r312108: r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c stable/11/contrib/netbsd-tests/lib/libc/t_cdb.c stable/11/lib/libc/tests/stdlib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/faccessat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fchmodat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -40,10 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fchownat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */ +/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $"); +__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include @@ -70,9 +70,7 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; -#ifdef __FreeBSD__ (void)close(fd); -#endif err(error, "fexecve"); } } Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fstatat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -63,9 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mkfifoat_fdcwd); Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -80,9 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mknodat_fdcwd); Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,9 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); #include + +#include +#include + #include #include #include @@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 201 #include #include #include -#include /* * dholland 20130112: disable tests that require O_SEARCH semantics Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/openat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/readlinkat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/unlinkat" Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $"); +#include +#include +#include #include #include #include @@ -39,11 +42,6 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif -#include #define DIR "dir" #define FILE "dir/utimensat" Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,10 +31,11 @@ */ -#ifdef __FreeBSD__ -#include -#endif #include + +#include +#include + #include #include #include @@ -42,7 +43,6 @@ #include #include #include -#include ATF_TC(t_spawn_openmode); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 4 16:47:56 2017 (r313227) @@ -60,16 +60,16 @@ get_different_scheduler(void) /* get current schedule policy */ scheduler = sched_getscheduler(0); - for (i = 0; i < nitems(schedulers); i++) { + for (i = 0; i < __arraycount(schedulers); i++) { if (schedulers[i] == scheduler) break; } - ATF_REQUIRE_MSG(i < nitems(schedulers), + ATF_REQUIRE_MSG(i < __arraycount(schedulers), "Unknown current scheduler %d", scheduler); - + /* new scheduler */ i++; - if (i >= nitems(schedulers)) + if (i >= __arraycount(schedulers)) i = 0; return schedulers[i]; } @@ -85,7 +85,7 @@ get_different_priority(int scheduler) sched_getparam(0, ¶m); priority = param.sched_priority; - + /* * Change numerical value of the priority, to ensure that it * was set for the spawned child. @@ -127,7 +127,7 @@ ATF_TC_BODY(t_spawnattr, tc) scheduler = get_different_scheduler(); priority = get_different_priority(scheduler); sp.sched_priority = priority; - + sigemptyset(&sig); sigaddset(&sig, SIGUSR1); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */ +/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); +__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); +#include +#include +#include #include #include @@ -40,11 +43,6 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/ #include #include -#ifdef __FreeBSD__ -#include -#include -#include - static void disable_corefile(void) { @@ -55,7 +53,6 @@ disable_corefile(void) ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); } -#endif static void handler(int); @@ -82,9 +79,7 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -122,9 +117,7 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,22 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - +#include #include +#include #include #include +#include #include #include #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) @@ -58,7 +55,6 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; -#ifdef __FreeBSD__ #define CREAT(x, m) do { \ int _creat_fd; \ ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \ @@ -72,12 +68,6 @@ ATF_TC_BODY(seekdir_basic, tc) CREAT("t/a", 0600); CREAT("t/b", 0600); CREAT("t/c", 0600); -#else - mkdir("t", 0755); - creat("t/a", 0600); - creat("t/b", 0600); - creat("t/c", 0600); -#endif dp = opendir("t"); if ( dp == NULL) @@ -90,10 +80,8 @@ ATF_TC_BODY(seekdir_basic, tc) /* get first entry */ entry = readdir(dp); here = telldir(dp); -#ifdef __FreeBSD__ ATF_REQUIRE_MSG(here != -1, "telldir failed: %s", strerror(errno)); -#endif /* get second entry */ entry = readdir(dp); @@ -137,9 +125,7 @@ ATF_TC_BODY(seekdir_basic, tc) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); -#ifdef __FreeBSD__ free(wasname); -#endif } /* There is no sbrk on AArch64 and RISC-V */ Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */ +/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); +__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $"); #include #include @@ -68,9 +68,7 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); -#ifdef __FreeBSD__ (void)close(fd); -#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */ +/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -247,9 +247,7 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } -#ifdef __FreeBSD__ free(buf); -#endif } ATF_TC(humanize_number_big); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */ +/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -26,8 +26,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __FreeBSD__ +/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */ +#include +#endif +#include +#include +#include +#include /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include #include +#include #include #include #include @@ -35,10 +45,6 @@ #include #include -#include -#include -#include - #include "isqemu.h" #define BILLION 1000000000LL /* nano-seconds per second */ @@ -49,11 +55,6 @@ #define KEVNT_TIMEOUT 10300 /* measured in milli-seconds */ #define FUZZ (40 * MILLION) /* scheduling fuzz accepted - 40 ms */ -#ifdef __FreeBSD__ -#include -#include -#endif - /* * Timer notes * Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */ +/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,11 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); +__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $"); -#ifdef __FreeBSD__ -#include -#endif #include #include #include @@ -41,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10 #include #include #include +#include #include ATF_TC(time_copy); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */ +/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $"); +__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $"); #include #include @@ -78,9 +78,7 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); -#ifdef __FreeBSD__ (void)close(fd); -#endif } } Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -144,9 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc) } } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TC(strvis_locale); ATF_TC_HEAD(strvis_locale, tc) { @@ -175,9 +173,7 @@ ATF_TC_BODY(strvis_locale, tc) setlocale(LC_CTYPE, ol); free(ol); } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ ATF_TP_ADD_TCS(tp) { @@ -186,13 +182,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strvis_null); ATF_TP_ADD_TC(tp, strvis_empty); ATF_TP_ADD_TC(tp, strunvis_hex); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TP_ADD_TC(tp, strvis_locale); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ return atf_no_error(); } Modified: stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Sat Feb 4 16:47:56 2017 (r313227) @@ -51,10 +51,6 @@ static const char * const inf_strings[] const char *nan_string = "NaN(x)y"; #endif -#ifdef __FreeBSD__ -#define __HAVE_LONG_DOUBLE -#endif - ATF_TC(strtod_basic); ATF_TC_HEAD(strtod_basic, tc) { Modified: stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */ +/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */ /* * Written by J.T. Conklin @@ -58,12 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { -#ifdef __FreeBSD__ void *dl_handle; -#endif - unsigned int t, a; char *off; char buf[32]; + unsigned int t, a; const char *tab[] = { "", @@ -248,12 +246,8 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; -#ifdef __FreeBSD__ dl_handle = dlopen(NULL, RTLD_LAZY); strchr_fn = dlsym(dl_handle, "test_strlen"); -#else - strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); -#endif if (!strchr_fn) strchr_fn = strchr; @@ -288,9 +282,7 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } -#ifdef __FreeBSD__ (void)dlclose(dl_handle); -#endif } ATF_TP_ADD_TCS(tp) Modified: stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */ +/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,18 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $"); +__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $"); #include #include +#include /* Needed for sys_nerr on FreeBSD */ #include #include #include -#ifdef __FreeBSD__ -#include -#endif - ATF_TC(strerror_basic); ATF_TC_HEAD(strerror_basic, tc) { Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 2.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); + +#ifdef __FreeBSD__ +#include /* For __FreeBSD_version */ +#endif + +#include + +#include #include #include @@ -38,13 +46,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/ #include #include -#include - -#ifdef __FreeBSD__ -#include -#include -#endif - static const char path[] = "access"; static const int mode[4] = { R_OK, W_OK, X_OK, F_OK }; Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include @@ -42,10 +43,6 @@ __RCSID("$NetBSD: t_chroot.c,v 1.1 2011/ #include #include -#ifdef __FreeBSD__ -#include -#endif - ATF_TC(chroot_basic); ATF_TC_HEAD(chroot_basic, tc) { Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */ +/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,9 +59,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); +__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include @@ -74,10 +75,6 @@ __RCSID("$NetBSD: t_mincore.c,v 1.8 2012 #include #include -#ifdef __FreeBSD__ -#include -#endif - static long page = 0; static const char path[] = "mincore"; static size_t check_residency(void *, size_t); Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ +/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,10 +55,11 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include #include @@ -78,7 +79,6 @@ __RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02 #ifdef __FreeBSD__ #include -#include #include #endif Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $ */ +/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $"); +__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $"); #include #include @@ -64,22 +64,6 @@ ATF_TC_BODY(wait6_invalid, tc) && errno == EINVAL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:49:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1686CD0060; Sat, 4 Feb 2017 16:49:51 +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 A0AFC9DA; Sat, 4 Feb 2017 16:49:51 +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 v14Gno6S075247; Sat, 4 Feb 2017 16:49:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GnoHo075246; Sat, 4 Feb 2017 16:49:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041649.v14GnoHo075246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:49:50 +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: r313228 - stable/11/lib/libnetbsd/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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:49:51 -0000 Author: ngie Date: Sat Feb 4 16:49:50 2017 New Revision: 313228 URL: https://svnweb.freebsd.org/changeset/base/313228 Log: MFC r311972: Add __BIT and __BITS macros from NetBSD to help support new testcases Modified: stable/11/lib/libnetbsd/sys/cdefs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libnetbsd/sys/cdefs.h ============================================================================== --- stable/11/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:47:56 2017 (r313227) +++ stable/11/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:49:50 2017 (r313228) @@ -69,4 +69,13 @@ */ #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) +/* __BIT(n): nth bit, where __BIT(0) == 0x1. */ +#define __BIT(__n) \ + (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \ + ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1)))) + +/* __BITS(m, n): bits m through n, m < n. */ +#define __BITS(__m, __n) \ + ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1)) + #endif /* _LIBNETBSD_SYS_CDEFS_H_ */ From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:52:49 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD867CD0242; Sat, 4 Feb 2017 16:52:49 +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 7CB26D95; Sat, 4 Feb 2017 16:52:49 +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 v14GqmxV078932; Sat, 4 Feb 2017 16:52:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gqms4078931; Sat, 4 Feb 2017 16:52:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041652.v14Gqms4078931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:52:48 +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: r313229 - stable/11/usr.sbin/ypserv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:52:49 -0000 Author: ngie Date: Sat Feb 4 16:52:48 2017 New Revision: 313229 URL: https://svnweb.freebsd.org/changeset/base/313229 Log: MFC r311469: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv. Modified: stable/11/usr.sbin/ypserv/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ypserv/Makefile ============================================================================== --- stable/11/usr.sbin/ypserv/Makefile Sat Feb 4 16:49:50 2017 (r313228) +++ stable/11/usr.sbin/ypserv/Makefile Sat Feb 4 16:52:48 2017 (r313229) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + RPCDIR= ${.CURDIR}/../../include/rpcsvc .PATH: ${RPCDIR} \ ${.CURDIR}/common @@ -10,11 +12,14 @@ SRCS= yp_svc.c yp_server.c yp_dblookup.c ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c \ yplib_host.c -CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. +CFLAGS+= -DDB_CACHE -I. WARNS?= 0 -LIBADD= wrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCP_WRAPPER +LIBADD+= wrap +.endif CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:54:45 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9506DCD0325; Sat, 4 Feb 2017 16:54:45 +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 64452EFA; Sat, 4 Feb 2017 16:54:45 +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 v14GsiYS079061; Sat, 4 Feb 2017 16:54:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GsiWs079060; Sat, 4 Feb 2017 16:54:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041654.v14GsiWs079060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:54:44 +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: r313230 - stable/11/usr.sbin/sendmail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:54:45 -0000 Author: ngie Date: Sat Feb 4 16:54:44 2017 New Revision: 313230 URL: https://svnweb.freebsd.org/changeset/base/313230 Log: MFC r311471: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail. Modified: stable/11/usr.sbin/sendmail/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sendmail/Makefile ============================================================================== --- stable/11/usr.sbin/sendmail/Makefile Sat Feb 4 16:52:48 2017 (r313229) +++ stable/11/usr.sbin/sendmail/Makefile Sat Feb 4 16:54:44 2017 (r313230) @@ -38,7 +38,7 @@ NIS= -DNIS MAPS= -DMAP_REGEX -DDNSMAP CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. -CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} +CFLAGS+= ${DBMDEF} ${NIS} ${MAPS} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DNETINET6 @@ -46,7 +46,7 @@ CFLAGS+= -DNETINET6 WARNS?= 0 -LIBADD= util wrap sm smutil +LIBADD= util sm smutil SRCS+= sm_os.h CLEANFILES+=sm_os.h @@ -57,6 +57,11 @@ CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LIBADD+= ssl crypto .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCPWRAPPERS +LIBADD+= wrap +.endif + # User customizations to the sendmail build environment CFLAGS+=${SENDMAIL_CFLAGS} DPADD+=${SENDMAIL_DPADD} From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:55:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39398CD0397; Sat, 4 Feb 2017 16:55: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 DFF361026; Sat, 4 Feb 2017 16:55: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 v14GtkaG079183; Sat, 4 Feb 2017 16:55:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gtktm079181; Sat, 4 Feb 2017 16:55:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041655.v14Gtktm079181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:55:46 +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: r313231 - stable/11/libexec/tftpd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:55:48 -0000 Author: ngie Date: Sat Feb 4 16:55:46 2017 New Revision: 313231 URL: https://svnweb.freebsd.org/changeset/base/313231 Log: MFC r311473: Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap Modified: stable/11/libexec/tftpd/Makefile stable/11/libexec/tftpd/tftpd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/tftpd/Makefile ============================================================================== --- stable/11/libexec/tftpd/Makefile Sat Feb 4 16:54:44 2017 (r313230) +++ stable/11/libexec/tftpd/Makefile Sat Feb 4 16:55:46 2017 (r313231) @@ -1,12 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +.include + PROG= tftpd MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP LIBADD= wrap +.endif .include Modified: stable/11/libexec/tftpd/tftpd.c ============================================================================== --- stable/11/libexec/tftpd/tftpd.c Sat Feb 4 16:54:44 2017 (r313230) +++ stable/11/libexec/tftpd/tftpd.c Sat Feb 4 16:55:46 2017 (r313231) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "tftp-file.h" @@ -75,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include "tftp-transfer.h" #include "tftp-options.h" +#ifdef LIBWRAP +#include +#endif + static void tftp_wrq(int peer, char *, ssize_t); static void tftp_rrq(int peer, char *, ssize_t); @@ -281,6 +284,7 @@ main(int argc, char *argv[]) } } +#ifdef LIBWRAP /* * See if the client is allowed to talk to me. * (This needs to be done before the chroot()) @@ -329,6 +333,7 @@ main(int argc, char *argv[]) "Full access allowed" "in /etc/hosts.allow"); } +#endif /* * Since we exit here, we should do that only after the above From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:56:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 362CBCD0426; Sat, 4 Feb 2017 16:56:53 +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 02346115F; Sat, 4 Feb 2017 16:56: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 v14Guq2R079281; Sat, 4 Feb 2017 16:56:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GuqVm079280; Sat, 4 Feb 2017 16:56:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041656.v14GuqVm079280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:56:52 +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: r313232 - stable/11/tests/sys/mac/bsdextended X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:56:53 -0000 Author: ngie Date: Sat Feb 4 16:56:51 2017 New Revision: 313232 URL: https://svnweb.freebsd.org/changeset/base/313232 Log: MFC r312164: Fix -Wformat issue Use %zu for printing out results from nitems, as it's size_t based Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:55:46 2017 (r313231) +++ stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:56:51 2017 (r313232) @@ -221,7 +221,7 @@ main(void) return (0); } - printf("1..%lu\n", nitems(test_users) + nitems(test_groups) + + printf("1..%zu\n", nitems(test_users) + nitems(test_groups) + 3 * nitems(test_strings) + 2); test_libugidfw_strings(); From owner-svn-src-stable-11@freebsd.org Sat Feb 4 16:58:07 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCF04CD04D1; Sat, 4 Feb 2017 16:58:07 +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 89ACD12A4; Sat, 4 Feb 2017 16:58:07 +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 v14Gw6jT079402; Sat, 4 Feb 2017 16:58:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gw6sk079401; Sat, 4 Feb 2017 16:58:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041658.v14Gw6sk079401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:58:06 +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: r313233 - stable/11/tests/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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:58:07 -0000 Author: ngie Date: Sat Feb 4 16:58:06 2017 New Revision: 313233 URL: https://svnweb.freebsd.org/changeset/base/313233 Log: MFC r312110: Fix -Wsign-compare warnings The loop index (i) doesn't need to be size_t as its comparison is signed Modified: stable/11/tests/sys/vm/mmap_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/vm/mmap_test.c ============================================================================== --- stable/11/tests/sys/vm/mmap_test.c Sat Feb 4 16:56:51 2017 (r313232) +++ stable/11/tests/sys/vm/mmap_test.c Sat Feb 4 16:58:06 2017 (r313233) @@ -184,8 +184,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_priva ATF_TC_BODY(mmap__dev_zero_private, tc) { char *p1, *p2, *p3; - size_t i; - int fd, pagesize; + int fd, i, pagesize; ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDONLY)) >= 0); @@ -197,7 +196,7 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) ATF_REQUIRE(p2 != MAP_FAILED); for (i = 0; i < pagesize; i++) - ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); + ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]); ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); @@ -224,8 +223,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_share ATF_TC_BODY(mmap__dev_zero_shared, tc) { char *p1, *p2, *p3; - size_t i; - int fd, pagesize; + int fd, i, pagesize; ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0); @@ -237,7 +235,7 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc) ATF_REQUIRE(p2 != MAP_FAILED); for (i = 0; i < pagesize; i++) - ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); + ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]); ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:01:54 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAEF7CD09EC; Sat, 4 Feb 2017 17:01:54 +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 95C0619FA; Sat, 4 Feb 2017 17:01:54 +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 v14H1r66081246; Sat, 4 Feb 2017 17:01:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H1rTO081245; Sat, 4 Feb 2017 17:01:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041701.v14H1rTO081245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:01:53 +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: r313235 - stable/11/tests/sys/mac/bsdextended X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:01:54 -0000 Author: ngie Date: Sat Feb 4 17:01:53 2017 New Revision: 313235 URL: https://svnweb.freebsd.org/changeset/base/313235 Log: MFC r312120: Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49 Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 17:00:47 2017 (r313234) +++ stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 17:01:53 2017 (r313235) @@ -71,7 +71,7 @@ static const char *test_groups[] = { "bin", }; -int test_num; +static int test_num; /* * List of test strings that must go in (and come out) of libugidfw intact. @@ -149,7 +149,8 @@ test_libugidfw_strings(void) struct mac_bsdextended_rule rule; char errorstr[256]; char rulestr[256]; - int error, i; + size_t i; + int error; for (i = 0; i < nitems(test_users); i++, test_num++) { if (getpwnam(test_users[i]) == NULL) @@ -171,7 +172,7 @@ test_libugidfw_strings(void) error = bsde_parse_rule_string(test_strings[i], &rule, sizeof(errorstr), errorstr); if (error == -1) - printf("not ok %d # bsde_parse_rule_string: '%s' (%d) " + printf("not ok %d # bsde_parse_rule_string: '%s' (%zu) " "failed: %s\n", test_num, test_strings[i], i, errorstr); else printf("ok %d\n", test_num); From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:02:56 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D1D4CD0B36; Sat, 4 Feb 2017 17:02:56 +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 0C6DD1BF3; Sat, 4 Feb 2017 17:02:55 +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 v14H2tCd083614; Sat, 4 Feb 2017 17:02:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H2tFx083613; Sat, 4 Feb 2017 17:02:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041702.v14H2tFx083613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:02:55 +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: r313236 - stable/11/tests/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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:02:56 -0000 Author: ngie Date: Sat Feb 4 17:02:54 2017 New Revision: 313236 URL: https://svnweb.freebsd.org/changeset/base/313236 Log: MFC r312114: Enable WARNS?= 6 across all of tests/sys Added: stable/11/tests/sys/Makefile.inc - copied unchanged from r312114, head/tests/sys/Makefile.inc Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/tests/sys/Makefile.inc (from r312114, head/tests/sys/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/Makefile.inc Sat Feb 4 17:02:54 2017 (r313236, copy of r312114, head/tests/sys/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +WARNS?= 6 From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:06:53 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DEC1CD0D03; Sat, 4 Feb 2017 17:06:53 +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 05D711E49; Sat, 4 Feb 2017 17:06: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 v14H6qco083860; Sat, 4 Feb 2017 17:06:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H6peL083858; Sat, 4 Feb 2017 17:06:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041706.v14H6peL083858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:06:51 +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: r313237 - stable/11/lib/msun/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:06:53 -0000 Author: ngie Date: Sat Feb 4 17:06:51 2017 New Revision: 313237 URL: https://svnweb.freebsd.org/changeset/base/313237 Log: MFC r303841,r312012,r312213: r303841 (by bdrewery): Revert r298434 which should be fixed by r301287, r301394, and r301403. PR: 208703, 208963 r312012: fmaxmin_test still fails with clang 3.9.x.. bypass the test PR: 208703 r312213: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. PR: 208703 Modified: stable/11/lib/msun/tests/Makefile stable/11/lib/msun/tests/fmaxmin_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/Makefile ============================================================================== --- stable/11/lib/msun/tests/Makefile Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/Makefile Sat Feb 4 17:06:51 2017 (r313237) @@ -52,16 +52,7 @@ TAP_TESTS_C+= ctrig_test TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test -# clang 3.8.0 fails always fails this test. See: bug 208703 -# -# XXX: depending on this compiler version check doesn't work at -# buildworld/installworld time, which results in jenkins failures (bug 208963) -# because the build is run on a 10.x instance, which has an older clang -# compiler. -# -#.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) -#TAP_TESTS_C+= fmaxmin_test -#.endif +TAP_TESTS_C+= fmaxmin_test TAP_TESTS_C+= ilogb_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test Modified: stable/11/lib/msun/tests/fmaxmin_test.c ============================================================================== --- stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:06:51 2017 (r313237) @@ -86,6 +86,8 @@ testall_r(long double big, long double s return (ok); } +const char *comment = NULL; + /* * Test all the functions: fmaxf, fmax, fmaxl, fminf, fmin, and fminl, * in all rounding modes and with the arguments in different orders. @@ -107,10 +109,17 @@ testall(int testnum, long double big, lo break; } } - printf("%sok %d - big = %.20Lg, small = %.20Lg\n", - (i == 4) ? "" : "not ", testnum, big, small); + printf("%sok %d - big = %.20Lg, small = %.20Lg%s\n", + (i == 4) ? "" : "not ", testnum, big, small, + comment == NULL ? "" : comment); } +/* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ +#if defined(__clang__) && \ + (__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0) +#define affected_by_bug_208703 +#endif + int main(int argc, char *argv[]) { @@ -122,15 +131,23 @@ main(int argc, char *argv[]) testall(3, nextafterf(42.0, INFINITY), 42.0); testall(4, -5.0, -5.0); testall(5, -3.0, -4.0); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 6-7 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(6, 1.0, NAN); testall(7, INFINITY, NAN); + comment = NULL; testall(8, INFINITY, 1.0); testall(9, -3.0, -INFINITY); testall(10, 3.0, -INFINITY); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 11-12 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(11, NAN, NAN); /* This test isn't strictly required to work by C99. */ testall(12, 0.0, -0.0); + comment = NULL; return (0); } From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:08:22 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A640DCD0DA2; Sat, 4 Feb 2017 17:08:22 +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 753781FA6; Sat, 4 Feb 2017 17:08:22 +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 v14H8Lma084033; Sat, 4 Feb 2017 17:08:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H8LDh084032; Sat, 4 Feb 2017 17:08:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041708.v14H8LDh084032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17: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: r313238 - stable/11/etc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:08:22 -0000 Author: ngie Date: Sat Feb 4 17:08:21 2017 New Revision: 313238 URL: https://svnweb.freebsd.org/changeset/base/313238 Log: MFC r310467: Provide some guidance when dealing with sections and variables contained within them For example, using variables designated for %usm requires uncommenting %usm section header Modified: stable/11/etc/snmpd.config Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/snmpd.config ============================================================================== --- stable/11/etc/snmpd.config Sat Feb 4 17:06:51 2017 (r313237) +++ stable/11/etc/snmpd.config Sat Feb 4 17:08:21 2017 (r313238) @@ -116,6 +116,14 @@ snmpEnableAuthenTraps = 2 # modules # +# Control configuration for the modules in the module specific sections, e.g. +# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the +# %usm specific section. You must uncomment the section specific header in +# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` +# can only be used if %usm is uncommented. +# + +# # Bridge module # This requires the mibII module. # From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:10:21 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90479CD0E26; Sat, 4 Feb 2017 17:10: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 6819A132; Sat, 4 Feb 2017 17:10: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 v14HAKQk084221; Sat, 4 Feb 2017 17:10:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HAKDN084216; Sat, 4 Feb 2017 17:10:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041710.v14HAKDN084216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:10:20 +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: r313239 - in stable/11: share/mk usr.sbin/bsnmpd/modules usr.sbin/bsnmpd/modules/snmp_hostres usr.sbin/bsnmpd/modules/snmp_mibII X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:10:21 -0000 Author: ngie Date: Sat Feb 4 17:10:19 2017 New Revision: 313239 URL: https://svnweb.freebsd.org/changeset/base/313239 Log: MFC r311744,r312328,r312329,r312330: r311744: Document bsd.snmpmod.mk from a high-level r312328: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. r312329: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 r312330: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP Modified: stable/11/share/mk/bsd.README stable/11/share/mk/bsd.snmpmod.mk stable/11/usr.sbin/bsnmpd/modules/Makefile stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.README ============================================================================== --- stable/11/share/mk/bsd.README Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/share/mk/bsd.README Sat Feb 4 17:10:19 2017 (r313239) @@ -410,6 +410,82 @@ If foo has multiple source files, add th =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +The include file, , handles building MIB modules for bsnmpd +from one or more source files, along with their manual pages. It has a +limited number of suffixes, consistent with the current needs of the BSD +tree. + +bsd.snmpmod.mk leverages bsd.lib.mk for building MIB modules and +bsd.files.mk for installing MIB description and definition files. + +It implements the following additional targets: + + smilint: + execute smilint on the MIBs defined by BMIBS. + + The net-mgmt/libsmi package must be installed before + executing this target. The net-mgmt/net-snmp package + should be installed as well to reduce false positives + from smilint. + +It sets/uses the following variables: + +BMIBS The MIB definitions to install. + +BMIBSDIR The directory where the MIB definitions are installed. + This defaults to `${SHAREDIR}/snmp/mibs`. + +DEFS The MIB description files to install. + +DEFSDIR The directory where MIB description files are installed. + This defaults to `${SHAREDIR}/snmp/defs`. + +EXTRAMIBDEFS Extra MIB description files to use as input when + generating ${MOD}_oid.h and ${MOD}_tree.[ch]. + +EXTRAMIBSYMS Extra MIB definition files used only for extracting + symbols. + + EXTRAMIBSYMS are useful when resolving inter-module + dependencies and are useful with files containing only + enum-definitions. + + See ${MOD}_oid.h for more details. + +LOCALBASE The package root where smilint and the net-snmp + definitions can be found + +MOD The bsnmpd module name. + +SMILINT smilint binary to use with the smilint make target. + +SMILINT_FLAGS flags to pass to smilint. + +SMIPATH A colon-separated directory path where MIBs definitions + can be found. See "SMIPATH" in smi_config for more + details. + +XSYM MIB names to extract symbols for. See ${MOD}_oid.h for + more details. + +It generates the following files: + +${MOD}_tree.c A source file and header which programmatically describes +${MOD}_tree.h the MIB (type, OID name, ACCESS attributes, etc). + + The files are generated via "gensnmptree -p". + + See gensnmptree(1) for more details. + +${MOD}_oid.h A header which programmatically describes the MIB root and + MIB tables. + + The files are generated via "gensnmptree -e". + + See gensnmptree(1) for more details. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + The include file contains the default targets for building subdirectories. It has the same seven targets as : all, clean, cleandir, depend, install, lint, and tags. For all of the directories Modified: stable/11/share/mk/bsd.snmpmod.mk ============================================================================== --- stable/11/share/mk/bsd.snmpmod.mk Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/share/mk/bsd.snmpmod.mk Sat Feb 4 17:10:19 2017 (r313239) @@ -25,4 +25,18 @@ FILESGROUPS+= BMIBS BMIBSDIR?= ${SHAREDIR}/snmp/mibs .endif +.if !target(smilint) && !empty(BMIBS) +LOCALBASE?= /usr/local + +SMILINT?= ${LOCALBASE}/bin/smilint + +SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs + +SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership + +smilint: ${BMIBS} + SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC} +.endif +smilint: .PHONY + .include Modified: stable/11/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd +.PATH: ${SRCTOP}/contrib/bsnmp/snmpd .if ${MK_ATM} != "no" _snmp_atm= snmp_atm @@ -36,4 +36,6 @@ SUBDIR+=snmp_wlan INCS= snmpmod.h INCSDIR= ${INCLUDEDIR}/bsnmp +SUBDIR_TARGETS+= smilint + .include Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -75,8 +75,3 @@ LIBADD= kvm devinfo m geom memstat printcap.pico: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=.:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -21,8 +21,3 @@ INCS= snmp_${MOD}.h BMIBS= BEGEMOT-IP-MIB.txt BEGEMOT-MIB2-MIB.txt .include - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:17:41 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57673CD00D0; Sat, 4 Feb 2017 17:17:41 +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 17965A93; Sat, 4 Feb 2017 17:17:41 +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 v14HHe50088309; Sat, 4 Feb 2017 17:17:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HHc4O088295; Sat, 4 Feb 2017 17:17:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041717.v14HHc4O088295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:17:38 +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: r313240 - in stable/11/lib/libc: . arm/aeabi capability gdtoa gen iconv md posix1e regex/grot resolv stdlib/jemalloc stdtime string 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-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:17:41 -0000 Author: ngie Date: Sat Feb 4 17:17:38 2017 New Revision: 313240 URL: https://svnweb.freebsd.org/changeset/base/313240 Log: MFC r312332,r312446,r312451: r312332: Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make r312446 (by emaste): libc: remove reference to nonexistent lib/locale directory As far as I can tell this was introduced in r72406 and updated in several subsequent revisions, but the lib/locale directory it referenced never existed. r312451: Replace dot-dot relative pathing with SRCTOP-relative paths where possible This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg Modified: stable/11/lib/libc/Makefile stable/11/lib/libc/arm/aeabi/Makefile.inc stable/11/lib/libc/capability/Makefile.inc stable/11/lib/libc/gdtoa/Makefile.inc stable/11/lib/libc/gen/Makefile.inc stable/11/lib/libc/iconv/Makefile.inc stable/11/lib/libc/md/Makefile.inc stable/11/lib/libc/posix1e/Makefile.inc stable/11/lib/libc/regex/grot/Makefile stable/11/lib/libc/resolv/Makefile.inc stable/11/lib/libc/stdlib/jemalloc/Makefile.inc stable/11/lib/libc/stdtime/Makefile.inc stable/11/lib/libc/string/Makefile.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/Makefile ============================================================================== --- stable/11/lib/libc/Makefile Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/Makefile Sat Feb 4 17:17:38 2017 (r313240) @@ -32,7 +32,7 @@ SHLIB_MAJOR= 7 SHLIB_LDSCRIPT=libc.ldscript SHLIB_LDSCRIPT_LINKS=libxnet.so WARNS?= 2 -CFLAGS+=-I${LIBC_SRCTOP}/include -I${LIBC_SRCTOP}/../../include +CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS Modified: stable/11/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- stable/11/lib/libc/arm/aeabi/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/arm/aeabi/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -21,7 +21,7 @@ SRCS+= aeabi_vfp_double.S \ # libc. This causes issues when other parts of libc call these functions. # We work around this by including these functions in libc but mark them as # hidden so users of libc will not pick up these versions. -.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/builtins/arm +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm SRCS+= aeabi_memcmp.S \ aeabi_memcpy.S \ Modified: stable/11/lib/libc/capability/Makefile.inc ============================================================================== --- stable/11/lib/libc/capability/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/capability/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,7 +1,7 @@ # $FreeBSD$ # capability sources -.PATH: ${LIBC_SRCTOP}/../../sys/kern ${LIBC_SRCTOP}/capability +.PATH: ${SRCTOP}/sys/kern ${LIBC_SRCTOP}/capability SRCS+= subr_capability.c Modified: stable/11/lib/libc/gdtoa/Makefile.inc ============================================================================== --- stable/11/lib/libc/gdtoa/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/gdtoa/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -10,11 +10,11 @@ GDTOASRCS+=dmisc.c dtoa.c gdtoa.c gethex SYM_MAPS+=${LIBC_SRCTOP}/gdtoa/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/gdtoa +CFLAGS+=-I${SRCTOP}/contrib/gdtoa .for src in ${GDTOASRCS} MISRCS+=gdtoa_${src} CLEANFILES+=gdtoa_${src} -gdtoa_${src}: ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} .NOMETA +gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor Modified: stable/11/lib/libc/gen/Makefile.inc ============================================================================== --- stable/11/lib/libc/gen/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/gen/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -150,11 +150,11 @@ SRCS+= fts-compat.c \ unvis-compat.c .endif -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-pwcache +.PATH: ${SRCTOP}/contrib/libc-pwcache SRCS+= pwcache.c pwcache.h -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-vis -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/libc-vis +.PATH: ${SRCTOP}/contrib/libc-vis +CFLAGS+= -I${SRCTOP}/contrib/libc-vis SRCS+= unvis.c vis.c MISRCS+=modf.c Modified: stable/11/lib/libc/iconv/Makefile.inc ============================================================================== --- stable/11/lib/libc/iconv/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/iconv/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -22,5 +22,5 @@ SRCS+= iconv_compat.c SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map .if ${MK_ICONV} == yes -.include "${LIBC_SRCTOP}/../libc_nonshared/Makefile.iconv" +.include "${SRCTOP}/lib/libc_nonshared/Makefile.iconv" .endif Modified: stable/11/lib/libc/md/Makefile.inc ============================================================================== --- stable/11/lib/libc/md/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/md/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/../libmd +.PATH: ${SRCTOP}/lib/libmd SRCS+= md5c.c Modified: stable/11/lib/libc/posix1e/Makefile.inc ============================================================================== --- stable/11/lib/libc/posix1e/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/posix1e/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -5,7 +5,7 @@ CFLAGS+=-D_ACL_PRIVATE # Copy kern/subr_acl_nfs4.c to the libc object directory. -subr_acl_nfs4.c: ${LIBC_SRCTOP}/../../sys/kern/subr_acl_nfs4.c +subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c cat ${.ALLSRC} > ${.TARGET} SRCS+= acl_branding.c \ Modified: stable/11/lib/libc/regex/grot/Makefile ============================================================================== --- stable/11/lib/libc/regex/grot/Makefile Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/regex/grot/Makefile Sat Feb 4 17:17:38 2017 (r313240) @@ -5,7 +5,7 @@ # Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's # for my use in some special contexts). -PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include +PATHS= ${LIBC_SRCTOP}/regex ${LIBC_SRCTOP}/locale ${SRCTOP}/include .PATH: ${PATHS} CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) Modified: stable/11/lib/libc/resolv/Makefile.inc ============================================================================== --- stable/11/lib/libc/resolv/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/resolv/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -9,4 +9,4 @@ SRCS+= herror.c h_errno.c mtctxres.c res SYM_MAPS+= ${LIBC_SRCTOP}/resolv/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../libmd +CFLAGS+=-I${SRCTOP}/lib/libmd Modified: stable/11/lib/libc/stdlib/jemalloc/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -9,18 +9,18 @@ JEMALLOCSRCS:= jemalloc.c arena.c atomic SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/jemalloc/include +CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} CLEANFILES+=jemalloc_${src} -jemalloc_${src}: ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} .NOMETA +jemalloc_${src}: ${SRCTOP}/contrib/jemalloc/src/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor MAN+=jemalloc.3 CLEANFILES+=jemalloc.3 -jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 .NOMETA +jemalloc.3: ${SRCTOP}/contrib/jemalloc/doc/jemalloc.3 .NOMETA ln -sf ${.ALLSRC} ${.TARGET} MLINKS+= \ Modified: stable/11/lib/libc/stdtime/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdtime/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/stdtime/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,15 +1,14 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../locale \ - ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime +.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode/stdtime SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ time32.c SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime +CFLAGS+= -I${SRCTOP}/contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime CFLAGS.localtime.c= -fwrapv Modified: stable/11/lib/libc/string/Makefile.inc ============================================================================== --- stable/11/lib/libc/string/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/string/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -2,7 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string -.PATH: ${LIBC_SRCTOP}/../../sys/libkern +.PATH: ${SRCTOP}/sys/libkern CFLAGS+= -I${LIBC_SRCTOP}/locale Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/sys/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -6,7 +6,7 @@ # Include the generated makefile containing the *complete* list # of syscall names in MIASM. -.include "${LIBC_SRCTOP}/../../sys/sys/syscall.mk" +.include "${SRCTOP}/sys/sys/syscall.mk" # Include machine dependent definitions. # From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:18:51 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49AD5CD019E; Sat, 4 Feb 2017 17:18:51 +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 165AECD2; Sat, 4 Feb 2017 17:18:51 +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 v14HIoPG088536; Sat, 4 Feb 2017 17:18:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HIolP088535; Sat, 4 Feb 2017 17:18:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041718.v14HIolP088535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:18:50 +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: r313241 - stable/11/contrib/bsnmp/snmp_usm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:18:51 -0000 Author: ngie Date: Sat Feb 4 17:18:49 2017 New Revision: 313241 URL: https://svnweb.freebsd.org/changeset/base/313241 Log: MFC r311394: op_usm_users: don't deref uusers if it's NULL when SETting the value Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. CID: 1008573 Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:17:38 2017 (r313240) +++ stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:18:49 2017 (r313241) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* + * XXX (ngie): need to investigate the MIB to determine how + * this is possible given some of the transitions below. + */ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:21:19 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794ACCD03CE; Sat, 4 Feb 2017 17:21:19 +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 3926BFE7; Sat, 4 Feb 2017 17:21:19 +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 v14HLIOd089574; Sat, 4 Feb 2017 17:21:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HLHb6089570; Sat, 4 Feb 2017 17:21:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041721.v14HLHb6089570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:21:17 +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: r313242 - in stable/11: . usr.sbin/bsnmpd/tools usr.sbin/bsnmpd/tools/bsnmptools usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:21:19 -0000 Author: ngie Date: Sat Feb 4 17:21:17 2017 New Revision: 313242 URL: https://svnweb.freebsd.org/changeset/base/313242 Log: MFC r311174: Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB Although it increases the size of the bsnmp{get,set,walk} binaries by four on my [amd64] system, it removes the need for producing .debug files, profiled libraries, and for installing the library itself, reducing the overall size use on disk by the utilities noted previously. Plus, it guards against ABI/API compatibility issues with the library as it's only used internal to the tools themselves. Modified: stable/11/ObsoleteFiles.inc stable/11/usr.sbin/bsnmpd/tools/Makefile stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/ObsoleteFiles.inc Sat Feb 4 17:21:17 2017 (r313242) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20170103: libbsnmptools.so made into an INTERNALLIB +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_LIBS+=usr/lib/libbsnmptools.so # 20170112: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161229: Three files from gnop tests consolidated into one Modified: stable/11/usr.sbin/bsnmpd/tools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -4,4 +4,8 @@ SUBDIR= libbsnmptools \ bsnmptools +SUBDIR_DEPEND_bsnmptools= libbsnmptools + +SUBDIR_PARALLEL= + .include Modified: stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -8,7 +8,9 @@ PROG= bsnmpget LIBADD= bsnmp bsnmptools -CFLAGS+= -I${.CURDIR}/../libbsnmptools + +CFLAGS+= -I${.CURDIR:H}/libbsnmptools +LDFLAGS+= -L${.OBJDIR:H}/libbsnmptools LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk LINKS+= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpset Modified: stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -5,9 +5,9 @@ .PATH: ${.CURDIR} LIB= bsnmptools -#INTERNALLIB= + SRCS= bsnmpimport.c bsnmpmap.c bsnmptools.c bsnmptc.c -SHLIB_MAJOR= 0 +INTERNALLIB= .include From owner-svn-src-stable-11@freebsd.org Sat Feb 4 17:26:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307A7CD05D8; Sat, 4 Feb 2017 17:26:30 +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 F3A3314BE; Sat, 4 Feb 2017 17:26:29 +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 v14HQTec092743; Sat, 4 Feb 2017 17:26:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HQScO092741; Sat, 4 Feb 2017 17:26:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041726.v14HQScO092741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:26: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: r313243 - in stable/11: crypto/openssh secure/usr.sbin/sshd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:26:30 -0000 Author: ngie Date: Sat Feb 4 17:26:28 2017 New Revision: 313243 URL: https://svnweb.freebsd.org/changeset/base/313243 Log: MFC r311585: Conditionalize building libwrap support into sshd Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system PR: 210141 Modified: stable/11/crypto/openssh/config.h stable/11/secure/usr.sbin/sshd/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/config.h ============================================================================== --- stable/11/crypto/openssh/config.h Sat Feb 4 17:21:17 2017 (r313242) +++ stable/11/crypto/openssh/config.h Sat Feb 4 17:26:28 2017 (r313243) @@ -1408,7 +1408,7 @@ /* #undef LASTLOG_WRITE_PUTUTXLINE */ /* Define if you want TCP Wrappers support */ -#define LIBWRAP 1 +/* #undef LIBWRAP */ /* Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP. */ Modified: stable/11/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/11/secure/usr.sbin/sshd/Makefile Sat Feb 4 17:21:17 2017 (r313242) +++ stable/11/secure/usr.sbin/sshd/Makefile Sat Feb 4 17:26:28 2017 (r313243) @@ -27,7 +27,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= ssh_namespace.h # pam should always happen before ssh here for static linking -LIBADD= pam ssh util wrap +LIBADD= pam ssh util .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -53,6 +53,11 @@ SRCS+= krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + LIBADD+= crypto .if defined(LOCALBASE)