From owner-svn-src-all@freebsd.org Sun Oct 4 00:40:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E77CA0F9C8; Sun, 4 Oct 2015 00:40:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3691FBC; Sun, 4 Oct 2015 00:40:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t940eDF3000773; Sun, 4 Oct 2015 00:40:13 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t940eDou000770; Sun, 4 Oct 2015 00:40:13 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201510040040.t940eDou000770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Sun, 4 Oct 2015 00:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288644 - head/share/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 00:40:14 -0000 Author: pjd Date: Sun Oct 4 00:40:12 2015 New Revision: 288644 URL: https://svnweb.freebsd.org/changeset/base/288644 Log: Add a little, but very useful script for use with programs that work using an event loop and should sleep only when waiting for events (eg. via kevent(2)). When a program is going to sleep in the kernel, the script will show its name, PID, kernel stack trace and userland stack trace. Sleeping in kevent(2) is ignored as it is expected to be valid. Sample output: # ./blocking lynxd lynxd(15042) is blocking... kernel`_cv_wait_sig+0x124 kernel`seltdwait+0xae kernel`sys_poll+0x3a3 kernel`amd64_syscall+0x343 kernel`0xffffffff806c79ab lynxd`poll+0xa lynxd`pqSocketCheck+0xa2 lynxd`pqWaitTimed+0x29 lynxd`connectDBComplete+0xd7 lynxd`PQsetdbLogin+0x2ec lynxd`db_connect+0x3c lynxd`main+0x198 lynxd`_start+0x16f 0x2 lynxd(1925) is blocking... kernel`_cv_wait+0x125 zfs.ko`zio_wait+0x5b zfs.ko`dmu_buf_hold_array_by_dnode+0x1dc zfs.ko`dmu_read+0xcb zfs.ko`zfs_freebsd_getpages+0x37b kernel`VOP_GETPAGES_APV+0xa7 kernel`vnode_pager_getpages+0x9a kernel`vm_fault_hold+0x885 kernel`vm_fault+0x77 kernel`trap_pfault+0x211 kernel`trap+0x506 kernel`0xffffffff806c76c2 lynxd`EVP_add_cipher+0x13 lynxd`SSL_library_init+0x11 lynxd`main+0x94 lynxd`_start+0x16f 0x2 lynxd(1925) is blocking... kernel`_cv_wait+0x125 zfs.ko`zio_wait+0x5b zfs.ko`dbuf_read+0x791 zfs.ko`dbuf_findbp+0x12f zfs.ko`dbuf_hold_impl+0xa2 zfs.ko`dbuf_hold+0x1b zfs.ko`dmu_buf_hold_array_by_dnode+0x153 zfs.ko`dmu_read_uio+0x66 zfs.ko`zfs_freebsd_read+0x3a3 kernel`VOP_READ_APV+0xa1 kernel`vn_read+0x13a kernel`vn_io_fault+0x10b kernel`dofileread+0x95 kernel`kern_readv+0x68 kernel`sys_read+0x63 kernel`amd64_syscall+0x343 kernel`0xffffffff806c79ab lynxd`_read+0xa lynxd`__srefill+0x122 lynxd`fgets+0x78 lynxd`file_gets+0x1d lynxd`BIO_gets+0x64 lynxd`PEM_read_bio+0xf5 lynxd`PEM_X509_INFO_read_bio+0x90 lynxd`X509_load_cert_crl_file+0x47 lynxd`by_file_ctrl+0x2e lynxd`X509_STORE_load_locations+0x4a lynxd`sslctx_init+0x255 lynxd`main+0x215 lynxd`_start+0x16f 0x2 Requested by: gnn Obtained from: Wheel Systems http://wheelsystems.com Added: head/share/dtrace/blocking (contents, props changed) Modified: head/share/dtrace/Makefile Modified: head/share/dtrace/Makefile ============================================================================== --- head/share/dtrace/Makefile Sat Oct 3 22:38:08 2015 (r288643) +++ head/share/dtrace/Makefile Sun Oct 4 00:40:12 2015 (r288644) @@ -12,7 +12,8 @@ SUBDIR= ${_toolkit} _toolkit= toolkit .endif -SCRIPTS= disklatency \ +SCRIPTS= blocking \ + disklatency \ disklatencycmd \ hotopen \ nfsattrstats \ Added: head/share/dtrace/blocking ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/blocking Sun Oct 4 00:40:12 2015 (r288644) @@ -0,0 +1,57 @@ +#!/usr/sbin/dtrace -s +/*- + * Copyright (c) 2015 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + * This little script is for use with programs that use event loop and should + * sleep only when waiting for events (eg. via kevent(2)). When a program is + * going to sleep in the kernel, the script will show its name, PID, kernel + * stack trace and userland stack trace. Sleeping in kevent(2) is ignored. + * + * usage: blocking + */ + +#pragma D option quiet + +syscall::kevent:entry +/execname == $$1/ +{ + self->inkevent = 1; +} + +fbt::sleepq_add:entry +/!self->inkevent && execname == $$1/ +{ + printf("\n%s(%d) is blocking...\n", execname, pid); + stack(); + ustack(); +} + +syscall::kevent:return +/execname == $$1/ +{ + self->inkevent = 0; +} From owner-svn-src-all@freebsd.org Sun Oct 4 01:56:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA2E0A0FC16; Sun, 4 Oct 2015 01:56:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB0D31CEC; Sun, 4 Oct 2015 01:56:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t941uBQq033199; Sun, 4 Oct 2015 01:56:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t941uBbX033198; Sun, 4 Oct 2015 01:56:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510040156.t941uBbX033198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 4 Oct 2015 01:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288645 - head/bin/cat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 01:56:11 -0000 Author: sbruno Date: Sun Oct 4 01:56:11 2015 New Revision: 288645 URL: https://svnweb.freebsd.org/changeset/base/288645 Log: Initialize fd to -1 so that gcc doesn't emit an unitialized warning. Modified: head/bin/cat/cat.c Modified: head/bin/cat/cat.c ============================================================================== --- head/bin/cat/cat.c Sun Oct 4 00:40:12 2015 (r288644) +++ head/bin/cat/cat.c Sun Oct 4 01:56:11 2015 (r288645) @@ -306,7 +306,8 @@ udom_open(const char *path, int flags) { struct addrinfo hints, *res, *res0; char rpath[PATH_MAX]; - int fd, error; + int fd = -1; + int error; /* * Construct the unix domain socket address and attempt to connect. From owner-svn-src-all@freebsd.org Sun Oct 4 04:25:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63EE0A0FE10; Sun, 4 Oct 2015 04:25:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46D7F1372; Sun, 4 Oct 2015 04:25:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t944Pvqi095044; Sun, 4 Oct 2015 04:25:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t944PvT1095043; Sun, 4 Oct 2015 04:25:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510040425.t944PvT1095043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Oct 2015 04:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288646 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 04:25:57 -0000 Author: adrian Date: Sun Oct 4 04:25:56 2015 New Revision: 288646 URL: https://svnweb.freebsd.org/changeset/base/288646 Log: Fix to compile using gcc-4.2 (eg mips, sparc64.) Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Oct 4 01:56:11 2015 (r288645) +++ head/sys/dev/usb/wlan/if_run.c Sun Oct 4 04:25:56 2015 (r288646) @@ -2162,8 +2162,8 @@ run_wme_update_cb(void *arg) { struct ieee80211com *ic = arg; struct run_softc *sc = ic->ic_softc; - const struct wmeParams (*ac)[WME_NUM_AC] = - &ic->ic_wme.wme_chanParams.cap_wmeParams; + const struct wmeParams *ac = + ic->ic_wme.wme_chanParams.cap_wmeParams; int aci, error = 0; RUN_LOCK_ASSERT(sc, MA_OWNED); @@ -2171,39 +2171,39 @@ run_wme_update_cb(void *arg) /* update MAC TX configuration registers */ for (aci = 0; aci < WME_NUM_AC; aci++) { error = run_write(sc, RT2860_EDCA_AC_CFG(aci), - ac[aci]->wmep_logcwmax << 16 | - ac[aci]->wmep_logcwmin << 12 | - ac[aci]->wmep_aifsn << 8 | - ac[aci]->wmep_txopLimit); + ac[aci].wmep_logcwmax << 16 | + ac[aci].wmep_logcwmin << 12 | + ac[aci].wmep_aifsn << 8 | + ac[aci].wmep_txopLimit); if (error) goto err; } /* update SCH/DMA registers too */ error = run_write(sc, RT2860_WMM_AIFSN_CFG, - ac[WME_AC_VO]->wmep_aifsn << 12 | - ac[WME_AC_VI]->wmep_aifsn << 8 | - ac[WME_AC_BK]->wmep_aifsn << 4 | - ac[WME_AC_BE]->wmep_aifsn); + ac[WME_AC_VO].wmep_aifsn << 12 | + ac[WME_AC_VI].wmep_aifsn << 8 | + ac[WME_AC_BK].wmep_aifsn << 4 | + ac[WME_AC_BE].wmep_aifsn); if (error) goto err; error = run_write(sc, RT2860_WMM_CWMIN_CFG, - ac[WME_AC_VO]->wmep_logcwmin << 12 | - ac[WME_AC_VI]->wmep_logcwmin << 8 | - ac[WME_AC_BK]->wmep_logcwmin << 4 | - ac[WME_AC_BE]->wmep_logcwmin); + ac[WME_AC_VO].wmep_logcwmin << 12 | + ac[WME_AC_VI].wmep_logcwmin << 8 | + ac[WME_AC_BK].wmep_logcwmin << 4 | + ac[WME_AC_BE].wmep_logcwmin); if (error) goto err; error = run_write(sc, RT2860_WMM_CWMAX_CFG, - ac[WME_AC_VO]->wmep_logcwmax << 12 | - ac[WME_AC_VI]->wmep_logcwmax << 8 | - ac[WME_AC_BK]->wmep_logcwmax << 4 | - ac[WME_AC_BE]->wmep_logcwmax); + ac[WME_AC_VO].wmep_logcwmax << 12 | + ac[WME_AC_VI].wmep_logcwmax << 8 | + ac[WME_AC_BK].wmep_logcwmax << 4 | + ac[WME_AC_BE].wmep_logcwmax); if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP0_CFG, - ac[WME_AC_BK]->wmep_txopLimit << 16 | - ac[WME_AC_BE]->wmep_txopLimit); + ac[WME_AC_BK].wmep_txopLimit << 16 | + ac[WME_AC_BE].wmep_txopLimit); if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP1_CFG, - ac[WME_AC_VO]->wmep_txopLimit << 16 | - ac[WME_AC_VI]->wmep_txopLimit); + ac[WME_AC_VO].wmep_txopLimit << 16 | + ac[WME_AC_VI].wmep_txopLimit); err: if (error) From owner-svn-src-all@freebsd.org Sun Oct 4 04:29:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B681EA0E633; Sun, 4 Oct 2015 04:29:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C1D31831; Sun, 4 Oct 2015 04:29:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t944Tj19095250; Sun, 4 Oct 2015 04:29:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t944TjLA095249; Sun, 4 Oct 2015 04:29:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510040429.t944TjLA095249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Oct 2015 04:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288647 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 04:29:45 -0000 Author: adrian Date: Sun Oct 4 04:29:44 2015 New Revision: 288647 URL: https://svnweb.freebsd.org/changeset/base/288647 Log: Fix to make compile on gcc-4.2.1 (eg mips, sparc64.) Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Sun Oct 4 04:25:56 2015 (r288646) +++ head/sys/dev/usb/wlan/if_rum.c Sun Oct 4 04:29:44 2015 (r288647) @@ -2086,38 +2086,40 @@ rum_update_slot(struct ieee80211com *ic) static void rum_wme_update_cb(struct rum_softc *sc, union sec_param *data, uint8_t rvp_id) { - const struct wmeParams (*chanp)[WME_NUM_AC] = &data->wme_params; + struct ieee80211com *ic = &sc->sc_ic; + const struct wmeParams *chanp = + ic->ic_wme.wme_chanParams.cap_wmeParams; int error = 0; error = rum_write(sc, RT2573_AIFSN_CSR, - chanp[WME_AC_VO]->wmep_aifsn << 12 | - chanp[WME_AC_VI]->wmep_aifsn << 8 | - chanp[WME_AC_BK]->wmep_aifsn << 4 | - chanp[WME_AC_BE]->wmep_aifsn); + chanp[WME_AC_VO].wmep_aifsn << 12 | + chanp[WME_AC_VI].wmep_aifsn << 8 | + chanp[WME_AC_BK].wmep_aifsn << 4 | + chanp[WME_AC_BE].wmep_aifsn); if (error) goto print_err; error = rum_write(sc, RT2573_CWMIN_CSR, - chanp[WME_AC_VO]->wmep_logcwmin << 12 | - chanp[WME_AC_VI]->wmep_logcwmin << 8 | - chanp[WME_AC_BK]->wmep_logcwmin << 4 | - chanp[WME_AC_BE]->wmep_logcwmin); + chanp[WME_AC_VO].wmep_logcwmin << 12 | + chanp[WME_AC_VI].wmep_logcwmin << 8 | + chanp[WME_AC_BK].wmep_logcwmin << 4 | + chanp[WME_AC_BE].wmep_logcwmin); if (error) goto print_err; error = rum_write(sc, RT2573_CWMAX_CSR, - chanp[WME_AC_VO]->wmep_logcwmax << 12 | - chanp[WME_AC_VI]->wmep_logcwmax << 8 | - chanp[WME_AC_BK]->wmep_logcwmax << 4 | - chanp[WME_AC_BE]->wmep_logcwmax); + chanp[WME_AC_VO].wmep_logcwmax << 12 | + chanp[WME_AC_VI].wmep_logcwmax << 8 | + chanp[WME_AC_BK].wmep_logcwmax << 4 | + chanp[WME_AC_BE].wmep_logcwmax); if (error) goto print_err; error = rum_write(sc, RT2573_TXOP01_CSR, - chanp[WME_AC_BK]->wmep_txopLimit << 16 | - chanp[WME_AC_BE]->wmep_txopLimit); + chanp[WME_AC_BK].wmep_txopLimit << 16 | + chanp[WME_AC_BE].wmep_txopLimit); if (error) goto print_err; error = rum_write(sc, RT2573_TXOP23_CSR, - chanp[WME_AC_VO]->wmep_txopLimit << 16 | - chanp[WME_AC_VI]->wmep_txopLimit); + chanp[WME_AC_VO].wmep_txopLimit << 16 | + chanp[WME_AC_VI].wmep_txopLimit); if (error) goto print_err; @@ -2134,10 +2136,8 @@ static int rum_wme_update(struct ieee80211com *ic) { struct rum_softc *sc = ic->ic_softc; - const struct wmeParams (*chanp)[WME_NUM_AC] = - &ic->ic_wme.wme_chanParams.cap_wmeParams; - rum_cmd_sleepable(sc, chanp, sizeof (*chanp), 0, rum_wme_update_cb); + rum_cmd_sleepable(sc, NULL, 0, 0, rum_wme_update_cb); return (0); } From owner-svn-src-all@freebsd.org Sun Oct 4 04:44:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA53A0F063; Sun, 4 Oct 2015 04:44:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6B801ED1; Sun, 4 Oct 2015 04:44:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t944i6XM003309; Sun, 4 Oct 2015 04:44:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t944i6W9003308; Sun, 4 Oct 2015 04:44:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510040444.t944i6W9003308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Oct 2015 04:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288648 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 04:44:07 -0000 Author: adrian Date: Sun Oct 4 04:44:06 2015 New Revision: 288648 URL: https://svnweb.freebsd.org/changeset/base/288648 Log: Random zyd(4) fixes to bring TX handling in line with rsu, etc * don't free buffers in the TX routine, only in transmit/raw_xmit * free nodes + references * .. and free those nodes/references /before/ net80211 detach Tested: * STA mode: zyd0: HMAC ZD1211B, FW 47.25, RF AL2230 S0, PA0 LED 0 BE0 NP1 Gain1 F0 Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Sun Oct 4 04:29:44 2015 (r288647) +++ head/sys/dev/usb/wlan/if_zyd.c Sun Oct 4 04:44:06 2015 (r288648) @@ -420,6 +420,22 @@ detach: return (ENXIO); /* failure */ } +static void +zyd_drain_mbufq(struct zyd_softc *sc) +{ + struct mbuf *m; + struct ieee80211_node *ni; + + ZYD_LOCK_ASSERT(sc, MA_OWNED); + while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) { + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + m->m_pkthdr.rcvif = NULL; + ieee80211_free_node(ni); + m_freem(m); + } +} + + static int zyd_detach(device_t dev) { @@ -433,6 +449,7 @@ zyd_detach(device_t dev) */ ZYD_LOCK(sc); sc->sc_flags |= ZYD_FLAG_DETACHED; + zyd_drain_mbufq(sc); STAILQ_INIT(&sc->tx_q); STAILQ_INIT(&sc->tx_free); ZYD_UNLOCK(sc); @@ -451,7 +468,6 @@ zyd_detach(device_t dev) if (ic->ic_softc == sc) ieee80211_ifdetach(ic); - mbufq_drain(&sc->sc_snd); mtx_destroy(&sc->sc_mtx); return (0); @@ -2443,7 +2459,6 @@ zyd_tx_start(struct zyd_softc *sc, struc if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { - m_freem(m0); return (ENOBUFS); } /* packet header may have moved, reset our local pointer */ @@ -2555,6 +2570,7 @@ zyd_start(struct zyd_softc *sc) ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (zyd_tx_start(sc, m, ni) != 0) { ieee80211_free_node(ni); + m_freem(m); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); break; @@ -2592,6 +2608,7 @@ zyd_raw_xmit(struct ieee80211_node *ni, if (zyd_tx_start(sc, m, ni) != 0) { ZYD_UNLOCK(sc); ieee80211_free_node(ni); + m_freem(m); return (EIO); } ZYD_UNLOCK(sc); @@ -2738,6 +2755,7 @@ zyd_stop(struct zyd_softc *sc) ZYD_LOCK_ASSERT(sc, MA_OWNED); sc->sc_flags &= ~ZYD_FLAG_RUNNING; + zyd_drain_mbufq(sc); /* * Drain all the transfers, if not already drained: From owner-svn-src-all@freebsd.org Sun Oct 4 05:22:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B98AA0E69F; Sun, 4 Oct 2015 05:22:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CACC1CFE; Sun, 4 Oct 2015 05:22:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t945MH8b019913; Sun, 4 Oct 2015 05:22:17 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t945MH5F019912; Sun, 4 Oct 2015 05:22:17 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510040522.t945MH5F019912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Oct 2015 05:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288649 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 05:22:18 -0000 Author: adrian Date: Sun Oct 4 05:22:17 2015 New Revision: 288649 URL: https://svnweb.freebsd.org/changeset/base/288649 Log: Fix run(4) mbuf queue flushing / freeing. Ensure things are freed during interface stop, or start may end up never being able to transmit a full queue. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Oct 4 04:44:06 2015 (r288648) +++ head/sys/dev/usb/wlan/if_run.c Sun Oct 4 05:22:17 2015 (r288649) @@ -831,6 +831,21 @@ detach: return (ENXIO); } +static void +run_drain_mbufq(struct run_softc *sc) +{ + struct mbuf *m; + struct ieee80211_node *ni; + + RUN_LOCK_ASSERT(sc, MA_OWNED); + while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) { + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + m->m_pkthdr.rcvif = NULL; + ieee80211_free_node(ni); + m_freem(m); + } +} + static int run_detach(device_t self) { @@ -852,6 +867,9 @@ run_detach(device_t self) /* free TX list, if any */ for (i = 0; i != RUN_EP_QUEUES; i++) run_unsetup_tx_list(sc, &sc->sc_epq[i]); + + /* Free TX queue */ + run_drain_mbufq(sc); RUN_UNLOCK(sc); if (sc->sc_ic.ic_softc == sc) { @@ -862,7 +880,6 @@ run_detach(device_t self) ieee80211_ifdetach(ic); } - mbufq_drain(&sc->sc_snd); mtx_destroy(&sc->sc_mtx); return (0); @@ -6172,6 +6189,8 @@ run_stop(void *arg) RUN_LOCK(sc); + run_drain_mbufq(sc); + if (sc->rx_m != NULL) { m_free(sc->rx_m); sc->rx_m = NULL; From owner-svn-src-all@freebsd.org Sun Oct 4 07:02:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85A3DA0E02C; Sun, 4 Oct 2015 07:02:18 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73A9A152B; Sun, 4 Oct 2015 07:02:18 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9472IYM064752; Sun, 4 Oct 2015 07:02:18 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9472IRO064751; Sun, 4 Oct 2015 07:02:18 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510040702.t9472IRO064751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 4 Oct 2015 07:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288652 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 07:02:18 -0000 Author: melifaro Date: Sun Oct 4 07:02:17 2015 New Revision: 288652 URL: https://svnweb.freebsd.org/changeset/base/288652 Log: Fix condition for nd6_llinfo_getholdsrc() introduced in r287484. Effectively it always returned NULL so SAS was always performed and sometimes the result might have been different. Fix state machine change accidentally introduced in r287985: state (4) inside nd6_cache_lladdr() (existing entry got nd message with the same lladdress) started to cause lle state transition to STALE instead of no-action. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 4 06:31:30 2015 (r288651) +++ head/sys/netinet6/nd6.c Sun Oct 4 07:02:17 2015 (r288652) @@ -530,7 +530,7 @@ nd6_llinfo_get_holdsrc(struct llentry *l * assume every packet in la_hold has the same IP header */ m = ln->la_hold; - if (sizeof(hdr) < m->m_len) + if (sizeof(hdr) > m->m_len) return (NULL); m_copydata(m, 0, sizeof(hdr), (caddr_t)&hdr); @@ -1798,7 +1798,8 @@ nd6_cache_lladdr(struct ifnet *ifp, stru */ bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); ln->la_flags |= LLE_VALID; - nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); + if (do_update != 0) /* 3,5,7 */ + nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); From owner-svn-src-all@freebsd.org Sun Oct 4 07:25:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB9EA0F3B7; Sun, 4 Oct 2015 07:25:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id DA70D1FDC; Sun, 4 Oct 2015 07:25:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id 2C4E41975; Sun, 4 Oct 2015 07:25:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Sun, 4 Oct 2015 07:25:27 +0000 From: Glen Barber To: Konstantin Belousov Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288492 - head/sys/arm/arm Message-ID: <20151004072527.GF24586@FreeBSD.org> References: <201510021326.t92DQ0Ds002986@repo.freebsd.org> <1443795970.66572.68.camel@freebsd.org> <20151002152059.GY11284@kib.kiev.ua> <1443803276.66572.72.camel@freebsd.org> <20151003070256.GD11284@kib.kiev.ua> <20151003073040.GE11284@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Zi0sgQQBxRFxMTsj" Content-Disposition: inline In-Reply-To: <20151003073040.GE11284@kib.kiev.ua> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 07:25:30 -0000 --Zi0sgQQBxRFxMTsj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 03, 2015 at 10:30:40AM +0300, Konstantin Belousov wrote: > On Sat, Oct 03, 2015 at 10:02:56AM +0300, Konstantin Belousov wrote: > > On Fri, Oct 02, 2015 at 10:27:56AM -0600, Ian Lepore wrote: > > > On Fri, 2015-10-02 at 18:20 +0300, Konstantin Belousov wrote: > > > > On Fri, Oct 02, 2015 at 08:26:10AM -0600, Ian Lepore wrote: > > > > > Some arm documentation refers to the need for "support code" when= the > > > > > flush-to-zero option is disabled on VFPv2 hardware (which for us = would > > > > > be just the RPi I think). Do we have that support code? What ha= ppens > > > > > if it's missing? I can't actually find any info on exactly what = that > > > > > support code is supposed to do. For all I know, we have the requ= ired > > > > > code in libm. Or maybe what's needed is exception-handling code = in the > > > > > kernel. I can't find any info on what they mean by "support code= " in > > > > > this context. > > > > The fpscr register is user-modifiable, so whatever happens after the > > > > change, could as well happen before it. > > > >=20 > > > > I saw the references to the support code in e.g. ARM v7-A A2.7.5 > > > > Flush-to-zero. But I was sure that the text refers to the modes when > > > > e.g. FZ is cleared and UFE or IXE bits are enabled. In this situati= on, > > > > fault handler must do something to allow the computation to proceed. > > > >=20 > > > > >=20 > > > > > I don't think this is an issue for VFPv3 and later hardware. I've > > > > > looked in a few of the TRMs for different cortex-a series process= ors and > > > > > they say the hardware handles all combinations of rounding and fl= ush to > > > > > zero without support software. But we should probably be on the = lookout > > > > > for reports of misbehaving apps on RPi after this change, just in= case > > > > > this setting has been protecting us from our ignorance there. > > > >=20 > > > > I did found the reference to the support code in the VFP11 TRM, whi= ch in > > > > turns point to > > > > http://infocenter.arm.com/help/index.jsp?topic=3D/com.arm.doc.epm04= 9219/index.html > > > > Does FreeBSD enable and handle this variant of coprocessor ? If ye= s, then > > > > indeed I would need to not enable FZ on the affected hardware. > > > >=20 > > >=20 > > > That link opened a reference to a cortex-a57 chip for me. I've had > > > problems trying to share links to arm's documentation site, something > > > about the way that navbar stuff works makes pasting links not-work. > > I tried to reference > > App Notes and tutorials -> All Application Notes -> AN098 - VFP > > Support Code > >=20 > > >=20 > > > We support one arm11/VFPv2 chipset, the one used on RPi. It's the on= ly > > > actual armv6 chip we support, all the other stuff supported by the ar= ch > > > we call armv6 is really armv7. The TRM for the arm1176JZF-S core used > > > on RPi is the one that mentions needing support code. > >=20 > > Yes, testing on original RPi, done by Glen, demostrates it. The test > > program I used is at > > https://www.kib.kiev.ua/kib/perl_opbasic_arith_175.c > > https://www.kib.kiev.ua/kib/perl_opbasic_arith_175 is the compiled bina= ry > > with -mfloat-abi=3Dsoftfp > >=20 > > Also the following untested on RPi patch should fix this. I verified > > that it still starts with FZ bit cleared, on VFP v3 (RPi 2): > > https://www.kib.kiev.ua/kib/rpi-fz.1.patch > Use https://www.kib.kiev.ua/kib/rpi-fz.2.patch instead, VFP v3 might also > declare that denormals are not supported in hw, apparently. >=20 With the rpi-fz.2.patch applied, cron no longer dumps core, and the perl_opbasic_arith_175.f runs successfully without floating exception. Glen --Zi0sgQQBxRFxMTsj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWENRiAAoJEAMUWKVHj+KTJN4QAJZIgN47ckI97aA9E3hs7xJm ILTy6+ymFo/qGwF3fb7WOynT09iDvqRSnvRlUpVZZG3sFAKH/qHaQ/sjo5BChZND yXq5YIIGjeN+B40143OxeLpzhdQldL6t9Qshqjv3ONOd//hDpAAiqQhHVkdqYR6N AEYsw+01K9apUmzLVBr7qjGwqHb2XQHxy+1VF6EXLI3jV/Inp+GLEgI1NKdeHlMw oyQw2gkkGKy7iY7HvMzWr1gA33J5n3oGsHKT1y0c6VVDh66MDMMZNko0KYBFc7Gz ELXK72ry1zI5HrMUgytQZz3I644q57Qw0dN3ij1/6v6EbQcTufe2bzaPw8JIn2yW BGUwMQ7r/gXNmN3bq/QrSxb7PWnagVbKiFo7uPopEI1Ddw4LNz7CT167tyZ5085z xp1BxHj7VhUbrhfWDwmR9MZgBpG85Qz8nLw7TlETW8NQJCEVguzR0Hy8719TuF4s GVlG7Ufv8TlYUM7fwI6Rwu/iGRBefMuuH4I1egJvGVpC1i91Cz/z98FX7n6TQQAb wRmo42bwzqwL8wBtupm9RwjCBwMXcLSYuBol5hrbI9qIqsv6tsjWDOLRrX5Hmgko XyyU1kVLn6RXubQHONof8v7ap0LCQPJvOEsNQdBNL2XasENKGcb1xf80UO4P+LNI /FEQ3fvw4HmBo2vpPnSD =qsc+ -----END PGP SIGNATURE----- --Zi0sgQQBxRFxMTsj-- From owner-svn-src-all@freebsd.org Sun Oct 4 07:45:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E986A0E304; Sun, 4 Oct 2015 07:45:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6EDC19EF; Sun, 4 Oct 2015 07:45:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t947jdQJ082820; Sun, 4 Oct 2015 07:45:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t947jbp7082807; Sun, 4 Oct 2015 07:45:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510040745.t947jbp7082807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 4 Oct 2015 07:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288653 - in head/sys/dev/drm2: . i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 07:45:40 -0000 Author: adrian Date: Sun Oct 4 07:45:36 2015 New Revision: 288653 URL: https://svnweb.freebsd.org/changeset/base/288653 Log: drm2: a few minor fixes after r280183 * Remove obsolete drm_agp_*_memory() prototypes. * Fix comment in drm_fops.c (outisde -> outside). * Fix some formatting issues in drm_stub.c (spaces -> tabs). * Add missing case statement (gen == 3) in intel_gpu_reset(). * Restore pci_enable_busmaster() call in the init path (fixes gpu hang on i945GM). * Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect). Submitted by: Reviewed by: dumbbell Approved by: dumbbell Differential Revision: https://reviews.freebsd.org/D3413 Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_crtc.c head/sys/dev/drm2/drm_fops.c head/sys/dev/drm2/drm_pci.c head/sys/dev/drm2/drm_stub.c head/sys/dev/drm2/i915/i915_dma.c head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/i915/intel_opregion.c Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/drmP.h Sun Oct 4 07:45:36 2015 (r288653) @@ -1782,12 +1782,6 @@ void drm_driver_irq_preinstall(struct dr void drm_driver_irq_postinstall(struct drm_device *dev); void drm_driver_irq_uninstall(struct drm_device *dev); -/* AGP/PCI Express/GART support (drm_agpsupport.c) */ -void *drm_agp_allocate_memory(size_t pages, u32 type); -int drm_agp_free_memory(void *handle); -int drm_agp_bind_memory(void *handle, off_t start); -int drm_agp_unbind_memory(void *handle); - /* sysctl support (drm_sysctl.h) */ extern int drm_sysctl_init(struct drm_device *dev); extern int drm_sysctl_cleanup(struct drm_device *dev); Modified: head/sys/dev/drm2/drm_crtc.c ============================================================================== --- head/sys/dev/drm2/drm_crtc.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/drm_crtc.c Sun Oct 4 07:45:36 2015 (r288653) @@ -663,7 +663,7 @@ int drm_plane_init(struct drm_device *de plane->dev = dev; plane->funcs = funcs; plane->format_types = malloc(sizeof(uint32_t) * format_count, - DRM_MEM_KMS, M_WAITOK); + DRM_MEM_KMS, M_NOWAIT); if (!plane->format_types) { DRM_DEBUG_KMS("out of memory when allocating plane\n"); drm_mode_object_put(dev, &plane->base); @@ -1010,7 +1010,7 @@ int drm_mode_group_init(struct drm_devic total_objects += dev->mode_config.num_encoder; group->id_list = malloc(total_objects * sizeof(uint32_t), - DRM_MEM_KMS, M_WAITOK | M_ZERO); + DRM_MEM_KMS, M_NOWAIT | M_ZERO); if (!group->id_list) return -ENOMEM; @@ -1998,7 +1998,7 @@ int drm_mode_setcrtc(struct drm_device * connector_set = malloc(crtc_req->count_connectors * sizeof(struct drm_connector *), - DRM_MEM_KMS, M_WAITOK); + DRM_MEM_KMS, M_NOWAIT); if (!connector_set) { ret = -ENOMEM; goto out; @@ -2523,7 +2523,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_de goto out_err1; } clips = malloc(num_clips * sizeof(*clips), DRM_MEM_KMS, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); if (!clips) { ret = -ENOMEM; goto out_err1; @@ -2774,13 +2774,13 @@ struct drm_property *drm_property_create int ret; property = malloc(sizeof(struct drm_property), DRM_MEM_KMS, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); if (!property) return NULL; if (num_values) { property->values = malloc(sizeof(uint64_t)*num_values, DRM_MEM_KMS, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); if (!property->values) goto fail; } @@ -2908,7 +2908,7 @@ int drm_property_add_enum(struct drm_pro } prop_enum = malloc(sizeof(struct drm_property_enum), DRM_MEM_KMS, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); if (!prop_enum) return -ENOMEM; @@ -3104,7 +3104,7 @@ static struct drm_property_blob *drm_pro return NULL; blob = malloc(sizeof(struct drm_property_blob)+length, DRM_MEM_KMS, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); if (!blob) return NULL; @@ -3434,7 +3434,7 @@ int drm_mode_crtc_set_gamma_size(struct crtc->gamma_size = gamma_size; crtc->gamma_store = malloc(gamma_size * sizeof(uint16_t) * 3, - DRM_MEM_KMS, M_WAITOK | M_ZERO); + DRM_MEM_KMS, M_NOWAIT | M_ZERO); if (!crtc->gamma_store) { crtc->gamma_size = 0; return -ENOMEM; @@ -3632,7 +3632,7 @@ int drm_mode_page_flip_ioctl(struct drm_ file_priv->event_space -= sizeof e->event; mtx_unlock(&dev->event_lock); - e = malloc(sizeof *e, DRM_MEM_KMS, M_WAITOK | M_ZERO); + e = malloc(sizeof *e, DRM_MEM_KMS, M_NOWAIT | M_ZERO); if (e == NULL) { mtx_lock(&dev->event_lock); file_priv->event_space += sizeof e->event; Modified: head/sys/dev/drm2/drm_fops.c ============================================================================== --- head/sys/dev/drm2/drm_fops.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/drm_fops.c Sun Oct 4 07:45:36 2015 (r288653) @@ -136,7 +136,7 @@ int drm_open(struct cdev *kdev, int flag sx_xlock(&drm_global_mutex); /* - * FIXME Linux<->FreeBSD: On Linux, counter updated outisde + * FIXME Linux<->FreeBSD: On Linux, counter updated outside * global mutex. */ if (!dev->open_count++) Modified: head/sys/dev/drm2/drm_pci.c ============================================================================== --- head/sys/dev/drm2/drm_pci.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/drm_pci.c Sun Oct 4 07:45:36 2015 (r288653) @@ -225,7 +225,7 @@ int drm_pci_set_unique(struct drm_device master->unique_len = u->unique_len; master->unique_size = u->unique_len + 1; - master->unique = malloc(master->unique_size, DRM_MEM_DRIVER, M_WAITOK); + master->unique = malloc(master->unique_size, DRM_MEM_DRIVER, M_NOWAIT); if (!master->unique) { ret = -ENOMEM; goto err; Modified: head/sys/dev/drm2/drm_stub.c ============================================================================== --- head/sys/dev/drm2/drm_stub.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/drm_stub.c Sun Oct 4 07:45:36 2015 (r288653) @@ -94,9 +94,9 @@ static int drm_minor_get_id(struct drm_d if (type == DRM_MINOR_CONTROL) { new_id += 64; - } else if (type == DRM_MINOR_RENDER) { - new_id += 128; - } + } else if (type == DRM_MINOR_RENDER) { + new_id += 128; + } return new_id; } Modified: head/sys/dev/drm2/i915/i915_dma.c ============================================================================== --- head/sys/dev/drm2/i915/i915_dma.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/i915/i915_dma.c Sun Oct 4 07:45:36 2015 (r288653) @@ -1452,6 +1452,8 @@ int i915_driver_load(struct drm_device * } } + pci_enable_busmaster(dev->dev); + intel_opregion_init(dev); callout_init(&dev_priv->hangcheck_timer, 1); Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/i915/i915_drv.c Sun Oct 4 07:45:36 2015 (r288653) @@ -894,6 +894,7 @@ int intel_gpu_reset(struct drm_device *d case 4: ret = i965_do_reset(dev); break; + case 3: case 2: ret = i8xx_do_reset(dev); break; Modified: head/sys/dev/drm2/i915/intel_opregion.c ============================================================================== --- head/sys/dev/drm2/i915/intel_opregion.c Sun Oct 4 07:02:17 2015 (r288652) +++ head/sys/dev/drm2/i915/intel_opregion.c Sun Oct 4 07:45:36 2015 (r288653) @@ -533,11 +533,9 @@ void intel_opregion_fini(struct drm_devi opregion->vbt = NULL; } #else -int +void intel_opregion_init(struct drm_device *dev) { - - return (0); } void From owner-svn-src-all@freebsd.org Sun Oct 4 08:00:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D9EEA0F122; Sun, 4 Oct 2015 08:00:30 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25DA51FAD; Sun, 4 Oct 2015 08:00:30 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9480UjB088207; Sun, 4 Oct 2015 08:00:30 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9480TY9088205; Sun, 4 Oct 2015 08:00:29 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201510040800.t9480TY9088205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 4 Oct 2015 08:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288654 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 08:00:30 -0000 Author: araujo Date: Sun Oct 4 08:00:29 2015 New Revision: 288654 URL: https://svnweb.freebsd.org/changeset/base/288654 Log: Remove per complete the fec aggregation protocol. The remove began with revision r271733. NOTE: This patch must never be merge to 10-Stable Reviewed by: glebius Approved by: bapt (mentor) Relnotes: Yes Sponsored by: EuroBSDCon Sweden. Differential Revision: D3786 Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sun Oct 4 07:45:36 2015 (r288653) +++ head/sys/net/if_lagg.c Sun Oct 4 08:00:29 2015 (r288654) @@ -221,13 +221,6 @@ static const struct lagg_proto { .pr_portreq = lacp_portreq, }, { - .pr_num = LAGG_PROTO_ETHERCHANNEL, - .pr_attach = lagg_lb_attach, - .pr_detach = lagg_lb_detach, - .pr_start = lagg_lb_start, - .pr_input = lagg_lb_input, - }, - { .pr_num = LAGG_PROTO_BROADCAST, .pr_start = lagg_bcast_start, .pr_input = lagg_bcast_input, @@ -1125,7 +1118,6 @@ lagg_port2req(struct lagg_port *lp, stru case LAGG_PROTO_ROUNDROBIN: case LAGG_PROTO_LOADBALANCE: - case LAGG_PROTO_ETHERCHANNEL: case LAGG_PROTO_BROADCAST: if (LAGG_PORTACTIVE(lp)) rp->rp_flags |= LAGG_PORT_ACTIVE; @@ -1759,7 +1751,6 @@ lagg_linkstate(struct lagg_softc *sc) break; case LAGG_PROTO_ROUNDROBIN: case LAGG_PROTO_LOADBALANCE: - case LAGG_PROTO_ETHERCHANNEL: case LAGG_PROTO_BROADCAST: speed = 0; SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Sun Oct 4 07:45:36 2015 (r288653) +++ head/sys/net/if_lagg.h Sun Oct 4 08:00:29 2015 (r288654) @@ -53,7 +53,6 @@ typedef enum { LAGG_PROTO_FAILOVER, /* active failover */ LAGG_PROTO_LOADBALANCE, /* loadbalance */ LAGG_PROTO_LACP, /* 802.3ad lacp */ - LAGG_PROTO_ETHERCHANNEL,/* Cisco FEC */ LAGG_PROTO_BROADCAST, /* broadcast */ LAGG_PROTO_MAX, } lagg_proto; @@ -66,7 +65,6 @@ struct lagg_protos { #define LAGG_PROTO_DEFAULT LAGG_PROTO_FAILOVER #define LAGG_PROTOS { \ { "failover", LAGG_PROTO_FAILOVER }, \ - { "fec", LAGG_PROTO_ETHERCHANNEL }, \ { "lacp", LAGG_PROTO_LACP }, \ { "loadbalance", LAGG_PROTO_LOADBALANCE }, \ { "roundrobin", LAGG_PROTO_ROUNDROBIN }, \ From owner-svn-src-all@freebsd.org Sun Oct 4 08:21:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1A82A0D2D1; Sun, 4 Oct 2015 08:21:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A82631C9E; Sun, 4 Oct 2015 08:21:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t948LG5Z000422; Sun, 4 Oct 2015 08:21:16 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t948LGH7000421; Sun, 4 Oct 2015 08:21:16 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510040821.t948LGH7000421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 4 Oct 2015 08:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288657 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 08:21:16 -0000 Author: melifaro Date: Sun Oct 4 08:21:15 2015 New Revision: 288657 URL: https://svnweb.freebsd.org/changeset/base/288657 Log: Add __noinline attribute to several functions to ease dtrace instrumentation Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 4 08:18:37 2015 (r288656) +++ head/sys/netinet6/nd6.c Sun Oct 4 08:21:15 2015 (r288657) @@ -512,12 +512,13 @@ nd6_llinfo_settimer_locked(struct llentr } /* -* Gets source address of the first packet in hold queue -* and stores it in @src. -* Returns pointer to @src (if hold queue is not empty) or NULL. -* -*/ -static struct in6_addr * + * Gets source address of the first packet in hold queue + * and stores it in @src. + * Returns pointer to @src (if hold queue is not empty) or NULL. + * + * Set noinline to be dtrace-friendly + */ +static __noinline struct in6_addr * nd6_llinfo_get_holdsrc(struct llentry *ln, struct in6_addr *src) { struct ip6_hdr hdr; @@ -541,8 +542,10 @@ nd6_llinfo_get_holdsrc(struct llentry *l /* * Switch @lle state to new state optionally arming timers. + * + * Set noinline to be dtrace-friendly */ -void +__noinline void nd6_llinfo_setstate(struct llentry *lle, int newstate) { struct ifnet *ifp; @@ -586,7 +589,12 @@ nd6_llinfo_settimer(struct llentry *ln, LLE_WUNLOCK(ln); } -static void +/* + * Timer-dependent part of nd state machine. + * + * Set noinline to be dtrace-friendly + */ +static __noinline void nd6_llinfo_timer(void *arg) { struct llentry *ln; @@ -1179,8 +1187,10 @@ nd6_is_addr_neighbor(const struct sockad * Since the function would cause significant changes in the kernel, DO NOT * make it global, unless you have a strong reason for the change, and are sure * that the change is safe. + * + * Set noinline to be dtrace-friendly */ -static void +static __noinline void nd6_free(struct llentry *ln, int gc) { struct nd_defrouter *dr; @@ -2036,8 +2046,10 @@ nd6_resolve(struct ifnet *ifp, int is_gw * Heavy version. * Function assume that destination LLE does not exist, * is invalid or stale, so LLE_EXCLUSIVE lock needs to be acquired. + * + * Set noinline to be dtrace-friendly */ -static int +static __noinline int nd6_resolve_slow(struct ifnet *ifp, struct mbuf *m, const struct sockaddr_in6 *dst, u_char *desten, uint32_t *pflags) { From owner-svn-src-all@freebsd.org Sun Oct 4 08:33:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7317DA0DC13; Sun, 4 Oct 2015 08:33:17 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4950812E4; Sun, 4 Oct 2015 08:33:17 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t948XHYS005295; Sun, 4 Oct 2015 08:33:17 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t948XGFH005293; Sun, 4 Oct 2015 08:33:16 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510040833.t948XGFH005293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 4 Oct 2015 08:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288658 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 08:33:17 -0000 Author: melifaro Date: Sun Oct 4 08:33:16 2015 New Revision: 288658 URL: https://svnweb.freebsd.org/changeset/base/288658 Log: Eliminate nd6_llinfo_settimer(). All consumers were converted to use nd6_llinfo_settimer_locked() in r216022. Make nd6_llinfo_settimer_locked() static: last external consumer was converted in r288124. Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 4 08:21:15 2015 (r288657) +++ head/sys/netinet6/nd6.c Sun Oct 4 08:33:16 2015 (r288658) @@ -134,6 +134,7 @@ static int regen_tmpaddr(struct in6_ifad static void nd6_free(struct llentry *, int); static void nd6_free_redirect(const struct llentry *); static void nd6_llinfo_timer(void *); +static void nd6_llinfo_settimer_locked(struct llentry *, long); static void clear_llinfo_pqueue(struct llentry *); static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int nd6_resolve_slow(struct ifnet *, struct mbuf *, @@ -483,7 +484,7 @@ skip1: /* * ND6 timer routine to handle ND6 entries */ -void +static void nd6_llinfo_settimer_locked(struct llentry *ln, long tick) { int canceled; @@ -579,16 +580,6 @@ nd6_llinfo_setstate(struct llentry *lle, lle->ln_state = newstate; } - -void -nd6_llinfo_settimer(struct llentry *ln, long tick) -{ - - LLE_WLOCK(ln); - nd6_llinfo_settimer_locked(ln, tick); - LLE_WUNLOCK(ln); -} - /* * Timer-dependent part of nd state machine. * Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Sun Oct 4 08:21:15 2015 (r288657) +++ head/sys/netinet6/nd6.h Sun Oct 4 08:33:16 2015 (r288658) @@ -408,8 +408,6 @@ struct llentry *nd6_lookup(const struct struct llentry *nd6_alloc(const struct in6_addr *, int, struct ifnet *); void nd6_setmtu(struct ifnet *); void nd6_llinfo_setstate(struct llentry *lle, int newstate); -void nd6_llinfo_settimer(struct llentry *, long); -void nd6_llinfo_settimer_locked(struct llentry *, long); void nd6_timer(void *); void nd6_purge(struct ifnet *); int nd6_resolve(struct ifnet *, int, struct mbuf *, From owner-svn-src-all@freebsd.org Sun Oct 4 09:39:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24E0A0F833; Sun, 4 Oct 2015 09:39:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744471306; Sun, 4 Oct 2015 09:39:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t949dfQd032051; Sun, 4 Oct 2015 09:39:41 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t949deA3032048; Sun, 4 Oct 2015 09:39:40 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201510040939.t949deA3032048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sun, 4 Oct 2015 09:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288662 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 09:39:41 -0000 Author: rwatson Date: Sun Oct 4 09:39:40 2015 New Revision: 288662 URL: https://svnweb.freebsd.org/changeset/base/288662 Log: Add missing stack unwind information to several assembly functions on ARMv6/7: - Define _SAVE() macro to allow unwind data to be conditionally defined for ARM assembly code in the kernel. - Use _SAVE() to provide unwind information for bcopy_page(), and two (of many) instances of copyin() and copyout(). Reviewed by: andrew, imp MFC after: 3 days Sponsored by: University of Cambridge Modified: head/sys/arm/arm/bcopy_page.S head/sys/arm/arm/bcopyinout.S head/sys/arm/include/asm.h Modified: head/sys/arm/arm/bcopy_page.S ============================================================================== --- head/sys/arm/arm/bcopy_page.S Sun Oct 4 09:25:57 2015 (r288661) +++ head/sys/arm/arm/bcopy_page.S Sun Oct 4 09:39:40 2015 (r288662) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); #endif /* ! COPY_CHUNK */ #ifndef SAVE_REGS -#define SAVE_REGS stmfd sp!, {r4-r8, lr} +#define SAVE_REGS stmfd sp!, {r4-r8, lr}; _SAVE({r4-r8, lr}) #define RESTORE_REGS ldmfd sp!, {r4-r8, pc} #endif @@ -134,6 +134,7 @@ END(bcopy_page) ENTRY(bzero_page) stmfd sp!, {r4-r8, lr} + _SAVE({r4-r8, lr}) #ifdef BIG_LOOPS mov r2, #(PAGE_SIZE >> 9) #else @@ -189,6 +190,7 @@ END(bzero_page) ENTRY(bcopy_page) pld [r0] stmfd sp!, {r4, r5} + _SAVE({r4, r5}) mov ip, #32 ldr r2, [r0], #0x04 /* 0x00 */ ldr r3, [r0], #0x04 /* 0x04 */ Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Sun Oct 4 09:25:57 2015 (r288661) +++ head/sys/arm/arm/bcopyinout.S Sun Oct 4 09:39:40 2015 (r288662) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #endif -#define SAVE_REGS stmfd sp!, {r4-r11} +#define SAVE_REGS stmfd sp!, {r4-r11}; _SAVE({r4-r11}) #define RESTORE_REGS ldmfd sp!, {r4-r11} #if defined(_ARM_ARCH_5E) @@ -341,6 +341,7 @@ ENTRY(copyout) cmp r2, r3 blt .Lnormale stmfd sp!, {r0-r2, r4, lr} + _SAVE({r0-r2, r4, lr}) mov r3, r0 mov r0, r1 mov r1, r3 Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Sun Oct 4 09:25:57 2015 (r288661) +++ head/sys/arm/include/asm.h Sun Oct 4 09:39:40 2015 (r288662) @@ -53,10 +53,12 @@ #define STOP_UNWINDING .cantunwind #define _FNSTART .fnstart #define _FNEND .fnend +#define _SAVE(...) .save __VA_ARGS__ #else #define STOP_UNWINDING #define _FNSTART #define _FNEND +#define _SAVE(...) #endif /* From owner-svn-src-all@freebsd.org Sun Oct 4 09:46:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E71F3A0FF23; Sun, 4 Oct 2015 09:46:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A04B1ACA; Sun, 4 Oct 2015 09:46:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t949knRZ089742 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 4 Oct 2015 12:46:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t949knRZ089742 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t949knYg089741; Sun, 4 Oct 2015 12:46:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Oct 2015 12:46:49 +0300 From: Konstantin Belousov To: dumbbell@freebsd.org, s3erios@gmail.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 Message-ID: <20151004094649.GG11284@kib.kiev.ua> References: <201510040745.t947jbp7082807@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510040745.t947jbp7082807@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 09:46:56 -0000 On Sun, Oct 04, 2015 at 07:45:37AM +0000, Adrian Chadd wrote: > * Add missing case statement (gen == 3) in intel_gpu_reset(). This seems to be wrong. The i915 and G33 chipsets do not have registers declared in the 8xx chipset documentation. More, i915 and G33 have different reset procedures. The absence of '3' case was copied from the corresponding Linux kernel. Was this change tested, or is there a reference to upstream where the handling was added in this manner ? > * Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect). This is also incorrect. At least the modesetting pathes are executed in the syscall context, and sleeping is allowed; the modesetting locks were selected to make sleeping possible. Using nowait causes random syscalls failure where the requests would succeed otherwise. From owner-svn-src-all@freebsd.org Sun Oct 4 12:42:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4848D9D07E4; Sun, 4 Oct 2015 12:42:08 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FFEC109E; Sun, 4 Oct 2015 12:42:08 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94Cg71a010294; Sun, 4 Oct 2015 12:42:07 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94Cg7hm010293; Sun, 4 Oct 2015 12:42:07 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510041242.t94Cg7hm010293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 4 Oct 2015 12:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288664 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 12:42:08 -0000 Author: melifaro Date: Sun Oct 4 12:42:07 2015 New Revision: 288664 URL: https://svnweb.freebsd.org/changeset/base/288664 Log: Simplify if (lladdr) condition in nd6_cache_lladdr(): For case (7) (new entry) nothing has to be done except lle_event. Invoke this event directly from "create new lle" code block. For case (4) (existing entry, same mac) useless mac update was performed, along with LLENTRY_RESOLVED lle_event. There was no sense in doing that, since nothing really had changed. Simply avoid this condition instead. Given that, condition was simplified to (3),(5) states which can be merged with previous block. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 4 10:26:58 2015 (r288663) +++ head/sys/netinet6/nd6.c Sun Oct 4 12:42:07 2015 (r288664) @@ -1753,6 +1753,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru /* No existing lle, mark as new entry */ is_newentry = 1; nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); + EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); } else { lltable_free_entry(LLTABLE6(ifp), ln); ln = ln_tmp; @@ -1789,25 +1790,21 @@ nd6_cache_lladdr(struct ifnet *ifp, stru */ do_update = 0; - if (!is_newentry && llchange != 0) + if (is_newentry == 0 && llchange != 0) { do_update = 1; /* (3,5) */ - if (lladdr) { /* (3-5) and (7) */ /* * Record source link-layer address * XXX is it dependent to ifp->if_type? */ bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); ln->la_flags |= LLE_VALID; - if (do_update != 0) /* 3,5,7 */ - nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); + nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); - if (do_update) { - if (ln->la_hold != NULL) - nd6_grab_holdchain(ln, &chain, &sin6); - } + if (ln->la_hold != NULL) + nd6_grab_holdchain(ln, &chain, &sin6); } /* Calculates new router status */ From owner-svn-src-all@freebsd.org Sun Oct 4 12:52:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BEE89D0F0D; Sun, 4 Oct 2015 12:52:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE0D1982; Sun, 4 Oct 2015 12:52:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94CqVPl015293; Sun, 4 Oct 2015 12:52:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94CqVe0015292; Sun, 4 Oct 2015 12:52:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510041252.t94CqVe0015292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Oct 2015 12:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288665 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 12:52:31 -0000 Author: kib Date: Sun Oct 4 12:52:30 2015 New Revision: 288665 URL: https://svnweb.freebsd.org/changeset/base/288665 Log: When asserting IL bit in exception syndrome register, print the raw register value. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Sun Oct 4 12:42:07 2015 (r288664) +++ head/sys/arm64/arm64/trap.c Sun Oct 4 12:52:30 2015 (r288665) @@ -275,7 +275,7 @@ do_el1h_sync(struct trapframe *frame) */ KASSERT((esr & ESR_ELx_IL) == ESR_ELx_IL || (exception == EXCP_DATA_ABORT && ((esr & ISS_DATA_ISV) == 0)), - ("Invalid instruction length in exception")); + ("Invalid instruction length in exception, esr %lx", esr)); CTR4(KTR_TRAP, "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", From owner-svn-src-all@freebsd.org Sun Oct 4 13:39:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7340A10086; Sun, 4 Oct 2015 13:39:01 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B49371AE6; Sun, 4 Oct 2015 13:39:01 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94Dd17i034220; Sun, 4 Oct 2015 13:39:01 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94Dd1jq034218; Sun, 4 Oct 2015 13:39:01 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510041339.t94Dd1jq034218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 4 Oct 2015 13:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288666 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 13:39:01 -0000 Author: kevlo Date: Sun Oct 4 13:39:00 2015 New Revision: 288666 URL: https://svnweb.freebsd.org/changeset/base/288666 Log: Fix max TX power settings for RT5390/RT5392. While here remove wrong definition of RT2860_USB_PHY_MAN_RST. Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runreg.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Oct 4 12:52:30 2015 (r288665) +++ head/sys/dev/usb/wlan/if_run.c Sun Oct 4 13:39:00 2015 (r288666) @@ -1692,14 +1692,14 @@ run_get_txpower(struct run_softc *sc) /* Fix broken Tx power entries. */ for (i = 0; i < 14; i++) { if (sc->mac_ver >= 0x5390) { - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 39) sc->txpow1[i] = 5; } else { if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) sc->txpow1[i] = 5; } if (sc->mac_ver > 0x5390) { - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 39) sc->txpow2[i] = 5; } else if (sc->mac_ver < 0x5390) { if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) Modified: head/sys/dev/usb/wlan/if_runreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_runreg.h Sun Oct 4 12:52:30 2015 (r288665) +++ head/sys/dev/usb/wlan/if_runreg.h Sun Oct 4 13:39:00 2015 (r288666) @@ -274,7 +274,6 @@ #define RT2860_USB_TXOP_HALT (1 << 20) #define RT2860_USB_TX_CLEAR (1 << 19) #define RT2860_USB_PHY_WD_EN (1 << 16) -#define RT2860_USB_PHY_MAN_RST (1 << 15) #define RT2860_USB_RX_AGG_LMT(x) ((x) << 8) /* in unit of 1KB */ #define RT2860_USB_RX_AGG_TO(x) ((x) & 0xff) /* in unit of 33ns */ From owner-svn-src-all@freebsd.org Sun Oct 4 13:40:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 908C8A10125; Sun, 4 Oct 2015 13:40:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 821831C9C; Sun, 4 Oct 2015 13:40:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94DeNvu034614; Sun, 4 Oct 2015 13:40:23 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94DeN3H034591; Sun, 4 Oct 2015 13:40:23 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510041340.t94DeN3H034591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 4 Oct 2015 13:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288667 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 13:40:23 -0000 Author: kevlo Date: Sun Oct 4 13:40:22 2015 New Revision: 288667 URL: https://svnweb.freebsd.org/changeset/base/288667 Log: Replace M_NOWAIT with M_WAITOK for consistency with other wireless drivers. Modified: head/sys/dev/usb/wlan/if_upgt.c Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Sun Oct 4 13:39:00 2015 (r288666) +++ head/sys/dev/usb/wlan/if_upgt.c Sun Oct 4 13:40:22 2015 (r288667) @@ -956,10 +956,7 @@ upgt_vap_create(struct ieee80211com *ic, if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ return NULL; - uvp = (struct upgt_vap *) malloc(sizeof(struct upgt_vap), - M_80211_VAP, M_NOWAIT | M_ZERO); - if (uvp == NULL) - return NULL; + uvp = malloc(sizeof(struct upgt_vap), M_80211_VAP, M_WAITOK | M_ZERO); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ From owner-svn-src-all@freebsd.org Sun Oct 4 18:54:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA6BBA0EDAC; Sun, 4 Oct 2015 18:54:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91A481A9A; Sun, 4 Oct 2015 18:54:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94Is3Q9067962; Sun, 4 Oct 2015 18:54:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94Is3AF067961; Sun, 4 Oct 2015 18:54:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201510041854.t94Is3AF067961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 4 Oct 2015 18:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288669 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 18:54:03 -0000 Author: pfg Date: Sun Oct 4 18:54:02 2015 New Revision: 288669 URL: https://svnweb.freebsd.org/changeset/base/288669 Log: Bump the stack protector to level "strong". The general stack protector is known to be weak and has pretty small coverage. While setting stack-protector-all would give better protection it would come with a performance cost: for this reason Google's Chrome OS team developed a new stack-protector-strong variant. In addition to the protections offered by -fstack-protector, the new option will guard any function that declares any type or length of local array, even those in structs or unions. It will also protect functions that use a local variable's address in a function argument or on the right-hand side of an assignment. The option was introduced in GCC-4.9, but support for it has been back-ported to our base GCC (r286074) and is also available in clang. The change was tested with dbench and doesn't introduce performance regressions. An exp-run over the ports tree revealed no failures when using the stricter stack-protector-all. Thanks to all testers involved. Reference: https://outflux.net/blog/archives/2014/01/27/fstack-protector-strong/ Tested by: pho, portmgr (antoine) Discussed with: secteam (delphij) Differential Revision: https://reviews.freebsd.org/D3463 PR: 203394 (exp-run) Relnotes: yes MFC: no (not supported in older clang) Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Oct 4 13:49:09 2015 (r288668) +++ head/share/mk/bsd.sys.mk Sun Oct 4 18:54:02 2015 (r288669) @@ -149,7 +149,7 @@ CXXFLAGS.clang+= -Wno-c++11-extensions .if ${MK_SSP} != "no" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. -SSP_CFLAGS?= -fstack-protector +SSP_CFLAGS?= -fstack-protector-strong CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS From owner-svn-src-all@freebsd.org Sun Oct 4 19:10:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89151A101A1; Sun, 4 Oct 2015 19:10:28 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7A21433; Sun, 4 Oct 2015 19:10:28 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94JASaT075965; Sun, 4 Oct 2015 19:10:28 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94JASIo075964; Sun, 4 Oct 2015 19:10:28 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510041910.t94JASIo075964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 4 Oct 2015 19:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288670 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 19:10:28 -0000 Author: melifaro Date: Sun Oct 4 19:10:27 2015 New Revision: 288670 URL: https://svnweb.freebsd.org/changeset/base/288670 Log: Invoke lle_event for new entry iff it has lladdr set. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Oct 4 18:54:02 2015 (r288669) +++ head/sys/netinet6/nd6.c Sun Oct 4 19:10:27 2015 (r288670) @@ -1750,10 +1750,12 @@ nd6_cache_lladdr(struct ifnet *ifp, stru lltable_link_entry(LLTABLE6(ifp), ln); IF_AFDATA_WUNLOCK(ifp); if (ln_tmp == NULL) { - /* No existing lle, mark as new entry */ + /* No existing lle, mark as new entry (6,7) */ is_newentry = 1; nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); - EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); + if (lladdr != NULL) /* (7) */ + EVENTHANDLER_INVOKE(lle_event, ln, + LLENTRY_RESOLVED); } else { lltable_free_entry(LLTABLE6(ifp), ln); ln = ln_tmp; From owner-svn-src-all@freebsd.org Sun Oct 4 21:16:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E91A10726; Sun, 4 Oct 2015 21:16:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7F2E17DE; Sun, 4 Oct 2015 21:16:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94LGkbi025751; Sun, 4 Oct 2015 21:16:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94LGkEU025750; Sun, 4 Oct 2015 21:16:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510042116.t94LGkEU025750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 4 Oct 2015 21:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288671 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 21:16:46 -0000 Author: andrew Date: Sun Oct 4 21:16:45 2015 New Revision: 288671 URL: https://svnweb.freebsd.org/changeset/base/288671 Log: When trying to execute from a misaligned address raise a SIGBUS with the invalid address alignment code. Obtained from: EuroBSDCon Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Sun Oct 4 19:10:27 2015 (r288670) +++ head/sys/arm64/arm64/trap.c Sun Oct 4 21:16:45 2015 (r288671) @@ -377,6 +377,11 @@ do_el0_sync(struct trapframe *frame) case EXCP_UNKNOWN: el0_excp_unknown(frame); break; + case EXCP_PC_ALIGN: + td = curthread; + call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr); + userret(td, frame); + break; case EXCP_BRK: td = curthread; call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_elr); From owner-svn-src-all@freebsd.org Sun Oct 4 22:50:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FD15A10E62; Sun, 4 Oct 2015 22:50:39 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC468124E; Sun, 4 Oct 2015 22:50:38 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t94MockY063210; Sun, 4 Oct 2015 22:50:38 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t94Mocjq063208; Sun, 4 Oct 2015 22:50:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510042250.t94Mocjq063208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 4 Oct 2015 22:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288672 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 22:50:39 -0000 Author: sbruno Date: Sun Oct 4 22:50:37 2015 New Revision: 288672 URL: https://svnweb.freebsd.org/changeset/base/288672 Log: Set correct argemdio addr, comment out arge1 as its not physically connected to anything. Move a couple of devices out of the kernel and into modules. Modified: head/sys/mips/conf/WZR-300HP head/sys/mips/conf/WZR-300HP.hints Modified: head/sys/mips/conf/WZR-300HP ============================================================================== --- head/sys/mips/conf/WZR-300HP Sun Oct 4 21:16:45 2015 (r288671) +++ head/sys/mips/conf/WZR-300HP Sun Oct 4 22:50:37 2015 (r288672) @@ -28,9 +28,6 @@ device geom_uncompress # compressed in- options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" -# options MD_ROOT -# options MD_ROOT_SIZE="6144" - options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash options ATH_EEPROM_FIRMWARE # Use EEPROM from flash device firmware # Used by the above @@ -42,10 +39,11 @@ device miiproxy device etherswitch device arswitch -# Enable GPIO -device gpio -device gpioled - # hwpmc device hwpmc_mips24k device hwpmc + +# load these via modules, shrink kernel +nodevice if_bridge +nodevice bridgestp +nodevice random Modified: head/sys/mips/conf/WZR-300HP.hints ============================================================================== --- head/sys/mips/conf/WZR-300HP.hints Sun Oct 4 21:16:45 2015 (r288671) +++ head/sys/mips/conf/WZR-300HP.hints Sun Oct 4 22:50:37 2015 (r288672) @@ -5,11 +5,11 @@ # arge1 MDIO bus hint.argemdio.0.at="nexus0" -hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 -hint.arge.0.phymask=0x0 +hint.arge.0.phymask=0x1 hint.arge.0.media=1000 hint.arge.0.fduplex=1 hint.arge.0.eeprommac=0x1f05120c @@ -17,9 +17,9 @@ hint.arge.0.mdio=mdioproxy1 # .. off # arge1: nail to 1000/full, RMII - connected to the switch -hint.arge.1.media=1000 # Map to 1000/full -hint.arge.1.fduplex=1 # -hint.arge.1.phymask=0x0 # no directly mapped PHYs +#hint.arge.1.media=1000 # Map to 1000/full +#hint.arge.1.fduplex=1 # +#hint.arge.1.phymask=0x0 # no directly mapped PHYs # # AR7240 switch config @@ -28,7 +28,7 @@ hint.arswitch.0.at="mdio0" hint.arswitch.0.is_7240=1 # We need to be explicitly told this hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY -hint.arswitch.0.is_rgmii=0 # No, not RGMII +hint.arswitch.0.is_rgmii=1 # No, not RGMII hint.arswitch.0.is_gmii=0 # No, not GMII # ath0 - slot 0 From owner-svn-src-all@freebsd.org Mon Oct 5 00:33:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E41E3A10136; Mon, 5 Oct 2015 00:33:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19D6185E; Mon, 5 Oct 2015 00:33:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t950XwFJ007432; Mon, 5 Oct 2015 00:33:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t950XwPj007430; Mon, 5 Oct 2015 00:33:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510050033.t950XwPj007430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Oct 2015 00:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288678 - head/bin/ls/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 00:33:59 -0000 Author: ngie Date: Mon Oct 5 00:33:57 2015 New Revision: 288678 URL: https://svnweb.freebsd.org/changeset/base/288678 Log: Merge additional testcases and improvements to bin/ls/ls_tests from ^/user/ngie/more-tests. - Additional testcases added: -- ls -D -- ls -F -- ls -H -- ls -L -- ls -R -- ls -S -- ls -T -- ls -b -- ls -d -- ls -f -- ls -g -- ls -h -- ls -i -- ls -k -- ls -l -- ls -m -- ls -n -- ls -o -- ls -p -- ls -q/ls -w -- ls -r -- ls -s -- ls -t -- ls -u -- ls -y - Socket file creation is limited to the ls -F testcase, greatly speeding up the test process - The ls -C testcase was made more robust by limiting the number of columns via COLUMNS and by dynamically formulating the columns/lines. - Add `atf_test_case` before all testcase `head` functions. X-MFC with: r284388, r288330, r288423 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/bin/ls/tests/Makefile head/bin/ls/tests/ls_tests.sh Directory Properties: head/ (props changed) Modified: head/bin/ls/tests/Makefile ============================================================================== --- head/bin/ls/tests/Makefile Mon Oct 5 00:11:49 2015 (r288677) +++ head/bin/ls/tests/Makefile Mon Oct 5 00:33:57 2015 (r288678) @@ -6,6 +6,6 @@ ATF_TESTS_SH+= ls_tests # This seems like overkill, but the idea in mind is that all of the testcases # should be runnable as !root TEST_METADATA.ls_tests+= required_user="unprivileged" -TEST_METADATA.ls_tests+= required_files="/usr/bin/nc" +TEST_METADATA.ls_tests+= required_files="/usr/bin/awk /usr/bin/nc /usr/bin/sort" .include Modified: head/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Mon Oct 5 00:11:49 2015 (r288677) +++ head/bin/ls/tests/ls_tests.sh Mon Oct 5 00:33:57 2015 (r288678) @@ -45,7 +45,7 @@ create_test_inputs() { create_test_dir - atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b + atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b/1 atf_check -e empty -s exit:0 ln -s a/b c atf_check -e empty -s exit:0 touch d atf_check -e empty -s exit:0 ln d e @@ -53,12 +53,10 @@ create_test_inputs() atf_check -e empty -s exit:0 mkdir .g atf_check -e empty -s exit:0 mkfifo h atf_check -e ignore -s exit:0 dd if=/dev/zero of=i count=1000 bs=1 - atf_check -e empty -s exit:0 \ - sh -c "pid=${ATF_TMPDIR}/nc.pid; daemon -p \$pid nc -lU j; sleep 2; pkill -F \$pid" atf_check -e empty -s exit:0 touch klmn atf_check -e empty -s exit:0 touch opqr atf_check -e empty -s exit:0 touch stuv - atf_check -e empty -s exit:0 touch wxyz + atf_check -e empty -s exit:0 install -m 0755 /dev/null wxyz atf_check -e empty -s exit:0 touch 0b00000001 atf_check -e empty -s exit:0 touch 0b00000010 atf_check -e empty -s exit:0 touch 0b00000011 @@ -76,37 +74,29 @@ create_test_inputs() atf_check -e empty -s exit:0 touch 0b00001111 } -atf_test_case a_flag -a_flag_head() -{ - atf_set "descr" "Verify -a support" -} +KB=1024 +MB=$(( 1024 * $KB )) +GB=$(( 1024 * $MB )) +TB=$(( 1024 * $GB )) +PB=$(( 1024 * $TB )) -a_flag_body() +create_test_inputs2() { create_test_dir - # Make sure "." and ".." show up with -a - atf_check -e empty -o match:'\.[[:space:]]+\.\.' -s exit:0 ls -ax - - create_test_inputs - - WITH_a=$PWD/../with_a.out - WITHOUT_a=$PWD/../without_a.out - - atf_check -e empty -o save:$WITH_a -s exit:0 ls -A - atf_check -e empty -o save:$WITHOUT_a -s exit:0 ls - - echo "-A usage" - cat $WITH_a - echo "No -A usage" - cat $WITHOUT_a + for filesize in 1 512 $(( 2 * $KB )) $(( 10 * $KB )) $(( 512 * $KB )); \ + do + atf_check -e ignore -o empty -s exit:0 \ + dd if=/dev/zero of=${filesize}.file bs=1 \ + count=1 oseek=${filesize} conv=sparse + files="${files} ${filesize}.file" + done - for dot_path in '\.f' '\.g'; do - atf_check -e empty -o not-empty -s exit:0 grep "${dot_path}" \ - $WITH_a - atf_check -e empty -o empty -s not-exit:0 grep "${dot_path}" \ - $WITHOUT_a + for filesize in $MB $GB $TB; do + atf_check -e ignore -o empty -s exit:0 \ + dd if=/dev/zero of=${filesize}.file bs=$MB \ + count=1 oseek=$(( $filesize / $MB )) conv=sparse + files="${files} ${filesize}.file" done } @@ -192,21 +182,101 @@ C_flag_head() atf_set "descr" "Verify that the output from ls -C is multi-column, sorted down" } +print_index() +{ + local i=1 + local wanted_index=$1; shift + + while [ $i -le $wanted_index ]; do + if [ $i -eq $wanted_index ]; then + echo $1 + return + fi + shift + : $(( i += 1 )) + done +} + C_flag_body() { create_test_inputs WITH_C=$PWD/../with_C.out + export COLUMNS=40 atf_check -e empty -o save:$WITH_C -s exit:0 ls -C echo "With -C usage" cat $WITH_C - atf_check -e ignore -o not-empty -s exit:0 \ - egrep "0b00000001[[:space:]]+0b00000111[[:space:]]+0b00001101[[:space:]]+e[[:space:]]+stuv" $WITH_C - atf_check -e ignore -o not-empty -s exit:0 \ - egrep "0b00000010[[:space:]]+0b00001000[[:space:]]+0b00001110[[:space:]]+h[[:space:]]+wxyz" $WITH_C + paths=$(find -s . -mindepth 1 -maxdepth 1 \! -name '.*' -exec basename {} \; ) + set -- $paths + num_paths=$# + num_columns=2 + + max_num_paths_per_column=$(( $(( $num_paths + 1 )) / $num_columns )) + + local i=1 + while [ $i -le $max_num_paths_per_column ]; do + column_1=$(print_index $i $paths) + column_2=$(print_index $(( $i + $max_num_paths_per_column )) $paths) + #echo "paths[$(( $i + $max_num_paths_per_column ))] = $column_2" + expected_expr="$column_1" + if [ -n "$column_2" ]; then + expected_expr="$expected_expr[[:space:]]+$column_2" + fi + atf_check -e ignore -o not-empty -s exit:0 \ + egrep "$expected_expr" $WITH_C + : $(( i += 1 )) + done +} + +atf_test_case D_flag +D_flag_head() +{ + atf_set "descr" "Verify that the output from ls -D modifies the time format used with ls -l" +} + +D_flag_body() +{ + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o match:"$(stat -f '%c[[:space:]]+%N' a.file)" \ + -s exit:0 ls -lD '%s' +} + +atf_test_case F_flag +F_flag_head() +{ + atf_set "descr" "Verify that the output from ls -F prints out appropriate symbols after files" +} + +F_flag_body() +{ + create_test_inputs + + atf_check -e empty -s exit:0 \ + sh -c "pid=${ATF_TMPDIR}/nc.pid; daemon -p \$pid nc -lU j; sleep 2; pkill -F \$pid" + + atf_check -e empty -o match:'a/' -s exit:0 ls -F + atf_check -e empty -o match:'c@' -s exit:0 ls -F + atf_check -e empty -o match:'h\|' -s exit:0 ls -F + atf_check -e empty -o match:'j=' -s exit:0 ls -F + #atf_check -e empty -o match:'%' -s exit:0 ls -F + atf_check -e empty -o match:'stuv' -s exit:0 ls -F + atf_check -e empty -o match:'wxyz\*' -s exit:0 ls -F +} + +atf_test_case H_flag +H_flag_head() +{ + atf_set "descr" "Verify that ls -H follows symlinks" +} + +H_flag_body() +{ + create_test_inputs + + atf_check -e empty -o match:'1' -s exit:0 ls -H c } atf_test_case I_flag @@ -251,9 +321,323 @@ I_flag_voids_implied_A_flag_when_root_bo atf_check -o match:'\.g' -s exit:0 ls -A -I } +atf_test_case L_flag +L_flag_head() +{ + atf_set "descr" "Verify that -L prints out the symbolic link and conversely -P prints out the target for the symbolic link" +} + +L_flag_body() +{ + atf_check -e empty -o empty -s exit:0 ln -s target1/target2 link1 + atf_check -e empty -o match:link1 -s exit:0 ls -L + atf_check -e empty -o not-match:target1/target2 -s exit:0 ls -L +} + +atf_test_case R_flag +R_flag_head() +{ + atf_set "descr" "Verify that the output from ls -R prints out the directory contents recursively" +} + +R_flag_body() +{ + create_test_inputs + + WITH_R=$PWD/../with_R.out + WITH_R_expected_output=$PWD/../with_R_expected.out + + atf_check -e empty -o save:$WITH_R -s exit:0 ls -R + + set -- . $(find -s . \! -name '.*' -type d) + while [ $# -gt 0 ]; do + dir=$1; shift + [ "$dir" != "." ] && echo "$dir:" + (cd $dir && ls -1A | sed -e '/^\./d') + [ $# -ne 0 ] && echo + done > $WITH_R_expected_output + + echo "-R usage" + cat $WITH_R + echo "-R expected output" + cat $WITH_R_expected_output + + atf_check_equal "$(cat $WITH_R)" "$(cat $WITH_R_expected_output)" +} + +atf_test_case S_flag +S_flag_head() +{ + atf_set "descr" "Verify that -S sorts by file size, then by filename lexicographically" +} + +S_flag_body() +{ + create_test_dir + + file_list_dir=$PWD/../files + + atf_check -e empty -o empty -s exit:0 mkdir -p $file_list_dir + + create_test_inputs + create_test_inputs2 + + WITH_S=$PWD/../with_S.out + WITHOUT_S=$PWD/../without_S.out + + atf_check -e empty -o save:$WITH_S ls -D '%s' -lS + atf_check -e empty -o save:$WITHOUT_S ls -D '%s' -l + + WITH_S_parsed=$(awk '! /^total/ { print $7 }' $WITH_S) + set -- $(awk '! /^total/ { print $5, $7 }' $WITHOUT_S) + while [ $# -gt 0 ]; do + size=$1; shift + filename=$1; shift + echo $filename >> $file_list_dir/${size} + done + file_lists=$(find $file_list_dir -type f -exec basename {} \; | sort -nr) + WITHOUT_S_parsed=$(for file_list in $file_lists; do sort < $file_list_dir/$file_list; done) + + echo "-lS usage (parsed)" + echo "$WITH_S_parsed" + echo "-l usage (parsed)" + echo "$WITHOUT_S_parsed" + + atf_check_equal "$WITHOUT_S_parsed" "$WITH_S_parsed" +} + +atf_test_case T_flag +T_flag_head() +{ + atf_set "descr" "Verify -T support" +} + +T_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + + birthtime_in_secs=$(stat -f %B -t %s a.file) + birthtime=$(date -j -f %s $birthtime_in_secs +"[[:space:]]+%b[[:space:]]+%e[[:space:]]+%H:%M:%S[[:space:]]+%Y") + + atf_check -e empty -o match:"$birthtime"'[[:space:]]+a\.file' \ + -s exit:0 ls -lT a.file +} + +atf_test_case a_flag +a_flag_head() +{ + atf_set "descr" "Verify -a support" +} + +a_flag_body() +{ + create_test_dir + + # Make sure "." and ".." show up with -a + atf_check -e empty -o match:'\.[[:space:]]+\.\.' -s exit:0 ls -ax + + create_test_inputs + + WITH_a=$PWD/../with_a.out + WITHOUT_a=$PWD/../without_a.out + + atf_check -e empty -o save:$WITH_a -s exit:0 ls -a + atf_check -e empty -o save:$WITHOUT_a -s exit:0 ls + + echo "-a usage" + cat $WITH_a + echo "No -a usage" + cat $WITHOUT_a + + for dot_path in '\.f' '\.g'; do + atf_check -e empty -o not-empty -s exit:0 grep "${dot_path}" \ + $WITH_a + atf_check -e empty -o empty -s not-exit:0 grep "${dot_path}" \ + $WITHOUT_a + done +} + +atf_test_case b_flag +b_flag_head() +{ + atf_set "descr" "Verify that the output from ls -b prints out non-printable characters" +} + +b_flag_body() +{ + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" + + atf_check -e empty -o empty -s exit:0 touch "$(printf "y\013z")" + atf_check -e empty -o match:'y\\vz' -s exit:0 ls -b +} + +atf_test_case d_flag +d_flag_head() +{ + atf_set "descr" "Verify that -d doesn't descend down directories" +} + +d_flag_body() +{ + create_test_dir + + output=$PWD/../output + + atf_check -e empty -o empty -s exit:0 mkdir -p a/b + + for path in . $PWD a; do + atf_check -e empty -o save:$output -s exit:0 ls -d $path + atf_check_equal "$(cat $output)" "$path" + done +} + +atf_test_case f_flag +f_flag_head() +{ + atf_set "descr" "Verify that -f prints out the contents of a directory unsorted" +} + +f_flag_body() +{ + create_test_inputs + + output=$PWD/../output + + # XXX: I don't have enough understanding of how the algorithm works yet + # to determine more than the fact that all the entries printed out + # exist + paths=$(find -s . -mindepth 1 -maxdepth 1 \! -name '.*' -exec basename {} \; ) + + atf_check -e empty -o save:$output -s exit:0 ls -f + + for path in $paths; do + atf_check -e ignore -o not-empty -s exit:0 \ + egrep "^$path$" $output + done +} + +atf_test_case g_flag +g_flag_head() +{ + atf_set "descr" "Verify that -g does nothing (compatibility flag)" +} + +g_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty -o match:"$(ls -a $file)" -s exit:0 \ + ls -ag $file + atf_check -e empty -o match:"$(ls -la $file)" -s exit:0 \ + ls -alg $file + done +} + +atf_test_case h_flag +h_flag_head() +{ + atf_set "descr" "Verify that -h prints out the humanized units for file sizes with ls -l" + atf_set "require.files" "/usr/bin/bc" +} + +h_flag_body() +{ + # XXX: this test doesn't currently show how 999 bytes will be 999B, + # but 1000 bytes will be 1.0K, due to how humanize_number(3) works. + create_test_inputs2 + for file in $files; do + file_size=$(stat -f '%z' "$file") || \ + atf_fail "stat'ing $file failed" + scale=2 + if [ $file_size -lt $KB ]; then + divisor=1 + scale=0 + suffix=B + elif [ $file_size -lt $MB ]; then + divisor=$KB + suffix=K + elif [ $file_size -lt $GB ]; then + divisor=$MB + suffix=M + elif [ $file_size -lt $TB ]; then + divisor=$GB + suffix=G + elif [ $file_size -lt $PB ]; then + divisor=$TB + suffix=T + else + divisor=$PB + suffix=P + fi + + bc_expr="$(printf "scale=%s\n%s/%s\nquit" $scale $file_size $divisor)" + size_humanized=$(bc -e "$bc_expr" | tr '.' '\.' | sed -e 's,\.00,,') + + atf_check -e empty -o match:"$size_humanized.+$file" \ + -s exit:0 ls -hl $file + done +} + +atf_test_case i_flag +i_flag_head() +{ + atf_set "descr" "Verify that -i prints out the inode for files" +} + +i_flag_body() +{ + create_test_inputs + + paths=$(find -L . -mindepth 1) + [ -n "$paths" ] || atf_skip 'Could not find any paths to iterate over (!)' + + for path in $paths; do + atf_check -e empty \ + -o match:"$(stat -f '[[:space:]]*%i[[:space:]]+%N' $path)" \ + -s exit:0 ls -d1i $path + done +} + +atf_test_case k_flag +k_flag_head() +{ + atf_set "descr" "Verify that -k prints out the size with a block size of 1kB" +} + +k_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty \ + -o match:"[[:space:]]+$(stat -f "%z" $file)[[:space:]]+.+[[:space:]]+$file" ls -lk $file + done +} + +atf_test_case l_flag +l_flag_head() +{ + atf_set "descr" "Verify that -l prints out the output in long format" +} + +l_flag_body() +{ + + atf_check -e empty -o empty -s exit:0 touch a.file + + birthtime_in_secs=$(stat -f "%B" -t "%s" a.file) + birthtime=$(date -j -f "%s" $birthtime_in_secs +"%b[[:space:]]+%e[[:space:]]+%H:%M") + + expected_output=$(stat -f "%Sp[[:space:]]+%l[[:space:]]+%Su[[:space:]]+%Sg[[:space:]]+%z[[:space:]]+$birthtime[[:space:]]+a\\.file" a.file) + + atf_check -e empty -o match:"$expected_output" -s exit:0 ls -l a.file +} + +atf_test_case lcomma_flag lcomma_flag_head() { - atf_set "descr" "Verify that -l, prints out the size with , delimiters" + atf_set "descr" "Verify that -l, prints out the size with ',' delimiters" } lcomma_flag_body() @@ -265,9 +649,211 @@ lcomma_flag_body() env LC_ALL=en_US.ISO8859-1 ls -l, i } +atf_test_case m_flag +m_flag_head() +{ + atf_set "descr" "Verify that the output from ls -m is comma-separated" +} + +m_flag_body() +{ + create_test_dir + + output=$PWD/../output + + atf_check -e empty -o empty -s exit:0 touch ,, "a,b " c d e + + atf_check -e empty -o save:$output -s exit:0 ls -m + + atf_check_equal "$(cat $output)" ",,, a,b , c, d, e" +} + +atf_test_case n_flag +n_flag_head() +{ + atf_set "descr" "Verify that the output from ls -n prints out numeric GIDs/UIDs instead of symbolic GIDs/UIDs" + atf_set "require.user" "root" +} + +n_flag_body() +{ + daemon_gid=$(id -g daemon) || atf_skip "could not resolve gid for daemon (!)" + nobody_uid=$(id -u nobody) || atf_skip "could not resolve uid for nobody (!)" + + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o empty -s exit:0 chown $nobody_uid:$daemon_gid a.file + + atf_check -e empty \ + -o match:'\-rw\-r\-\-r\-\-[[:space:]]+1[[:space:]]+'"$nobody_uid[[:space:]]+$daemon_gid"'[[:space:]]+.+a\.file' \ + ls -ln a.file + +} + +atf_test_case o_flag +o_flag_head() +{ + atf_set "descr" "Verify that the output from ls -o prints out the chflag values or '-' if none are set" + atf_set "require.user" "root" +} + +o_flag_body() +{ + local size=12345 + + create_test_dir + + atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=a.file \ + bs=$size count=1 + atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \ + bs=$size count=1 + atf_check -e empty -o empty -s exit:0 chflags uarch a.file + + atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \ + -s exit:0 ls -lo a.file + atf_check -e empty -o match:"[[:space:]]+\\-[[:space:]]$size+.+b\\.file" \ + -s exit:0 ls -lo b.file +} + +atf_test_case p_flag +p_flag_head() +{ + atf_set "descr" "Verify that the output from ls -p prints out '/' after directories" +} + +p_flag_body() +{ + create_test_inputs + + paths=$(find -L .) + [ -n "$paths" ] || atf_skip 'Could not find any paths to iterate over (!)' + + for path in $paths; do + suffix= + # If path is not a symlink and is a directory, then the suffix + # must be "/". + if [ ! -L "${path}" -a -d "$path" ]; then + suffix=/ + fi + atf_check -e empty -o match:"$path${suffix}" -s exit:0 \ + ls -dp $path + done +} + +atf_test_case q_flag_and_w_flag +q_flag_and_w_flag_head() +{ + atf_set "descr" "Verify that the output from ls -q prints out '?' for ESC and ls -w prints out the escape character" +} + +q_flag_and_w_flag_body() +{ + atf_skip "kyua report-jenkins doesn't properly escape non-printable chars: https://github.com/jmmv/kyua/issues/136" + + create_test_dir + + test_file="$(printf "y\01z")" + + atf_check -e empty -o empty -s exit:0 touch "$test_file" + + atf_check -e empty -o match:'y\?z' -s exit:0 ls -q "$test_file" + atf_check -e empty -o match:"$test_file" -s exit:0 ls -w "$test_file" +} + +atf_test_case r_flag +r_flag_head() +{ + atf_set "descr" "Verify that the output from ls -r sorts the same way as reverse sorting with sort(1)" +} + +r_flag_body() +{ + create_test_inputs + + WITH_r=$PWD/../with_r.out + WITH_sort=$PWD/../with_sort.out + + atf_check -e empty -o save:$WITH_r -s exit:0 ls -1r + atf_check -e empty -o save:$WITH_sort -s exit:0 sh -c 'ls -1 | sort -r' + + echo "Sorted with -r" + cat $WITH_r + echo "Reverse sorted with sort(1)" + cat $WITH_sort + + atf_check_equal "$(cat $WITH_r)" "$(cat $WITH_sort)" +} + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Verify that the output from ls -s matches the output from stat(1)" +} + +s_flag_body() +{ + create_test_inputs2 + for file in $files; do + atf_check -e empty \ + -o match:"$(stat -f "%b" $file)[[:space:]]+$file" ls -s $file + done +} + +atf_test_case t_flag +t_flag_head() +{ + atf_set "descr" "Verify that the output from ls -t sorts by modification time" +} + +t_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + atf_check -e empty -o empty -s exit:0 touch b.file + sync + + atf_check -e empty -o match:'a\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' + atf_check -e empty -o match:'b\.file.*a\.file' -s exit:0 ls -Ct + + atf_check -e empty -o empty -s exit:0 rm a.file + atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' + sync + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Ct +} + +atf_test_case u_flag +u_flag_head() +{ + atf_set "descr" "Verify that the output from ls -u sorts by last access" +} + +u_flag_body() +{ + create_test_dir + + atf_check -e empty -o empty -s exit:0 touch a.file + sync + atf_check -e empty -o empty -s exit:0 touch b.file + sync + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu + + atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' + sync + atf_check -e empty -o match:'i am a' -s exit:0 cat a.file + sync + + atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' + atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu +} + +atf_test_case x_flag x_flag_head() { - atf_set "descr" "Verify that -x prints out one item per line" + atf_set "descr" "Verify that the output from ls -x is multi-column, sorted across" } x_flag_body() @@ -284,9 +870,34 @@ x_flag_body() atf_check -e ignore -o not-empty -s exit:0 \ egrep "a[[:space:]]+c[[:space:]]+d[[:space:]]+e[[:space:]]+h" $WITH_x atf_check -e ignore -o not-empty -s exit:0 \ - egrep "i[[:space:]]+j[[:space:]]+klmn[[:space:]]+opqr[[:space:]]+stuv" $WITH_x + egrep "i[[:space:]]+klmn[[:space:]]+opqr[[:space:]]+stuv[[:space:]]+wxyz" $WITH_x +} + +atf_test_case y_flag +y_flag_head() +{ + atf_set "descr" "Verify that the output from ls -y sorts the same way as sort(1)" +} + +y_flag_body() +{ + create_test_inputs + + WITH_sort=$PWD/../with_sort.out + WITH_y=$PWD/../with_y.out + + atf_check -e empty -o save:$WITH_sort -s exit:0 sh -c 'ls -1 | sort' + atf_check -e empty -o save:$WITH_y -s exit:0 ls -1y + + echo "Sorted with sort(1)" + cat $WITH_sort + echo "Sorted with -y" + cat $WITH_y + + atf_check_equal "$(cat $WITH_sort)" "$(cat $WITH_y)" } +atf_test_case 1_flag 1_flag_head() { atf_set "descr" "Verify that -1 prints out one item per line" @@ -318,42 +929,41 @@ atf_init_test_cases() atf_add_test_case A_flag_implied_when_root atf_add_test_case B_flag atf_add_test_case C_flag - #atf_add_test_case D_flag - #atf_add_test_case F_flag + atf_add_test_case D_flag + atf_add_test_case F_flag #atf_add_test_case G_flag - #atf_add_test_case H_flag + atf_add_test_case H_flag atf_add_test_case I_flag atf_add_test_case I_flag_voids_implied_A_flag_when_root - #atf_add_test_case L_flag + atf_add_test_case L_flag #atf_add_test_case P_flag - #atf_add_test_case R_flag - #atf_add_test_case S_flag - #atf_add_test_case T_flag + atf_add_test_case R_flag + atf_add_test_case S_flag + atf_add_test_case T_flag #atf_add_test_case U_flag #atf_add_test_case W_flag #atf_add_test_case Z_flag atf_add_test_case a_flag - #atf_add_test_case b_flag + atf_add_test_case b_flag #atf_add_test_case c_flag - #atf_add_test_case d_flag - #atf_add_test_case f_flag - #atf_add_test_case g_flag - #atf_add_test_case h_flag - #atf_add_test_case i_flag - #atf_add_test_case k_flag - #atf_add_test_case l_flag + atf_add_test_case d_flag + atf_add_test_case f_flag + atf_add_test_case g_flag + atf_add_test_case h_flag + atf_add_test_case i_flag + atf_add_test_case k_flag + atf_add_test_case l_flag atf_add_test_case lcomma_flag - #atf_add_test_case m_flag - #atf_add_test_case n_flag - #atf_add_test_case o_flag - #atf_add_test_case p_flag - #atf_add_test_case q_flag - #atf_add_test_case r_flag - #atf_add_test_case s_flag - #atf_add_test_case t_flag - #atf_add_test_case u_flag - #atf_add_test_case w_flag + atf_add_test_case m_flag + atf_add_test_case n_flag + atf_add_test_case o_flag + atf_add_test_case p_flag + atf_add_test_case q_flag_and_w_flag + atf_add_test_case r_flag + atf_add_test_case s_flag + atf_add_test_case t_flag + atf_add_test_case u_flag atf_add_test_case x_flag - #atf_add_test_case y_flag + atf_add_test_case y_flag atf_add_test_case 1_flag } From owner-svn-src-all@freebsd.org Mon Oct 5 01:25:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E0ACA1081D; Mon, 5 Oct 2015 01:25:52 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE1F1FE2; Mon, 5 Oct 2015 01:25:52 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t951Pquh027794; Mon, 5 Oct 2015 01:25:52 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t951PqxW027793; Mon, 5 Oct 2015 01:25:52 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510050125.t951PqxW027793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 5 Oct 2015 01:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288681 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 01:25:52 -0000 Author: peter Date: Mon Oct 5 01:25:51 2015 New Revision: 288681 URL: https://svnweb.freebsd.org/changeset/base/288681 Log: Fix broken build, again. cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c wasn't added to conf/files in r286705 and was fixed by r286718. The broken version was MFCed by r288571. Forgotten by: mav (again) Modified: stable/10/sys/conf/files Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Oct 5 00:55:16 2015 (r288680) +++ stable/10/sys/conf/files Mon Oct 5 01:25:51 2015 (r288681) @@ -145,6 +145,7 @@ cddl/contrib/opensolaris/uts/common/fs/z cddl/contrib/opensolaris/uts/common/fs/zfs/bplist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c optional zfs compile-with "${ZFS_C}" +cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" From owner-svn-src-all@freebsd.org Mon Oct 5 03:25:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 845F6A10BA8; Mon, 5 Oct 2015 03:25:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA71102C; Mon, 5 Oct 2015 03:25:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t953PVLQ077365; Mon, 5 Oct 2015 03:25:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t953PVoj077364; Mon, 5 Oct 2015 03:25:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510050325.t953PVoj077364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Oct 2015 03:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288682 - in head: contrib/ipfilter tests/sys/kern/execve tests/sys/kqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 03:25:31 -0000 Author: ngie Date: Mon Oct 5 03:25:30 2015 New Revision: 288682 URL: https://svnweb.freebsd.org/changeset/base/288682 Log: Remove some paths preparing for a re-copy from head Deleted: head/contrib/ipfilter/ head/tests/sys/kern/execve/ head/tests/sys/kqueue/ From owner-svn-src-all@freebsd.org Mon Oct 5 03:26:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0AF4A10D4E; Mon, 5 Oct 2015 03:26:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E121611D0; Mon, 5 Oct 2015 03:26:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t953QptR077476; Mon, 5 Oct 2015 03:26:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t953QphM077475; Mon, 5 Oct 2015 03:26:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510050326.t953QphM077475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Oct 2015 03:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288683 - in head: contrib/ipfilter tests/sys/kern/execve tests/sys/kqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 03:26:52 -0000 Author: ngie Date: Mon Oct 5 03:26:51 2015 New Revision: 288683 URL: https://svnweb.freebsd.org/changeset/base/288683 Log: Revert r288682 I meant to do this on ^/user/ngie/more-tests Pointyhat to: ngie (use svn info next time...) Added: - copied from r288681, head/contrib/ipfilter/ head/tests/sys/kern/execve/ - copied from r288681, head/tests/sys/kern/execve/ head/tests/sys/kqueue/ - copied from r288681, head/tests/sys/kqueue/ Directory Properties: head/contrib/ipfilter/ (props changed) Modified: Directory Properties: head/contrib/ipfilter/ml_ipl.c (props changed) head/contrib/ipfilter/mlfk_ipl.c (props changed) head/contrib/ipfilter/mlh_rule.c (props changed) head/contrib/ipfilter/mli_ipl.c (props changed) head/contrib/ipfilter/mln_ipl.c (props changed) head/contrib/ipfilter/mls_ipl.c (props changed) From owner-svn-src-all@freebsd.org Mon Oct 5 05:24:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E1B9A1057B; Mon, 5 Oct 2015 05:24:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B5E81825; Mon, 5 Oct 2015 05:24:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t955OHAs025877; Mon, 5 Oct 2015 05:24:17 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t955OHEH025876; Mon, 5 Oct 2015 05:24:17 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510050524.t955OHEH025876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 5 Oct 2015 05:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288689 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 05:24:17 -0000 Author: kevlo Date: Mon Oct 5 05:24:16 2015 New Revision: 288689 URL: https://svnweb.freebsd.org/changeset/base/288689 Log: Remove the unnecessary cast. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 5 04:12:26 2015 (r288688) +++ head/sys/dev/ath/if_ath.c Mon Oct 5 05:24:16 2015 (r288689) @@ -1438,8 +1438,7 @@ ath_vap_create(struct ieee80211com *ic, int needbeacon, error; enum ieee80211_opmode ic_opmode; - avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), - M_80211_VAP, M_WAITOK | M_ZERO); + avp = malloc(sizeof(struct ath_vap), M_80211_VAP, M_WAITOK | M_ZERO); needbeacon = 0; IEEE80211_ADDR_COPY(mac, mac0); From owner-svn-src-all@freebsd.org Mon Oct 5 05:33:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50B8BA10D17; Mon, 5 Oct 2015 05:33:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DD891EF6; Mon, 5 Oct 2015 05:33:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t955XVxj029933; Mon, 5 Oct 2015 05:33:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t955XVa8029932; Mon, 5 Oct 2015 05:33:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510050533.t955XVa8029932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 5 Oct 2015 05:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288690 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 05:33:31 -0000 Author: kib Date: Mon Oct 5 05:33:30 2015 New Revision: 288690 URL: https://svnweb.freebsd.org/changeset/base/288690 Log: MFC r288068: Ensure that maxproc does not exceed pid_max, at the time of boot. Modified: stable/10/sys/kern/subr_param.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_param.c ============================================================================== --- stable/10/sys/kern/subr_param.c Mon Oct 5 05:24:16 2015 (r288689) +++ stable/10/sys/kern/subr_param.c Mon Oct 5 05:33:30 2015 (r288690) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #define NBUF 0 #endif #ifndef MAXFILES -#define MAXFILES (maxproc * 2) +#define MAXFILES (40 + 32 * maxusers) #endif static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); @@ -261,6 +261,8 @@ init_param2(long physpages) TUNABLE_INT_FETCH("kern.maxproc", &maxproc); if (maxproc > (physpages / 12)) maxproc = physpages / 12; + if (maxproc > pid_max) + maxproc = pid_max; maxprocperuid = (maxproc * 9) / 10; /* From owner-svn-src-all@freebsd.org Mon Oct 5 06:55:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FAEDA1049E; Mon, 5 Oct 2015 06:55:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20E8A877; Mon, 5 Oct 2015 06:55:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t956tQ6j062952; Mon, 5 Oct 2015 06:55:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t956tQ5C062951; Mon, 5 Oct 2015 06:55:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050655.t956tQ5C062951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 06:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288692 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 06:55:27 -0000 Author: mav Date: Mon Oct 5 06:55:26 2015 New Revision: 288692 URL: https://svnweb.freebsd.org/changeset/base/288692 Log: MFC r269709 (by imp): is_full_id is set to 0 and then not used. remove it. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 06:40:09 2015 (r288691) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 06:55:26 2015 (r288692) @@ -6071,13 +6071,12 @@ scsi_parse_transportid_iscsi(char *id_st char *error_str, int error_str_len) { size_t id_len, sep_len, id_size, name_len; - int is_full_id, retval; + int retval; unsigned int i, sep_pos, sep_found; const char *sep_template = ",i,0x"; const char *iqn_prefix = "iqn."; struct scsi_transportid_iscsi_device *iscsi; - is_full_id = 0; retval = 0; sep_found = 0; From owner-svn-src-all@freebsd.org Mon Oct 5 06:56:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13638A105E8; Mon, 5 Oct 2015 06:56:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 049449C9; Mon, 5 Oct 2015 06:56:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t956uMOk063042; Mon, 5 Oct 2015 06:56:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t956uMJ2063041; Mon, 5 Oct 2015 06:56:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050656.t956uMJ2063041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 06:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288693 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 06:56:23 -0000 Author: mav Date: Mon Oct 5 06:56:22 2015 New Revision: 288693 URL: https://svnweb.freebsd.org/changeset/base/288693 Log: MFC r270225 (by jhb): Unexpand TAILQ_FOREACH(). Modified: stable/10/sys/cam/scsi/scsi_low.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_low.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_low.c Mon Oct 5 06:55:26 2015 (r288692) +++ stable/10/sys/cam/scsi/scsi_low.c Mon Oct 5 06:56:22 2015 (r288693) @@ -326,15 +326,13 @@ scsi_low_find_ccb(slp, target, lun, osde if ((cb = slp->sl_Qnexus) != NULL && cb->osdep == osdep) return cb; - for (cb = TAILQ_FIRST(&slp->sl_start); cb != NULL; - cb = TAILQ_NEXT(cb, ccb_chain)) + TAILQ_FOREACH(cb, &slp->sl_start, ccb_chain) { if (cb->osdep == osdep) return cb; } - for (cb = TAILQ_FIRST(&li->li_discq); cb != NULL; - cb = TAILQ_NEXT(cb, ccb_chain)) + TAILQ_FOREACH(cb, &li->li_discq, ccb_chain) { if (cb->osdep == osdep) return cb; @@ -4184,8 +4182,7 @@ scsi_low_info(slp, ti, s) printf(">>>>> SCSI_LOW_INFO(0x%lx): %s\n", (u_long) slp->sl_Tnexus, s); if (ti == NULL) { - for (ti = TAILQ_FIRST(&slp->sl_titab); ti != NULL; - ti = TAILQ_NEXT(ti, ti_chain)) + TAILQ_FOREACH(ti, &slp->sl_titab, ti_chain) { scsi_low_print(slp, ti); } From owner-svn-src-all@freebsd.org Mon Oct 5 07:07:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC20AA10B04; Mon, 5 Oct 2015 07:07:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C340C176; Mon, 5 Oct 2015 07:07:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9577cKL067331; Mon, 5 Oct 2015 07:07:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9577c3E067329; Mon, 5 Oct 2015 07:07:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050707.t9577c3E067329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288694 - in stable/10/sys/cam: ata scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:07:39 -0000 Author: mav Date: Mon Oct 5 07:07:37 2015 New Revision: 288694 URL: https://svnweb.freebsd.org/changeset/base/288694 Log: MFC r277101 (by imp): Explain a bit of tricky code dealing with trims and how it prevents starvation. These side effects aren't obvious without extremely careful study, and are important to do just so. Modified: stable/10/sys/cam/ata/ata_da.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Mon Oct 5 06:56:22 2015 (r288693) +++ stable/10/sys/cam/ata/ata_da.c Mon Oct 5 07:07:37 2015 (r288694) @@ -1797,6 +1797,16 @@ adadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * trim_running set to 0 before the call above to allow + * other I/O to progress when many BIO_DELETE requests + * are pushed down. We set trim_running to 0 and call + * daschedule again so that we don't stall if there are + * no other I/Os pending apart from BIO_DELETEs. + */ softc->trim_running = 0; adaschedule(periph); cam_periph_unlock(periph); Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Oct 5 06:56:22 2015 (r288693) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Oct 5 07:07:37 2015 (r288694) @@ -3048,6 +3048,16 @@ dadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->delete_run_queue.queue, bio_queue); softc->delete_run_queue.insert_point = NULL; + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * delete_running set to 0 before the call above to + * allow other I/O to progress when many BIO_DELETE + * requests are pushed down. We set delete_running to 0 + * and call daschedule again so that we don't stall if + * there are no other I/Os pending apart from BIO_DELETEs. + */ softc->delete_running = 0; daschedule(periph); cam_periph_unlock(periph); From owner-svn-src-all@freebsd.org Mon Oct 5 07:10:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8512FA10CC6; Mon, 5 Oct 2015 07:10:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C39E388; Mon, 5 Oct 2015 07:10:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957AAYA067515; Mon, 5 Oct 2015 07:10:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957AALA067514; Mon, 5 Oct 2015 07:10:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050710.t957AALA067514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288695 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:10:10 -0000 Author: mav Date: Mon Oct 5 07:10:09 2015 New Revision: 288695 URL: https://svnweb.freebsd.org/changeset/base/288695 Log: MFC r277440 (by will): Restore the CAM XPT peripheral generation counter, and export it via sysctl. Define it as an atomic uint32_t. These increments happen infrequently enough for the atomic overhead to be a problem, and since they're now independent atomics, they won't contend with xpt_lock_buses(). This counter is useful as a means of cheaply identifying whether any changes have been made to the CAM peripheral list. Userland programs have no guarantee that the counter won't change on them while being returned or while processing the information, so they must be written accordingly. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:07:37 2015 (r288694) +++ stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:10:09 2015 (r288695) @@ -93,6 +93,8 @@ struct xpt_task { }; struct xpt_softc { + uint32_t xpt_generation; + /* number of high powered commands that can go through right now */ struct mtx xpt_highpower_lock; STAILQ_HEAD(highpowerlist, cam_ed) highpowerq; @@ -154,6 +156,8 @@ MTX_SYSINIT(xpt_topo_init, &xsoftc.xpt_t TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay); SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); +SYSCTL_UINT(_kern_cam, OID_AUTO, xpt_generation, CTLFLAG_RD, + &xsoftc.xpt_generation, 0, "CAM peripheral generation count"); struct cam_doneq { struct mtx_padalign cam_doneq_mtx; @@ -981,6 +985,7 @@ xpt_add_periph(struct cam_periph *periph device->generation++; SLIST_INSERT_HEAD(&device->periphs, periph, periph_links); mtx_unlock(&device->target->bus->eb_mtx); + atomic_add_32(&xsoftc.xpt_generation, 1); } return (status); @@ -997,6 +1002,7 @@ xpt_remove_periph(struct cam_periph *per device->generation++; SLIST_REMOVE(&device->periphs, periph, cam_periph, periph_links); mtx_unlock(&device->target->bus->eb_mtx); + atomic_add_32(&xsoftc.xpt_generation, 1); } } From owner-svn-src-all@freebsd.org Mon Oct 5 07:21:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1713A10562; Mon, 5 Oct 2015 07:21:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D82DC8; Mon, 5 Oct 2015 07:21:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957LROk072077; Mon, 5 Oct 2015 07:21:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957LR1u072076; Mon, 5 Oct 2015 07:21:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050721.t957LR1u072076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288696 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:21:27 -0000 Author: mav Date: Mon Oct 5 07:21:26 2015 New Revision: 288696 URL: https://svnweb.freebsd.org/changeset/base/288696 Log: MFC r257831 (by smh): Corrected definition for old_rate to match d_rotation_rate Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Oct 5 07:10:09 2015 (r288695) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Oct 5 07:21:26 2015 (r288696) @@ -3458,7 +3458,7 @@ dadone(struct cam_periph *periph, union * Disable queue sorting for non-rotational media * by default. */ - u_int old_rate = softc->disk->d_rotation_rate; + u_int16_t old_rate = softc->disk->d_rotation_rate; softc->disk->d_rotation_rate = scsi_2btoul(bdc->medium_rotation_rate); From owner-svn-src-all@freebsd.org Mon Oct 5 07:29:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E438A10A6E; Mon, 5 Oct 2015 07:29:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60562365; Mon, 5 Oct 2015 07:29:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957TRnC076283; Mon, 5 Oct 2015 07:29:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957TR1p076282; Mon, 5 Oct 2015 07:29:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050729.t957TR1p076282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288697 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:29:27 -0000 Author: mav Date: Mon Oct 5 07:29:26 2015 New Revision: 288697 URL: https://svnweb.freebsd.org/changeset/base/288697 Log: MFC r278398 (by trasz): Fix ordering of "*logout" and "*terminate"; no functional changes. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 07:21:26 2015 (r288696) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 07:29:26 2015 (r288697) @@ -1652,41 +1652,40 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) } static void -cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) +cfiscsi_ioctl_logout(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_terminate_params *citp; + struct ctl_iscsi_logout_params *cilp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - citp = (struct ctl_iscsi_terminate_params *)&(ci->data); + cilp = (struct ctl_iscsi_logout_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (citp->all == 0 && cs->cs_id != citp->connection_id && - strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) + if (cilp->all == 0 && cs->cs_id != cilp->connection_id && + strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - /* - * Oh well. Just terminate the connection. - */ - } else { - bhsam = (struct iscsi_bhs_asynchronous_message *) - response->ip_bhs; - bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; - bhsam->bhsam_flags = 0x80; - bhsam->bhsam_0xffffffff = 0xffffffff; - bhsam->bhsam_async_event = - BHSAM_EVENT_TARGET_TERMINATES_SESSION; - cfiscsi_pdu_queue(response); + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "Unable to allocate memory"); + mtx_unlock(&softc->lock); + return; } - cfiscsi_session_terminate(cs); + bhsam = + (struct iscsi_bhs_asynchronous_message *)response->ip_bhs; + bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; + bhsam->bhsam_flags = 0x80; + bhsam->bhsam_async_event = BHSAM_EVENT_TARGET_REQUESTS_LOGOUT; + bhsam->bhsam_parameter3 = htons(10); + cfiscsi_pdu_queue(response); found++; } mtx_unlock(&softc->lock); @@ -1702,40 +1701,41 @@ cfiscsi_ioctl_terminate(struct ctl_iscsi } static void -cfiscsi_ioctl_logout(struct ctl_iscsi *ci) +cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_logout_params *cilp; + struct ctl_iscsi_terminate_params *citp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - cilp = (struct ctl_iscsi_logout_params *)&(ci->data); + citp = (struct ctl_iscsi_terminate_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (cilp->all == 0 && cs->cs_id != cilp->connection_id && - strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) + if (citp->all == 0 && cs->cs_id != citp->connection_id && + strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), - "Unable to allocate memory"); - mtx_unlock(&softc->lock); - return; + /* + * Oh well. Just terminate the connection. + */ + } else { + bhsam = (struct iscsi_bhs_asynchronous_message *) + response->ip_bhs; + bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; + bhsam->bhsam_flags = 0x80; + bhsam->bhsam_0xffffffff = 0xffffffff; + bhsam->bhsam_async_event = + BHSAM_EVENT_TARGET_TERMINATES_SESSION; + cfiscsi_pdu_queue(response); } - bhsam = - (struct iscsi_bhs_asynchronous_message *)response->ip_bhs; - bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; - bhsam->bhsam_flags = 0x80; - bhsam->bhsam_async_event = BHSAM_EVENT_TARGET_REQUESTS_LOGOUT; - bhsam->bhsam_parameter3 = htons(10); - cfiscsi_pdu_queue(response); + cfiscsi_session_terminate(cs); found++; } mtx_unlock(&softc->lock); @@ -2170,12 +2170,12 @@ cfiscsi_ioctl(struct cdev *dev, case CTL_ISCSI_LIST: cfiscsi_ioctl_list(ci); break; - case CTL_ISCSI_TERMINATE: - cfiscsi_ioctl_terminate(ci); - break; case CTL_ISCSI_LOGOUT: cfiscsi_ioctl_logout(ci); break; + case CTL_ISCSI_TERMINATE: + cfiscsi_ioctl_terminate(ci); + break; #ifdef ICL_KERNEL_PROXY case CTL_ISCSI_LISTEN: cfiscsi_ioctl_listen(ci); From owner-svn-src-all@freebsd.org Mon Oct 5 07:31:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9910DA10DBF; Mon, 5 Oct 2015 07:31:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E01D9CB; Mon, 5 Oct 2015 07:31:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957VroJ080050; Mon, 5 Oct 2015 07:31:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957VqdT080045; Mon, 5 Oct 2015 07:31:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050731.t957VqdT080045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288698 - in stable/10/usr.sbin: ctld iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:31:53 -0000 Author: mav Date: Mon Oct 5 07:31:51 2015 New Revision: 288698 URL: https://svnweb.freebsd.org/changeset/base/288698 Log: MFC r278622 (by trasz): Remove unused code. Modified: stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/keys.c stable/10/usr.sbin/iscsid/iscsid.h stable/10/usr.sbin/iscsid/keys.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 07:29:26 2015 (r288697) +++ stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 07:31:51 2015 (r288698) @@ -410,7 +410,6 @@ void keys_delete(struct keys *keys); void keys_load(struct keys *keys, const struct pdu *pdu); void keys_save(struct keys *keys, struct pdu *pdu); const char *keys_find(struct keys *keys, const char *name); -int keys_find_int(struct keys *keys, const char *name); void keys_add(struct keys *keys, const char *name, const char *value); void keys_add_int(struct keys *keys, Modified: stable/10/usr.sbin/ctld/keys.c ============================================================================== --- stable/10/usr.sbin/ctld/keys.c Mon Oct 5 07:29:26 2015 (r288697) +++ stable/10/usr.sbin/ctld/keys.c Mon Oct 5 07:31:51 2015 (r288698) @@ -161,26 +161,6 @@ keys_find(struct keys *keys, const char return (NULL); } -int -keys_find_int(struct keys *keys, const char *name) -{ - const char *str; - char *endptr; - int num; - - str = keys_find(keys, name); - if (str == NULL) - return (-1); - - num = strtoul(str, &endptr, 10); - if (*endptr != '\0') { - log_debugx("invalid numeric value \"%s\"", str); - return (-1); - } - - return (num); -} - void keys_add(struct keys *keys, const char *name, const char *value) { Modified: stable/10/usr.sbin/iscsid/iscsid.h ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.h Mon Oct 5 07:29:26 2015 (r288697) +++ stable/10/usr.sbin/iscsid/iscsid.h Mon Oct 5 07:31:51 2015 (r288698) @@ -115,7 +115,6 @@ void keys_delete(struct keys *key); void keys_load(struct keys *keys, const struct pdu *pdu); void keys_save(struct keys *keys, struct pdu *pdu); const char *keys_find(struct keys *keys, const char *name); -int keys_find_int(struct keys *keys, const char *name); void keys_add(struct keys *keys, const char *name, const char *value); void keys_add_int(struct keys *keys, Modified: stable/10/usr.sbin/iscsid/keys.c ============================================================================== --- stable/10/usr.sbin/iscsid/keys.c Mon Oct 5 07:29:26 2015 (r288697) +++ stable/10/usr.sbin/iscsid/keys.c Mon Oct 5 07:31:51 2015 (r288698) @@ -162,26 +162,6 @@ keys_find(struct keys *keys, const char return (NULL); } -int -keys_find_int(struct keys *keys, const char *name) -{ - const char *str; - char *endptr; - int num; - - str = keys_find(keys, name); - if (str == NULL) - return (-1); - - num = strtoul(str, &endptr, 10); - if (*endptr != '\0') { - log_debugx("invalid numeric value \"%s\"", str); - return (-1); - } - - return (num); -} - void keys_add(struct keys *keys, const char *name, const char *value) { From owner-svn-src-all@freebsd.org Mon Oct 5 07:33:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAFEDA10F76; Mon, 5 Oct 2015 07:33:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBFB0B6E; Mon, 5 Oct 2015 07:33:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957Xt9J080255; Mon, 5 Oct 2015 07:33:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957Xtc0080254; Mon, 5 Oct 2015 07:33:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050733.t957Xtc0080254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288699 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:33:55 -0000 Author: mav Date: Mon Oct 5 07:33:54 2015 New Revision: 288699 URL: https://svnweb.freebsd.org/changeset/base/288699 Log: MFC r279314 (by trasz): Add missing error check. Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:31:51 2015 (r288698) +++ stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:33:54 2015 (r288699) @@ -761,6 +761,7 @@ target_lun: LUN lun_number lun_number: STR { uint64_t tmp; + int ret; char *name; if (expand_number($1, &tmp) != 0) { @@ -769,7 +770,9 @@ lun_number: STR return (1); } - asprintf(&name, "%s,lun,%ju", target->t_name, tmp); + ret = asprintf(&name, "%s,lun,%ju", target->t_name, tmp); + if (ret <= 0) + log_err(1, "asprintf"); lun = lun_new(conf, name); if (lun == NULL) return (1); From owner-svn-src-all@freebsd.org Mon Oct 5 07:36:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A205BA101AA; Mon, 5 Oct 2015 07:36:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937F2D09; Mon, 5 Oct 2015 07:36:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957aHe3080497; Mon, 5 Oct 2015 07:36:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957aHr4080496; Mon, 5 Oct 2015 07:36:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050736.t957aHr4080496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288700 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:36:17 -0000 Author: mav Date: Mon Oct 5 07:36:16 2015 New Revision: 288700 URL: https://svnweb.freebsd.org/changeset/base/288700 Log: MFC r280388 (by benno): Be consistent with M_ZERO when allocating ccbs. There are four places, all in cam_xpt.c, where ccbs are malloc'ed. Two of these use M_ZERO, two don't. The two that don't meant that allocated ccbs had trash in them making it hard to debug errors where they showed up. Due to this, use M_ZERO all the time when allocating ccbs. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:33:54 2015 (r288699) +++ stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:36:16 2015 (r288700) @@ -4527,7 +4527,7 @@ xpt_get_ccb_nowait(struct cam_periph *pe { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_NOWAIT); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_NOWAIT); if (new_ccb == NULL) return (NULL); periph->periph_allocated++; @@ -4541,7 +4541,7 @@ xpt_get_ccb(struct cam_periph *periph) union ccb *new_ccb; cam_periph_unlock(periph); - new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_WAITOK); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_WAITOK); cam_periph_lock(periph); periph->periph_allocated++; cam_ccbq_take_opening(&periph->path->device->ccbq); From owner-svn-src-all@freebsd.org Mon Oct 5 07:38:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D218BA1032D; Mon, 5 Oct 2015 07:38:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3832E84; Mon, 5 Oct 2015 07:38:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957cNrU080676; Mon, 5 Oct 2015 07:38:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957cNcs080675; Mon, 5 Oct 2015 07:38:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050738.t957cNcs080675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288701 - stable/10/sys/cam/ata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:38:23 -0000 Author: mav Date: Mon Oct 5 07:38:22 2015 New Revision: 288701 URL: https://svnweb.freebsd.org/changeset/base/288701 Log: MFC r280845 (by eadler): Add some additional quirks for various Western Digital Caviar MHDDs Modified: stable/10/sys/cam/ata/ata_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Mon Oct 5 07:36:16 2015 (r288700) +++ stable/10/sys/cam/ata/ata_da.c Mon Oct 5 07:38:22 2015 (r288701) @@ -233,16 +233,31 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* WDC Caviar Red Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????CX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* WDC Caviar Green Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????RS*", "*" }, /*quirks*/ADA_Q_4K }, { - /* WDC Caviar Green Advanced Format (4k) drives */ + /* WDC Caviar Green/Red Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????RX*", "*" }, /*quirks*/ADA_Q_4K }, { + /* WDC Caviar Red Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????CX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* WDC Caviar Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????EX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* WDC Caviar Green Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????RS*", "*" }, /*quirks*/ADA_Q_4K From owner-svn-src-all@freebsd.org Mon Oct 5 07:40:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1522A104ED; Mon, 5 Oct 2015 07:40:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FDFE3; Mon, 5 Oct 2015 07:40:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957eJDS082012; Mon, 5 Oct 2015 07:40:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957eJJu082011; Mon, 5 Oct 2015 07:40:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050740.t957eJJu082011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288702 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:40:20 -0000 Author: mav Date: Mon Oct 5 07:40:18 2015 New Revision: 288702 URL: https://svnweb.freebsd.org/changeset/base/288702 Log: MFC r281531 (by asomers): Initialize async_arg_ptr in xpt_async when called with async_code AC_ADVINFO_CHANGED. Without this change, newly inserted hard disks won't always have their physical path device nodes created. The problem reproduces most readily when attaching a large number of disks at once. Modified: stable/10/sys/cam/cam_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:38:22 2015 (r288701) +++ stable/10/sys/cam/cam_xpt.c Mon Oct 5 07:40:18 2015 (r288702) @@ -4268,8 +4268,10 @@ xpt_async(u_int32_t async_code, struct c } memcpy(ccb->casync.async_arg_ptr, async_arg, size); ccb->casync.async_arg_size = size; - } else if (size < 0) + } else if (size < 0) { + ccb->casync.async_arg_ptr = async_arg; ccb->casync.async_arg_size = size; + } if (path->device != NULL && path->device->lun_id != CAM_LUN_WILDCARD) xpt_freeze_devq(path, 1); else From owner-svn-src-all@freebsd.org Mon Oct 5 07:41:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C61A10703; Mon, 5 Oct 2015 07:41:13 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A2A8302; Mon, 5 Oct 2015 07:41:13 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957fDna084033; Mon, 5 Oct 2015 07:41:13 GMT (envelope-from markm@FreeBSD.org) Received: (from markm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957fDXG084032; Mon, 5 Oct 2015 07:41:13 GMT (envelope-from markm@FreeBSD.org) Message-Id: <201510050741.t957fDXG084032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markm set sender to markm@FreeBSD.org using -f From: Mark Murray Date: Mon, 5 Oct 2015 07:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288703 - head/sys/dev/random X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:41:13 -0000 Author: markm Date: Mon Oct 5 07:41:12 2015 New Revision: 288703 URL: https://svnweb.freebsd.org/changeset/base/288703 Log: It appears that under some circumstances, like virtualisiation, the 'rdrand' instruction may occasionally not return random numbers, in spite of looping attempts to do so. The reusult is a KASSERT/panic. Reluctantly accept this state-of-affairs, but make a noise about it. if this 'noise' spams the console, it may be time to discontinue using that source. This is written in a general way to account for /any/ source that might not supply random numbers when required. Submitted by: jkh (report and slightly different fix) Approved by: so (/dev/random blanket) Modified: head/sys/dev/random/random_harvestq.c Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Mon Oct 5 07:40:18 2015 (r288702) +++ head/sys/dev/random/random_harvestq.c Mon Oct 5 07:41:12 2015 (r288703) @@ -211,7 +211,16 @@ random_sources_feed(void) LIST_FOREACH(rrs, &source_list, rrs_entries) { for (i = 0; i < p_random_alg_context->ra_poolcount*(local_read_rate + 1); i++) { n = rrs->rrs_source->rs_read(entropy, sizeof(entropy)); - KASSERT((n > 0 && n <= sizeof(entropy)), ("very bad return from rs_read (= %d) in %s", n, __func__)); + KASSERT((n <= sizeof(entropy)), ("%s: rs_read returned too much data (%d > %d) in %s", __func__, n, sizeof(entropy))); + /* It would appear that in some circumstances (e.g. virtualisation), + * the underlying hardware entropy source might not always return + * random numbers. Accept this but make a noise. If too much happens, + * can that source be trusted? + */ + if (n == 0) { + printf("%s: rs_read for hardware device '%s' returned no entropy.\n", __func__, rrs->rrs_source->rs_ident); + continue; + } random_harvest_direct(entropy, n, (n*8)/2, rrs->rrs_source->rs_source); } } From owner-svn-src-all@freebsd.org Mon Oct 5 07:42:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D294CA107C7; Mon, 5 Oct 2015 07:42:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39C987D; Mon, 5 Oct 2015 07:42:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957g7ZS084682; Mon, 5 Oct 2015 07:42:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957g5Zm084638; Mon, 5 Oct 2015 07:42:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050742.t957g5Zm084638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 07:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288704 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:42:08 -0000 Author: mav Date: Mon Oct 5 07:42:05 2015 New Revision: 288704 URL: https://svnweb.freebsd.org/changeset/base/288704 Log: MFC r281532 (by delphij): Eliminate unused headers. Modified: stable/10/usr.sbin/ctld/discovery.c stable/10/usr.sbin/ctld/isns.c stable/10/usr.sbin/ctld/keys.c stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/pdu.c stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/discovery.c Mon Oct 5 07:42:05 2015 (r288704) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include Modified: stable/10/usr.sbin/ctld/isns.c ============================================================================== --- stable/10/usr.sbin/ctld/isns.c Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/isns.c Mon Oct 5 07:42:05 2015 (r288704) @@ -35,14 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include -#include #include -#include -#include #include #include #include Modified: stable/10/usr.sbin/ctld/keys.c ============================================================================== --- stable/10/usr.sbin/ctld/keys.c Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/keys.c Mon Oct 5 07:42:05 2015 (r288704) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/login.c Mon Oct 5 07:42:05 2015 (r288704) @@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/parse.y Mon Oct 5 07:42:05 2015 (r288704) @@ -35,7 +35,6 @@ #include #include #include -#include #include #include Modified: stable/10/usr.sbin/ctld/pdu.c ============================================================================== --- stable/10/usr.sbin/ctld/pdu.c Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/pdu.c Mon Oct 5 07:42:05 2015 (r288704) @@ -34,8 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Mon Oct 5 07:41:12 2015 (r288703) +++ stable/10/usr.sbin/ctld/token.l Mon Oct 5 07:42:05 2015 (r288704) @@ -34,7 +34,6 @@ #include #include -#include "ctld.h" #include "y.tab.h" int lineno; From owner-svn-src-all@freebsd.org Mon Oct 5 07:42:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4980BA107CB; Mon, 5 Oct 2015 07:42:08 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B2FB87E; Mon, 5 Oct 2015 07:42:08 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t957g8wL084695; Mon, 5 Oct 2015 07:42:08 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t957g8Yq084694; Mon, 5 Oct 2015 07:42:08 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510050742.t957g8Yq084694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 5 Oct 2015 07:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r288705 - svnadmin/tools/svnssh X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 07:42:08 -0000 Author: peter Date: Mon Oct 5 07:42:07 2015 New Revision: 288705 URL: https://svnweb.freebsd.org/changeset/base/288705 Log: Add a maximum elapsed time before exiting. Modified: svnadmin/tools/svnssh/svnssh.c Modified: svnadmin/tools/svnssh/svnssh.c ============================================================================== --- svnadmin/tools/svnssh/svnssh.c Mon Oct 5 07:42:05 2015 (r288704) +++ svnadmin/tools/svnssh/svnssh.c Mon Oct 5 07:42:07 2015 (r288705) @@ -205,6 +205,7 @@ main(int argc, char *argv[]) rl.rlim_cur = 60 * 60; /* 60 minutes (soft) */ rl.rlim_max = 70 * 60; /* 70 minutes (hard) */ setrlimit(RLIMIT_CPU, &rl); + alarm(120); /* Limit total run time */ if (karma == 0) syslog(LOG_INFO, "svn server: %s, karma %d", username, karma); closelog(); From owner-svn-src-all@freebsd.org Mon Oct 5 08:09:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32E5DA10C08; Mon, 5 Oct 2015 08:09:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4166DE; Mon, 5 Oct 2015 08:09:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9589ZNM005593; Mon, 5 Oct 2015 08:09:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9589ZtR005592; Mon, 5 Oct 2015 08:09:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050809.t9589ZtR005592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288706 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:09:36 -0000 Author: mav Date: Mon Oct 5 08:09:34 2015 New Revision: 288706 URL: https://svnweb.freebsd.org/changeset/base/288706 Log: MFC r285030: Fix couple panics on forced unmount of backing file. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 07:42:07 2015 (r288705) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:09:34 2015 (r288706) @@ -809,24 +809,27 @@ ctl_be_block_getattr_file(struct ctl_be_ { struct vattr vattr; struct statfs statfs; + uint64_t val; int error; + val = UINT64_MAX; if (be_lun->vn == NULL) - return (UINT64_MAX); + return (val); + vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); if (strcmp(attrname, "blocksused") == 0) { error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); - if (error != 0) - return (UINT64_MAX); - return (vattr.va_bytes >> be_lun->blocksize_shift); + if (error == 0) + val = vattr.va_bytes >> be_lun->blocksize_shift; } - if (strcmp(attrname, "blocksavail") == 0) { + if (strcmp(attrname, "blocksavail") == 0 && + (be_lun->vn->v_iflag & VI_DOOMED) == 0) { error = VFS_STATFS(be_lun->vn->v_mount, &statfs); - if (error != 0) - return (UINT64_MAX); - return ((statfs.f_bavail * statfs.f_bsize) >> - be_lun->blocksize_shift); + if (error == 0) + val = (statfs.f_bavail * statfs.f_bsize) >> + be_lun->blocksize_shift; } - return (UINT64_MAX); + VOP_UNLOCK(be_lun->vn, 0); + return (val); } static void @@ -2657,10 +2660,12 @@ ctl_be_block_modify(struct ctl_be_block_ oldsize = be_lun->size_bytes; if (be_lun->vn == NULL) error = ctl_be_block_open(softc, be_lun, req); + else if (vn_isdisk(be_lun->vn, &error)) + error = ctl_be_block_modify_dev(be_lun, req); else if (be_lun->vn->v_type == VREG) error = ctl_be_block_modify_file(be_lun, req); else - error = ctl_be_block_modify_dev(be_lun, req); + error = EINVAL; if (error == 0 && be_lun->size_bytes != oldsize) { be_lun->size_blocks = be_lun->size_bytes >> From owner-svn-src-all@freebsd.org Mon Oct 5 08:13:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 560CFA10FC8; Mon, 5 Oct 2015 08:13:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A5E9CDB; Mon, 5 Oct 2015 08:13:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958DVss009510; Mon, 5 Oct 2015 08:13:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958DU2M009508; Mon, 5 Oct 2015 08:13:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050813.t958DU2M009508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288707 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:13:31 -0000 Author: mav Date: Mon Oct 5 08:13:29 2015 New Revision: 288707 URL: https://svnweb.freebsd.org/changeset/base/288707 Log: MFC r271731 (by will): Fix a kernel panic when unloading isp(4). In the current implementation, the isp_kthread() threads never exit. The target threads do have an exit mode from isp_attach(), but it is not invoked from isp_detach(). Ensure isp_detach() notifies threads started for each channel, such that they exit before their parent device softc detaches, and thus before the module does. Otherwise, a page fault panic occurs later in: sysctl_kern_proc sysctl_out_proc kern_proc_out fill_kinfo_proc fill_kinfo_thread strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); For isp_kthread() (and isp(4) target threads), td->td_wmesg references now-unmapped memory after the module has been unloaded. These threads are typically msleep()ing at the time of unload, but they could also attempt to execute now-unmapped code segments. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:09:34 2015 (r288706) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:13:29 2015 (r288707) @@ -170,6 +170,7 @@ isp_attach_chan(ispsoftc_t *isp, struct ISP_SET_PC(isp, chan, proc_active, 0); isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); } + ISP_SPI_PC(isp, chan)->num_threads += 1; #endif } else { fcparam *fcp = FCPARAM(isp, chan); @@ -208,12 +209,14 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_sim_free(fc->sim, FALSE); return (ENOMEM); } + ISP_FC_PC(isp, chan)->num_threads += 1; #ifdef ISP_INTERNAL_TARGET ISP_SET_PC(isp, chan, proc_active, 1); if (THREAD_CREATE(isp_target_thread_fc, fc, &fc->target_proc, 0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { ISP_SET_PC(isp, chan, proc_active, 0); isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); } + ISP_FC_PC(isp, chan)->num_threads += 1; #endif if (chan > 0) { snprintf(name, sizeof(name), "chan%d", chan); @@ -234,6 +237,47 @@ isp_attach_chan(ispsoftc_t *isp, struct return (0); } +static void +isp_detach_internal_target(ispsoftc_t *isp, int chan) +{ +#ifdef ISP_INTERNAL_TARGET + void *wchan; + + ISP_GET_PC(isp, chan, target_proc, wchan); + ISP_SET_PC(isp, chan, proc_active, 0); + wakeup(wchan); +#endif +} + +static void +isp_detach_chan(ispsoftc_t *isp, int chan) +{ + struct cam_sim *sim; + struct cam_path *path; + struct ccb_setasync csa; + int *num_threads; + + ISP_GET_PC(isp, chan, sim, sim); + ISP_GET_PC(isp, chan, path, path); + ISP_GET_PC_ADDR(isp, chan, num_threads, num_threads); + + xpt_setup_ccb(&csa.ccb_h, path, 5); + csa.ccb_h.func_code = XPT_SASYNC_CB; + csa.event_enable = 0; + csa.callback = isp_cam_async; + csa.callback_arg = sim; + xpt_action((union ccb *)&csa); + xpt_free_path(path); + xpt_bus_deregister(cam_sim_path(sim)); + cam_sim_free(sim, FALSE); + + /* Wait for the channel's spawned threads to exit. */ + wakeup(isp->isp_osinfo.pc.ptr); + isp_detach_internal_target(isp, chan); + while (*num_threads != 0) + mtx_sleep(isp, &isp->isp_osinfo.lock, PRIBIO, "isp_reap", 100); +} + int isp_attach(ispsoftc_t *isp) { @@ -284,13 +328,9 @@ unwind: while (--chan >= 0) { struct cam_sim *sim; struct cam_path *path; - if (IS_FC(isp)) { - sim = ISP_FC_PC(isp, chan)->sim; - path = ISP_FC_PC(isp, chan)->path; - } else { - sim = ISP_SPI_PC(isp, chan)->sim; - path = ISP_SPI_PC(isp, chan)->path; - } + + ISP_GET_PC(isp, chan, sim, sim); + ISP_GET_PC(isp, chan, path, path); xpt_free_path(path); ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(sim)); @@ -314,49 +354,26 @@ int isp_detach(ispsoftc_t *isp) { struct cam_sim *sim; - struct cam_path *path; - struct ccb_setasync csa; int chan; ISP_LOCK(isp); for (chan = isp->isp_nchan - 1; chan >= 0; chan -= 1) { - if (IS_FC(isp)) { - sim = ISP_FC_PC(isp, chan)->sim; - path = ISP_FC_PC(isp, chan)->path; - } else { - sim = ISP_SPI_PC(isp, chan)->sim; - path = ISP_SPI_PC(isp, chan)->path; - } + ISP_GET_PC(isp, chan, sim, sim); if (sim->refcount > 2) { ISP_UNLOCK(isp); return (EBUSY); } } + /* Tell spawned threads that we're exiting. */ + isp->isp_osinfo.is_exiting = 1; if (isp->isp_osinfo.timer_active) { callout_stop(&isp->isp_osinfo.tmo); isp->isp_osinfo.timer_active = 0; } - for (chan = isp->isp_nchan - 1; chan >= 0; chan -= 1) { - if (IS_FC(isp)) { - sim = ISP_FC_PC(isp, chan)->sim; - path = ISP_FC_PC(isp, chan)->path; - } else { - sim = ISP_SPI_PC(isp, chan)->sim; - path = ISP_SPI_PC(isp, chan)->path; - } - xpt_setup_ccb(&csa.ccb_h, path, 5); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = 0; - csa.callback = isp_cam_async; - csa.callback_arg = sim; - ISP_LOCK(isp); - xpt_action((union ccb *)&csa); - ISP_UNLOCK(isp); - xpt_free_path(path); - xpt_bus_deregister(cam_sim_path(sim)); - cam_sim_free(sim, FALSE); - } + for (chan = isp->isp_nchan - 1; chan >= 0; chan -= 1) + isp_detach_chan(isp, chan); ISP_UNLOCK(isp); + if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -4269,7 +4286,7 @@ isp_target_thread(ispsoftc_t *isp, int c /* * Add resources */ - ISP_GET_PC_ADDR(isp, chan, target_proc, wchan); + ISP_GET_PC(isp, chan, target_proc, wchan); for (i = 0; i < 4; i++) { ccb = malloc(sizeof (*ccb), M_ISPTARG, M_WAITOK | M_ZERO); xpt_setup_ccb(&ccb->ccb_h, wperiph->path, 1); @@ -4357,14 +4374,24 @@ static void isp_target_thread_pi(void *arg) { struct isp_spi *pi = arg; - isp_target_thread(cam_sim_softc(pi->sim), cam_sim_bus(pi->sim)); + ispsoftc_t *isp = cam_sim_softc(pi->sim); + int chan = cam_sim_bus(pi->sim); + + isp_target_thread(isp, chan); + ISP_SPI_PC(isp, chan)->num_threads -= 1; + kthread_exit(); } static void isp_target_thread_fc(void *arg) { struct isp_fc *fc = arg; - isp_target_thread(cam_sim_softc(fc->sim), cam_sim_bus(fc->sim)); + ispsoftc_t *isp = cam_sim_softc(pi->sim); + int chan = cam_sim_bus(pi->sim); + + isp_target_thread(isp, chan); + ISP_FC_PC(isp, chan)->num_threads -= 1; + kthread_exit(); } static int @@ -4804,7 +4831,7 @@ isp_kthread(void *arg) mtx_lock(&isp->isp_osinfo.lock); - for (;;) { + while (isp->isp_osinfo.is_exiting == 0) { int lb, lim; isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d checking FC state", __func__, chan); @@ -4900,7 +4927,9 @@ isp_kthread(void *arg) mtx_lock(&isp->isp_osinfo.lock); } } + fc->num_threads -= 1; mtx_unlock(&isp->isp_osinfo.lock); + kthread_exit(); } static void Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Oct 5 08:09:34 2015 (r288706) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Oct 5 08:13:29 2015 (r288707) @@ -270,6 +270,7 @@ struct isp_fc { unsigned int inject_lost_data_frame; #endif #endif + int num_threads; }; struct isp_spi { @@ -293,6 +294,7 @@ struct isp_spi { struct proc * target_proc; #endif #endif + int num_threads; }; struct isposinfo { @@ -367,6 +369,8 @@ struct isposinfo { struct isp_spi *spi; void *ptr; } pc; + + int is_exiting; }; #define ISP_FC_PC(isp, chan) (&(isp)->isp_osinfo.pc.fc[(chan)]) #define ISP_SPI_PC(isp, chan) (&(isp)->isp_osinfo.pc.spi[(chan)]) From owner-svn-src-all@freebsd.org Mon Oct 5 08:14:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77FCA0E07C; Mon, 5 Oct 2015 08:14:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9904EE26; Mon, 5 Oct 2015 08:14:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958ESL7009613; Mon, 5 Oct 2015 08:14:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958ESQl009612; Mon, 5 Oct 2015 08:14:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050814.t958ESQl009612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288708 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:14:28 -0000 Author: mav Date: Mon Oct 5 08:14:27 2015 New Revision: 288708 URL: https://svnweb.freebsd.org/changeset/base/288708 Log: MFC r273051 (by imp): Use the C99 flexible array construct to denote a variable amount of data rather than the old-school [1] construct. We have required c99 compilers for some time. Modified: stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Oct 5 08:13:29 2015 (r288707) +++ stable/10/sys/dev/isp/ispmbox.h Mon Oct 5 08:14:27 2015 (r288708) @@ -1442,7 +1442,7 @@ typedef struct { uint16_t snscb_addr[4]; /* response buffer address */ uint16_t snscb_sblen; /* subcommand buffer length (words) */ uint16_t snscb_reserved1; - uint16_t snscb_data[1]; /* variable data */ + uint16_t snscb_data[]; /* variable data */ } sns_screq_t; /* Subcommand Request Structure */ typedef struct { @@ -1503,7 +1503,7 @@ typedef struct { uint8_t snscb_port_type; uint8_t snscb_port_id[3]; uint8_t snscb_portname[8]; - uint16_t snscb_data[1]; /* variable data */ + uint16_t snscb_data[]; /* variable data */ } sns_scrsp_t; /* Subcommand Response Structure */ typedef struct { From owner-svn-src-all@freebsd.org Mon Oct 5 08:16:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7DA9A0E27E; Mon, 5 Oct 2015 08:16:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DEA4FB7; Mon, 5 Oct 2015 08:16:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958GCfF009749; Mon, 5 Oct 2015 08:16:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958GBBH009745; Mon, 5 Oct 2015 08:16:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050816.t958GBBH009745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288709 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:16:12 -0000 Author: mav Date: Mon Oct 5 08:16:10 2015 New Revision: 288709 URL: https://svnweb.freebsd.org/changeset/base/288709 Log: MFC r285146: Drop discovered targets when initiator role is disabled. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Oct 5 08:14:27 2015 (r288708) +++ stable/10/sys/dev/isp/isp.c Mon Oct 5 08:16:10 2015 (r288709) @@ -2223,6 +2223,36 @@ isp_fibre_init_2400(ispsoftc_t *isp) } static void +isp_del_all_init_entries(ispsoftc_t *isp, int chan) +{ + fcparam *fcp = FCPARAM(isp, chan); + fcportdb_t *lp; + int i; + + for (i = 0; i < MAX_FC_TARG; i++) { + lp = &fcp->portdb[i]; + if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) + continue; + /* + * It's up to the outer layers to clear isp_dev_map. + */ + lp->state = FC_PORTDB_STATE_NIL; + isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 1); + if (lp->autologin == 0) { + (void) isp_plogx(isp, chan, lp->handle, + lp->portid, + PLOGX_FLG_CMD_LOGO | + PLOGX_FLG_IMPLICIT | + PLOGX_FLG_FREE_NPHDL, 0); + } else { + lp->autologin = 0; + } + lp->new_prli_word3 = 0; + lp->new_portid = 0; + } +} + +static void isp_mark_portdb(ispsoftc_t *isp, int chan, int disposition) { fcparam *fcp = FCPARAM(isp, chan); @@ -2981,7 +3011,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) * It's up to the outer layers to clear isp_dev_map. */ lp->state = FC_PORTDB_STATE_NIL; - isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); + isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 0); if (lp->autologin == 0) { (void) isp_plogx(isp, chan, lp->handle, lp->portid, @@ -4990,6 +5020,28 @@ isp_control(ispsoftc_t *isp, ispctl_t ct } while ((r & 0xffff) == MBOX_LOOP_ID_USED); return (r); } + case ISPCTL_CHANGE_ROLE: + { + int role, r; + + va_start(ap, ctl); + chan = va_arg(ap, int); + role = va_arg(ap, int); + va_end(ap); + if (IS_FC(isp)) { +#ifdef ISP_TARGET_MODE + if ((role & ISP_ROLE_TARGET) == 0) + isp_del_all_wwn_entries(isp, chan); +#endif + if ((role & ISP_ROLE_INITIATOR) == 0) + isp_del_all_init_entries(isp, chan); + r = isp_fc_change_role(isp, chan, role); + } else { + SDPARAM(isp, chan)->role = role; + r = 0; + } + return (r); + } default: isp_prt(isp, ISP_LOGERR, "Unknown Control Opcode 0x%x", ctl); break; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:14:27 2015 (r288708) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:16:10 2015 (r288709) @@ -115,7 +115,7 @@ isp_role_sysctl(SYSCTL_HANDLER_ARGS) } /* Actually change the role. */ - error = isp_fc_change_role(isp, chan, value); + error = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, value); ISP_UNLOCK(isp); return (error); } @@ -474,18 +474,14 @@ ispioctl(struct cdev *dev, u_long c, cad retval = EINVAL; break; } - *(int *)addr = FCPARAM(isp, chan)->role; -#ifdef ISP_INTERNAL_TARGET ISP_LOCK(isp); - retval = isp_fc_change_role(isp, chan, nr); - ISP_UNLOCK(isp); -#else - FCPARAM(isp, chan)->role = nr; -#endif + *(int *)addr = FCPARAM(isp, chan)->role; } else { + ISP_LOCK(isp); *(int *)addr = SDPARAM(isp, chan)->role; - SDPARAM(isp, chan)->role = nr; } + retval = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, nr); + ISP_UNLOCK(isp); retval = 0; break; @@ -5478,7 +5474,8 @@ isp_action(struct cam_sim *sim, union cc ISP_SET_PC(isp, bus, tm_enabled, 0); ISP_SET_PC(isp, bus, tm_luns_enabled, 0); #endif - if (isp_fc_change_role(isp, bus, newrole) != 0) { + if (isp_control(isp, ISPCTL_CHANGE_ROLE, + bus, newrole) != 0) { ccb->ccb_h.status = CAM_REQ_CMP_ERR; xpt_done(ccb); break; @@ -5668,7 +5665,7 @@ isp_done(XS_T *sccb) void isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) { - int bus; + int bus, now; static const char prom0[] = "Chan %d PortID 0x%06x handle 0x%x %s %s WWPN 0x%08x%08x"; static const char prom2[] = "Chan %d PortID 0x%06x handle 0x%x %s %s tgt %u WWPN 0x%08x%08x"; char buf[64]; @@ -5909,6 +5906,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); + now = va_arg(ap, int); va_end(ap); fc = ISP_FC_PC(isp, bus); /* @@ -5921,7 +5919,15 @@ isp_async(ispsoftc_t *isp, ispasync_t cm * */ isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - if (lp->dev_map_idx && lp->announced == 0) { + if (lp->dev_map_idx && lp->announced == 0 && now) { + lp->announced = 1; + tgt = lp->dev_map_idx - 1; + FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; + lp->dev_map_idx = 0; + isp_make_gone(isp, lp, bus, tgt); + isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + } else if (lp->dev_map_idx && lp->announced == 0) { lp->announced = 1; lp->state = FC_PORTDB_STATE_ZOMBIE; lp->gone_timer = ISP_FC_PC(isp, bus)->gone_device_time; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Oct 5 08:14:27 2015 (r288708) +++ stable/10/sys/dev/isp/isp_library.c Mon Oct 5 08:16:10 2015 (r288709) @@ -603,9 +603,6 @@ isp_fc_change_role(ispsoftc_t *isp, int return (ENXIO); } if (chan == 0) { -#ifdef ISP_TARGET_MODE - isp_del_all_wwn_entries(isp, chan); -#endif isp_clear_commands(isp); isp_reset(isp, 0); if (isp->isp_state != ISP_RESETSTATE) { @@ -626,8 +623,6 @@ isp_fc_change_role(ispsoftc_t *isp, int uint8_t qe[QENTRY_LEN], *scp; ISP_MEMZERO(qe, QENTRY_LEN); - /* Acquire Scratch */ - if (FC_SCRATCH_ACQUIRE(isp, chan)) { return (EBUSY); } @@ -671,12 +666,6 @@ isp_fc_change_role(ispsoftc_t *isp, int MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN, chan); isp_get_vp_modify(isp, (vp_modify_t *)&scp[QENTRY_LEN], vp); -#ifdef ISP_TARGET_MODE - isp_del_all_wwn_entries(isp, chan); -#endif - /* - * Release Scratch - */ FC_SCRATCH_RELEASE(isp, chan); if (vp->vp_mod_status != VP_STS_OK) { Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Mon Oct 5 08:14:27 2015 (r288708) +++ stable/10/sys/dev/isp/ispvar.h Mon Oct 5 08:16:10 2015 (r288709) @@ -915,6 +915,8 @@ void isp_done(XS_T *); * Get PDB on this channel for this N-port handle * ... ISPCTL_PLOGX, isp_plcmd_t *) * Performa a port login/logout + * ... ISPCTL_CHANGE_ROLE, int channel, int role); + * Change role of specified channel * * ISPCTL_PDB_SYNC is somewhat misnamed. It actually is the final step, in * order, of ISPCTL_FCLINK_TEST, ISPCTL_SCAN_FABRIC, and ISPCTL_SCAN_LOOP. @@ -937,7 +939,8 @@ typedef enum { ISPCTL_GET_NAMES, ISPCTL_RUN_MBOXCMD, ISPCTL_GET_PDB, - ISPCTL_PLOGX + ISPCTL_PLOGX, + ISPCTL_CHANGE_ROLE } ispctl_t; int isp_control(ispsoftc_t *, ispctl_t, ...); From owner-svn-src-all@freebsd.org Mon Oct 5 08:18:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF04A0E492; Mon, 5 Oct 2015 08:18:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1843C2FA; Mon, 5 Oct 2015 08:18:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958IVp0009921; Mon, 5 Oct 2015 08:18:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958IVQ0009920; Mon, 5 Oct 2015 08:18:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510050818.t958IVQ0009920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 5 Oct 2015 08:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288710 - stable/10/usr.sbin/sesutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:18:32 -0000 Author: bapt Date: Mon Oct 5 08:18:31 2015 New Revision: 288710 URL: https://svnweb.freebsd.org/changeset/base/288710 Log: MFC 287473,287485,287493,287494 Add a new sesutil(8) utility This is an utility for managing SCSI Enclosure Services (SES) device. For now only one command is supported "locate" which will change the test of the external LED associated to a given disk. Usage if the following: sesutil locate disk [on|off] Disk can be a device name: "da12" or a special keyword: "all". Reviewed by: mav Relnotes: yes Sponsored by: gandi.net Added: stable/10/usr.sbin/sesutil/ - copied from r287473, head/usr.sbin/sesutil/ Modified: stable/10/usr.sbin/sesutil/sesutil.c Modified: stable/10/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Sat Sep 5 00:06:01 2015 (r287473) +++ stable/10/usr.sbin/sesutil/sesutil.c Mon Oct 5 08:18:31 2015 (r288710) @@ -83,13 +83,13 @@ do_locate(int fd, unsigned int idx, bool static bool disk_match(const char *devnames, const char *disk, size_t len) { - const char *devname; + const char *dname; - devname = devnames; - while ((devname = strstr(devname, disk)) != NULL) { - if (devname[len] == '\0' || devname[len] == ',') + dname = devnames; + while ((dname = strstr(dname, disk)) != NULL) { + if (dname[len] == '\0' || dname[len] == ',') return (true); - devname++; + dname++; } return (false); } @@ -104,7 +104,7 @@ locate(int argc, char **argv) size_t len, i; int fd, nobj, j; bool all = false; - bool locate; + bool onoff; if (argc != 2) { errx(EXIT_FAILURE, "usage: %s locate [disk] [on|off]", @@ -114,9 +114,9 @@ locate(int argc, char **argv) disk = argv[0]; if (strcmp(argv[1], "on") == 0) { - locate = true; + onoff = true; } else if (strcmp(argv[1], "off") == 0) { - locate = false; + onoff = false; } else { errx(EXIT_FAILURE, "usage: %s locate [disk] [on|off]", getprogname()); @@ -165,17 +165,16 @@ locate(int argc, char **argv) continue; if (objdn.elm_names_len > 0) { if (all) { - do_locate(fd, objdn.elm_idx, locate); + do_locate(fd, objdn.elm_idx, onoff); continue; } if (disk_match(objdn.elm_devnames, disk, len)) { - do_locate(fd, objdn.elm_idx, locate); + do_locate(fd, objdn.elm_idx, onoff); break; } } } close(fd); - i++; } globfree(&g); From owner-svn-src-all@freebsd.org Mon Oct 5 08:28:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB0EEA0F31E; Mon, 5 Oct 2015 08:28:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7D7BCA; Mon, 5 Oct 2015 08:28:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958SYNr005337; Mon, 5 Oct 2015 08:28:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958SYQT005336; Mon, 5 Oct 2015 08:28:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050828.t958SYQT005336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288711 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:28:35 -0000 Author: mav Date: Mon Oct 5 08:28:33 2015 New Revision: 288711 URL: https://svnweb.freebsd.org/changeset/base/288711 Log: MFC r285147: Change comment added in r284540. This appeared to be not card's issue, but driver's, though solution is the same so far. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:18:31 2015 (r288710) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:28:33 2015 (r288711) @@ -2965,9 +2965,9 @@ isp_handle_platform_ctio(ispsoftc_t *isp } if (atp == NULL) { /* - * In case of target mode disable at least ISP2532 return - * invalid zero ct_rxid value. Try to workaround that using - * tag_id from the CCB, pointed by valid ct_syshandle. + * XXX: isp_clear_commands() generates fake CTIO with zero + * ct_rxid value, filling only ct_syshandle. Workaround + * that using tag_id from the CCB, pointed by ct_syshandle. */ atp = isp_find_atpd(isp, tptr, ccb->csio.tag_id); } From owner-svn-src-all@freebsd.org Mon Oct 5 08:29:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2FAFA0F3AC; Mon, 5 Oct 2015 08:29:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C365DD22; Mon, 5 Oct 2015 08:29:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958TWbk005455; Mon, 5 Oct 2015 08:29:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958TWPo005451; Mon, 5 Oct 2015 08:29:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050829.t958TWPo005451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288712 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:29:32 -0000 Author: mav Date: Mon Oct 5 08:29:31 2015 New Revision: 288712 URL: https://svnweb.freebsd.org/changeset/base/288712 Log: MFC r285154: Remove extra level of target ID indirection (isp_dev_map). FreeBSD never had limitation on number of target IDs, and there is no any other requirement to allocate them densely. Since slots of port database already populated just sequentially, there is no much need for another indirection to allocate sequentially too. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Oct 5 08:28:33 2015 (r288711) +++ stable/10/sys/dev/isp/isp.c Mon Oct 5 08:29:31 2015 (r288712) @@ -2233,9 +2233,6 @@ isp_del_all_init_entries(ispsoftc_t *isp lp = &fcp->portdb[i]; if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) continue; - /* - * It's up to the outer layers to clear isp_dev_map. - */ lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 1); if (lp->autologin == 0) { @@ -3007,9 +3004,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) switch (lp->state) { case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: - /* - * It's up to the outer layers to clear isp_dev_map. - */ lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 0); if (lp->autologin == 0) { @@ -3029,10 +3023,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) */ break; case FC_PORTDB_STATE_NEW: - /* - * It's up to the outer layers to assign a virtual - * target id in isp_dev_map (if any). - */ lp->portid = lp->new_portid; lp->prli_word3 = lp->new_prli_word3; lp->state = FC_PORTDB_STATE_VALID; @@ -3054,10 +3044,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; lp->prli_word3 = lp->new_prli_word3; - if (lp->dev_map_idx) { - int t = lp->dev_map_idx - 1; - fcp->isp_dev_map[t] = dbidx + 1; - } lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp); if (dbidx != FL_ID) { @@ -4354,7 +4340,8 @@ isp_start(XS_T *xs) ispreq_t *reqp; void *cdbp, *qep; uint16_t *tptr; - int target, dmaresult, hdlidx = 0; + fcportdb_t *lp; + int target, dmaresult; XS_INITERR(xs); isp = XS_ISP(xs); @@ -4403,29 +4390,23 @@ isp_start(XS_T *xs) return (CMD_RQLATER); } - if (XS_TGT(xs) >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d target too big", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); + lp = &fcp->portdb[target]; + if (target < 0 || target >= MAX_FC_TARG || + lp->dev_map_idx == 0) { XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } - - hdlidx = fcp->isp_dev_map[XS_TGT(xs)] - 1; - isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d- hdlidx value %d", XS_TGT(xs), hdlidx); - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - XS_SETERR(xs, HBA_SELTIMEOUT); - return (CMD_COMPLETE); - } - if (fcp->portdb[hdlidx].state == FC_PORTDB_STATE_ZOMBIE) { + if (lp->state == FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d target zombie", XS_CHANNEL(xs), target, XS_LUN(xs)); return (CMD_RQLATER); } - if (fcp->portdb[hdlidx].state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), fcp->portdb[hdlidx].state); + if (lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), lp->state); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } - target = fcp->portdb[hdlidx].handle; - fcp->portdb[hdlidx].dirty = 1; + lp->dirty = 1; } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { @@ -4567,7 +4548,6 @@ isp_start(XS_T *xs) reqp->req_cdblen = cdblen; } else if (IS_24XX(isp)) { ispreqt7_t *t7 = (ispreqt7_t *)local; - fcportdb_t *lp; if (cdblen > sizeof (t7->req_cdb)) { isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); @@ -4575,8 +4555,7 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } - lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; - t7->req_nphdl = target; + t7->req_nphdl = lp->handle; t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); @@ -4596,14 +4575,12 @@ isp_start(XS_T *xs) cdbp = t7->req_cdb; } else { ispreqt2_t *t2 = (ispreqt2_t *)local; - fcportdb_t *lp; if (cdblen > sizeof t2->req_cdb) { isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); XS_SETERR(xs, HBA_BOTCH); return (CMD_COMPLETE); } - lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t2->req_crn, xs)) { isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); @@ -4613,16 +4590,16 @@ isp_start(XS_T *xs) } if (ISP_CAP_2KLOGIN(isp)) { ispreqt2e_t *t2e = (ispreqt2e_t *)local; - t2e->req_target = target; + t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; - t2->req_target = target; + t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); cdbp = t2->req_cdb; } else { - t2->req_target = target; + t2->req_target = lp->handle; t2->req_lun_trn = XS_LUN(xs); cdbp = t2->req_cdb; } @@ -4720,16 +4697,15 @@ isp_control(ispsoftc_t *isp, ispctl_t ct isp24xx_statusreq_t *sp; fcparam *fcp = FCPARAM(isp, chan); fcportdb_t *lp; - int hdlidx; - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOGWARN, "Chan %d bad handle %d trying to reset target %d", chan, hdlidx, tgt); + if (tgt < 0 || tgt >= MAX_FC_TARG) { + isp_prt(isp, ISP_LOGWARN, "Chan %d trying to reset bad target %d", chan, tgt); break; } - lp = &fcp->portdb[hdlidx]; - if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d for abort of target %d no longer valid", chan, hdlidx, tgt); + lp = &fcp->portdb[tgt]; + if (lp->dev_map_idx == 0 || + lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; } @@ -4810,17 +4786,16 @@ isp_control(ispsoftc_t *isp, ispctl_t ct isp24xx_abrt_t local, *ab = &local, *ab2; fcparam *fcp; fcportdb_t *lp; - int hdlidx; fcp = FCPARAM(isp, chan); - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOGWARN, "Chan %d bad handle %d trying to abort target %d", chan, hdlidx, tgt); + if (tgt < 0 || tgt >= MAX_FC_TARG) { + isp_prt(isp, ISP_LOGWARN, "Chan %d trying to abort bad target %d", chan, tgt); break; } - lp = &fcp->portdb[hdlidx]; - if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d for abort of target %d no longer valid", chan, hdlidx, tgt); + lp = &fcp->portdb[tgt]; + if (lp->dev_map_idx == 0 || + lp->state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; } isp_prt(isp, ISP_LOGALL, "Chan %d Abort Cmd for N-Port 0x%04x @ Port 0x%06x", chan, lp->handle, lp->portid); @@ -4860,7 +4835,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct if (ab->abrt_nphdl == ISP24XX_ABRT_OKAY) { return (0); } - isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, hdlidx, ab->abrt_nphdl); + isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d abort returned 0x%x", chan, tgt, ab->abrt_nphdl); break; } else if (IS_FC(isp)) { if (ISP_CAP_SCCFW(isp)) { Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:28:33 2015 (r288711) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:29:31 2015 (r288712) @@ -4684,7 +4684,7 @@ isp_gdt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; - int dbidx, tgt, more_to_do = 0; + int dbidx, more_to_do = 0; ISP_LOCK(isp); isp_prt(isp, ISP_LOGDEBUG0, "Chan %d GDT timer expired", chan); @@ -4703,12 +4703,10 @@ isp_gdt_task(void *arg, int pending) more_to_do++; continue; } - tgt = lp->dev_map_idx - 1; - FCPARAM(isp, chan)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Gone Device Timeout"); - isp_make_gone(isp, lp, chan, tgt); + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Gone Device Timeout"); + isp_make_gone(isp, lp, chan, dbidx); } if (fc->ready) { if (more_to_do) { @@ -4744,7 +4742,7 @@ isp_ldt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; - int dbidx, tgt, i; + int dbidx, i; ISP_LOCK(isp); isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop Down Timer expired @ %lu", chan, (unsigned long) time_uptime); @@ -4777,7 +4775,7 @@ isp_ldt_task(void *arg, int pending) if ((xs = isp->isp_xflist[i].cmd) == NULL) { continue; } - if (dbidx != (FCPARAM(isp, chan)->isp_dev_map[XS_TGT(xs)] - 1)) { + if (dbidx != XS_TGT(xs)) { continue; } isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%d orphaned by loop down timeout", @@ -4788,20 +4786,10 @@ isp_ldt_task(void *arg, int pending) * Mark that we've announced that this device is gone.... */ lp->announced = 1; - - /* - * but *don't* change the state of the entry. Just clear - * any target id stuff and announce to CAM that the - * device is gone. This way any necessary PLOGO stuff - * will happen when loop comes back up. - */ - - tgt = lp->dev_map_idx - 1; - FCPARAM(isp, chan)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Loop Down Timeout"); - isp_make_gone(isp, lp, chan, tgt); + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Loop Down Timeout"); + isp_make_gone(isp, lp, chan, dbidx); } if (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) { @@ -5297,7 +5285,6 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc; - unsigned int hdlidx; cts->protocol = PROTO_SCSI; cts->protocol_version = SCSI_REV_2; @@ -5309,9 +5296,8 @@ isp_action(struct cam_sim *sim, union cc fc->valid = CTS_FC_VALID_SPEED; fc->bitrate = 100000; fc->bitrate *= fcp->isp_gbspeed; - hdlidx = fcp->isp_dev_map[tgt] - 1; - if (hdlidx < MAX_FC_TARG) { - fcportdb_t *lp = &fcp->portdb[hdlidx]; + if (tgt < MAX_FC_TARG) { + fcportdb_t *lp = &fcp->portdb[tgt]; fc->wwnn = lp->node_wwn; fc->wwpn = lp->port_wwn; fc->port = lp->portid; @@ -5632,17 +5618,9 @@ isp_done(XS_T *sccb) else if ((IS_FC(isp)) && (XS_TGT(sccb) < MAX_FC_TARG)) { fcparam *fcp; - int hdlidx; fcp = FCPARAM(isp, XS_CHANNEL(sccb)); - hdlidx = fcp->isp_dev_map[XS_TGT(sccb)] - 1; - /* - * Note that we have reported that this device is - * gone. If it reappears, we'll need to issue a - * rescan. - */ - if (hdlidx >= 0 && hdlidx < MAX_FC_TARG) - fcp->portdb[hdlidx].reported_gone = 1; + fcp->portdb[XS_TGT(sccb)].reported_gone = 1; } if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { sccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -5811,24 +5789,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->announced = 0; lp->gone_timer = 0; if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) { - int dbidx = lp - FCPARAM(isp, bus)->portdb; - int i; - - for (i = 0; i < MAX_FC_TARG; i++) { - if (i >= FL_ID && i <= SNS_ID) { - continue; - } - if (FCPARAM(isp, bus)->isp_dev_map[i] == 0) { - break; - } - } - if (i < MAX_FC_TARG) { - FCPARAM(isp, bus)->isp_dev_map[i] = dbidx + 1; - lp->dev_map_idx = i + 1; - } else { - isp_prt(isp, ISP_LOGWARN, "out of target ids"); - isp_dump_portdb(isp, bus); - } + lp->dev_map_idx = (lp - FCPARAM(isp, bus)->portdb) + 1; } isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); if (lp->dev_map_idx) { @@ -5852,7 +5813,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->state = FC_PORTDB_STATE_NIL; if (lp->dev_map_idx) { tgt = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; isp_prt(isp, ISP_LOGCONFIG, prom3, bus, lp->portid, tgt, "change is bad"); isp_make_gone(isp, lp, bus, tgt); @@ -5866,8 +5826,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp->prli_word3 = lp->new_prli_word3; isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); if (lp->dev_map_idx) { - int t = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[t] = (lp - FCPARAM(isp, bus)->portdb) + 1; tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "changed at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); @@ -5922,7 +5880,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm if (lp->dev_map_idx && lp->announced == 0 && now) { lp->announced = 1; tgt = lp->dev_map_idx - 1; - FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; isp_make_gone(isp, lp, bus, tgt); isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Mon Oct 5 08:28:33 2015 (r288711) +++ stable/10/sys/dev/isp/ispvar.h Mon Oct 5 08:29:31 2015 (r288712) @@ -344,12 +344,7 @@ typedef struct { * devices) or by the driver (e.g., for fabric devices). * * It has a state. If the state if VALID, that means that we've logged into - * the device. We also *may* have a initiator map index entry. This is a value - * from 0..MAX_FC_TARG that is used to index into the isp_dev_map array. If - * the value therein is non-zero, then that value minus one is used to index - * into the Port Database to find the handle for forming commands. There is - * back-index minus one value within to Port Database entry that tells us - * which entry in isp_dev_map points to us (to avoid searching). + * the device. * * Local loop devices the firmware automatically performs PLOGI on for us * (which is why that handle is imposed upon us). Fabric devices we assign @@ -395,7 +390,6 @@ typedef struct { /* * The dev_map_idx, if nonzero, is the system virtual target ID (+1) - * as a cross-reference with the isp_dev_map. * * A device is 'autologin' if the firmware automatically logs into * it (re-logins as needed). Basically, local private loop devices. @@ -491,15 +485,6 @@ typedef struct { */ fcportdb_t portdb[MAX_FC_TARG]; - /* - * This maps system virtual 'target' id to a portdb entry. - * - * The mapping function is to take any non-zero entry and - * subtract one to get the portdb index. This means that - * entries which are zero are unmapped (i.e., don't exist). - */ - uint16_t isp_dev_map[MAX_FC_TARG]; - #ifdef ISP_TARGET_MODE /* * This maps N-Port Handle to portdb entry so we From owner-svn-src-all@freebsd.org Mon Oct 5 08:30:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5063A0F679; Mon, 5 Oct 2015 08:30:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CADB8FAC; Mon, 5 Oct 2015 08:30:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958UoMu005591; Mon, 5 Oct 2015 08:30:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958UoNO005589; Mon, 5 Oct 2015 08:30:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050830.t958UoNO005589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288713 - in stable/10/sys: cam/ctl dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:30:51 -0000 Author: mav Date: Mon Oct 5 08:30:49 2015 New Revision: 288713 URL: https://svnweb.freebsd.org/changeset/base/288713 Log: MFC r285155: Make first step toward supporting target and initiator roles same time. To avoid conflicts between target and initiator devices in CAM, make CTL use target ID reported by HBA as its initiator_id in XPT_PATH_INQ. That target ID is known to never be used for initiator role, so it won't conflict. For Fibre Channel and FireWire HBAs this specific ID choice is irrelevant since all target IDs there are virtual. Same time for SPI HBAs it seems could be even requirement to use same target ID for both initiator and target roles. While there are some more things to polish in isp(4) driver, first tests of using both roles same time on the same port appeared successfull: # camcontrol devlist -v scbus0 on isp0 bus 0: at scbus0 target 1 lun 0 (da20,pass21) <> at scbus0 target 256 lun 0 (ctl0) <> at scbus0 target -1 lun ffffffff (ctl1) Modified: stable/10/sys/cam/ctl/scsi_ctl.c stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:29:31 2015 (r288712) +++ stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:30:49 2015 (r288713) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); struct ctlfe_softc { struct ctl_port port; path_id_t path_id; + target_id_t target_id; u_int maxio; struct cam_sim *sim; char port_name[DEV_IDLEN]; @@ -357,6 +358,7 @@ ctlfeasync(void *callback_arg, uint32_t } softc->path_id = cpi->ccb_h.path_id; + softc->target_id = cpi->initiator_id; softc->sim = xpt_path_sim(path); if (cpi->maxio != 0) softc->maxio = cpi->maxio; @@ -1557,6 +1559,8 @@ ctlfe_onoffline(void *arg, int online) } ccb = xpt_alloc_ccb(); xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); + ccb->ccb_h.func_code = XPT_GET_SIM_KNOB; + xpt_action(ccb); /* * Copan WWN format: @@ -1570,15 +1574,7 @@ ctlfe_onoffline(void *arg, int online) * 3 == NL-Port * Bits 7-0: 0 == Node Name, >0 == Port Number */ - if (online != 0) { - - ccb->ccb_h.func_code = XPT_GET_SIM_KNOB; - - - xpt_action(ccb); - - if ((ccb->knob.xport_specific.valid & KNOB_VALID_ADDRESS) != 0){ #ifdef RANDOM_WWNN uint64_t random_bits; @@ -1677,9 +1673,9 @@ ctlfe_onoffline(void *arg, int online) ccb->knob.xport_specific.valid |= KNOB_VALID_ADDRESS; if (online != 0) - ccb->knob.xport_specific.fc.role = KNOB_ROLE_TARGET; + ccb->knob.xport_specific.fc.role |= KNOB_ROLE_TARGET; else - ccb->knob.xport_specific.fc.role = KNOB_ROLE_NONE; + ccb->knob.xport_specific.fc.role &= ~KNOB_ROLE_TARGET; xpt_action(ccb); @@ -1809,7 +1805,7 @@ ctlfe_lun_enable(void *arg, int lun_id) bus_softc = (struct ctlfe_softc *)arg; status = xpt_create_path(&path, /*periph*/ NULL, - bus_softc->path_id, 0, lun_id); + bus_softc->path_id, bus_softc->target_id, lun_id); /* XXX KDM need some way to return status to CTL here? */ if (status != CAM_REQ_CMP) { printf("%s: could not create path, status %#x\n", __func__, Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:29:31 2015 (r288712) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:30:49 2015 (r288713) @@ -462,24 +462,11 @@ ispioctl(struct cdev *dev, u_long c, cad retval = EINVAL; break; } - if (IS_FC(isp)) { - /* - * We don't really support dual role at present on FC cards. - * - * We should, but a bunch of things are currently broken, - * so don't allow it. - */ - if (nr == ISP_ROLE_BOTH) { - isp_prt(isp, ISP_LOGERR, "cannot support dual role at present"); - retval = EINVAL; - break; - } - ISP_LOCK(isp); + ISP_LOCK(isp); + if (IS_FC(isp)) *(int *)addr = FCPARAM(isp, chan)->role; - } else { - ISP_LOCK(isp); + else *(int *)addr = SDPARAM(isp, chan)->role; - } retval = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, nr); ISP_UNLOCK(isp); retval = 0; @@ -1262,11 +1249,6 @@ isp_enable_lun(ispsoftc_t *isp, union cc target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "enabling lun %u\n", lun); - if (target != CAM_TARGET_WILDCARD && target != 0) { - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - return; - } if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -1479,12 +1461,6 @@ isp_disable_lun(ispsoftc_t *isp, union c target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "disabling lun %u\n", lun); - if (target != CAM_TARGET_WILDCARD && target != 0) { - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - return; - } - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -5437,21 +5413,10 @@ isp_action(struct cam_sim *sim, union cc } break; case KNOB_ROLE_BOTH: -#if 0 if (fcp->role != ISP_ROLE_BOTH) { rchange = 1; newrole = ISP_ROLE_BOTH; } -#else - /* - * We don't really support dual role at present on FC cards. - * - * We should, but a bunch of things are currently broken, - * so don't allow it. - */ - isp_prt(isp, ISP_LOGERR, "cannot support dual role at present"); - ccb->ccb_h.status = CAM_REQ_INVALID; -#endif break; } if (rchange) { From owner-svn-src-all@freebsd.org Mon Oct 5 08:31:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98B08A0F72E; Mon, 5 Oct 2015 08:31:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F53209; Mon, 5 Oct 2015 08:31:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958VnaA009269; Mon, 5 Oct 2015 08:31:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958VnYU009266; Mon, 5 Oct 2015 08:31:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050831.t958VnYU009266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288714 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:31:49 -0000 Author: mav Date: Mon Oct 5 08:31:48 2015 New Revision: 288714 URL: https://svnweb.freebsd.org/changeset/base/288714 Log: MFC r285459: Unify port database use for target and initiator roles. Aside from cleaner and more consistent code, this allows ports to be both target and initiator same time, and easily switch from any role to any. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_target.h stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Oct 5 08:30:49 2015 (r288713) +++ stable/10/sys/dev/isp/isp.c Mon Oct 5 08:31:48 2015 (r288714) @@ -65,16 +65,18 @@ __FBSDID("$FreeBSD$"); */ #define MBOX_DELAY_COUNT 1000000 / 100 #define ISP_MARK_PORTDB(a, b, c) \ - isp_prt(isp, ISP_LOG_SANCFG, \ - "Chan %d ISP_MARK_PORTDB@LINE %d", b, __LINE__); \ - isp_mark_portdb(a, b, c) + do { \ + isp_prt(isp, ISP_LOG_SANCFG, \ + "Chan %d ISP_MARK_PORTDB@LINE %d", (b), __LINE__); \ + isp_mark_portdb((a), (b), (c)); \ + } while (0) /* * Local static data */ static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'"; +static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x handle 0x%x, Connection '%s'"; static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -2223,36 +2225,10 @@ isp_fibre_init_2400(ispsoftc_t *isp) } static void -isp_del_all_init_entries(ispsoftc_t *isp, int chan) -{ - fcparam *fcp = FCPARAM(isp, chan); - fcportdb_t *lp; - int i; - - for (i = 0; i < MAX_FC_TARG; i++) { - lp = &fcp->portdb[i]; - if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) - continue; - lp->state = FC_PORTDB_STATE_NIL; - isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 1); - if (lp->autologin == 0) { - (void) isp_plogx(isp, chan, lp->handle, - lp->portid, - PLOGX_FLG_CMD_LOGO | - PLOGX_FLG_IMPLICIT | - PLOGX_FLG_FREE_NPHDL, 0); - } else { - lp->autologin = 0; - } - lp->new_prli_word3 = 0; - lp->new_portid = 0; - } -} - -static void isp_mark_portdb(ispsoftc_t *isp, int chan, int disposition) { fcparam *fcp = FCPARAM(isp, chan); + fcportdb_t *lp; int i; if (chan < 0 || chan >= isp->isp_nchan) { @@ -2260,32 +2236,28 @@ isp_mark_portdb(ispsoftc_t *isp, int cha return; } for (i = 0; i < MAX_FC_TARG; i++) { - if (fcp->portdb[i].target_mode) { - if (disposition < 0) { - isp_prt(isp, ISP_LOGTINFO, "isp_mark_portdb: Chan %d zeroing handle 0x" "%04x port 0x%06x", chan, - fcp->portdb[i].handle, fcp->portdb[i].portid); - ISP_MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); - } - continue; - } - if (disposition == 0) { - ISP_MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); - } else { - switch (fcp->portdb[i].state) { - case FC_PORTDB_STATE_CHANGED: - case FC_PORTDB_STATE_PENDING_VALID: - case FC_PORTDB_STATE_VALID: - case FC_PORTDB_STATE_PROBATIONAL: - fcp->portdb[i].state = FC_PORTDB_STATE_PROBATIONAL; - break; - case FC_PORTDB_STATE_ZOMBIE: - break; - case FC_PORTDB_STATE_NIL: - default: - ISP_MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); - fcp->portdb[i].state = FC_PORTDB_STATE_NIL; - break; + lp = &fcp->portdb[i]; + switch (lp->state) { + case FC_PORTDB_STATE_PROBATIONAL: + case FC_PORTDB_STATE_DEAD: + case FC_PORTDB_STATE_CHANGED: + case FC_PORTDB_STATE_PENDING_VALID: + case FC_PORTDB_STATE_VALID: + if (disposition > 0) + lp->state = FC_PORTDB_STATE_PROBATIONAL; + else { + lp->state = FC_PORTDB_STATE_NIL; + isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); } + break; + case FC_PORTDB_STATE_ZOMBIE: + break; + case FC_PORTDB_STATE_NIL: + case FC_PORTDB_STATE_NEW: + default: + ISP_MEMZERO(lp, sizeof(*lp)); + lp->state = FC_PORTDB_STATE_NIL; + break; } } } @@ -2473,7 +2445,7 @@ isp_port_login(ispsoftc_t *isp, uint16_t return (MBOX_PORT_ID_USED | (mbs.param[1] << 16)); case MBOX_LOOP_ID_USED: - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: handle 0x%04x in use for port id 0x%02xXXXX", handle, mbs.param[1] & 0xff); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: handle 0x%x in use for port id 0x%02xXXXX", handle, mbs.param[1] & 0xff); return (MBOX_LOOP_ID_USED); case MBOX_COMMAND_COMPLETE: @@ -2559,7 +2531,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Port 0x%06x flags 0x%x curstate %x", chan, pdb->portid, un.bill.pdb_flags, un.bill.pdb_curstate); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x", chan, id, pdb->portid, un.bill.pdb_flags, un.bill.pdb_curstate); if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { mbs.param[0] = MBOX_NOT_LOGGED_IN; if (dolock) { @@ -2587,6 +2559,7 @@ isp_dump_chip_portdb(ispsoftc_t *isp, in isp_pdb_t pdb; int lim, loopid; + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d chip port dump", chan); if (ISP_CAP_2KLOGIN(isp)) { lim = NPH_MAX_2K; } else { @@ -2988,16 +2961,8 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; - if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) { - continue; - } - - if (lp->state == FC_PORTDB_STATE_VALID) { - if (dbidx != FL_ID) { - isp_prt(isp, - ISP_LOGERR, "portdb idx %d already valid", - dbidx); - } + if (lp->state == FC_PORTDB_STATE_NIL || + lp->state == FC_PORTDB_STATE_VALID) { continue; } @@ -3005,7 +2970,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: lp->state = FC_PORTDB_STATE_NIL; - isp_async(isp, ISPASYNC_DEV_GONE, chan, lp, 0); + isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); if (lp->autologin == 0) { (void) isp_plogx(isp, chan, lp->handle, lp->portid, @@ -3029,17 +2994,14 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) isp_async(isp, ISPASYNC_DEV_ARRIVED, chan, lp); lp->new_prli_word3 = 0; lp->new_portid = 0; - lp->announced = 0; break; case FC_PORTDB_STATE_CHANGED: -/* - * XXXX FIX THIS - */ lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_CHANGED, chan, lp); + lp->portid = lp->new_portid; + lp->prli_word3 = lp->new_prli_word3; lp->new_prli_word3 = 0; lp->new_portid = 0; - lp->announced = 0; break; case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; @@ -3050,13 +3012,12 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) lp->new_prli_word3 = 0; lp->new_portid = 0; } - lp->announced = 0; break; case FC_PORTDB_STATE_ZOMBIE: break; default: isp_prt(isp, ISP_LOGWARN, - "isp_scan_loop: state %d for idx %d", + "isp_pdb_sync: state %d for idx %d", lp->state, dbidx); isp_dump_portdb(isp, chan); } @@ -3127,7 +3088,6 @@ isp_scan_loop(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop 0..%d", chan, lim-1); - /* * Run through the list and get the port database info for each one. */ @@ -3211,6 +3171,9 @@ isp_scan_loop(ispsoftc_t *isp, int chan) */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { int a, b, c; + isp_prt(isp, ISP_LOGWARN, + "Chan %d bad pdb (WWNN %016jx, WWPN %016jx, PortID %06x, W3 0x%x, H 0x%x) @ handle 0x%x", + chan, tmp.node_wwn, tmp.port_wwn, tmp.portid, tmp.prli_word3, tmp.handle, handle); a = (tmp.node_wwn == 0); b = (tmp.port_wwn == 0); c = (tmp.portid == 0); @@ -3220,13 +3183,10 @@ isp_scan_loop(ispsoftc_t *isp, int chan) tmp.port_wwn = isp_get_wwn(isp, chan, handle, 0); if (tmp.node_wwn && tmp.port_wwn) { - isp_prt(isp, ISP_LOGINFO, "DODGED!"); + isp_prt(isp, ISP_LOGWARN, "DODGED!"); goto cont; } } - isp_prt(isp, ISP_LOGWARN, - "Chan %d bad pdb (%1d%1d%1d) @ handle 0x%x", chan, - a, b, c, handle); isp_dump_portdb(isp, chan); continue; } @@ -3234,30 +3194,19 @@ isp_scan_loop(ispsoftc_t *isp, int chan) /* * Now search the entire port database - * for the same Port and Node WWN. + * for the same Port WWN. */ - for (i = 0; i < MAX_FC_TARG; i++) { - lp = &fcp->portdb[i]; - - if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) { - continue; - } - if (lp->node_wwn != tmp.node_wwn) { - continue; - } - if (lp->port_wwn != tmp.port_wwn) { - continue; - } - + if (isp_find_pdb_by_wwn(isp, chan, tmp.port_wwn, &lp)) { /* * Okay- we've found a non-nil entry that matches. * Check to make sure it's probational or a zombie. */ if (lp->state != FC_PORTDB_STATE_PROBATIONAL && - lp->state != FC_PORTDB_STATE_ZOMBIE) { + lp->state != FC_PORTDB_STATE_ZOMBIE && + lp->state != FC_PORTDB_STATE_VALID) { isp_prt(isp, ISP_LOGERR, "Chan %d [%d] not probational/zombie (0x%x)", - chan, i, lp->state); + chan, FC_PORTDB_TGT(isp, chan, lp), lp->state); isp_dump_portdb(isp, chan); ISP_MARK_PORTDB(isp, chan, 1); isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); @@ -3269,6 +3218,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) * automatically. */ lp->autologin = 1; + lp->node_wwn = tmp.node_wwn; /* * Check to make see if really still the same @@ -3279,7 +3229,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) lp->new_prli_word3 = tmp.prli_word3; lp->state = FC_PORTDB_STATE_PENDING_VALID; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x Pending Valid", chan, tmp.portid, tmp.handle); - break; + continue; } /* @@ -3296,13 +3246,6 @@ isp_scan_loop(ispsoftc_t *isp, int chan) lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; lp->new_prli_word3 = tmp.prli_word3; - break; - } - - /* - * Did we find and update an old entry? - */ - if (i < MAX_FC_TARG) { continue; } @@ -3311,9 +3254,6 @@ isp_scan_loop(ispsoftc_t *isp, int chan) * for it and save info for later disposition. */ for (i = 0; i < MAX_FC_TARG; i++) { - if (fcp->portdb[i].target_mode) { - continue; - } if (fcp->portdb[i].state == FC_PORTDB_STATE_NIL) { break; } @@ -3739,7 +3679,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; - if (lp->state != FC_PORTDB_STATE_PROBATIONAL || lp->target_mode) { + if (lp->state != FC_PORTDB_STATE_PROBATIONAL) { continue; } if (lp->portid == portid) { @@ -3781,7 +3721,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (r != 0) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x is dead", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric PortID 0x%06x handle 0x%x is dead (%d)", chan, portid, lp->handle, r); continue; } @@ -3797,7 +3737,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (pdb.handle != lp->handle || pdb.portid != portid || wwpn != lp->port_wwn || - wwnn != lp->node_wwn) { + (lp->node_wwn != 0 && wwnn != lp->node_wwn)) { isp_prt(isp, ISP_LOG_SANCFG, fconf, chan, dbidx, pdb.handle, pdb.portid, (uint32_t) (wwnn >> 32), (uint32_t) wwnn, @@ -3815,8 +3755,9 @@ isp_scan_fabric(ispsoftc_t *isp, int cha * portid consistency after re-login. * */ - if (isp_login_device(isp, chan, portid, &pdb, - &oldhandle)) { + if ((fcp->role & ISP_ROLE_INITIATOR) == 0 || + isp_login_device(isp, chan, portid, &pdb, + &oldhandle)) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; if (fcp->isp_loopstate != @@ -3837,7 +3778,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); if (wwpn != lp->port_wwn || - wwnn != lp->node_wwn) { + (lp->node_wwn != 0 && wwnn != lp->node_wwn)) { isp_prt(isp, ISP_LOGWARN, "changed WWN" " after relogin"); lp->new_portid = portid; @@ -3875,6 +3816,9 @@ isp_scan_fabric(ispsoftc_t *isp, int cha continue; } + if ((fcp->role & ISP_ROLE_INITIATOR) == 0) + continue; + /* * Ah- a new entry. Search the database again for all non-NIL * entries to make sure we never ever make a new database entry @@ -3888,12 +3832,6 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp <= &fcp->portdb[SNS_ID]) { continue; } - /* - * Skip any target mode entries. - */ - if (lp->target_mode) { - continue; - } if (lp->state == FC_PORTDB_STATE_NIL) { if (dbidx == MAX_FC_TARG) { dbidx = lp - fcp->portdb; @@ -3966,10 +3904,9 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (dbidx >= FL_ID && dbidx <= SNS_ID) { continue; } - if (fcp->portdb[dbidx].target_mode) { - continue; - } - if (fcp->portdb[dbidx].node_wwn == wwnn && fcp->portdb[dbidx].port_wwn == wwpn) { + if ((fcp->portdb[dbidx].node_wwn == wwnn || + fcp->portdb[dbidx].node_wwn == 0) && + fcp->portdb[dbidx].port_wwn == wwpn) { break; } } @@ -4007,6 +3944,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha */ lp = &fcp->portdb[dbidx]; lp->handle = handle; + lp->node_wwn = wwnn; lp->new_portid = portid; lp->new_prli_word3 = nr; if (lp->portid != portid || lp->prli_word3 != nr) { @@ -4393,7 +4331,7 @@ isp_start(XS_T *xs) isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); lp = &fcp->portdb[target]; if (target < 0 || target >= MAX_FC_TARG || - lp->dev_map_idx == 0) { + lp->is_target == 0) { XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } @@ -4406,7 +4344,6 @@ isp_start(XS_T *xs) XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } - lp->dirty = 1; } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { @@ -4417,6 +4354,7 @@ isp_start(XS_T *xs) if (sdp->update) { isp_spi_update(isp, XS_CHANNEL(xs)); } + lp = NULL; } start_again: @@ -4703,7 +4641,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct break; } lp = &fcp->portdb[tgt]; - if (lp->dev_map_idx == 0 || + if (lp->is_target == 0 || lp->state != FC_PORTDB_STATE_VALID) { isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; @@ -4793,7 +4731,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct break; } lp = &fcp->portdb[tgt]; - if (lp->dev_map_idx == 0 || + if (lp->is_target == 0 || lp->state != FC_PORTDB_STATE_VALID) { isp_prt(isp, ISP_LOGWARN, "Chan %d abort of no longer valid target %d", chan, tgt); break; @@ -5004,12 +4942,6 @@ isp_control(ispsoftc_t *isp, ispctl_t ct role = va_arg(ap, int); va_end(ap); if (IS_FC(isp)) { -#ifdef ISP_TARGET_MODE - if ((role & ISP_ROLE_TARGET) == 0) - isp_del_all_wwn_entries(isp, chan); -#endif - if ((role & ISP_ROLE_INITIATOR) == 0) - isp_del_all_init_entries(isp, chan); r = isp_fc_change_role(isp, chan, role); } else { SDPARAM(isp, chan)->role = role; @@ -7887,26 +7819,26 @@ isp_setdfltfcparm(ispsoftc_t *isp, int c * not disturb an already active list of commands. */ -void +int isp_reinit(ispsoftc_t *isp, int do_load_defaults) { - int i; + int i, res = 0; isp_reset(isp, do_load_defaults); - if (isp->isp_state != ISP_RESETSTATE) { + res = EIO; isp_prt(isp, ISP_LOGERR, "%s: cannot reset card", __func__); ISP_DISABLE_INTS(isp); goto cleanup; } isp_init(isp); - if (isp->isp_state == ISP_INITSTATE) { isp->isp_state = ISP_RUNSTATE; } if (isp->isp_state != ISP_RUNSTATE) { + res = EIO; #ifndef ISP_TARGET_MODE isp_prt(isp, ISP_LOGWARN, "%s: not at runstate", __func__); #endif @@ -7923,18 +7855,16 @@ isp_reinit(ispsoftc_t *isp, int do_load_ ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); } } - } + } cleanup: - isp->isp_nactive = 0; - isp_clear_commands(isp); if (IS_FC(isp)) { - for (i = 0; i < isp->isp_nchan; i++) { + for (i = 0; i < isp->isp_nchan; i++) ISP_MARK_PORTDB(isp, i, -1); - } } + return (res); } /* Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:30:49 2015 (r288713) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:31:48 2015 (r288714) @@ -52,11 +52,10 @@ MODULE_DEPEND(isp, cam, 1, 1, 1); int isp_announced = 0; int isp_fabric_hysteresis = 5; int isp_loop_down_limit = 60; /* default loop down limit */ -int isp_change_is_bad = 0; /* "changed" devices are bad */ int isp_quickboot_time = 7; /* don't wait more than N secs for loop up */ int isp_gone_device_time = 30; /* grace time before reporting device lost */ int isp_autoconfig = 1; /* automatically attach/detach devices */ -static const char prom3[] = "Chan %d PortID 0x%06x Departed from Target %u because of %s"; +static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of %s"; static void isp_freeze_loopdown(ispsoftc_t *, int, char *); static d_ioctl_t ispioctl; @@ -474,9 +473,6 @@ ispioctl(struct cdev *dev, u_long c, cad case ISP_RESETHBA: ISP_LOCK(isp); -#ifdef ISP_TARGET_MODE - isp_del_all_wwn_entries(isp, ISP_NOCHAN); -#endif isp_reinit(isp, 0); ISP_UNLOCK(isp); retval = 0; @@ -528,7 +524,7 @@ ispioctl(struct cdev *dev, u_long c, cad break; } lp = &FCPARAM(isp, ifc->chan)->portdb[ifc->loopid]; - if (lp->state == FC_PORTDB_STATE_VALID || lp->target_mode) { + if (lp->state != FC_PORTDB_STATE_NIL) { ifc->role = (lp->prli_word3 & SVC3_ROLE_MASK) >> SVC3_ROLE_SHIFT; ifc->loopid = lp->handle; ifc->portid = lp->portid; @@ -1512,13 +1508,7 @@ isp_disable_lun(ispsoftc_t *isp, union c done: if (status == CAM_REQ_CMP) { tptr->enabled = 0; - /* - * If we have no more luns enabled for this bus, - * delete all tracked wwns for it (if we are FC), - * and disable target mode. - */ if (is_any_lun_enabled(isp, bus) == 0) { - isp_del_all_wwn_entries(isp, bus); if (isp_disable_target_mode(isp, bus)) { status = CAM_REQ_CMP_ERR; } @@ -2467,7 +2457,9 @@ isp_handle_platform_atio2(ispsoftc_t *is /* * If we're not in the port database, add ourselves. */ - if (!IS_2100(isp) && isp_find_pdb_by_loopid(isp, 0, atiop->init_id, &lp) == 0) { + if (!IS_2100(isp) && + (isp_find_pdb_by_handle(isp, 0, atiop->init_id, &lp) == 0 || + lp->state == FC_PORTDB_STATE_ZOMBIE)) { uint64_t iid = (((uint64_t) aep->at_wwpn[0]) << 48) | (((uint64_t) aep->at_wwpn[1]) << 32) | @@ -2594,6 +2586,7 @@ isp_handle_platform_atio7(ispsoftc_t *is */ isp_prt(isp, ISP_LOGTINFO, "%s: [RX_ID 0x%x] D_ID 0x%06x found on Chan %d for S_ID 0x%06x wasn't in PDB already", __func__, aep->at_rxid, did, chan, sid); + isp_dump_portdb(isp, chan); isp_endcmd(isp, aep, NIL_HANDLE, chan, ECMD_TERMINATE, 0); return; } @@ -3116,7 +3109,7 @@ isp_handle_platform_notify_fc(ispsoftc_t } else { loopid = inp->in_iid; } - if (isp_find_pdb_by_loopid(isp, 0, loopid, &lp)) { + if (isp_find_pdb_by_handle(isp, 0, loopid, &lp)) { wwn = lp->port_wwn; } else { wwn = INI_ANY; @@ -3270,7 +3263,7 @@ isp_handle_platform_notify_24xx(ispsoftc case IN24XX_PORT_LOGOUT: ptr = "PORT LOGOUT"; - if (isp_find_pdb_by_loopid(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), nphdl, &lp)) { + if (isp_find_pdb_by_handle(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), nphdl, &lp)) { isp_del_wwn_entry(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), lp->port_wwn, nphdl, lp->portid); } /* FALLTHROUGH */ @@ -4606,13 +4599,6 @@ isp_make_here(ispsoftc_t *isp, fcportdb_ xpt_free_ccb(ccb); return; } - - /* - * Since we're about to issue a rescan, mark this device as not - * reported gone. - */ - fcp->reported_gone = 0; - xpt_rescan(ccb); } @@ -4626,11 +4612,6 @@ isp_make_gone(ispsoftc_t *isp, fcportdb_ return; } if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) { - /* - * We're about to send out the lost device async - * notification, so indicate that we have reported it gone. - */ - fcp->reported_gone = 1; xpt_async(AC_LOST_DEVICE, tp, NULL); xpt_free_path(tp); } @@ -4660,6 +4641,8 @@ isp_gdt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; + struct ac_contract ac; + struct ac_device_changed *adc; int dbidx, more_to_do = 0; ISP_LOCK(isp); @@ -4670,19 +4653,27 @@ isp_gdt_task(void *arg, int pending) if (lp->state != FC_PORTDB_STATE_ZOMBIE) { continue; } - if (lp->dev_map_idx == 0 || lp->target_mode) { - continue; - } if (lp->gone_timer != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "%s: Chan %d more to do for target %u (timer=%u)", __func__, chan, lp->dev_map_idx - 1, lp->gone_timer); lp->gone_timer -= 1; more_to_do++; continue; } - lp->dev_map_idx = 0; + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, dbidx, lp->portid, "Gone Device Timeout"); + if (lp->is_target) { + lp->is_target = 0; + isp_make_gone(isp, lp, chan, dbidx); + } + if (lp->is_initiator) { + lp->is_initiator = 0; + ac.contract_number = AC_CONTRACT_DEV_CHG; + adc = (struct ac_device_changed *) ac.contract_data; + adc->wwpn = lp->port_wwn; + adc->port = lp->portid; + adc->target = lp->handle; + adc->arrived = 0; + xpt_async(AC_CONTRACT, fc->path, &ac); + } lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Gone Device Timeout"); - isp_make_gone(isp, lp, chan, dbidx); } if (fc->ready) { if (more_to_do) { @@ -4718,6 +4709,8 @@ isp_ldt_task(void *arg, int pending) ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; fcportdb_t *lp; + struct ac_contract ac; + struct ac_device_changed *adc; int dbidx, i; ISP_LOCK(isp); @@ -4730,18 +4723,12 @@ isp_ldt_task(void *arg, int pending) for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &FCPARAM(isp, chan)->portdb[dbidx]; - if (lp->state != FC_PORTDB_STATE_PROBATIONAL) { - continue; - } - if (lp->dev_map_idx == 0 || lp->target_mode) { + if (lp->state == FC_PORTDB_STATE_NIL) continue; - } /* * XXX: CLEAN UP AND COMPLETE ANY PENDING COMMANDS FIRST! */ - - for (i = 0; i < isp->isp_maxcmds; i++) { struct ccb_scsiio *xs; @@ -4758,19 +4745,24 @@ isp_ldt_task(void *arg, int pending) isp->isp_xflist[i].handle, chan, XS_TGT(xs), XS_LUN(xs)); } - /* - * Mark that we've announced that this device is gone.... - */ - lp->announced = 1; - lp->dev_map_idx = 0; - lp->state = FC_PORTDB_STATE_NIL; - isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, dbidx, "Loop Down Timeout"); - isp_make_gone(isp, lp, chan, dbidx); + isp_prt(isp, ISP_LOGCONFIG, prom3, chan, dbidx, lp->portid, "Loop Down Timeout"); + if (lp->is_target) { + lp->is_target = 0; + isp_make_gone(isp, lp, chan, dbidx); + } + if (lp->is_initiator) { + lp->is_initiator = 0; + ac.contract_number = AC_CONTRACT_DEV_CHG; + adc = (struct ac_device_changed *) ac.contract_data; + adc->wwpn = lp->port_wwn; + adc->port = lp->portid; + adc->target = lp->handle; + adc->arrived = 0; + xpt_async(AC_CONTRACT, fc->path, &ac); + } } - if (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) { - isp_unfreeze_loopdown(isp, chan); - } + isp_unfreeze_loopdown(isp, chan); /* * The loop down timer has expired. Wake up the kthread * to notice that fact (or make it false). @@ -5585,7 +5577,7 @@ isp_done(XS_T *sccb) fcparam *fcp; fcp = FCPARAM(isp, XS_CHANNEL(sccb)); - fcp->portdb[XS_TGT(sccb)].reported_gone = 1; + fcp->portdb[XS_TGT(sccb)].is_target = 0; } if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { sccb->ccb_h.status |= CAM_DEV_QFRZN; @@ -5608,15 +5600,16 @@ isp_done(XS_T *sccb) void isp_async(ispsoftc_t *isp, ispasync_t cmd, ...) { - int bus, now; - static const char prom0[] = "Chan %d PortID 0x%06x handle 0x%x %s %s WWPN 0x%08x%08x"; - static const char prom2[] = "Chan %d PortID 0x%06x handle 0x%x %s %s tgt %u WWPN 0x%08x%08x"; + int bus; + static const char prom[] = "Chan %d [%d] WWPN 0x%16jx PortID 0x%06x handle 0x%x %s %s"; char buf[64]; char *msg = NULL; target_id_t tgt; fcportdb_t *lp; struct isp_fc *fc; struct cam_path *tmppath; + struct ac_contract ac; + struct ac_device_changed *adc; va_list ap; switch (cmd) { @@ -5718,10 +5711,10 @@ isp_async(ispsoftc_t *isp, ispasync_t cm if (fc->path) { isp_freeze_loopdown(isp, bus, msg); } - if (!callout_active(&fc->ldt)) { - callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime); - } + } + if (!callout_active(&fc->ldt)) { + callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime); } } isp_fcp_reset_crn(fc, /*tgt*/0, /*tgt_set*/ 0); @@ -5751,19 +5744,25 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp = va_arg(ap, fcportdb_t *); va_end(ap); fc = ISP_FC_PC(isp, bus); - lp->announced = 0; - lp->gone_timer = 0; - if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) { - lp->dev_map_idx = (lp - FCPARAM(isp, bus)->portdb) + 1; - } + tgt = FC_PORTDB_TGT(isp, bus, lp); isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - if (lp->dev_map_idx) { - tgt = lp->dev_map_idx - 1; - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "arrived at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "arrived"); + if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && + (lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) { + lp->is_target = 1; isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); isp_make_here(isp, lp, bus, tgt); - } else { - isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "arrived", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + } + if ((FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) && + (lp->prli_word3 & PRLI_WD3_INITIATOR_FUNCTION)) { + lp->is_initiator = 1; + ac.contract_number = AC_CONTRACT_DEV_CHG; + adc = (struct ac_device_changed *) ac.contract_data; + adc->wwpn = lp->port_wwn; + adc->port = lp->portid; + adc->target = lp->handle; + adc->arrived = 1; + xpt_async(AC_CONTRACT, fc->path, &ac); } break; case ISPASYNC_DEV_CHANGED: @@ -5772,97 +5771,68 @@ isp_async(ispsoftc_t *isp, ispasync_t cm lp = va_arg(ap, fcportdb_t *); va_end(ap); fc = ISP_FC_PC(isp, bus); - lp->announced = 0; - lp->gone_timer = 0; - if (isp_change_is_bad) { - lp->state = FC_PORTDB_STATE_NIL; - if (lp->dev_map_idx) { - tgt = lp->dev_map_idx - 1; - lp->dev_map_idx = 0; - isp_prt(isp, ISP_LOGCONFIG, prom3, bus, lp->portid, tgt, "change is bad"); - isp_make_gone(isp, lp, bus, tgt); - } else { - isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "changed and departed", - (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - } - } else { - lp->portid = lp->new_portid; - lp->prli_word3 = lp->new_prli_word3; - isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - if (lp->dev_map_idx) { - tgt = lp->dev_map_idx - 1; - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "changed at", tgt, - (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + tgt = FC_PORTDB_TGT(isp, bus, lp); + isp_gen_role_str(buf, sizeof (buf), lp->new_prli_word3); + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->new_portid, lp->handle, buf, "changed"); +changed: + if (lp->is_target != + ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && + (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) { + lp->is_target = !lp->is_target; + if (lp->is_target) { isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + isp_make_here(isp, lp, bus, tgt); } else { - isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "changed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_make_gone(isp, lp, bus, tgt); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); } } + if (lp->is_initiator != + ((FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) && + (lp->new_prli_word3 & PRLI_WD3_INITIATOR_FUNCTION))) { + lp->is_initiator = !lp->is_initiator; + ac.contract_number = AC_CONTRACT_DEV_CHG; + adc = (struct ac_device_changed *) ac.contract_data; + adc->wwpn = lp->port_wwn; + adc->port = lp->portid; + adc->target = lp->handle; + adc->arrived = lp->is_initiator; + xpt_async(AC_CONTRACT, fc->path, &ac); + } break; case ISPASYNC_DEV_STAYED: va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); va_end(ap); + fc = ISP_FC_PC(isp, bus); + tgt = FC_PORTDB_TGT(isp, bus, lp); isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - if (lp->dev_map_idx) { - fc = ISP_FC_PC(isp, bus); - tgt = lp->dev_map_idx - 1; - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "stayed at", tgt, - (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - /* - * Only issue a rescan if we've actually reported - * that this device is gone. - */ - if (lp->reported_gone != 0) { - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "rescanned at", tgt, - (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - isp_make_here(isp, lp, bus, tgt); - } - } else { - isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "stayed", - (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - } - break; + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "stayed"); + goto changed; case ISPASYNC_DEV_GONE: va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); - now = va_arg(ap, int); va_end(ap); fc = ISP_FC_PC(isp, bus); + tgt = FC_PORTDB_TGT(isp, bus, lp); /* - * If this has a virtual target and we haven't marked it - * that we're going to have isp_gdt tell the OS it's gone, - * set the isp_gdt timer running on it. - * - * If it isn't marked that isp_gdt is going to get rid of it, - * announce that it's gone. - * + * If this has a virtual target or initiator set the isp_gdt + * timer running on it to delay its departure. */ isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - if (lp->dev_map_idx && lp->announced == 0 && now) { - lp->announced = 1; - tgt = lp->dev_map_idx - 1; - lp->dev_map_idx = 0; - isp_make_gone(isp, lp, bus, tgt); - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); - } else if (lp->dev_map_idx && lp->announced == 0) { - lp->announced = 1; + if (lp->is_target || lp->is_initiator) { lp->state = FC_PORTDB_STATE_ZOMBIE; - lp->gone_timer = ISP_FC_PC(isp, bus)->gone_device_time; + lp->gone_timer = fc->gone_device_time; + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "gone zombie"); if (fc->ready && !callout_active(&fc->gdt)) { isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Starting Gone Device Timer with %u seconds time now %lu", bus, lp->gone_timer, (unsigned long)time_uptime); callout_reset(&fc->gdt, hz, isp_gdt, fc); } - tgt = lp->dev_map_idx - 1; - isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone zombie at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); - } else if (lp->announced == 0) { - isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "departed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + break; } + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "gone"); break; case ISPASYNC_CHANGE_NOTIFY: { @@ -5928,13 +5898,11 @@ isp_async(ispsoftc_t *isp, ispasync_t cm case NT_LIP_RESET: case NT_LINK_UP: case NT_LINK_DOWN: + case NT_HBA_RESET: /* * No action need be taken here. */ break; - case NT_HBA_RESET: - isp_del_all_wwn_entries(isp, ISP_NOCHAN); - break; case NT_GLOBAL_LOGOUT: case NT_LOGOUT: /* @@ -5942,34 +5910,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm */ isp_handle_platform_target_notify_ack(isp, notify); break; - case NT_ARRIVED: - { - struct ac_contract ac; - struct ac_device_changed *fc; - - ac.contract_number = AC_CONTRACT_DEV_CHG; - fc = (struct ac_device_changed *) ac.contract_data; - fc->wwpn = notify->nt_wwn; - fc->port = notify->nt_sid; - fc->target = notify->nt_nphdl; - fc->arrived = 1; - xpt_async(AC_CONTRACT, ISP_FC_PC(isp, notify->nt_channel)->path, &ac); - break; - } - case NT_DEPARTED: - { - struct ac_contract ac; - struct ac_device_changed *fc; - - ac.contract_number = AC_CONTRACT_DEV_CHG; - fc = (struct ac_device_changed *) ac.contract_data; - fc->wwpn = notify->nt_wwn; - fc->port = notify->nt_sid; - fc->target = notify->nt_nphdl; - fc->arrived = 0; - xpt_async(AC_CONTRACT, ISP_FC_PC(isp, notify->nt_channel)->path, &ac); - break; - } default: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 08:32:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED86BA0F7ED; Mon, 5 Oct 2015 08:32:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEFDD3CE; Mon, 5 Oct 2015 08:32:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958WZEA009367; Mon, 5 Oct 2015 08:32:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958WZmm009366; Mon, 5 Oct 2015 08:32:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050832.t958WZmm009366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288715 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:32:36 -0000 Author: mav Date: Mon Oct 5 08:32:34 2015 New Revision: 288715 URL: https://svnweb.freebsd.org/changeset/base/288715 Log: MFC r285481: Make role sysctl handling from r284727 less strict. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:31:48 2015 (r288714) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:32:34 2015 (r288715) @@ -101,18 +101,15 @@ isp_role_sysctl(SYSCTL_HANDLER_ARGS) ISP_LOCK(isp); old = FCPARAM(isp, chan)->role; + /* We don't allow target mode switch from here. */ + value = (old & ISP_ROLE_TARGET) | (value & ISP_ROLE_INITIATOR); + /* If nothing has changed -- we are done. */ if (value == old) { ISP_UNLOCK(isp); return (0); } - /* We don't allow target mode switch from here. */ - if ((value ^ old) & ISP_ROLE_TARGET) { - ISP_UNLOCK(isp); - return (EPERM); - } - /* Actually change the role. */ error = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, value); ISP_UNLOCK(isp); From owner-svn-src-all@freebsd.org Mon Oct 5 08:33:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1F57A0F9C4; Mon, 5 Oct 2015 08:33:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B33797E8; Mon, 5 Oct 2015 08:33:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958XgtM009522; Mon, 5 Oct 2015 08:33:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958XgF5009521; Mon, 5 Oct 2015 08:33:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050833.t958XgF5009521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288716 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:33:43 -0000 Author: mav Date: Mon Oct 5 08:33:41 2015 New Revision: 288716 URL: https://svnweb.freebsd.org/changeset/base/288716 Log: MFC r285510: Switch initiator IDs in target mode to the same address space as target IDs in initiator mode -- index in port database instead of handlers. This makes initiator IDs persist across role changes and firmware resets, when handlers previously assigned by firmware are lost and reused. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:32:34 2015 (r288715) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:33:41 2015 (r288716) @@ -1898,10 +1898,10 @@ isp_target_start_ctio(ispsoftc_t *isp, u cto->ct_header.rqs_entry_count = 1; cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; ATPD_SET_SEQNO(cto, atp); - if (ISP_CAP_2KLOGIN(isp) == 0) { - ((ct2e_entry_t *)cto)->ct_iid = cso->init_id; + if (ISP_CAP_2KLOGIN(isp)) { + ((ct2e_entry_t *)cto)->ct_iid = atp->nphdl; } else { - cto->ct_iid = cso->init_id; + cto->ct_iid = atp->nphdl; if (ISP_CAP_SCCFW(isp) == 0) { cto->ct_lun = ccb->ccb_h.target_lun; } @@ -2441,28 +2441,24 @@ isp_handle_platform_atio2(ispsoftc_t *is * We don't get 'suggested' sense data as we do with SCSI cards. */ atiop->sense_len = 0; - if (ISP_CAP_2KLOGIN(isp)) { - /* - * NB: We could not possibly have 2K logins if we - * NB: also did not have SCC FW. - */ - atiop->init_id = ((at2e_entry_t *)aep)->at_iid; - } else { - atiop->init_id = aep->at_iid; - } /* * If we're not in the port database, add ourselves. */ - if (!IS_2100(isp) && - (isp_find_pdb_by_handle(isp, 0, atiop->init_id, &lp) == 0 || - lp->state == FC_PORTDB_STATE_ZOMBIE)) { - uint64_t iid = - (((uint64_t) aep->at_wwpn[0]) << 48) | - (((uint64_t) aep->at_wwpn[1]) << 32) | - (((uint64_t) aep->at_wwpn[2]) << 16) | - (((uint64_t) aep->at_wwpn[3]) << 0); - isp_add_wwn_entry(isp, 0, iid, atiop->init_id, PORT_ANY, 0); + if (IS_2100(isp)) + atiop->init_id = nphdl; + else { + if ((isp_find_pdb_by_handle(isp, 0, nphdl, &lp) == 0 || + lp->state == FC_PORTDB_STATE_ZOMBIE)) { + uint64_t iid = + (((uint64_t) aep->at_wwpn[0]) << 48) | + (((uint64_t) aep->at_wwpn[1]) << 32) | + (((uint64_t) aep->at_wwpn[2]) << 16) | + (((uint64_t) aep->at_wwpn[3]) << 0); + isp_add_wwn_entry(isp, 0, iid, nphdl, PORT_ANY, 0); + isp_find_pdb_by_handle(isp, 0, nphdl, &lp); + } + atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); } atiop->cdb_len = ATIO2_CDBLEN; ISP_MEMCPY(atiop->cdb_io.cdb_bytes, aep->at_cdb, ATIO2_CDBLEN); @@ -2491,7 +2487,7 @@ isp_handle_platform_atio2(ispsoftc_t *is atp->orig_datalen = aep->at_datalen; atp->bytes_xfered = 0; atp->lun = lun; - atp->nphdl = atiop->init_id; + atp->nphdl = nphdl; atp->sid = PORT_ANY; atp->oxid = aep->at_oxid; atp->cdb0 = aep->at_cdb[0]; @@ -2520,7 +2516,6 @@ isp_handle_platform_atio7(ispsoftc_t *is int cdbxlen; uint16_t lun, chan, nphdl = NIL_HANDLE; uint32_t did, sid; - uint64_t wwn = INI_NONE; fcportdb_t *lp; tstate_t *tptr; struct ccb_accept_tio *atiop; @@ -2588,7 +2583,6 @@ isp_handle_platform_atio7(ispsoftc_t *is return; } nphdl = lp->handle; - wwn = lp->port_wwn; /* * Get the tstate pointer @@ -2676,7 +2670,7 @@ isp_handle_platform_atio7(ispsoftc_t *is SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); tptr->atio_count--; ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO count now %d\n", tptr->atio_count); - atiop->init_id = nphdl; + atiop->init_id = FC_PORTDB_TGT(isp, chan, lp); atiop->ccb_h.target_id = FCPARAM(isp, chan)->isp_loopid; atiop->ccb_h.target_lun = lun; atiop->sense_len = 0; @@ -3090,7 +3084,7 @@ isp_handle_platform_notify_fc(ispsoftc_t { tstate_t *tptr; uint16_t lun; - uint32_t loopid; + uint32_t loopid, sid; uint64_t wwn; atio_private_data_t *atp; fcportdb_t *lp; @@ -3108,8 +3102,10 @@ isp_handle_platform_notify_fc(ispsoftc_t } if (isp_find_pdb_by_handle(isp, 0, loopid, &lp)) { wwn = lp->port_wwn; + sid = lp->portid; } else { wwn = INI_ANY; + sid = PORT_ANY; } tptr = get_lun_statep(isp, 0, lun); if (tptr == NULL) { @@ -3141,7 +3137,7 @@ isp_handle_platform_notify_fc(ispsoftc_t nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; nt->nt_wwn = wwn; nt->nt_nphdl = loopid; - nt->nt_sid = PORT_ANY; + nt->nt_sid = sid; nt->nt_did = PORT_ANY; nt->nt_lun = lun; nt->nt_need_ack = 1; @@ -3453,10 +3449,11 @@ isp_handle_platform_target_tmf(ispsoftc_ goto bad; } - if (isp_find_pdb_by_sid(isp, notify->nt_channel, notify->nt_sid, &lp) == 0) { + if (isp_find_pdb_by_sid(isp, notify->nt_channel, notify->nt_sid, &lp) == 0 && + isp_find_pdb_by_handle(isp, notify->nt_channel, notify->nt_nphdl, &lp) == 0) { inot->initiator_id = CAM_TARGET_WILDCARD; } else { - inot->initiator_id = lp->handle; + inot->initiator_id = FC_PORTDB_TGT(isp, notify->nt_channel, lp); } inot->seq_id = notify->nt_tagval; inot->tag_id = notify->nt_tagval >> 32; @@ -4666,7 +4663,7 @@ isp_gdt_task(void *arg, int pending) adc = (struct ac_device_changed *) ac.contract_data; adc->wwpn = lp->port_wwn; adc->port = lp->portid; - adc->target = lp->handle; + adc->target = dbidx; adc->arrived = 0; xpt_async(AC_CONTRACT, fc->path, &ac); } @@ -4753,7 +4750,7 @@ isp_ldt_task(void *arg, int pending) adc = (struct ac_device_changed *) ac.contract_data; adc->wwpn = lp->port_wwn; adc->port = lp->portid; - adc->target = lp->handle; + adc->target = dbidx; adc->arrived = 0; xpt_async(AC_CONTRACT, fc->path, &ac); } @@ -5757,7 +5754,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm adc = (struct ac_device_changed *) ac.contract_data; adc->wwpn = lp->port_wwn; adc->port = lp->portid; - adc->target = lp->handle; + adc->target = tgt; adc->arrived = 1; xpt_async(AC_CONTRACT, fc->path, &ac); } @@ -5792,7 +5789,7 @@ changed: adc = (struct ac_device_changed *) ac.contract_data; adc->wwpn = lp->port_wwn; adc->port = lp->portid; - adc->target = lp->handle; + adc->target = tgt; adc->arrived = lp->is_initiator; xpt_async(AC_CONTRACT, fc->path, &ac); } From owner-svn-src-all@freebsd.org Mon Oct 5 08:35:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23442A0FD19; Mon, 5 Oct 2015 08:35:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14C9F989; Mon, 5 Oct 2015 08:35:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958ZnFi009688; Mon, 5 Oct 2015 08:35:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958Zn3b009686; Mon, 5 Oct 2015 08:35:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050835.t958Zn3b009686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288717 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:35:50 -0000 Author: mav Date: Mon Oct 5 08:35:48 2015 New Revision: 288717 URL: https://svnweb.freebsd.org/changeset/base/288717 Log: MFC r285600: MULTI_ID supported does not mean it is used. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Oct 5 08:33:41 2015 (r288716) +++ stable/10/sys/dev/isp/isp.c Mon Oct 5 08:35:48 2015 (r288717) @@ -3653,7 +3653,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha * that have the same domain and area code as our own * portid. */ - if (ISP_CAP_MULTI_ID(isp)) { + if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) { if ((portid >> 8) == (fcp->isp_portid >> 8)) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d skip PortID 0x%06x", Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:33:41 2015 (r288716) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Oct 5 08:35:48 2015 (r288717) @@ -2533,7 +2533,7 @@ isp_handle_platform_atio7(ispsoftc_t *is * If we can't, we're somewhat in trouble because we can't actually respond w/o that information. * We also, as a matter of course, need to know the WWN of the initiator too. */ - if (ISP_CAP_MULTI_ID(isp)) { + if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) { /* * Find the right channel based upon D_ID */ From owner-svn-src-all@freebsd.org Mon Oct 5 08:41:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 998DBA10239; Mon, 5 Oct 2015 08:41:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B510DD8; Mon, 5 Oct 2015 08:41:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958fXBo013665; Mon, 5 Oct 2015 08:41:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958fXrC013663; Mon, 5 Oct 2015 08:41:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050841.t958fXrC013663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288718 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:41:33 -0000 Author: mav Date: Mon Oct 5 08:41:32 2015 New Revision: 288718 URL: https://svnweb.freebsd.org/changeset/base/288718 Log: MFC r286406, r286414: Wrap some unused functions with notyet, it is necessary to be able to build the modules/ctl directly. Remove a dead MALLOC_DEFINE. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:35:48 2015 (r288717) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:41:32 2015 (r288718) @@ -376,9 +376,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debu */ #define SCSI_EVPD_NUM_SUPPORTED_PAGES 10 +#ifdef notyet static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); +#endif static int ctl_init(void); void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); @@ -446,7 +448,9 @@ static int ctl_scsiio_lun_check(struct c const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); //static int ctl_check_rtr(union ctl_io *pending_io, struct ctl_softc *softc); +#ifdef notyet static void ctl_failover(void); +#endif static void ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, @@ -485,7 +489,9 @@ static void ctl_work_thread(void *arg); static void ctl_enqueue_incoming(union ctl_io *io); static void ctl_enqueue_rtr(union ctl_io *io); static void ctl_enqueue_done(union ctl_io *io); +#ifdef notyet static void ctl_enqueue_isc(union ctl_io *io); +#endif static const struct ctl_cmd_entry * ctl_get_cmd_entry(struct ctl_scsiio *ctsio, int *sa); static const struct ctl_cmd_entry * @@ -513,7 +519,6 @@ static struct cdevsw ctl_cdevsw = { MALLOC_DEFINE(M_CTL, "ctlmem", "Memory used for CTL"); -MALLOC_DEFINE(M_CTLIO, "ctlio", "Memory used for CTL requests"); static int ctl_module_event_handler(module_t, int /*modeventtype_t*/, void *); @@ -531,6 +536,7 @@ static struct ctl_frontend ioctl_fronten .name = "ioctl", }; +#ifdef notyet static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) @@ -965,6 +971,7 @@ ctl_copy_sense_data(union ctl_ha_msg *sr dest->scsiio.sense_len = src->scsi.sense_len; dest->io_hdr.status = src->hdr.status; } +#endif static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) @@ -11367,6 +11374,7 @@ ctl_failover_io(union ctl_io *io, int ha ctl_done(io); } +#ifdef notyet static void ctl_failover(void) { @@ -11607,6 +11615,7 @@ ctl_failover(void) ctl_pause_rtr = 0; mtx_unlock(&softc->ctl_lock); } +#endif static void ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, @@ -14233,6 +14242,7 @@ ctl_enqueue_done(union ctl_io *io) wakeup(thr); } +#ifdef notyet static void ctl_enqueue_isc(union ctl_io *io) { @@ -14345,6 +14355,7 @@ struct ctl_ha_component ctl_ha_component .start = ctl_isc_start, .quiesce = ctl_isc_quiesce }; +#endif /* * vim: ts=8 Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:35:48 2015 (r288717) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:41:32 2015 (r288718) @@ -191,7 +191,9 @@ void ctl_data_submit_done(union ctl_io * void ctl_config_read_done(union ctl_io *io); void ctl_config_write_done(union ctl_io *io); void ctl_portDB_changed(int portnum); +#ifdef notyet void ctl_init_isc_msg(void); +#endif /* * KPI to manipulate LUN/port options From owner-svn-src-all@freebsd.org Mon Oct 5 08:42:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92E23A1036F; Mon, 5 Oct 2015 08:42:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 821BFF88; Mon, 5 Oct 2015 08:42:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958go7J013794; Mon, 5 Oct 2015 08:42:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958gi4V013771; Mon, 5 Oct 2015 08:42:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050842.t958gi4V013771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288719 - in stable/10: sys/cam/ctl sys/conf sys/modules/ctl usr.bin/ctlstat usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:42:50 -0000 Author: mav Date: Mon Oct 5 08:42:43 2015 New Revision: 288719 URL: https://svnweb.freebsd.org/changeset/base/288719 Log: MFC r286806: Drop "internal" CTL frontend. Its idea was to be a simple initiator and execute several commands from kernel level, but FreeBSD never had consumer for that functionality, while its implementation polluted many unrelated places. Deleted: stable/10/sys/cam/ctl/ctl_frontend_internal.c stable/10/sys/cam/ctl/ctl_frontend_internal.h Modified: stable/10/sys/cam/ctl/README.ctl.txt stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/conf/files stable/10/sys/modules/ctl/Makefile stable/10/usr.bin/ctlstat/ctlstat.c stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctladm/ctladm.c stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:42:43 2015 (r288719) @@ -366,16 +366,6 @@ This is a CTL frontend port that is also frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible via this port. - -ctl_frontend_internal.c -ctl_frontend_internal.h: ------------------------ - -This is a frontend port written for Copan to do some system-specific tasks -that required sending commands into CTL from inside the kernel. This isn't -entirely relevant to FreeBSD in general, but can perhaps be repurposed or -removed later. - ctl_ha.h: -------- Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:42:43 2015 (r288719) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -394,9 +393,6 @@ static int ctl_serialize_other_sc_cmd(st static int ctl_ioctl_submit_wait(union ctl_io *io); static void ctl_ioctl_datamove(union ctl_io *io); static void ctl_ioctl_done(union ctl_io *io); -static void ctl_ioctl_hard_startstop_callback(void *arg, - struct cfi_metatask *metatask); -static void ctl_ioctl_bbrread_callback(void *arg,struct cfi_metatask *metatask); static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries); @@ -2095,38 +2091,6 @@ ctl_ioctl_done(union ctl_io *io) mtx_unlock(¶ms->ioctl_mtx); } -static void -ctl_ioctl_hard_startstop_callback(void *arg, struct cfi_metatask *metatask) -{ - struct ctl_fe_ioctl_startstop_info *sd_info; - - sd_info = (struct ctl_fe_ioctl_startstop_info *)arg; - - sd_info->hs_info.status = metatask->status; - sd_info->hs_info.total_luns = metatask->taskinfo.startstop.total_luns; - sd_info->hs_info.luns_complete = - metatask->taskinfo.startstop.luns_complete; - sd_info->hs_info.luns_failed = metatask->taskinfo.startstop.luns_failed; - - cv_broadcast(&sd_info->sem); -} - -static void -ctl_ioctl_bbrread_callback(void *arg, struct cfi_metatask *metatask) -{ - struct ctl_fe_ioctl_bbrread_info *fe_bbr_info; - - fe_bbr_info = (struct ctl_fe_ioctl_bbrread_info *)arg; - - mtx_lock(fe_bbr_info->lock); - fe_bbr_info->bbr_info->status = metatask->status; - fe_bbr_info->bbr_info->bbr_status = metatask->taskinfo.bbrread.status; - fe_bbr_info->wakeup_done = 1; - mtx_unlock(fe_bbr_info->lock); - - cv_broadcast(&fe_bbr_info->sem); -} - /* * Returns 0 for success, errno for failure. */ @@ -2726,103 +2690,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } - case CTL_HARD_START: - case CTL_HARD_STOP: { - struct ctl_fe_ioctl_startstop_info ss_info; - struct cfi_metatask *metatask; - struct mtx hs_mtx; - - mtx_init(&hs_mtx, "HS Mutex", NULL, MTX_DEF); - - cv_init(&ss_info.sem, "hard start/stop cv" ); - - metatask = cfi_alloc_metatask(/*can_wait*/ 1); - if (metatask == NULL) { - retval = ENOMEM; - mtx_destroy(&hs_mtx); - break; - } - - if (cmd == CTL_HARD_START) - metatask->tasktype = CFI_TASK_STARTUP; - else - metatask->tasktype = CFI_TASK_SHUTDOWN; - - metatask->callback = ctl_ioctl_hard_startstop_callback; - metatask->callback_arg = &ss_info; - - cfi_action(metatask); - - /* Wait for the callback */ - mtx_lock(&hs_mtx); - cv_wait_sig(&ss_info.sem, &hs_mtx); - mtx_unlock(&hs_mtx); - - /* - * All information has been copied from the metatask by the - * time cv_broadcast() is called, so we free the metatask here. - */ - cfi_free_metatask(metatask); - - memcpy((void *)addr, &ss_info.hs_info, sizeof(ss_info.hs_info)); - - mtx_destroy(&hs_mtx); - break; - } - case CTL_BBRREAD: { - struct ctl_bbrread_info *bbr_info; - struct ctl_fe_ioctl_bbrread_info fe_bbr_info; - struct mtx bbr_mtx; - struct cfi_metatask *metatask; - - bbr_info = (struct ctl_bbrread_info *)addr; - - bzero(&fe_bbr_info, sizeof(fe_bbr_info)); - - bzero(&bbr_mtx, sizeof(bbr_mtx)); - mtx_init(&bbr_mtx, "BBR Mutex", NULL, MTX_DEF); - - fe_bbr_info.bbr_info = bbr_info; - fe_bbr_info.lock = &bbr_mtx; - - cv_init(&fe_bbr_info.sem, "BBR read cv"); - metatask = cfi_alloc_metatask(/*can_wait*/ 1); - - if (metatask == NULL) { - mtx_destroy(&bbr_mtx); - cv_destroy(&fe_bbr_info.sem); - retval = ENOMEM; - break; - } - metatask->tasktype = CFI_TASK_BBRREAD; - metatask->callback = ctl_ioctl_bbrread_callback; - metatask->callback_arg = &fe_bbr_info; - metatask->taskinfo.bbrread.lun_num = bbr_info->lun_num; - metatask->taskinfo.bbrread.lba = bbr_info->lba; - metatask->taskinfo.bbrread.len = bbr_info->len; - - cfi_action(metatask); - - mtx_lock(&bbr_mtx); - while (fe_bbr_info.wakeup_done == 0) - cv_wait_sig(&fe_bbr_info.sem, &bbr_mtx); - mtx_unlock(&bbr_mtx); - - bbr_info->status = metatask->status; - bbr_info->bbr_status = metatask->taskinfo.bbrread.status; - bbr_info->scsi_status = metatask->taskinfo.bbrread.scsi_status; - memcpy(&bbr_info->sense_data, - &metatask->taskinfo.bbrread.sense_data, - MIN(sizeof(bbr_info->sense_data), - sizeof(metatask->taskinfo.bbrread.sense_data))); - - cfi_free_metatask(metatask); - - mtx_destroy(&bbr_mtx); - cv_destroy(&fe_bbr_info.sem); - - break; - } case CTL_DELAY_IO: { struct ctl_io_delay_info *delay_info; #ifdef CTL_IO_DELAY Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 08:42:43 2015 (r288719) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:42:43 2015 (r288719) @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:42:43 2015 (r288719) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 08:42:43 2015 (r288719) @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 08:42:43 2015 (r288719) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 08:42:43 2015 (r288719) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* XXX KDM move defines from ctl_ioctl.h to somewhere else */ #include Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:42:43 2015 (r288719) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #define io_ptr spriv_ptr1 Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:42:43 2015 (r288719) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 08:42:43 2015 (r288719) @@ -92,23 +92,6 @@ struct ctl_ooa_info { ctl_ooa_status status; /* Returned from CTL */ }; -struct ctl_hard_startstop_info { - cfi_mt_status status; - int total_luns; - int luns_complete; - int luns_failed; -}; - -struct ctl_bbrread_info { - int lun_num; /* Passed in to CTL */ - uint64_t lba; /* Passed in to CTL */ - int len; /* Passed in to CTL */ - cfi_mt_status status; /* Returned from CTL */ - cfi_bbrread_status bbr_status; /* Returned from CTL */ - uint8_t scsi_status; /* Returned from CTL */ - struct scsi_sense_data sense_data; /* Returned from CTL */ -}; - typedef enum { CTL_DELAY_TYPE_NONE, CTL_DELAY_TYPE_CONT, @@ -816,10 +799,6 @@ struct ctl_lun_map { #define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry) #define CTL_DUMP_OOA _IO(CTL_MINOR, 0x06) #define CTL_CHECK_OOA _IOWR(CTL_MINOR, 0x07, struct ctl_ooa_info) -#define CTL_HARD_STOP _IOR(CTL_MINOR, 0x08, \ - struct ctl_hard_startstop_info) -#define CTL_HARD_START _IOR(CTL_MINOR, 0x09, \ - struct ctl_hard_startstop_info) #define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info) #define CTL_REALSYNC_GET _IOR(CTL_MINOR, 0x11, int) #define CTL_REALSYNC_SET _IOW(CTL_MINOR, 0x12, int) @@ -827,7 +806,6 @@ struct ctl_lun_map { #define CTL_GETSYNC _IOWR(CTL_MINOR, 0x14, struct ctl_sync_info) #define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats) #define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc) -#define CTL_BBRREAD _IOWR(CTL_MINOR, 0x17, struct ctl_bbrread_info) #define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa) #define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19) #define CTL_GET_PORT_LIST _IOWR(CTL_MINOR, 0x20, struct ctl_port_list) Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 08:42:43 2015 (r288719) @@ -47,18 +47,6 @@ #define CTL_PROCESSOR_PRODUCT "CTLPROCESSOR " #define CTL_UNKNOWN_PRODUCT "CTLDEVICE " -struct ctl_fe_ioctl_startstop_info { - struct cv sem; - struct ctl_hard_startstop_info hs_info; -}; - -struct ctl_fe_ioctl_bbrread_info { - struct cv sem; - struct ctl_bbrread_info *bbr_info; - int wakeup_done; - struct mtx *lock; -}; - typedef enum { CTL_IOCTL_INPROG, CTL_IOCTL_DATAMOVE, Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 08:42:43 2015 (r288719) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:42:43 2015 (r288719) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/conf/files Mon Oct 5 08:42:43 2015 (r288719) @@ -83,7 +83,6 @@ cam/ctl/ctl_backend_ramdisk.c optional c cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl -cam/ctl/ctl_frontend_internal.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl Modified: stable/10/sys/modules/ctl/Makefile ============================================================================== --- stable/10/sys/modules/ctl/Makefile Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/sys/modules/ctl/Makefile Mon Oct 5 08:42:43 2015 (r288719) @@ -11,7 +11,6 @@ SRCS+= ctl_backend_ramdisk.c SRCS+= ctl_cmd_table.c SRCS+= ctl_frontend.c SRCS+= ctl_frontend_cam_sim.c -SRCS+= ctl_frontend_internal.c SRCS+= ctl_frontend_iscsi.c SRCS+= ctl_scsi_all.c SRCS+= ctl_tpc.c Modified: stable/10/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 08:42:43 2015 (r288719) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:42:43 2015 (r288719) @@ -83,12 +83,6 @@ .Op Fl c Ar cdbsize .Op Fl N .Nm -.Ic bbrread -.Aq target:lun -.Op general options -.Aq Fl -l Ar lba -.Aq Fl -d Ar datalen -.Nm .Ic readcap .Aq target:lun .Op general options @@ -129,10 +123,6 @@ .Ic startup .Op general options .Nm -.Ic hardstop -.Nm -.Ic hardstart -.Nm .Ic lunlist .Nm .Ic delay @@ -364,34 +354,6 @@ to the kernel when doing a write, just e data. This is to be used for performance testing. .El -.It Ic bbrread -Issue a SCSI READ command to the logical device to potentially force a bad -block on a disk in the RAID set to be reconstructed from the other disks in -the array. This command should only be used on an array that is in the -normal state. If used on a critical array, it could cause the array to go -offline if the bad block to be remapped is on one of the disks that is -still active in the array. -.Pp -The data for this particular command will be discarded, and not returned to -the user. -.Pp -In order to determine which LUN to read from, the user should first -determine which LUN the disk with a bad block belongs to. Then he should -map the bad disk block back to the logical block address for the array in -order to determine which LBA to pass in to the -.Ic bbrread -command. -.Pp -This command is primarily intended for testing. In practice, bad block -remapping will generally be triggered by the in-kernel Disk Aerobics and -Disk Scrubbing code. -.Bl -tag -width 10n -.It Fl l Ar lba -Specify the starting Logical Block Address. -.It Fl d Ar datalen -Specify the amount of data in bytes to read from the LUN. This must be a -multiple of the LUN blocksize. -.El .It Ic readcap Send the .Tn SCSI @@ -545,22 +507,6 @@ START STOP UNIT command with the start b to all direct access LUNs. This will mark all direct access LUNs "online" again. It will not cause any LUNs to start up. A separate start command without the on/offline bit set is necessary for that. -.It Ic hardstop -Use the kernel facility for stopping all direct access LUNs and setting the -offline bit. Unlike the -.Ic shutdown -command above, this command allows shutting down LUNs with I/O active. It -will also issue a LUN reset to any reserved LUNs to break the reservation -so that the LUN can be stopped. -.Ic shutdown -command instead. -.It Ic hardstart -This command is functionally identical to the -.Ic startup -command described above. The primary difference is that the LUNs are -enumerated and commands sent by the in-kernel Front End Target Driver -instead of by -.Nm . .It Ic lunlist List all LUNs registered with CTL. Because this command uses the ioctl port, it will only work when the FETDs Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:42:43 2015 (r288719) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -106,14 +105,11 @@ typedef enum { CTLADM_CMD_SHUTDOWN, CTLADM_CMD_STARTUP, CTLADM_CMD_LUNLIST, - CTLADM_CMD_HARDSTOP, - CTLADM_CMD_HARDSTART, CTLADM_CMD_DELAY, CTLADM_CMD_REALSYNC, CTLADM_CMD_SETSYNC, CTLADM_CMD_GETSYNC, CTLADM_CMD_ERR_INJECT, - CTLADM_CMD_BBRREAD, CTLADM_CMD_PRES_IN, CTLADM_CMD_PRES_OUT, CTLADM_CMD_INQ_VPD_DEVID, @@ -172,7 +168,6 @@ static const char startstop_opts[] = "io static struct ctladm_opts option_table[] = { {"adddev", CTLADM_CMD_ADDDEV, CTLADM_ARG_NONE, NULL}, - {"bbrread", CTLADM_CMD_BBRREAD, CTLADM_ARG_NEED_TL, "d:l:"}, {"create", CTLADM_CMD_CREATE, CTLADM_ARG_NONE, "b:B:d:l:o:s:S:t:"}, {"delay", CTLADM_CMD_DELAY, CTLADM_ARG_NEED_TL, "T:l:t:"}, {"devid", CTLADM_CMD_INQ_VPD_DEVID, CTLADM_ARG_NEED_TL, NULL}, @@ -180,8 +175,6 @@ static struct ctladm_opts option_table[] {"dumpooa", CTLADM_CMD_DUMPOOA, CTLADM_ARG_NONE, NULL}, {"dumpstructs", CTLADM_CMD_DUMPSTRUCTS, CTLADM_ARG_NONE, NULL}, {"getsync", CTLADM_CMD_GETSYNC, CTLADM_ARG_NEED_TL, NULL}, - {"hardstart", CTLADM_CMD_HARDSTART, CTLADM_ARG_NONE, NULL}, - {"hardstop", CTLADM_CMD_HARDSTOP, CTLADM_ARG_NONE, NULL}, {"help", CTLADM_CMD_HELP, CTLADM_ARG_NONE, NULL}, {"inject", CTLADM_CMD_ERR_INJECT, CTLADM_ARG_NEED_TL, "cd:i:p:r:s:"}, {"inquiry", CTLADM_CMD_INQUIRY, CTLADM_ARG_NEED_TL, NULL}, @@ -228,11 +221,6 @@ static int cctl_do_io(int fd, int retrie static int cctl_delay(int fd, int target, int lun, int argc, char **argv, char *combinedopt); static int cctl_lunlist(int fd); -static void cctl_cfi_mt_statusstr(cfi_mt_status status, char *str, int str_len); -static void cctl_cfi_bbr_statusstr(cfi_bbrread_status, char *str, int str_len); -static int cctl_hardstopstart(int fd, ctladm_cmdfunction command); -static int cctl_bbrread(int fd, int target, int lun, int iid, int argc, - char **argv, char *combinedopt); static int cctl_startup_shutdown(int fd, int target, int lun, int iid, ctladm_cmdfunction command); static int cctl_sync_cache(int fd, int target, int lun, int iid, int retries, @@ -1341,180 +1329,6 @@ bailout: return (retval); } -static void -cctl_cfi_mt_statusstr(cfi_mt_status status, char *str, int str_len) -{ - switch (status) { - case CFI_MT_PORT_OFFLINE: - snprintf(str, str_len, "Port Offline"); - break; - case CFI_MT_ERROR: - snprintf(str, str_len, "Error"); - break; - case CFI_MT_SUCCESS: - snprintf(str, str_len, "Success"); - break; - case CFI_MT_NONE: - snprintf(str, str_len, "None??"); - break; - default: - snprintf(str, str_len, "Unknown status: %d", status); - break; - } -} - -static void -cctl_cfi_bbr_statusstr(cfi_bbrread_status status, char *str, int str_len) -{ - switch (status) { - case CFI_BBR_SUCCESS: - snprintf(str, str_len, "Success"); - break; - case CFI_BBR_LUN_UNCONFIG: - snprintf(str, str_len, "LUN not configured"); - break; - case CFI_BBR_NO_LUN: - snprintf(str, str_len, "LUN does not exist"); - break; - case CFI_BBR_NO_MEM: - snprintf(str, str_len, "Memory allocation error"); - break; - case CFI_BBR_BAD_LEN: - snprintf(str, str_len, "Length is not a multiple of blocksize"); - break; - case CFI_BBR_RESERV_CONFLICT: - snprintf(str, str_len, "Reservation conflict"); - break; - case CFI_BBR_LUN_STOPPED: - snprintf(str, str_len, "LUN is powered off"); - break; - case CFI_BBR_LUN_OFFLINE_CTL: - snprintf(str, str_len, "LUN is offline"); - break; - case CFI_BBR_LUN_OFFLINE_RC: - snprintf(str, str_len, "RAIDCore array is offline (double " - "failure?)"); - break; - case CFI_BBR_SCSI_ERROR: - snprintf(str, str_len, "SCSI Error"); - break; - case CFI_BBR_ERROR: - snprintf(str, str_len, "Error"); - break; - default: - snprintf(str, str_len, "Unknown status: %d", status); - break; - } -} - -static int -cctl_hardstopstart(int fd, ctladm_cmdfunction command) -{ - struct ctl_hard_startstop_info hs_info; - char error_str[256]; - int do_start; - int retval; - - retval = 0; - - if (command == CTLADM_CMD_HARDSTART) - do_start = 1; - else - do_start = 0; - - if (ioctl(fd, (do_start == 1) ? CTL_HARD_START : CTL_HARD_STOP, - &hs_info) == -1) { - warn("%s: CTL_HARD_%s ioctl failed", __func__, - (do_start == 1) ? "START" : "STOP"); - retval = 1; - goto bailout; - } - - fprintf(stdout, "Hard %s Status: ", (command == CTLADM_CMD_HARDSTOP) ? - "Stop" : "Start"); - cctl_cfi_mt_statusstr(hs_info.status, error_str, sizeof(error_str)); - fprintf(stdout, "%s\n", error_str); - fprintf(stdout, "Total LUNs: %d\n", hs_info.total_luns); - fprintf(stdout, "LUNs complete: %d\n", hs_info.luns_complete); - fprintf(stdout, "LUNs failed: %d\n", hs_info.luns_failed); - -bailout: - return (retval); -} - -static int -cctl_bbrread(int fd, int target __unused, int lun, int iid __unused, - int argc, char **argv, char *combinedopt) -{ - struct ctl_bbrread_info bbr_info; - char error_str[256]; - int datalen = -1; - uint64_t lba = 0; - int lba_set = 0; - int retval; - int c; - - retval = 0; - - while ((c = getopt(argc, argv, combinedopt)) != -1) { - switch (c) { - case 'd': - datalen = strtoul(optarg, NULL, 0); - break; - case 'l': - lba = strtoull(optarg, NULL, 0); - lba_set = 1; - break; - default: - break; - } - } - - if (lba_set == 0) { - warnx("%s: you must specify an LBA with -l", __func__); - retval = 1; - goto bailout; - } - - if (datalen == -1) { - warnx("%s: you must specify a length with -d", __func__); - retval = 1; - goto bailout; - } - - bbr_info.lun_num = lun; - bbr_info.lba = lba; - /* - * XXX KDM get the blocksize first?? - */ - if ((datalen % 512) != 0) { - warnx("%s: data length %d is not a multiple of 512 bytes", - __func__, datalen); - retval = 1; - goto bailout; - } - bbr_info.len = datalen; - - if (ioctl(fd, CTL_BBRREAD, &bbr_info) == -1) { - warn("%s: CTL_BBRREAD ioctl failed", __func__); - retval = 1; - goto bailout; - } - cctl_cfi_mt_statusstr(bbr_info.status, error_str, sizeof(error_str)); - fprintf(stdout, "BBR Read Overall Status: %s\n", error_str); - cctl_cfi_bbr_statusstr(bbr_info.bbr_status, error_str, - sizeof(error_str)); - fprintf(stdout, "BBR Read Status: %s\n", error_str); - /* - * XXX KDM should we bother printing out SCSI status if we get - * CFI_BBR_SCSI_ERROR back? - * - * Return non-zero if this fails? - */ -bailout: - return (retval); -} - static int cctl_startup_shutdown(int fd, int target, int lun, int iid, ctladm_cmdfunction command) @@ -4494,11 +4308,8 @@ usage(int error) " ctladm devlist [-b backend] [-v] [-x]\n" " ctladm shutdown\n" " ctladm startup\n" -" ctladm hardstop\n" -" ctladm hardstart\n" " ctladm lunlist\n" " ctladm lunmap -p targ_port [-l pLUN] [-L cLUN]\n" -" ctladm bbrread [dev_id] <-l lba> <-d datalen>\n" " ctladm delay [dev_id] <-l datamove|done> [-T oneshot|cont]\n" " [-t secs]\n" " ctladm realsync \n" @@ -4605,10 +4416,7 @@ usage(int error) "lunmap options:\n" "-p targ_port : specify target port number\n" "-L pLUN : specify port-visible LUN\n" -"-L cLUN : specify CTL LUN\n" -"bbrread options:\n" -"-l lba : starting LBA\n" -"-d datalen : length, in bytes, to read\n", +"-L cLUN : specify CTL LUN\n", CTL_DEFAULT_DEV); } @@ -4859,14 +4667,6 @@ main(int argc, char **argv) retval = cctl_startup_shutdown(fd, target, lun, initid, command); break; - case CTLADM_CMD_HARDSTOP: - case CTLADM_CMD_HARDSTART: - retval = cctl_hardstopstart(fd, command); - break; - case CTLADM_CMD_BBRREAD: - retval = cctl_bbrread(fd, target, lun, initid, argc, argv, - combinedopt); - break; case CTLADM_CMD_LUNLIST: retval = cctl_lunlist(fd); break; Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:41:32 2015 (r288718) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:42:43 2015 (r288719) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Mon Oct 5 08:43:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74B0CA10480; Mon, 5 Oct 2015 08:43:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64E6F137; Mon, 5 Oct 2015 08:43:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958hn9l013892; Mon, 5 Oct 2015 08:43:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958hmZF013884; Mon, 5 Oct 2015 08:43:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050843.t958hmZF013884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288720 - in stable/10/sys: cam/ctl conf modules/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:43:49 -0000 Author: mav Date: Mon Oct 5 08:43:47 2015 New Revision: 288720 URL: https://svnweb.freebsd.org/changeset/base/288720 Log: MFC r286807: Move "ioctl" CAM frontend into separate file. It has nothing to share with too huge ctl.c other then device descriptor, but even that may be counted as design error that may be fixed later. At some point we may even want to have several ioctl ports. Added: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c - copied unchanged from r286807, head/sys/cam/ctl/ctl_frontend_ioctl.c Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/conf/files stable/10/sys/modules/ctl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:42:43 2015 (r288719) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:43:47 2015 (r288720) @@ -384,15 +384,7 @@ static int ctl_init(void); void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); -static void ctl_ioctl_online(void *arg); -static void ctl_ioctl_offline(void *arg); -static int ctl_ioctl_lun_enable(void *arg, int lun_id); -static int ctl_ioctl_lun_disable(void *arg, int lun_id); -static int ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio); static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); -static int ctl_ioctl_submit_wait(union ctl_io *io); -static void ctl_ioctl_datamove(union ctl_io *io); -static void ctl_ioctl_done(union ctl_io *io); static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries); @@ -527,11 +519,6 @@ static moduledata_t ctl_moduledata = { DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD); MODULE_VERSION(ctl, 1); -static struct ctl_frontend ioctl_frontend = -{ - .name = "ioctl", -}; - #ifdef notyet static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, @@ -1062,7 +1049,6 @@ ctl_init(void) { struct ctl_softc *softc; void *other_pool; - struct ctl_port *port; int i, error, retval; //int isc_retval; @@ -1187,32 +1173,6 @@ ctl_init(void) return (error); } - /* - * Initialize the ioctl front end. - */ - ctl_frontend_register(&ioctl_frontend); - port = &softc->ioctl_info.port; - port->frontend = &ioctl_frontend; - sprintf(softc->ioctl_info.port_name, "ioctl"); - port->port_type = CTL_PORT_IOCTL; - port->num_requested_ctl_io = 100; - port->port_name = softc->ioctl_info.port_name; - port->port_online = ctl_ioctl_online; - port->port_offline = ctl_ioctl_offline; - port->onoff_arg = &softc->ioctl_info; - port->lun_enable = ctl_ioctl_lun_enable; - port->lun_disable = ctl_ioctl_lun_disable; - port->targ_lun_arg = &softc->ioctl_info; - port->fe_datamove = ctl_ioctl_datamove; - port->fe_done = ctl_ioctl_done; - port->max_targets = 15; - port->max_target_id = 15; - - if (ctl_port_register(&softc->ioctl_info.port) != 0) { - printf("ctl: ioctl front end registration failed, will " - "continue anyway\n"); - } - SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "ha_state", CTLTYPE_INT | CTLFLAG_RWTUN, softc, 0, ctl_ha_state_sysctl, "I", "HA state for this head"); @@ -1236,9 +1196,6 @@ ctl_shutdown(void) softc = (struct ctl_softc *)control_softc; - if (ctl_port_deregister(&softc->ioctl_info.port) != 0) - printf("ctl: ioctl front end deregistration failed\n"); - mtx_lock(&softc->ctl_lock); /* @@ -1251,8 +1208,6 @@ ctl_shutdown(void) mtx_unlock(&softc->ctl_lock); - ctl_frontend_deregister(&ioctl_frontend); - #if 0 ctl_shutdown_thread(softc->work_thread); mtx_destroy(&softc->queue_lock); @@ -1424,26 +1379,6 @@ ctl_port_list(struct ctl_port_entry *ent return (retval); } -static void -ctl_ioctl_online(void *arg) -{ - struct ctl_ioctl_info *ioctl_info; - - ioctl_info = (struct ctl_ioctl_info *)arg; - - ioctl_info->flags |= CTL_IOCTL_FLAG_ENABLED; -} - -static void -ctl_ioctl_offline(void *arg) -{ - struct ctl_ioctl_info *ioctl_info; - - ioctl_info = (struct ctl_ioctl_info *)arg; - - ioctl_info->flags &= ~CTL_IOCTL_FLAG_ENABLED; -} - /* * Remove an initiator by port number and initiator ID. * Returns 0 for success, -1 for failure. @@ -1639,181 +1574,6 @@ ctl_create_iid(struct ctl_port *port, in } } -static int -ctl_ioctl_lun_enable(void *arg, int lun_id) -{ - return (0); -} - -static int -ctl_ioctl_lun_disable(void *arg, int lun_id) -{ - return (0); -} - -/* - * Data movement routine for the CTL ioctl frontend port. - */ -static int -ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio) -{ - struct ctl_sg_entry *ext_sglist, *kern_sglist; - struct ctl_sg_entry ext_entry, kern_entry; - int ext_sglen, ext_sg_entries, kern_sg_entries; - int ext_sg_start, ext_offset; - int len_to_copy, len_copied; - int kern_watermark, ext_watermark; - int ext_sglist_malloced; - int i, j; - - ext_sglist_malloced = 0; - ext_sg_start = 0; - ext_offset = 0; - - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove\n")); - - /* - * If this flag is set, fake the data transfer. - */ - if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { - ctsio->ext_data_filled = ctsio->ext_data_len; - goto bailout; - } - - /* - * To simplify things here, if we have a single buffer, stick it in - * a S/G entry and just make it a single entry S/G list. - */ - if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { - int len_seen; - - ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); - - ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL, - M_WAITOK); - ext_sglist_malloced = 1; - if (copyin(ctsio->ext_data_ptr, ext_sglist, - ext_sglen) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - goto bailout; - } - ext_sg_entries = ctsio->ext_sg_entries; - len_seen = 0; - for (i = 0; i < ext_sg_entries; i++) { - if ((len_seen + ext_sglist[i].len) >= - ctsio->ext_data_filled) { - ext_sg_start = i; - ext_offset = ctsio->ext_data_filled - len_seen; - break; - } - len_seen += ext_sglist[i].len; - } - } else { - ext_sglist = &ext_entry; - ext_sglist->addr = ctsio->ext_data_ptr; - ext_sglist->len = ctsio->ext_data_len; - ext_sg_entries = 1; - ext_sg_start = 0; - ext_offset = ctsio->ext_data_filled; - } - - if (ctsio->kern_sg_entries > 0) { - kern_sglist = (struct ctl_sg_entry *)ctsio->kern_data_ptr; - kern_sg_entries = ctsio->kern_sg_entries; - } else { - kern_sglist = &kern_entry; - kern_sglist->addr = ctsio->kern_data_ptr; - kern_sglist->len = ctsio->kern_data_len; - kern_sg_entries = 1; - } - - - kern_watermark = 0; - ext_watermark = ext_offset; - len_copied = 0; - for (i = ext_sg_start, j = 0; - i < ext_sg_entries && j < kern_sg_entries;) { - uint8_t *ext_ptr, *kern_ptr; - - len_to_copy = MIN(ext_sglist[i].len - ext_watermark, - kern_sglist[j].len - kern_watermark); - - ext_ptr = (uint8_t *)ext_sglist[i].addr; - ext_ptr = ext_ptr + ext_watermark; - if (ctsio->io_hdr.flags & CTL_FLAG_BUS_ADDR) { - /* - * XXX KDM fix this! - */ - panic("need to implement bus address support"); -#if 0 - kern_ptr = bus_to_virt(kern_sglist[j].addr); -#endif - } else - kern_ptr = (uint8_t *)kern_sglist[j].addr; - kern_ptr = kern_ptr + kern_watermark; - - kern_watermark += len_to_copy; - ext_watermark += len_to_copy; - - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == - CTL_FLAG_DATA_IN) { - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " - "bytes to user\n", len_to_copy)); - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " - "to %p\n", kern_ptr, ext_ptr)); - if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); - goto bailout; - } - } else { - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " - "bytes from user\n", len_to_copy)); - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " - "to %p\n", ext_ptr, kern_ptr)); - if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){ - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/0); - goto bailout; - } - } - - len_copied += len_to_copy; - - if (ext_sglist[i].len == ext_watermark) { - i++; - ext_watermark = 0; - } - - if (kern_sglist[j].len == kern_watermark) { - j++; - kern_watermark = 0; - } - } - - ctsio->ext_data_filled += len_copied; - - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, " - "kern_sg_entries: %d\n", ext_sg_entries, - kern_sg_entries)); - CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_data_len = %d, " - "kern_data_len = %d\n", ctsio->ext_data_len, - ctsio->kern_data_len)); - - - /* XXX KDM set residual?? */ -bailout: - - if (ext_sglist_malloced != 0) - free(ext_sglist, M_CTL); - - return (CTL_RETVAL_COMPLETE); -} - /* * Serialize a command that went down the "wrong" side, and so was sent to * this controller for execution. The logic is a little different than the @@ -1980,117 +1740,6 @@ ctl_serialize_other_sc_cmd(struct ctl_sc return (retval); } -static int -ctl_ioctl_submit_wait(union ctl_io *io) -{ - struct ctl_fe_ioctl_params params; - ctl_fe_ioctl_state last_state; - int done, retval; - - retval = 0; - - bzero(¶ms, sizeof(params)); - - mtx_init(¶ms.ioctl_mtx, "ctliocmtx", NULL, MTX_DEF); - cv_init(¶ms.sem, "ctlioccv"); - params.state = CTL_IOCTL_INPROG; - last_state = params.state; - - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ¶ms; - - CTL_DEBUG_PRINT(("ctl_ioctl_submit_wait\n")); - - /* This shouldn't happen */ - if ((retval = ctl_queue(io)) != CTL_RETVAL_COMPLETE) - return (retval); - - done = 0; - - do { - mtx_lock(¶ms.ioctl_mtx); - /* - * Check the state here, and don't sleep if the state has - * already changed (i.e. wakeup has already occured, but we - * weren't waiting yet). - */ - if (params.state == last_state) { - /* XXX KDM cv_wait_sig instead? */ - cv_wait(¶ms.sem, ¶ms.ioctl_mtx); - } - last_state = params.state; - - switch (params.state) { - case CTL_IOCTL_INPROG: - /* Why did we wake up? */ - /* XXX KDM error here? */ - mtx_unlock(¶ms.ioctl_mtx); - break; - case CTL_IOCTL_DATAMOVE: - CTL_DEBUG_PRINT(("got CTL_IOCTL_DATAMOVE\n")); - - /* - * change last_state back to INPROG to avoid - * deadlock on subsequent data moves. - */ - params.state = last_state = CTL_IOCTL_INPROG; - - mtx_unlock(¶ms.ioctl_mtx); - ctl_ioctl_do_datamove(&io->scsiio); - /* - * Note that in some cases, most notably writes, - * this will queue the I/O and call us back later. - * In other cases, generally reads, this routine - * will immediately call back and wake us up, - * probably using our own context. - */ - io->scsiio.be_move_done(io); - break; - case CTL_IOCTL_DONE: - mtx_unlock(¶ms.ioctl_mtx); - CTL_DEBUG_PRINT(("got CTL_IOCTL_DONE\n")); - done = 1; - break; - default: - mtx_unlock(¶ms.ioctl_mtx); - /* XXX KDM error here? */ - break; - } - } while (done == 0); - - mtx_destroy(¶ms.ioctl_mtx); - cv_destroy(¶ms.sem); - - return (CTL_RETVAL_COMPLETE); -} - -static void -ctl_ioctl_datamove(union ctl_io *io) -{ - struct ctl_fe_ioctl_params *params; - - params = (struct ctl_fe_ioctl_params *) - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; - - mtx_lock(¶ms->ioctl_mtx); - params->state = CTL_IOCTL_DATAMOVE; - cv_broadcast(¶ms->sem); - mtx_unlock(¶ms->ioctl_mtx); -} - -static void -ctl_ioctl_done(union ctl_io *io) -{ - struct ctl_fe_ioctl_params *params; - - params = (struct ctl_fe_ioctl_params *) - io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; - - mtx_lock(¶ms->ioctl_mtx); - params->state = CTL_IOCTL_DONE; - cv_broadcast(¶ms->sem); - mtx_unlock(¶ms->ioctl_mtx); -} - /* * Returns 0 for success, errno for failure. */ @@ -2333,57 +1982,9 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = 0; switch (cmd) { - case CTL_IO: { - union ctl_io *io; - void *pool_tmp; - - /* - * If we haven't been "enabled", don't allow any SCSI I/O - * to this FETD. - */ - if ((softc->ioctl_info.flags & CTL_IOCTL_FLAG_ENABLED) == 0) { - retval = EPERM; - break; - } - - io = ctl_alloc_io(softc->ioctl_info.port.ctl_pool_ref); - - /* - * Need to save the pool reference so it doesn't get - * spammed by the user's ctl_io. - */ - pool_tmp = io->io_hdr.pool; - memcpy(io, (void *)addr, sizeof(*io)); - io->io_hdr.pool = pool_tmp; - - /* - * No status yet, so make sure the status is set properly. - */ - io->io_hdr.status = CTL_STATUS_NONE; - - /* - * The user sets the initiator ID, target and LUN IDs. - */ - io->io_hdr.nexus.targ_port = softc->ioctl_info.port.targ_port; - io->io_hdr.flags |= CTL_FLAG_USER_REQ; - if ((io->io_hdr.io_type == CTL_IO_SCSI) - && (io->scsiio.tag_type != CTL_TAG_UNTAGGED)) - io->scsiio.tag_num = softc->ioctl_info.cur_tag_num++; - - retval = ctl_ioctl_submit_wait(io); - - if (retval != 0) { - ctl_free_io(io); - break; - } - - memcpy((void *)addr, io, sizeof(*io)); - - /* return this to our pool */ - ctl_free_io(io); - + case CTL_IO: + retval = ctl_ioctl_io(dev, cmd, addr, flag, td); break; - } case CTL_ENABLE_PORT: case CTL_DISABLE_PORT: case CTL_SET_PORT_WWNS: { Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:42:43 2015 (r288719) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:43:47 2015 (r288720) @@ -194,6 +194,8 @@ void ctl_portDB_changed(int portnum); #ifdef notyet void ctl_init_isc_msg(void); #endif +int ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td); /* * KPI to manipulate LUN/port options Copied: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c (from r286807, head/sys/cam/ctl/ctl_frontend_ioctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 08:43:47 2015 (r288720, copy of r286807, head/sys/cam/ctl/ctl_frontend_ioctl.c) @@ -0,0 +1,470 @@ +/*- + * Copyright (c) 2003-2009 Silicon Graphics International Corp. + * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2015 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct cfi_softc { + uint32_t cur_tag_num; + struct ctl_port port; +}; + +static struct cfi_softc cfi_softc; + +static int cfi_init(void); +static void cfi_shutdown(void); +static void cfi_online(void *arg); +static void cfi_offline(void *arg); +static int cfi_lun_enable(void *arg, int lun_id); +static int cfi_lun_disable(void *arg, int lun_id); +static void cfi_datamove(union ctl_io *io); +static void cfi_done(union ctl_io *io); + +static struct ctl_frontend cfi_frontend = +{ + .name = "ioctl", + .init = cfi_init, + .shutdown = cfi_shutdown, +}; +CTL_FRONTEND_DECLARE(ctlioctl, cfi_frontend); + +static int +cfi_init(void) +{ + struct cfi_softc *isoftc = &cfi_softc; + struct ctl_port *port; + + memset(isoftc, 0, sizeof(*isoftc)); + + port = &isoftc->port; + port->frontend = &cfi_frontend; + port->port_type = CTL_PORT_IOCTL; + port->num_requested_ctl_io = 100; + port->port_name = "ioctl"; + port->port_online = cfi_online; + port->port_offline = cfi_offline; + port->onoff_arg = &isoftc; + port->lun_enable = cfi_lun_enable; + port->lun_disable = cfi_lun_disable; + port->targ_lun_arg = &isoftc; + port->fe_datamove = cfi_datamove; + port->fe_done = cfi_done; + port->max_targets = 1; + port->max_target_id = 0; + port->max_initiators = 1; + + if (ctl_port_register(port) != 0) { + printf("%s: ioctl port registration failed\n", __func__); + return (0); + } + ctl_port_online(port); + return (0); +} + +void +cfi_shutdown(void) +{ + struct cfi_softc *isoftc = &cfi_softc; + struct ctl_port *port; + + port = &isoftc->port; + ctl_port_offline(port); + if (ctl_port_deregister(&isoftc->port) != 0) + printf("%s: ctl_frontend_deregister() failed\n", __func__); +} + +static void +cfi_online(void *arg) +{ +} + +static void +cfi_offline(void *arg) +{ +} + +static int +cfi_lun_enable(void *arg, int lun_id) +{ + + return (0); +} + +static int +cfi_lun_disable(void *arg, int lun_id) +{ + + return (0); +} + +/* + * Data movement routine for the CTL ioctl frontend port. + */ +static int +ctl_ioctl_do_datamove(struct ctl_scsiio *ctsio) +{ + struct ctl_sg_entry *ext_sglist, *kern_sglist; + struct ctl_sg_entry ext_entry, kern_entry; + int ext_sglen, ext_sg_entries, kern_sg_entries; + int ext_sg_start, ext_offset; + int len_to_copy, len_copied; + int kern_watermark, ext_watermark; + int ext_sglist_malloced; + int i, j; + + ext_sglist_malloced = 0; + ext_sg_start = 0; + ext_offset = 0; + + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove\n")); + + /* + * If this flag is set, fake the data transfer. + */ + if (ctsio->io_hdr.flags & CTL_FLAG_NO_DATAMOVE) { + ctsio->ext_data_filled = ctsio->ext_data_len; + goto bailout; + } + + /* + * To simplify things here, if we have a single buffer, stick it in + * a S/G entry and just make it a single entry S/G list. + */ + if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { + int len_seen; + + ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); + + ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL, + M_WAITOK); + ext_sglist_malloced = 1; + if (copyin(ctsio->ext_data_ptr, ext_sglist, + ext_sglen) != 0) { + ctl_set_internal_failure(ctsio, + /*sks_valid*/ 0, + /*retry_count*/ 0); + goto bailout; + } + ext_sg_entries = ctsio->ext_sg_entries; + len_seen = 0; + for (i = 0; i < ext_sg_entries; i++) { + if ((len_seen + ext_sglist[i].len) >= + ctsio->ext_data_filled) { + ext_sg_start = i; + ext_offset = ctsio->ext_data_filled - len_seen; + break; + } + len_seen += ext_sglist[i].len; + } + } else { + ext_sglist = &ext_entry; + ext_sglist->addr = ctsio->ext_data_ptr; + ext_sglist->len = ctsio->ext_data_len; + ext_sg_entries = 1; + ext_sg_start = 0; + ext_offset = ctsio->ext_data_filled; + } + + if (ctsio->kern_sg_entries > 0) { + kern_sglist = (struct ctl_sg_entry *)ctsio->kern_data_ptr; + kern_sg_entries = ctsio->kern_sg_entries; + } else { + kern_sglist = &kern_entry; + kern_sglist->addr = ctsio->kern_data_ptr; + kern_sglist->len = ctsio->kern_data_len; + kern_sg_entries = 1; + } + + + kern_watermark = 0; + ext_watermark = ext_offset; + len_copied = 0; + for (i = ext_sg_start, j = 0; + i < ext_sg_entries && j < kern_sg_entries;) { + uint8_t *ext_ptr, *kern_ptr; + + len_to_copy = MIN(ext_sglist[i].len - ext_watermark, + kern_sglist[j].len - kern_watermark); + + ext_ptr = (uint8_t *)ext_sglist[i].addr; + ext_ptr = ext_ptr + ext_watermark; + if (ctsio->io_hdr.flags & CTL_FLAG_BUS_ADDR) { + /* + * XXX KDM fix this! + */ + panic("need to implement bus address support"); +#if 0 + kern_ptr = bus_to_virt(kern_sglist[j].addr); +#endif + } else + kern_ptr = (uint8_t *)kern_sglist[j].addr; + kern_ptr = kern_ptr + kern_watermark; + + kern_watermark += len_to_copy; + ext_watermark += len_to_copy; + + if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == + CTL_FLAG_DATA_IN) { + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " + "bytes to user\n", len_to_copy)); + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " + "to %p\n", kern_ptr, ext_ptr)); + if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) { + ctl_set_internal_failure(ctsio, + /*sks_valid*/ 0, + /*retry_count*/ 0); + goto bailout; + } + } else { + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: copying %d " + "bytes from user\n", len_to_copy)); + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " + "to %p\n", ext_ptr, kern_ptr)); + if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){ + ctl_set_internal_failure(ctsio, + /*sks_valid*/ 0, + /*retry_count*/0); + goto bailout; + } + } + + len_copied += len_to_copy; + + if (ext_sglist[i].len == ext_watermark) { + i++; + ext_watermark = 0; + } + + if (kern_sglist[j].len == kern_watermark) { + j++; + kern_watermark = 0; + } + } + + ctsio->ext_data_filled += len_copied; + + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_sg_entries: %d, " + "kern_sg_entries: %d\n", ext_sg_entries, + kern_sg_entries)); + CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: ext_data_len = %d, " + "kern_data_len = %d\n", ctsio->ext_data_len, + ctsio->kern_data_len)); + + + /* XXX KDM set residual?? */ +bailout: + + if (ext_sglist_malloced != 0) + free(ext_sglist, M_CTL); + + return (CTL_RETVAL_COMPLETE); +} + +static void +cfi_datamove(union ctl_io *io) +{ + struct ctl_fe_ioctl_params *params; + + params = (struct ctl_fe_ioctl_params *) + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + + mtx_lock(¶ms->ioctl_mtx); + params->state = CTL_IOCTL_DATAMOVE; + cv_broadcast(¶ms->sem); + mtx_unlock(¶ms->ioctl_mtx); +} + +static void +cfi_done(union ctl_io *io) +{ + struct ctl_fe_ioctl_params *params; + + params = (struct ctl_fe_ioctl_params *) + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; + + mtx_lock(¶ms->ioctl_mtx); + params->state = CTL_IOCTL_DONE; + cv_broadcast(¶ms->sem); + mtx_unlock(¶ms->ioctl_mtx); +} + +static int +cfi_submit_wait(union ctl_io *io) +{ + struct ctl_fe_ioctl_params params; + ctl_fe_ioctl_state last_state; + int done, retval; + + retval = 0; + + bzero(¶ms, sizeof(params)); + + mtx_init(¶ms.ioctl_mtx, "ctliocmtx", NULL, MTX_DEF); + cv_init(¶ms.sem, "ctlioccv"); + params.state = CTL_IOCTL_INPROG; + last_state = params.state; + + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = ¶ms; + + CTL_DEBUG_PRINT(("cfi_submit_wait\n")); + + /* This shouldn't happen */ + if ((retval = ctl_queue(io)) != CTL_RETVAL_COMPLETE) + return (retval); + + done = 0; + + do { + mtx_lock(¶ms.ioctl_mtx); + /* + * Check the state here, and don't sleep if the state has + * already changed (i.e. wakeup has already occured, but we + * weren't waiting yet). + */ + if (params.state == last_state) { + /* XXX KDM cv_wait_sig instead? */ + cv_wait(¶ms.sem, ¶ms.ioctl_mtx); + } + last_state = params.state; + + switch (params.state) { + case CTL_IOCTL_INPROG: + /* Why did we wake up? */ + /* XXX KDM error here? */ + mtx_unlock(¶ms.ioctl_mtx); + break; + case CTL_IOCTL_DATAMOVE: + CTL_DEBUG_PRINT(("got CTL_IOCTL_DATAMOVE\n")); + + /* + * change last_state back to INPROG to avoid + * deadlock on subsequent data moves. + */ + params.state = last_state = CTL_IOCTL_INPROG; + + mtx_unlock(¶ms.ioctl_mtx); + ctl_ioctl_do_datamove(&io->scsiio); + /* + * Note that in some cases, most notably writes, + * this will queue the I/O and call us back later. + * In other cases, generally reads, this routine + * will immediately call back and wake us up, + * probably using our own context. + */ + io->scsiio.be_move_done(io); + break; + case CTL_IOCTL_DONE: + mtx_unlock(¶ms.ioctl_mtx); + CTL_DEBUG_PRINT(("got CTL_IOCTL_DONE\n")); + done = 1; + break; + default: + mtx_unlock(¶ms.ioctl_mtx); + /* XXX KDM error here? */ + break; + } + } while (done == 0); + + mtx_destroy(¶ms.ioctl_mtx); + cv_destroy(¶ms.sem); + + return (CTL_RETVAL_COMPLETE); +} + +int +ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td) +{ + union ctl_io *io; + void *pool_tmp; + int retval = 0; + + /* + * If we haven't been "enabled", don't allow any SCSI I/O + * to this FETD. + */ + if ((cfi_softc.port.status & CTL_PORT_STATUS_ONLINE) == 0) + return (EPERM); + + io = ctl_alloc_io(cfi_softc.port.ctl_pool_ref); + + /* + * Need to save the pool reference so it doesn't get + * spammed by the user's ctl_io. + */ + pool_tmp = io->io_hdr.pool; + memcpy(io, (void *)addr, sizeof(*io)); + io->io_hdr.pool = pool_tmp; + + /* + * No status yet, so make sure the status is set properly. + */ + io->io_hdr.status = CTL_STATUS_NONE; + + /* + * The user sets the initiator ID, target and LUN IDs. + */ + io->io_hdr.nexus.targ_port = cfi_softc.port.targ_port; + io->io_hdr.flags |= CTL_FLAG_USER_REQ; + if ((io->io_hdr.io_type == CTL_IO_SCSI) && + (io->scsiio.tag_type != CTL_TAG_UNTAGGED)) + io->scsiio.tag_num = cfi_softc.cur_tag_num++; + + retval = cfi_submit_wait(io); + if (retval == 0) + memcpy((void *)addr, io, sizeof(*io)); + ctl_free_io(io); + return (retval); +} Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 08:42:43 2015 (r288719) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 08:43:47 2015 (r288720) @@ -69,18 +69,6 @@ struct ctl_io_pool { }; typedef enum { - CTL_IOCTL_FLAG_NONE = 0x00, - CTL_IOCTL_FLAG_ENABLED = 0x01 -} ctl_ioctl_flags; - -struct ctl_ioctl_info { - ctl_ioctl_flags flags; - uint32_t cur_tag_num; - struct ctl_port port; - char port_name[24]; -}; - -typedef enum { CTL_SER_BLOCK, CTL_SER_BLOCKOPT, CTL_SER_EXTENT, @@ -460,7 +448,6 @@ struct ctl_softc { int inquiry_pq_no_lun; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; - struct ctl_ioctl_info ioctl_info; void *othersc_pool; struct proc *ctl_proc; int targ_online; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Oct 5 08:42:43 2015 (r288719) +++ stable/10/sys/conf/files Mon Oct 5 08:43:47 2015 (r288720) @@ -83,6 +83,7 @@ cam/ctl/ctl_backend_ramdisk.c optional c cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl +cam/ctl/ctl_frontend_ioctl.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 08:44:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C818A1052E; Mon, 5 Oct 2015 08:44:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA26289; Mon, 5 Oct 2015 08:44:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958ieTM013995; Mon, 5 Oct 2015 08:44:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958ietL013994; Mon, 5 Oct 2015 08:44:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050844.t958ietL013994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288721 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:44:40 -0000 Author: mav Date: Mon Oct 5 08:44:39 2015 New Revision: 288721 URL: https://svnweb.freebsd.org/changeset/base/288721 Log: MFC r286811: Polish sizes processing. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:43:47 2015 (r288720) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:44:39 2015 (r288721) @@ -171,7 +171,6 @@ struct ctl_be_block_lun { uint64_t size_blocks; uint64_t size_bytes; uint32_t blocksize; - int blocksize_shift; uint16_t pblockexp; uint16_t pblockoff; uint16_t ublockexp; @@ -775,7 +774,7 @@ ctl_be_block_gls_file(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) << be_lun->blocksize_shift; + off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = VOP_IOCTL(be_lun->vn, FIOSEEKHOLE, &off, 0, curthread->td_ucred, curthread); @@ -793,10 +792,9 @@ ctl_be_block_gls_file(struct ctl_be_bloc } VOP_UNLOCK(be_lun->vn, 0); - off >>= be_lun->blocksize_shift; data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off - lbalen->lba), + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), data->descr[0].length); data->descr[0].status = status; @@ -818,14 +816,14 @@ ctl_be_block_getattr_file(struct ctl_be_ if (strcmp(attrname, "blocksused") == 0) { error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); if (error == 0) - val = vattr.va_bytes >> be_lun->blocksize_shift; + val = vattr.va_bytes / be_lun->blocksize; } if (strcmp(attrname, "blocksavail") == 0 && (be_lun->vn->v_iflag & VI_DOOMED) == 0) { error = VFS_STATFS(be_lun->vn->v_mount, &statfs); if (error == 0) - val = (statfs.f_bavail * statfs.f_bsize) >> - be_lun->blocksize_shift; + val = statfs.f_bavail * statfs.f_bsize / + be_lun->blocksize; } VOP_UNLOCK(be_lun->vn, 0); return (val); @@ -936,7 +934,7 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) << be_lun->blocksize_shift; + off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; error = (*dev_data->csw->d_ioctl)(dev_data->cdev, FIOSEEKHOLE, (caddr_t)&off, FREAD, curthread); if (error == 0 && off > roff) @@ -952,10 +950,9 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc } } - off >>= be_lun->blocksize_shift; data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off - lbalen->lba), + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), data->descr[0].length); data->descr[0].status = status; @@ -1868,7 +1865,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdevsw *devsw; char *value; int error, atomic, maxio, unmap; - off_t ps, pss, po, pos, us, uss, uo, uos; + off_t ps, pss, po, pos, us, uss, uo, uos, tmp; params = &be_lun->params; @@ -1911,8 +1908,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc return (ENODEV); } - error = devsw->d_ioctl(dev, DIOCGSECTORSIZE, - (caddr_t)&be_lun->blocksize, FREAD, + error = devsw->d_ioctl(dev, DIOCGSECTORSIZE, (caddr_t)&tmp, FREAD, curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), @@ -1927,15 +1923,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc * the user is asking for is an even multiple of the underlying * device's blocksize. */ - if ((params->blocksize_bytes != 0) - && (params->blocksize_bytes > be_lun->blocksize)) { - uint32_t bs_multiple, tmp_blocksize; - - bs_multiple = params->blocksize_bytes / be_lun->blocksize; - - tmp_blocksize = bs_multiple * be_lun->blocksize; - - if (tmp_blocksize == params->blocksize_bytes) { + if ((params->blocksize_bytes != 0) && + (params->blocksize_bytes >= tmp)) { + if (params->blocksize_bytes % tmp == 0) { be_lun->blocksize = params->blocksize_bytes; } else { snprintf(req->error_str, sizeof(req->error_str), @@ -1946,17 +1936,16 @@ ctl_be_block_open_dev(struct ctl_be_bloc return (EINVAL); } - } else if ((params->blocksize_bytes != 0) - && (params->blocksize_bytes != be_lun->blocksize)) { + } else if (params->blocksize_bytes != 0) { snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u < backing device " "blocksize %u", params->blocksize_bytes, be_lun->blocksize); return (EINVAL); - } + } else + be_lun->blocksize = tmp; - error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, - (caddr_t)&be_lun->size_bytes, FREAD, + error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&tmp, FREAD, curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), @@ -1967,7 +1956,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc } if (params->lun_size_bytes != 0) { - if (params->lun_size_bytes > be_lun->size_bytes) { + if (params->lun_size_bytes > tmp) { snprintf(req->error_str, sizeof(req->error_str), "requested LUN size %ju > backing device " "size %ju", @@ -1977,7 +1966,8 @@ ctl_be_block_open_dev(struct ctl_be_bloc } be_lun->size_bytes = params->lun_size_bytes; - } + } else + be_lun->size_bytes = tmp; error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, curthread); @@ -2173,14 +2163,8 @@ ctl_be_block_open(struct ctl_be_block_so } VOP_UNLOCK(be_lun->vn, 0); - if (error != 0) { + if (error != 0) ctl_be_block_close(be_lun); - return (error); - } - - be_lun->blocksize_shift = fls(be_lun->blocksize) - 1; - be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; - return (0); } @@ -2237,10 +2221,14 @@ ctl_be_block_create(struct ctl_be_block_ goto bailout_error; } be_lun->dev_path = strdup(value, M_CTLBLK); - be_lun->blocksize = 512; - be_lun->blocksize_shift = fls(be_lun->blocksize) - 1; + be_lun->size_bytes = params->lun_size_bytes; + if (params->blocksize_bytes != 0) + be_lun->blocksize = params->blocksize_bytes; + else + be_lun->blocksize = 512; retval = ctl_be_block_open(softc, be_lun, req); + be_lun->size_blocks = be_lun->size_bytes / be_lun->blocksize; if (retval != 0) { retval = 0; req->status = CTL_LUN_WARNING; @@ -2665,10 +2653,9 @@ ctl_be_block_modify(struct ctl_be_block_ error = ctl_be_block_modify_file(be_lun, req); else error = EINVAL; + be_lun->size_blocks = be_lun->size_bytes / be_lun->blocksize; if (error == 0 && be_lun->size_bytes != oldsize) { - be_lun->size_blocks = be_lun->size_bytes >> - be_lun->blocksize_shift; /* * The maximum LBA is the size - 1. From owner-svn-src-all@freebsd.org Mon Oct 5 08:45:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C336EA10677; Mon, 5 Oct 2015 08:45:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AD9763F; Mon, 5 Oct 2015 08:45:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958jvAA014106; Mon, 5 Oct 2015 08:45:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958jvfV014105; Mon, 5 Oct 2015 08:45:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050845.t958jvfV014105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288722 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:45:57 -0000 Author: mav Date: Mon Oct 5 08:45:56 2015 New Revision: 288722 URL: https://svnweb.freebsd.org/changeset/base/288722 Log: MFC r287221: Fix type bug introduced at r286811. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:44:39 2015 (r288721) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:45:56 2015 (r288722) @@ -1864,8 +1864,8 @@ ctl_be_block_open_dev(struct ctl_be_bloc struct cdev *dev; struct cdevsw *devsw; char *value; - int error, atomic, maxio, unmap; - off_t ps, pss, po, pos, us, uss, uo, uos, tmp; + int error, atomic, maxio, unmap, tmp; + off_t ps, pss, po, pos, us, uss, uo, uos, otmp; params = &be_lun->params; @@ -1931,21 +1931,19 @@ ctl_be_block_open_dev(struct ctl_be_bloc snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u is not an even " "multiple of backing device blocksize %u", - params->blocksize_bytes, - be_lun->blocksize); + params->blocksize_bytes, tmp); return (EINVAL); } } else if (params->blocksize_bytes != 0) { snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u < backing device " - "blocksize %u", params->blocksize_bytes, - be_lun->blocksize); + "blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); } else be_lun->blocksize = tmp; - error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&tmp, FREAD, + error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), @@ -1956,18 +1954,18 @@ ctl_be_block_open_dev(struct ctl_be_bloc } if (params->lun_size_bytes != 0) { - if (params->lun_size_bytes > tmp) { + if (params->lun_size_bytes > otmp) { snprintf(req->error_str, sizeof(req->error_str), "requested LUN size %ju > backing device " "size %ju", (uintmax_t)params->lun_size_bytes, - (uintmax_t)be_lun->size_bytes); + (uintmax_t)otmp); return (EINVAL); } be_lun->size_bytes = params->lun_size_bytes; } else - be_lun->size_bytes = tmp; + be_lun->size_bytes = otmp; error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, curthread); From owner-svn-src-all@freebsd.org Mon Oct 5 08:46:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 393E6A10718; Mon, 5 Oct 2015 08:46:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7EF83A; Mon, 5 Oct 2015 08:46:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958kmXq014243; Mon, 5 Oct 2015 08:46:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958km6R014240; Mon, 5 Oct 2015 08:46:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050846.t958km6R014240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288723 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:46:49 -0000 Author: mav Date: Mon Oct 5 08:46:48 2015 New Revision: 288723 URL: https://svnweb.freebsd.org/changeset/base/288723 Log: MFC r287293: Remove 600 bytes of port_priv from struct ctl_io_hdr. This field used only for camtgt frontend, and once it any way preallocates all requests, let it preallocate this memory too, not bothering core code. Modified: stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:45:56 2015 (r288722) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:46:48 2015 (r288723) @@ -173,35 +173,11 @@ union ctl_priv { #define CTL_PRIV_MODEPAGE 1 /* Modepage info for config write */ #define CTL_PRIV_BACKEND 2 /* Reserved for block, RAIDCore */ #define CTL_PRIV_BACKEND_LUN 3 /* Backend LUN pointer */ -#define CTL_PRIV_FRONTEND 4 /* LSI driver, ioctl front end */ -#define CTL_PRIV_USER 5 /* Userland use */ +#define CTL_PRIV_FRONTEND 4 /* Frontend storage */ +#define CTL_PRIV_FRONTEND2 5 /* Another frontend storage */ #define CTL_INVALID_PORTNAME 0xFF #define CTL_UNMAPPED_IID 0xFF -/* - * XXX KDM this size is for the port_priv variable in struct ctl_io_hdr - * below. This should be defined in terms of the size of struct - * ctlfe_lun_cmd_info at the moment: - * struct ctlfe_lun_cmd_info { - * int cur_transfer_index; - * ctlfe_cmd_flags flags; - * bus_dma_segment_t cam_sglist[32]; - * }; - * - * This isn't really the way I'd prefer to do it, but it does make some - * sense, AS LONG AS we can guarantee that there will always only be one - * outstanding DMA request per ctl_io. If that assumption isn't valid, - * then we've got problems. - * - * At some point it may be nice switch CTL over to using CCBs for - * everything. At that point we can probably use the ATIO/CTIO model, so - * that multiple simultaneous DMAs per command will just work. - * - * Also note that the current size, 600, is appropriate for 64-bit - * architectures, but is overkill for 32-bit architectures. Need a way to - * figure out the size at compile time, or just get rid of this altogether. - */ -#define CTL_PORT_PRIV_SIZE 600 struct ctl_sg_entry { void *addr; @@ -268,7 +244,6 @@ struct ctl_io_hdr { union ctl_io *serializing_sc; void *pool; /* I/O pool */ union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ - uint8_t port_priv[CTL_PORT_PRIV_SIZE];/* PORT private area*/ struct ctl_sg_entry remote_sglist[CTL_NUM_SG_ENTRIES]; struct ctl_sg_entry remote_dma_sglist[CTL_NUM_SG_ENTRIES]; struct ctl_sg_entry local_sglist[CTL_NUM_SG_ENTRIES]; Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:45:56 2015 (r288722) +++ stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:46:48 2015 (r288723) @@ -119,11 +119,7 @@ typedef enum { CTLFE_CMD_PIECEWISE = 0x01 } ctlfe_cmd_flags; -/* - * The size limit of this structure is CTL_PORT_PRIV_SIZE, from ctl_io.h. - * Currently that is 600 bytes. - */ -struct ctlfe_lun_cmd_info { +struct ctlfe_cmd_info { int cur_transfer_index; size_t cur_transfer_off; ctlfe_cmd_flags flags; @@ -135,7 +131,6 @@ struct ctlfe_lun_cmd_info { #define CTLFE_MAX_SEGS 32 bus_dma_segment_t cam_sglist[CTLFE_MAX_SEGS]; }; -CTASSERT(sizeof(struct ctlfe_lun_cmd_info) <= CTL_PORT_PRIV_SIZE); /* * When we register the adapter/bus, request that this many ctl_ios be @@ -533,6 +528,7 @@ ctlferegister(struct cam_periph *periph, for (i = 0; i < CTLFE_ATIO_PER_LUN; i++) { union ccb *new_ccb; union ctl_io *new_io; + struct ctlfe_cmd_info *cmd_info; new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE, M_ZERO|M_NOWAIT); @@ -546,6 +542,15 @@ ctlferegister(struct cam_periph *periph, status = CAM_RESRC_UNAVAIL; break; } + cmd_info = malloc(sizeof(*cmd_info), M_CTLFE, + M_ZERO | M_NOWAIT); + if (cmd_info == NULL) { + ctl_free_io(new_io); + free(new_ccb, M_CTLFE); + status = CAM_RESRC_UNAVAIL; + break; + } + new_io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr = cmd_info; softc->atios_alloced++; new_ccb->ccb_h.io_ptr = new_io; @@ -556,6 +561,7 @@ ctlferegister(struct cam_periph *periph, xpt_action(new_ccb); status = new_ccb->ccb_h.status; if ((status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { + free(cmd_info, M_CTLFE); ctl_free_io(new_io); free(new_ccb, M_CTLFE); break; @@ -686,13 +692,13 @@ ctlfedata(struct ctlfe_lun_softc *softc, u_int16_t *sglist_cnt) { struct ctlfe_softc *bus_softc; - struct ctlfe_lun_cmd_info *cmd_info; + struct ctlfe_cmd_info *cmd_info; struct ctl_sg_entry *ctl_sglist; bus_dma_segment_t *cam_sglist; size_t off; int i, idx; - cmd_info = (struct ctlfe_lun_cmd_info *)io->io_hdr.port_priv; + cmd_info = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr; bus_softc = softc->parent_softc; /* @@ -768,7 +774,7 @@ static void ctlfestart(struct cam_periph *periph, union ccb *start_ccb) { struct ctlfe_lun_softc *softc; - struct ctlfe_lun_cmd_info *cmd_info; + struct ctlfe_cmd_info *cmd_info; struct ccb_hdr *ccb_h; struct ccb_accept_tio *atio; struct ccb_scsiio *csio; @@ -796,7 +802,7 @@ ctlfestart(struct cam_periph *periph, un flags = atio->ccb_h.flags & (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK); - cmd_info = (struct ctlfe_lun_cmd_info *)io->io_hdr.port_priv; + cmd_info = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr; cmd_info->cur_transfer_index = 0; cmd_info->cur_transfer_off = 0; cmd_info->flags = 0; @@ -968,12 +974,17 @@ static void ctlfe_free_ccb(struct cam_periph *periph, union ccb *ccb) { struct ctlfe_lun_softc *softc; + union ctl_io *io; + struct ctlfe_cmd_info *cmd_info; softc = (struct ctlfe_lun_softc *)periph->softc; + io = ccb->ccb_h.io_ptr; switch (ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: softc->atios_freed++; + cmd_info = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr; + free(cmd_info, M_CTLFE); break; case XPT_IMMEDIATE_NOTIFY: case XPT_NOTIFY_ACKNOWLEDGE: @@ -983,7 +994,7 @@ ctlfe_free_ccb(struct cam_periph *periph break; } - ctl_free_io(ccb->ccb_h.io_ptr); + ctl_free_io(io); free(ccb, M_CTLFE); KASSERT(softc->atios_freed <= softc->atios_alloced, ("%s: " @@ -1078,6 +1089,7 @@ ctlfedone(struct cam_periph *periph, uni { struct ctlfe_lun_softc *softc; struct ctlfe_softc *bus_softc; + struct ctlfe_cmd_info *cmd_info; struct ccb_accept_tio *atio = NULL; union ctl_io *io = NULL; struct mtx *mtx; @@ -1139,10 +1151,12 @@ ctlfedone(struct cam_periph *periph, uni */ mtx_unlock(mtx); io = done_ccb->ccb_h.io_ptr; + cmd_info = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr; ctl_zero_io(io); /* Save pointers on both sides */ io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = done_ccb; + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr = cmd_info; done_ccb->ccb_h.io_ptr = io; /* @@ -1291,12 +1305,11 @@ ctlfedone(struct cam_periph *periph, uni return; } } else { - struct ctlfe_lun_cmd_info *cmd_info; + struct ctlfe_cmd_info *cmd_info; struct ccb_scsiio *csio; csio = &done_ccb->csio; - cmd_info = (struct ctlfe_lun_cmd_info *) - io->io_hdr.port_priv; + cmd_info = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr; io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; From owner-svn-src-all@freebsd.org Mon Oct 5 08:47:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEAB9A107DD; Mon, 5 Oct 2015 08:47:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93F1D989; Mon, 5 Oct 2015 08:47:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958ll70014343; Mon, 5 Oct 2015 08:47:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958ljcB014337; Mon, 5 Oct 2015 08:47:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050847.t958ljcB014337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288724 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:47:47 -0000 Author: mav Date: Mon Oct 5 08:47:45 2015 New Revision: 288724 URL: https://svnweb.freebsd.org/changeset/base/288724 Log: MFC r287372: Make most of port methods optional and remove bunch of dummies. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_tpc_local.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:47:45 2015 (r288724) @@ -3102,7 +3102,8 @@ ctl_lun_map_init(struct ctl_port *port) return (ENOMEM); for (i = 0; i < CTL_MAX_LUNS; i++) port->lun_map[i] = UINT32_MAX; - if (port->status & CTL_PORT_STATUS_ONLINE) { + if (port->status & CTL_PORT_STATUS_ONLINE && + port->lun_disable != NULL) { STAILQ_FOREACH(lun, &softc->lun_list, links) port->lun_disable(port->targ_lun_arg, lun->lun); } @@ -3119,7 +3120,8 @@ ctl_lun_map_deinit(struct ctl_port *port return (0); free(port->lun_map, M_CTL); port->lun_map = NULL; - if (port->status & CTL_PORT_STATUS_ONLINE) { + if (port->status & CTL_PORT_STATUS_ONLINE && + port->lun_enable != NULL) { STAILQ_FOREACH(lun, &softc->lun_list, links) port->lun_enable(port->targ_lun_arg, lun->lun); } @@ -3139,7 +3141,8 @@ ctl_lun_map_set(struct ctl_port *port, u } old = port->lun_map[plun]; port->lun_map[plun] = glun; - if ((port->status & CTL_PORT_STATUS_ONLINE) && old >= CTL_MAX_LUNS) + if ((port->status & CTL_PORT_STATUS_ONLINE) && old >= CTL_MAX_LUNS && + port->lun_enable != NULL) port->lun_enable(port->targ_lun_arg, plun); return (0); } @@ -3153,7 +3156,8 @@ ctl_lun_map_unset(struct ctl_port *port, return (0); old = port->lun_map[plun]; port->lun_map[plun] = UINT32_MAX; - if ((port->status & CTL_PORT_STATUS_ONLINE) && old < CTL_MAX_LUNS) + if ((port->status & CTL_PORT_STATUS_ONLINE) && old < CTL_MAX_LUNS && + port->lun_disable != NULL) port->lun_disable(port->targ_lun_arg, plun); return (0); } @@ -4321,7 +4325,7 @@ ctl_enable_lun(struct ctl_be_lun *be_lun for (port = STAILQ_FIRST(&softc->port_list); port != NULL; port = nport) { nport = STAILQ_NEXT(port, links); if ((port->status & CTL_PORT_STATUS_ONLINE) == 0 || - port->lun_map != NULL) + port->lun_map != NULL || port->lun_enable == NULL) continue; /* @@ -4368,9 +4372,9 @@ ctl_disable_lun(struct ctl_be_lun *be_lu STAILQ_FOREACH(port, &softc->port_list, links) { if ((port->status & CTL_PORT_STATUS_ONLINE) == 0 || - port->lun_map != NULL) + port->lun_map != NULL || port->lun_disable == NULL) continue; - mtx_unlock(&softc->ctl_lock); + /* * Drop the lock before we call the frontend's disable * routine, to avoid lock order reversals. @@ -4378,6 +4382,7 @@ ctl_disable_lun(struct ctl_be_lun *be_lu * XXX KDM what happens if the frontend list changes while * we're traversing it? It's unlikely, but should be handled. */ + mtx_unlock(&softc->ctl_lock); retval = port->lun_disable(port->targ_lun_arg, lun->lun); mtx_lock(&softc->ctl_lock); if (retval != 0) { Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 08:47:45 2015 (r288724) @@ -304,17 +304,21 @@ ctl_port_online(struct ctl_port *port) struct ctl_lun *lun; uint32_t l; - if (port->lun_map) { - for (l = 0; l < CTL_MAX_LUNS; l++) { - if (ctl_lun_map_from_port(port, l) >= CTL_MAX_LUNS) - continue; - port->lun_enable(port->targ_lun_arg, l); + if (port->lun_enable != NULL) { + if (port->lun_map) { + for (l = 0; l < CTL_MAX_LUNS; l++) { + if (ctl_lun_map_from_port(port, l) >= + CTL_MAX_LUNS) + continue; + port->lun_enable(port->targ_lun_arg, l); + } + } else { + STAILQ_FOREACH(lun, &softc->lun_list, links) + port->lun_enable(port->targ_lun_arg, lun->lun); } - } else { - STAILQ_FOREACH(lun, &softc->lun_list, links) - port->lun_enable(port->targ_lun_arg, lun->lun); } - port->port_online(port->onoff_arg); + if (port->port_online != NULL) + port->port_online(port->onoff_arg); /* XXX KDM need a lock here? */ port->status |= CTL_PORT_STATUS_ONLINE; } @@ -326,16 +330,20 @@ ctl_port_offline(struct ctl_port *port) struct ctl_lun *lun; uint32_t l; - port->port_offline(port->onoff_arg); - if (port->lun_map) { - for (l = 0; l < CTL_MAX_LUNS; l++) { - if (ctl_lun_map_from_port(port, l) >= CTL_MAX_LUNS) - continue; - port->lun_disable(port->targ_lun_arg, l); + if (port->port_offline != NULL) + port->port_offline(port->onoff_arg); + if (port->lun_disable != NULL) { + if (port->lun_map) { + for (l = 0; l < CTL_MAX_LUNS; l++) { + if (ctl_lun_map_from_port(port, l) >= + CTL_MAX_LUNS) + continue; + port->lun_disable(port->targ_lun_arg, l); + } + } else { + STAILQ_FOREACH(lun, &softc->lun_list, links) + port->lun_disable(port->targ_lun_arg, lun->lun); } - } else { - STAILQ_FOREACH(lun, &softc->lun_list, links) - port->lun_disable(port->targ_lun_arg, lun->lun); } /* XXX KDM need a lock here? */ port->status &= ~CTL_PORT_STATUS_ONLINE; Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:47:45 2015 (r288724) @@ -98,8 +98,6 @@ int cfcs_init(void); static void cfcs_poll(struct cam_sim *sim); static void cfcs_online(void *arg); static void cfcs_offline(void *arg); -static int cfcs_lun_enable(void *arg, int lun_id); -static int cfcs_lun_disable(void *arg, int lun_id); static void cfcs_datamove(union ctl_io *io); static void cfcs_done(union ctl_io *io); void cfcs_action(struct cam_sim *sim, union ccb *ccb); @@ -152,9 +150,6 @@ cfcs_init(void) port->port_online = cfcs_online; port->port_offline = cfcs_offline; port->onoff_arg = softc; - port->lun_enable = cfcs_lun_enable; - port->lun_disable = cfcs_lun_disable; - port->targ_lun_arg = softc; port->fe_datamove = cfcs_datamove; port->fe_done = cfcs_done; @@ -301,17 +296,6 @@ cfcs_offline(void *arg) cfcs_onoffline(arg, /*online*/ 0); } -static int -cfcs_lun_enable(void *arg, int lun_id) -{ - return (0); -} -static int -cfcs_lun_disable(void *arg, int lun_id) -{ - return (0); -} - /* * This function is very similar to ctl_ioctl_do_datamove(). Is there a * way to combine the functionality? Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 08:47:45 2015 (r288724) @@ -65,10 +65,6 @@ static struct cfi_softc cfi_softc; static int cfi_init(void); static void cfi_shutdown(void); -static void cfi_online(void *arg); -static void cfi_offline(void *arg); -static int cfi_lun_enable(void *arg, int lun_id); -static int cfi_lun_disable(void *arg, int lun_id); static void cfi_datamove(union ctl_io *io); static void cfi_done(union ctl_io *io); @@ -93,12 +89,6 @@ cfi_init(void) port->port_type = CTL_PORT_IOCTL; port->num_requested_ctl_io = 100; port->port_name = "ioctl"; - port->port_online = cfi_online; - port->port_offline = cfi_offline; - port->onoff_arg = &isoftc; - port->lun_enable = cfi_lun_enable; - port->lun_disable = cfi_lun_disable; - port->targ_lun_arg = &isoftc; port->fe_datamove = cfi_datamove; port->fe_done = cfi_done; port->max_targets = 1; @@ -125,30 +115,6 @@ cfi_shutdown(void) printf("%s: ctl_frontend_deregister() failed\n", __func__); } -static void -cfi_online(void *arg) -{ -} - -static void -cfi_offline(void *arg) -{ -} - -static int -cfi_lun_enable(void *arg, int lun_id) -{ - - return (0); -} - -static int -cfi_lun_disable(void *arg, int lun_id) -{ - - return (0); -} - /* * Data movement routine for the CTL ioctl frontend port. */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:47:45 2015 (r288724) @@ -149,8 +149,6 @@ int cfiscsi_init(void); static void cfiscsi_online(void *arg); static void cfiscsi_offline(void *arg); static int cfiscsi_info(void *arg, struct sbuf *sb); -static int cfiscsi_lun_enable(void *arg, int lun_id); -static int cfiscsi_lun_disable(void *arg, int lun_id); static int cfiscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); static void cfiscsi_datamove(union ctl_io *io); @@ -2031,9 +2029,6 @@ cfiscsi_ioctl_port_create(struct ctl_req port->port_offline = cfiscsi_offline; port->port_info = cfiscsi_info; port->onoff_arg = ct; - port->lun_enable = cfiscsi_lun_enable; - port->lun_disable = cfiscsi_lun_disable; - port->targ_lun_arg = ct; port->fe_datamove = cfiscsi_datamove; port->fe_done = cfiscsi_done; @@ -2297,20 +2292,6 @@ cfiscsi_target_find_or_create(struct cfi return (newct); } -static int -cfiscsi_lun_enable(void *arg, int lun_id) -{ - - return (0); -} - -static int -cfiscsi_lun_disable(void *arg, int lun_id) -{ - - return (0); -} - static void cfiscsi_datamove_in(union ctl_io *io) { Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:46:48 2015 (r288723) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:47:45 2015 (r288724) @@ -66,10 +66,6 @@ static struct tpcl_softc tpcl_softc; static int tpcl_init(void); static void tpcl_shutdown(void); -static void tpcl_online(void *arg); -static void tpcl_offline(void *arg); -static int tpcl_lun_enable(void *arg, int lun_id); -static int tpcl_lun_disable(void *arg, int lun_id); static void tpcl_datamove(union ctl_io *io); static void tpcl_done(union ctl_io *io); @@ -97,12 +93,6 @@ tpcl_init(void) port->port_type = CTL_PORT_INTERNAL; port->num_requested_ctl_io = 100; port->port_name = "tpc"; - port->port_online = tpcl_online; - port->port_offline = tpcl_offline; - port->onoff_arg = tsoftc; - port->lun_enable = tpcl_lun_enable; - port->lun_disable = tpcl_lun_disable; - port->targ_lun_arg = tsoftc; port->fe_datamove = tpcl_datamove; port->fe_done = tpcl_done; port->max_targets = 1; @@ -141,30 +131,6 @@ tpcl_shutdown(void) } static void -tpcl_online(void *arg) -{ -} - -static void -tpcl_offline(void *arg) -{ -} - -static int -tpcl_lun_enable(void *arg, int lun_id) -{ - - return (0); -} - -static int -tpcl_lun_disable(void *arg, int lun_id) -{ - - return (0); -} - -static void tpcl_datamove(union ctl_io *io) { struct ctl_sg_entry *ext_sglist, *kern_sglist; From owner-svn-src-all@freebsd.org Mon Oct 5 08:48:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ECFFA108CC; Mon, 5 Oct 2015 08:48:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3EAEADB; Mon, 5 Oct 2015 08:48:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958mm3i014442; Mon, 5 Oct 2015 08:48:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958mmnA014439; Mon, 5 Oct 2015 08:48:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050848.t958mmnA014439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288725 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:48:49 -0000 Author: mav Date: Mon Oct 5 08:48:47 2015 New Revision: 288725 URL: https://svnweb.freebsd.org/changeset/base/288725 Log: MFC r287433: Small UA cleanup. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_error.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:47:45 2015 (r288724) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:48:47 2015 (r288725) @@ -439,7 +439,7 @@ static int ctl_scsiio_lun_check(struct c #ifdef notyet static void ctl_failover(void); #endif -static void ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, +static void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio); @@ -1014,6 +1014,20 @@ ctl_clr_ua_all(struct ctl_lun *lun, uint } } +static void +ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, + ctl_ua_type ua_type) +{ + struct ctl_lun *lun; + + mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); + STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) { + mtx_lock(&lun->lun_lock); + ctl_clr_ua(lun, initidx, ua_type); + mtx_unlock(&lun->lun_lock); + } +} + static int ctl_ha_state_sysctl(SYSCTL_HANDLER_ARGS) { @@ -9102,7 +9116,7 @@ ctl_request_sense(struct ctl_scsiio *cts if (ua_type == CTL_UA_LUN_CHANGE) { mtx_unlock(&lun->lun_lock); mtx_lock(&ctl_softc->ctl_lock); - ctl_clear_ua(ctl_softc, initidx, ua_type); + ctl_clr_ua_allluns(ctl_softc, initidx, ua_type); mtx_unlock(&ctl_softc->ctl_lock); mtx_lock(&lun->lun_lock); } @@ -11090,24 +11104,6 @@ ctl_failover(void) } #endif -static void -ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx, - ctl_ua_type ua_type) -{ - struct ctl_lun *lun; - ctl_ua_type *pu; - - mtx_assert(&ctl_softc->ctl_lock, MA_OWNED); - - STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) { - mtx_lock(&lun->lun_lock); - pu = lun->pending_ua[initidx / CTL_MAX_INIT_PER_PORT]; - if (pu != NULL) - pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type; - mtx_unlock(&lun->lun_lock); - } -} - static int ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) { Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:47:45 2015 (r288724) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:48:47 2015 (r288725) @@ -120,8 +120,6 @@ typedef enum { CTL_UA_LUN_CHANGE = 0x0020, CTL_UA_MODE_CHANGE = 0x0040, CTL_UA_LOG_CHANGE = 0x0080, - CTL_UA_LVD = 0x0100, - CTL_UA_SE = 0x0200, CTL_UA_RES_PREEMPT = 0x0400, CTL_UA_RES_RELEASE = 0x0800, CTL_UA_REG_PREEMPT = 0x1000, Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 08:47:45 2015 (r288724) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 08:48:47 2015 (r288725) @@ -446,16 +446,6 @@ ctl_build_ua(struct ctl_lun *lun, uint32 asc = 0x2A; ascq = 0x02; break; - case CTL_UA_LVD: - /* 29h/06h TRANSCEIVER MODE CHANGED TO LVD */ - asc = 0x29; - ascq = 0x06; - break; - case CTL_UA_SE: - /* 29h/05h TRANSCEIVER MODE CHANGED TO SINGLE-ENDED */ - asc = 0x29; - ascq = 0x05; - break; case CTL_UA_RES_PREEMPT: /* 2Ah/03h RESERVATIONS PREEMPTED */ asc = 0x2A; From owner-svn-src-all@freebsd.org Mon Oct 5 08:50:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40D87A10AE7; Mon, 5 Oct 2015 08:50:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26D7CC8F; Mon, 5 Oct 2015 08:50:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958oGLY014589; Mon, 5 Oct 2015 08:50:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958oGwY014585; Mon, 5 Oct 2015 08:50:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050850.t958oGwY014585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288726 - in stable/10: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:50:17 -0000 Author: mav Date: Mon Oct 5 08:50:15 2015 New Revision: 288726 URL: https://svnweb.freebsd.org/changeset/base/288726 Log: MFC r287455, r287458, r287459: Remove some dead code. Deleted: stable/10/sys/cam/ctl/ctl_backend_block.h Modified: stable/10/sys/cam/ctl/README.ctl.txt stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/usr.sbin/ctladm/ctladm.c stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:48:47 2015 (r288725) +++ stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:50:15 2015 (r288726) @@ -318,7 +318,6 @@ These files define the basic CTL backend explain the API. ctl_backend_block.c -ctl_backend_block.h: ------------------- The block and file backend. This allows for using a disk or a file as the Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:48:47 2015 (r288725) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:50:15 2015 (r288726) @@ -156,7 +156,6 @@ typedef uint64_t (*cbb_getattr_t)(struct */ struct ctl_be_block_lun { struct ctl_lun_create_params params; - struct ctl_block_disk *disk; char lunname[32]; char *dev_path; ctl_be_block_type dev_type; @@ -198,8 +197,6 @@ struct ctl_be_block_lun { */ struct ctl_be_block_softc { struct mtx lock; - int num_disks; - STAILQ_HEAD(, ctl_block_disk) disk_list; int num_luns; STAILQ_HEAD(, ctl_be_block_lun) lun_list; }; @@ -2920,7 +2917,6 @@ ctl_be_block_init(void) mtx_init(&softc->lock, "ctlblock", NULL, MTX_DEF); beio_zone = uma_zcreate("beio", sizeof(struct ctl_be_block_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - STAILQ_INIT(&softc->disk_list); STAILQ_INIT(&softc->lun_list); return (retval); Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:48:47 2015 (r288725) +++ stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:50:15 2015 (r288726) @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:48:47 2015 (r288725) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:50:15 2015 (r288726) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-all@freebsd.org Mon Oct 5 08:51:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72847A10C4B; Mon, 5 Oct 2015 08:51:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6016AF4A; Mon, 5 Oct 2015 08:51:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958pMUa015187; Mon, 5 Oct 2015 08:51:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958pLUl015183; Mon, 5 Oct 2015 08:51:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050851.t958pLUl015183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288727 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:51:22 -0000 Author: mav Date: Mon Oct 5 08:51:20 2015 New Revision: 288727 URL: https://svnweb.freebsd.org/changeset/base/288727 Log: MFC r287499: Move setting of media parameters inside open routines. This is preparation for possibility to open/close media several times per LUN life cycle. While there, rename variables to reduce confusion. As additional bonus this allows to open read-only media, such as ZFS snapshots. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:50:15 2015 (r288726) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:51:20 2015 (r288727) @@ -4003,7 +4003,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct ctl_lun *nlun, *lun; struct scsi_vpd_id_descriptor *desc; struct scsi_vpd_id_t10 *t10id; - const char *eui, *naa, *scsiname, *vendor, *value; + const char *eui, *naa, *scsiname, *vendor; int lun_number, i, lun_malloced; int devidlen, idlen1, idlen2 = 0, len; @@ -4169,21 +4169,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (be_lun->flags & CTL_LUN_FLAG_PRIMARY) lun->flags |= CTL_LUN_PRIMARY_SC; - value = ctl_get_opt(&be_lun->options, "readonly"); - if (value != NULL && strcmp(value, "on") == 0) - lun->flags |= CTL_LUN_READONLY; - - lun->serseq = CTL_LUN_SERSEQ_OFF; - if (be_lun->flags & CTL_LUN_FLAG_SERSEQ_READ) - lun->serseq = CTL_LUN_SERSEQ_READ; - value = ctl_get_opt(&be_lun->options, "serseq"); - if (value != NULL && strcmp(value, "on") == 0) - lun->serseq = CTL_LUN_SERSEQ_ON; - else if (value != NULL && strcmp(value, "read") == 0) - lun->serseq = CTL_LUN_SERSEQ_READ; - else if (value != NULL && strcmp(value, "off") == 0) - lun->serseq = CTL_LUN_SERSEQ_OFF; - lun->ctl_softc = ctl_softc; #ifdef CTL_TIME_IO lun->last_busy = getsbinuptime(); @@ -6276,7 +6261,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) header->datalen = MIN(total_len - 1, 254); if (control_dev == 0) { header->dev_specific = 0x10; /* DPOFUA */ - if ((lun->flags & CTL_LUN_READONLY) || + if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] .eca_and_aen & SCP_SWP) != 0) header->dev_specific |= 0x80; /* WP */ @@ -6299,7 +6284,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) scsi_ulto2b(datalen, header->datalen); if (control_dev == 0) { header->dev_specific = 0x10; /* DPOFUA */ - if ((lun->flags & CTL_LUN_READONLY) || + if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] .eca_and_aen & SCP_SWP) != 0) header->dev_specific |= 0x80; /* WP */ @@ -10532,15 +10517,16 @@ ctl_check_for_blockage(struct ctl_lun *l return (CTL_ACTION_BLOCK); case CTL_SER_EXTENT: return (ctl_extent_check(ooa_io, pending_io, - (lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun && lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); case CTL_SER_EXTENTOPT: if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) return (ctl_extent_check(ooa_io, pending_io, - (lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun && + lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); return (CTL_ACTION_PASS); case CTL_SER_EXTENTSEQ: - if (lun->serseq != CTL_LUN_SERSEQ_OFF) + if (lun->be_lun && lun->be_lun->serseq != CTL_LUN_SERSEQ_OFF) return (ctl_extent_check_seq(ooa_io, pending_io)); return (CTL_ACTION_PASS); case CTL_SER_PASS: @@ -10767,7 +10753,8 @@ ctl_scsiio_lun_check(struct ctl_lun *lun } if (entry->pattern & CTL_LUN_PAT_WRITE) { - if (lun->flags & CTL_LUN_READONLY) { + if (lun->be_lun && + lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_DATA_PROTECT, /*asc*/ 0x27, /*ascq*/ 0x01, SSD_ELEM_NONE); Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Mon Oct 5 08:50:15 2015 (r288726) +++ stable/10/sys/cam/ctl/ctl_backend.h Mon Oct 5 08:51:20 2015 (r288727) @@ -86,9 +86,15 @@ typedef enum { CTL_LUN_FLAG_DEV_TYPE = 0x40, CTL_LUN_FLAG_UNMAP = 0x80, CTL_LUN_FLAG_OFFLINE = 0x100, - CTL_LUN_FLAG_SERSEQ_READ = 0x200 + CTL_LUN_FLAG_READONLY = 0x200 } ctl_backend_lun_flags; +typedef enum { + CTL_LUN_SERSEQ_OFF, + CTL_LUN_SERSEQ_READ, + CTL_LUN_SERSEQ_ON +} ctl_lun_serseq; + #ifdef _KERNEL #define CTL_BACKEND_DECLARE(name, driver) \ @@ -195,6 +201,7 @@ typedef void (*be_lun_config_t)(void *be struct ctl_be_lun { uint8_t lun_type; /* passed to CTL */ ctl_backend_lun_flags flags; /* passed to CTL */ + ctl_lun_serseq serseq; /* passed to CTL */ void *be_lun; /* passed to CTL */ uint64_t maxlba; /* passed to CTL */ uint32_t blocksize; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:50:15 2015 (r288726) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:51:20 2015 (r288727) @@ -118,7 +118,6 @@ typedef enum { CTL_BE_BLOCK_LUN_UNCONFIGURED = 0x01, CTL_BE_BLOCK_LUN_CONFIG_ERR = 0x02, CTL_BE_BLOCK_LUN_WAITING = 0x04, - CTL_BE_BLOCK_LUN_MULTI_THREAD = 0x08 } ctl_be_block_lun_flags; typedef enum { @@ -169,18 +168,11 @@ struct ctl_be_block_lun { uma_zone_t lun_zone; uint64_t size_blocks; uint64_t size_bytes; - uint32_t blocksize; - uint16_t pblockexp; - uint16_t pblockoff; - uint16_t ublockexp; - uint16_t ublockoff; - uint32_t atomicblock; - uint32_t opttxferlen; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; STAILQ_ENTRY(ctl_be_block_lun) links; - struct ctl_be_lun ctl_be_lun; + struct ctl_be_lun cbe_lun; struct taskqueue *io_taskqueue; struct task io_task; int num_threads; @@ -771,7 +763,7 @@ ctl_be_block_gls_file(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; + off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = VOP_IOCTL(be_lun->vn, FIOSEEKHOLE, &off, 0, curthread->td_ucred, curthread); @@ -791,8 +783,8 @@ ctl_be_block_gls_file(struct ctl_be_bloc data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), - data->descr[0].length); + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - + lbalen->lba), data->descr[0].length); data->descr[0].status = status; ctl_complete_beio(beio); @@ -813,14 +805,14 @@ ctl_be_block_getattr_file(struct ctl_be_ if (strcmp(attrname, "blocksused") == 0) { error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); if (error == 0) - val = vattr.va_bytes / be_lun->blocksize; + val = vattr.va_bytes / be_lun->cbe_lun.blocksize; } if (strcmp(attrname, "blocksavail") == 0 && (be_lun->vn->v_iflag & VI_DOOMED) == 0) { error = VFS_STATFS(be_lun->vn->v_mount, &statfs); if (error == 0) val = statfs.f_bavail * statfs.f_bsize / - be_lun->blocksize; + be_lun->cbe_lun.blocksize; } VOP_UNLOCK(be_lun->vn, 0); return (val); @@ -931,7 +923,7 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; + off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; error = (*dev_data->csw->d_ioctl)(dev_data->cdev, FIOSEEKHOLE, (caddr_t)&off, FREAD, curthread); if (error == 0 && off > roff) @@ -949,8 +941,8 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), - data->descr[0].length); + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - + lbalen->lba), data->descr[0].length); data->descr[0].status = status; ctl_complete_beio(beio); @@ -1006,7 +998,7 @@ ctl_be_block_unmap_dev_range(struct ctl_ uint64_t maxlen; dev_data = &be_lun->backend.dev; - maxlen = LONG_MAX - (LONG_MAX % be_lun->blocksize); + maxlen = LONG_MAX - (LONG_MAX % be_lun->cbe_lun.blocksize); while (len > 0) { bio = g_alloc_bio(); bio->bio_cmd = BIO_DELETE; @@ -1016,7 +1008,7 @@ ctl_be_block_unmap_dev_range(struct ctl_ bio->bio_data = 0; bio->bio_done = ctl_be_block_biodone; bio->bio_caller1 = beio; - bio->bio_pblkno = off / be_lun->blocksize; + bio->bio_pblkno = off / be_lun->cbe_lun.blocksize; off += bio->bio_length; len -= bio->bio_length; @@ -1058,11 +1050,11 @@ ctl_be_block_unmap_dev(struct ctl_be_blo end = buf + ptrlen->len / sizeof(*buf); for (; buf < end; buf++) { len = (uint64_t)scsi_4btoul(buf->length) * - be_lun->blocksize; + be_lun->cbe_lun.blocksize; beio->io_len += len; ctl_be_block_unmap_dev_range(be_lun, beio, - scsi_8btou64(buf->lba) * be_lun->blocksize, len, - (end - buf < 2) ? TRUE : FALSE); + scsi_8btou64(buf->lba) * be_lun->cbe_lun.blocksize, + len, (end - buf < 2) ? TRUE : FALSE); } } else ctl_be_block_unmap_dev_range(be_lun, beio, @@ -1114,7 +1106,7 @@ ctl_be_block_dispatch_dev(struct ctl_be_ bio->bio_offset = cur_offset; bio->bio_data = cur_ptr; bio->bio_done = ctl_be_block_biodone; - bio->bio_pblkno = cur_offset / be_lun->blocksize; + bio->bio_pblkno = cur_offset / be_lun->cbe_lun.blocksize; cur_offset += bio->bio_length; cur_ptr += bio->bio_length; @@ -1161,6 +1153,7 @@ static void ctl_be_block_cw_dispatch_sync(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_lba_len_flags *lbalen; @@ -1168,8 +1161,8 @@ ctl_be_block_cw_dispatch_sync(struct ctl beio = (struct ctl_be_block_io *)PRIV(io)->ptr; lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - beio->io_len = lbalen->len * be_lun->blocksize; - beio->io_offset = lbalen->lba * be_lun->blocksize; + beio->io_len = lbalen->len * cbe_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; beio->io_arg = (lbalen->flags & SSC_IMMED) != 0; beio->bio_cmd = BIO_FLUSH; beio->ds_trans_type = DEVSTAT_NO_DATA; @@ -1198,6 +1191,7 @@ static void ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_lba_len_flags *lbalen; uint64_t len_left, lba; @@ -1224,8 +1218,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b } if (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR)) { - beio->io_offset = lbalen->lba * be_lun->blocksize; - beio->io_len = (uint64_t)lbalen->len * be_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; + beio->io_len = (uint64_t)lbalen->len * cbe_lun->blocksize; beio->bio_cmd = BIO_DELETE; beio->ds_trans_type = DEVSTAT_FREE; @@ -1239,27 +1233,27 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b DPRINTF("WRITE SAME at LBA %jx len %u\n", (uintmax_t)lbalen->lba, lbalen->len); - pb = be_lun->blocksize << be_lun->pblockexp; - if (be_lun->pblockoff > 0) - pbo = pb - be_lun->blocksize * be_lun->pblockoff; + pb = cbe_lun->blocksize << be_lun->cbe_lun.pblockexp; + if (be_lun->cbe_lun.pblockoff > 0) + pbo = pb - cbe_lun->blocksize * be_lun->cbe_lun.pblockoff; else pbo = 0; - len_left = (uint64_t)lbalen->len * be_lun->blocksize; + len_left = (uint64_t)lbalen->len * cbe_lun->blocksize; for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { /* * Setup the S/G entry for this chunk. */ seglen = MIN(CTLBLK_MAX_SEG, len_left); - if (pb > be_lun->blocksize) { - adj = ((lbalen->lba + lba) * be_lun->blocksize + + if (pb > cbe_lun->blocksize) { + adj = ((lbalen->lba + lba) * cbe_lun->blocksize + seglen - pbo) % pb; if (seglen > adj) seglen -= adj; else - seglen -= seglen % be_lun->blocksize; + seglen -= seglen % cbe_lun->blocksize; } else - seglen -= seglen % be_lun->blocksize; + seglen -= seglen % cbe_lun->blocksize; beio->sg_segs[i].len = seglen; beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); @@ -1271,16 +1265,16 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b buf = beio->sg_segs[i].addr; end = buf + seglen; - for (; buf < end; buf += be_lun->blocksize) { - memcpy(buf, io->scsiio.kern_data_ptr, be_lun->blocksize); + for (; buf < end; buf += cbe_lun->blocksize) { + memcpy(buf, io->scsiio.kern_data_ptr, cbe_lun->blocksize); if (lbalen->flags & SWS_LBDATA) scsi_ulto4b(lbalen->lba + lba, buf); lba++; } } - beio->io_offset = lbalen->lba * be_lun->blocksize; - beio->io_len = lba * be_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; + beio->io_len = lba * cbe_lun->blocksize; /* We can not do all in one run. Correct and schedule rerun. */ if (len_left > 0) { @@ -1465,6 +1459,7 @@ static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len_flags *lbalen; @@ -1519,9 +1514,9 @@ ctl_be_block_dispatch(struct ctl_be_bloc lbas = CTLBLK_HALF_IO_SIZE; else lbas = CTLBLK_MAX_IO_SIZE; - lbas = MIN(lbalen->len - bptrlen->len, lbas / be_lun->blocksize); - beio->io_offset = (lbalen->lba + bptrlen->len) * be_lun->blocksize; - beio->io_len = lbas * be_lun->blocksize; + lbas = MIN(lbalen->len - bptrlen->len, lbas / cbe_lun->blocksize); + beio->io_offset = (lbalen->lba + bptrlen->len) * cbe_lun->blocksize; + beio->io_len = lbas * cbe_lun->blocksize; bptrlen->len += lbas; for (i = 0, len_left = beio->io_len; len_left > 0; i++) { @@ -1666,13 +1661,13 @@ static int ctl_be_block_submit(union ctl_io *io) { struct ctl_be_block_lun *be_lun; - struct ctl_be_lun *ctl_be_lun; + struct ctl_be_lun *cbe_lun; DPRINTF("entered\n"); - ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ + cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; - be_lun = (struct ctl_be_block_lun *)ctl_be_lun->be_lun; + be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; /* * Make sure we only get SCSI I/O. @@ -1742,6 +1737,7 @@ ctl_be_block_ioctl(struct cdev *dev, u_l static int ctl_be_block_open_file(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun; struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; char *value; @@ -1750,6 +1746,7 @@ ctl_be_block_open_file(struct ctl_be_blo int error; error = 0; + cbe_lun = &be_lun->cbe_lun; file_data = &be_lun->backend.file; params = &be_lun->params; @@ -1758,6 +1755,8 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->lun_flush = ctl_be_block_flush_file; be_lun->get_lba_status = ctl_be_block_gls_file; be_lun->getattr = ctl_be_block_getattr_file; + be_lun->unmap = NULL; + cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP; error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); if (error != 0) { @@ -1782,19 +1781,11 @@ ctl_be_block_open_file(struct ctl_be_blo } } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; else be_lun->size_bytes = vattr.va_size; - /* - * We set the multi thread flag for file operations because all - * filesystems (in theory) are capable of allowing multiple readers - * of a file at once. So we want to get the maximum possible - * concurrency. - */ - be_lun->flags |= CTL_BE_BLOCK_LUN_MULTI_THREAD; /* * For files we can use any logical block size. Prefer 512 bytes @@ -1803,59 +1794,63 @@ ctl_be_block_open_file(struct ctl_be_blo * logical block size -- report it as physical block size. */ if (params->blocksize_bytes != 0) - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; else - be_lun->blocksize = 512; + cbe_lun->blocksize = 512; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); us = ps = vattr.va_blocksize; uo = po = 0; - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); if (value != NULL) ctl_expand_number(value, &ps); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + value = ctl_get_opt(&cbe_lun->options, "pblockoffset"); if (value != NULL) ctl_expand_number(value, &po); - pss = ps / be_lun->blocksize; - pos = po / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && - ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { - be_lun->pblockexp = fls(pss) - 1; - be_lun->pblockoff = (pss - pos) % pss; + pss = ps / cbe_lun->blocksize; + pos = po / cbe_lun->blocksize; + if ((pss > 0) && (pss * cbe_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * cbe_lun->blocksize == po)) { + cbe_lun->pblockexp = fls(pss) - 1; + cbe_lun->pblockoff = (pss - pos) % pss; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + value = ctl_get_opt(&cbe_lun->options, "ublocksize"); if (value != NULL) ctl_expand_number(value, &us); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + value = ctl_get_opt(&cbe_lun->options, "ublockoffset"); if (value != NULL) ctl_expand_number(value, &uo); - uss = us / be_lun->blocksize; - uos = uo / be_lun->blocksize; - if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && - ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { - be_lun->ublockexp = fls(uss) - 1; - be_lun->ublockoff = (uss - uos) % uss; + uss = us / cbe_lun->blocksize; + uos = uo / cbe_lun->blocksize; + if ((uss > 0) && (uss * cbe_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * cbe_lun->blocksize == uo)) { + cbe_lun->ublockexp = fls(uss) - 1; + cbe_lun->ublockoff = (uss - uos) % uss; } /* * Sanity check. The media size has to be at least one * sector long. */ - if (be_lun->size_bytes < be_lun->blocksize) { + if (be_lun->size_bytes < cbe_lun->blocksize) { error = EINVAL; snprintf(req->error_str, sizeof(req->error_str), "file %s size %ju < block size %u", be_lun->dev_path, - (uintmax_t)be_lun->size_bytes, be_lun->blocksize); + (uintmax_t)be_lun->size_bytes, cbe_lun->blocksize); } - be_lun->opttxferlen = CTLBLK_MAX_IO_SIZE / be_lun->blocksize; + cbe_lun->opttxferlen = CTLBLK_MAX_IO_SIZE / cbe_lun->blocksize; return (error); } static int ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_lun_create_params *params; struct vattr vattr; struct cdev *dev; @@ -1878,6 +1873,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc atomic = maxio = CTLBLK_MAX_IO_SIZE; } else { be_lun->dispatch = ctl_be_block_dispatch_dev; + be_lun->get_lba_status = NULL; atomic = 0; maxio = be_lun->backend.dev.cdev->si_iosize_max; if (maxio <= 0) @@ -1887,6 +1883,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc } be_lun->lun_flush = ctl_be_block_flush_dev; be_lun->getattr = ctl_be_block_getattr_dev; + be_lun->unmap = ctl_be_block_unmap_dev; error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED); if (error) { @@ -1923,7 +1920,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc if ((params->blocksize_bytes != 0) && (params->blocksize_bytes >= tmp)) { if (params->blocksize_bytes % tmp == 0) { - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; } else { snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u is not an even " @@ -1938,7 +1935,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc "blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); } else - be_lun->blocksize = tmp; + cbe_lun->blocksize = tmp; error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, curthread); @@ -1963,6 +1960,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } else be_lun->size_bytes = otmp; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, curthread); @@ -1977,36 +1977,36 @@ ctl_be_block_open_dev(struct ctl_be_bloc us = ps; uo = po; - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); if (value != NULL) ctl_expand_number(value, &ps); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + value = ctl_get_opt(&cbe_lun->options, "pblockoffset"); if (value != NULL) ctl_expand_number(value, &po); - pss = ps / be_lun->blocksize; - pos = po / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && - ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { - be_lun->pblockexp = fls(pss) - 1; - be_lun->pblockoff = (pss - pos) % pss; + pss = ps / cbe_lun->blocksize; + pos = po / cbe_lun->blocksize; + if ((pss > 0) && (pss * cbe_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * cbe_lun->blocksize == po)) { + cbe_lun->pblockexp = fls(pss) - 1; + cbe_lun->pblockoff = (pss - pos) % pss; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + value = ctl_get_opt(&cbe_lun->options, "ublocksize"); if (value != NULL) ctl_expand_number(value, &us); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + value = ctl_get_opt(&cbe_lun->options, "ublockoffset"); if (value != NULL) ctl_expand_number(value, &uo); - uss = us / be_lun->blocksize; - uos = uo / be_lun->blocksize; - if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && - ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { - be_lun->ublockexp = fls(uss) - 1; - be_lun->ublockoff = (uss - uos) % uss; + uss = us / cbe_lun->blocksize; + uos = uo / cbe_lun->blocksize; + if ((uss > 0) && (uss * cbe_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * cbe_lun->blocksize == uo)) { + cbe_lun->ublockexp = fls(uss) - 1; + cbe_lun->ublockoff = (uss - uos) % uss; } - be_lun->atomicblock = atomic / be_lun->blocksize; - be_lun->opttxferlen = maxio / be_lun->blocksize; + cbe_lun->atomicblock = atomic / cbe_lun->blocksize; + cbe_lun->opttxferlen = maxio / cbe_lun->blocksize; if (be_lun->dispatch == ctl_be_block_dispatch_zvol) { unmap = 1; @@ -2019,11 +2019,13 @@ ctl_be_block_open_dev(struct ctl_be_bloc (caddr_t)&arg, FREAD, curthread); unmap = (error == 0) ? arg.value.i : 0; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); + value = ctl_get_opt(&cbe_lun->options, "unmap"); if (value != NULL) unmap = (strcmp(value, "on") == 0); if (unmap) - be_lun->unmap = ctl_be_block_unmap_dev; + cbe_lun->flags |= CTL_LUN_FLAG_UNMAP; + else + cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP; return (0); } @@ -2031,10 +2033,10 @@ ctl_be_block_open_dev(struct ctl_be_bloc static int ctl_be_block_close(struct ctl_be_block_lun *be_lun) { - DROP_GIANT(); - if (be_lun->vn) { - int flags = FREAD | FWRITE; + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; + int flags; + if (be_lun->vn) { switch (be_lun->dev_type) { case CTL_BE_BLOCK_DEV: if (be_lun->backend.dev.csw) { @@ -2053,6 +2055,9 @@ ctl_be_block_close(struct ctl_be_block_l break; } + flags = FREAD; + if ((cbe_lun->flags & CTL_LUN_FLAG_READONLY) == 0) + flags |= FWRITE; (void)vn_close(be_lun->vn, flags, NOCRED, curthread); be_lun->vn = NULL; @@ -2073,31 +2078,24 @@ ctl_be_block_close(struct ctl_be_block_l } be_lun->dev_type = CTL_BE_BLOCK_NONE; } - PICKUP_GIANT(); - return (0); } static int ctl_be_block_open(struct ctl_be_block_softc *softc, - struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) + struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct nameidata nd; - int flags; - int error; + char *value; + int error, flags; - /* - * XXX KDM allow a read-only option? - */ - flags = FREAD | FWRITE; error = 0; - if (rootvnode == NULL) { snprintf(req->error_str, sizeof(req->error_str), "Root filesystem is not mounted"); return (1); } - if (!curthread->td_proc->p_fd->fd_cdir) { curthread->td_proc->p_fd->fd_cdir = rootvnode; VREF(rootvnode); @@ -2111,9 +2109,27 @@ ctl_be_block_open(struct ctl_be_block_so VREF(rootvnode); } - again: + value = ctl_get_opt(&cbe_lun->options, "file"); + if (value == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "no file argument specified"); + return (1); + } + free(be_lun->dev_path, M_CTLBLK); + be_lun->dev_path = strdup(value, M_CTLBLK); + + flags = FREAD; + value = ctl_get_opt(&cbe_lun->options, "readonly"); + if (value == NULL || strcmp(value, "on") != 0) + flags |= FWRITE; + +again: NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path, curthread); error = vn_open(&nd, &flags, 0, NULL); + if ((error == EROFS || error == EACCES) && (flags & FWRITE)) { + flags &= ~FWRITE; + goto again; + } if (error) { /* * This is the only reasonable guess we can make as far as @@ -2122,28 +2138,24 @@ ctl_be_block_open(struct ctl_be_block_so * full path. */ if (be_lun->dev_path[0] != '/') { - char *dev_path = "/dev/"; char *dev_name; - /* Try adding device path at beginning of name */ - dev_name = malloc(strlen(be_lun->dev_path) - + strlen(dev_path) + 1, - M_CTLBLK, M_WAITOK); - if (dev_name) { - sprintf(dev_name, "%s%s", dev_path, - be_lun->dev_path); - free(be_lun->dev_path, M_CTLBLK); - be_lun->dev_path = dev_name; - goto again; - } + asprintf(&dev_name, M_CTLBLK, "/dev/%s", + be_lun->dev_path); + free(be_lun->dev_path, M_CTLBLK); + be_lun->dev_path = dev_name; + goto again; } snprintf(req->error_str, sizeof(req->error_str), "error opening %s: %d", be_lun->dev_path, error); return (error); } + if (flags & FWRITE) + cbe_lun->flags &= ~CTL_LUN_FLAG_READONLY; + else + cbe_lun->flags |= CTL_LUN_FLAG_READONLY; NDFREE(&nd, NDF_ONLY_PNBUF); - be_lun->vn = nd.ni_vp; /* We only support disks and files. */ @@ -2160,12 +2172,23 @@ ctl_be_block_open(struct ctl_be_block_so if (error != 0) ctl_be_block_close(be_lun); + cbe_lun->serseq = CTL_LUN_SERSEQ_OFF; + if (be_lun->dispatch != ctl_be_block_dispatch_dev) + cbe_lun->serseq = CTL_LUN_SERSEQ_READ; + value = ctl_get_opt(&cbe_lun->options, "serseq"); + if (value != NULL && strcmp(value, "on") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_ON; + else if (value != NULL && strcmp(value, "read") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_READ; + else if (value != NULL && strcmp(value, "off") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_OFF; return (0); } static int ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun; struct ctl_be_block_lun *be_lun; struct ctl_lun_create_params *params; char num_thread_str[16]; @@ -2178,10 +2201,9 @@ ctl_be_block_create(struct ctl_be_block_ retval = 0; req->status = CTL_LUN_OK; - num_threads = cbb_num_threads; - be_lun = malloc(sizeof(*be_lun), M_CTLBLK, M_ZERO | M_WAITOK); - + cbe_lun = &be_lun->cbe_lun; + cbe_lun->be_lun = be_lun; be_lun->params = req->reqdata.create; be_lun->softc = softc; STAILQ_INIT(&be_lun->input_queue); @@ -2191,12 +2213,10 @@ ctl_be_block_create(struct ctl_be_block_ sprintf(be_lun->lunname, "cblk%d", softc->num_luns); mtx_init(&be_lun->io_lock, "cblk io lock", NULL, MTX_DEF); mtx_init(&be_lun->queue_lock, "cblk queue lock", NULL, MTX_DEF); - ctl_init_opts(&be_lun->ctl_be_lun.options, + ctl_init_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); - be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); - if (be_lun->lun_zone == NULL) { snprintf(req->error_str, sizeof(req->error_str), "error allocating UMA zone"); @@ -2204,46 +2224,29 @@ ctl_be_block_create(struct ctl_be_block_ } if (params->flags & CTL_LUN_FLAG_DEV_TYPE) - be_lun->ctl_be_lun.lun_type = params->device_type; + cbe_lun->lun_type = params->device_type; else - be_lun->ctl_be_lun.lun_type = T_DIRECT; + cbe_lun->lun_type = T_DIRECT; + be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; + cbe_lun->flags = CTL_LUN_FLAG_PRIMARY; - if (be_lun->ctl_be_lun.lun_type == T_DIRECT) { - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "file"); - if (value == NULL) { - snprintf(req->error_str, sizeof(req->error_str), - "no file argument specified"); - goto bailout_error; - } - be_lun->dev_path = strdup(value, M_CTLBLK); + if (cbe_lun->lun_type == T_DIRECT) { be_lun->size_bytes = params->lun_size_bytes; if (params->blocksize_bytes != 0) - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; else - be_lun->blocksize = 512; + cbe_lun->blocksize = 512; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); retval = ctl_be_block_open(softc, be_lun, req); - be_lun->size_blocks = be_lun->size_bytes / be_lun->blocksize; if (retval != 0) { retval = 0; req->status = CTL_LUN_WARNING; } + num_threads = cbb_num_threads; } else { - /* - * For processor devices, we don't have any size. - */ - be_lun->blocksize = 0; - be_lun->pblockexp = 0; - be_lun->pblockoff = 0; - be_lun->ublockexp = 0; - be_lun->ublockoff = 0; - be_lun->size_blocks = 0; - be_lun->size_bytes = 0; - be_lun->ctl_be_lun.maxlba = 0; - - /* - * Default to just 1 thread for processor devices. - */ num_threads = 1; } @@ -2251,7 +2254,7 @@ ctl_be_block_create(struct ctl_be_block_ * XXX This searching loop might be refactored to be combined with * the loop above, */ - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "num_threads"); + value = ctl_get_opt(&cbe_lun->options, "num_threads"); if (value != NULL) { tmp_num_threads = strtol(value, NULL, 0); @@ -2269,67 +2272,46 @@ ctl_be_block_create(struct ctl_be_block_ num_threads = tmp_num_threads; } - be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; - be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; if (be_lun->vn == NULL) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_OFFLINE; - if (be_lun->unmap != NULL) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; - if (be_lun->dispatch != ctl_be_block_dispatch_dev) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_SERSEQ_READ; - be_lun->ctl_be_lun.be_lun = be_lun; - be_lun->ctl_be_lun.maxlba = (be_lun->size_blocks == 0) ? - 0 : (be_lun->size_blocks - 1); - be_lun->ctl_be_lun.blocksize = be_lun->blocksize; - be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; - be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; - be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; - be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; - be_lun->ctl_be_lun.atomicblock = be_lun->atomicblock; - be_lun->ctl_be_lun.opttxferlen = be_lun->opttxferlen; + cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; /* Tell the user the blocksize we ended up using */ params->lun_size_bytes = be_lun->size_bytes; - params->blocksize_bytes = be_lun->blocksize; + params->blocksize_bytes = cbe_lun->blocksize; if (params->flags & CTL_LUN_FLAG_ID_REQ) { - be_lun->ctl_be_lun.req_lun_id = params->req_lun_id; - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ; + cbe_lun->req_lun_id = params->req_lun_id; + cbe_lun->flags |= CTL_LUN_FLAG_ID_REQ; } else - be_lun->ctl_be_lun.req_lun_id = 0; + cbe_lun->req_lun_id = 0; - be_lun->ctl_be_lun.lun_shutdown = ctl_be_block_lun_shutdown; - be_lun->ctl_be_lun.lun_config_status = - ctl_be_block_lun_config_status; - be_lun->ctl_be_lun.be = &ctl_be_block_driver; + cbe_lun->lun_shutdown = ctl_be_block_lun_shutdown; + cbe_lun->lun_config_status = ctl_be_block_lun_config_status; + cbe_lun->be = &ctl_be_block_driver; if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) { snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d", softc->num_luns); - strncpy((char *)be_lun->ctl_be_lun.serial_num, tmpstr, - MIN(sizeof(be_lun->ctl_be_lun.serial_num), - sizeof(tmpstr))); + strncpy((char *)cbe_lun->serial_num, tmpstr, + MIN(sizeof(cbe_lun->serial_num), sizeof(tmpstr))); /* Tell the user what we used for a serial number */ strncpy((char *)params->serial_num, tmpstr, MIN(sizeof(params->serial_num), sizeof(tmpstr))); } else { - strncpy((char *)be_lun->ctl_be_lun.serial_num, - params->serial_num, - MIN(sizeof(be_lun->ctl_be_lun.serial_num), + strncpy((char *)cbe_lun->serial_num, params->serial_num, + MIN(sizeof(cbe_lun->serial_num), sizeof(params->serial_num))); } if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) { snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns); - strncpy((char *)be_lun->ctl_be_lun.device_id, tmpstr, - MIN(sizeof(be_lun->ctl_be_lun.device_id), - sizeof(tmpstr))); + strncpy((char *)cbe_lun->device_id, tmpstr, + MIN(sizeof(cbe_lun->device_id), sizeof(tmpstr))); /* Tell the user what we used for a device ID */ strncpy((char *)params->device_id, tmpstr, MIN(sizeof(params->device_id), sizeof(tmpstr))); } else { - strncpy((char *)be_lun->ctl_be_lun.device_id, - params->device_id, - MIN(sizeof(be_lun->ctl_be_lun.device_id), + strncpy((char *)cbe_lun->device_id, params->device_id, + MIN(sizeof(cbe_lun->device_id), sizeof(params->device_id))); } @@ -2375,7 +2357,7 @@ ctl_be_block_create(struct ctl_be_block_ mtx_unlock(&softc->lock); - retval = ctl_add_lun(&be_lun->ctl_be_lun); + retval = ctl_add_lun(&be_lun->cbe_lun); if (retval != 0) { mtx_lock(&softc->lock); STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_block_lun, @@ -2413,15 +2395,15 @@ ctl_be_block_create(struct ctl_be_block_ mtx_unlock(&softc->lock); goto bailout_error; } else { - params->req_lun_id = be_lun->ctl_be_lun.lun_id; + params->req_lun_id = cbe_lun->lun_id; } mtx_unlock(&softc->lock); be_lun->disk_stats = devstat_new_entry("cbb", params->req_lun_id, - be_lun->blocksize, + cbe_lun->blocksize, DEVSTAT_ALL_SUPPORTED, - be_lun->ctl_be_lun.lun_type + cbe_lun->lun_type | DEVSTAT_TYPE_IF_OTHER, DEVSTAT_PRIORITY_OTHER); @@ -2437,7 +2419,7 @@ bailout_error: free(be_lun->dev_path, M_CTLBLK); if (be_lun->lun_zone != NULL) uma_zdestroy(be_lun->lun_zone); - ctl_free_opts(&be_lun->ctl_be_lun.options); + ctl_free_opts(&cbe_lun->options); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); free(be_lun, M_CTLBLK); @@ -2459,7 +2441,7 @@ ctl_be_block_rm(struct ctl_be_block_soft be_lun = NULL; STAILQ_FOREACH(be_lun, &softc->lun_list, links) { - if (be_lun->ctl_be_lun.lun_id == params->lun_id) + if (be_lun->cbe_lun.lun_id == params->lun_id) break; } mtx_unlock(&softc->lock); @@ -2471,7 +2453,7 @@ ctl_be_block_rm(struct ctl_be_block_soft goto bailout_error; } - retval = ctl_disable_lun(&be_lun->ctl_be_lun); + retval = ctl_disable_lun(&be_lun->cbe_lun); if (retval != 0) { snprintf(req->error_str, sizeof(req->error_str), @@ -2481,7 +2463,7 @@ ctl_be_block_rm(struct ctl_be_block_soft *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 08:52:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 494E9A10D66; Mon, 5 Oct 2015 08:52:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3917B1E6; Mon, 5 Oct 2015 08:52:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958qffk018390; Mon, 5 Oct 2015 08:52:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958qcnD018378; Mon, 5 Oct 2015 08:52:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050852.t958qcnD018378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288728 - in stable/10: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:52:41 -0000 Author: mav Date: Mon Oct 5 08:52:37 2015 New Revision: 288728 URL: https://svnweb.freebsd.org/changeset/base/288728 Log: MFC r287500: Allow LUN options modification via CTL_LUNREQ_MODIFY. Not all changes take effect, but that is a different question. Modified: stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctladm/ctladm.c stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 08:52:37 2015 (r288728) @@ -208,6 +208,8 @@ typedef STAILQ_HEAD(ctl_options, ctl_opt struct ctl_be_arg; void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); +void ctl_update_opts(ctl_options_t *opts, int num_args, + struct ctl_be_arg *args); void ctl_free_opts(ctl_options_t *opts); char * ctl_get_opt(ctl_options_t *opts, const char *name); int ctl_expand_number(const char *buf, uint64_t *num); Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 08:52:37 2015 (r288728) @@ -185,15 +185,48 @@ ctl_init_opts(ctl_options_t *opts, int n if ((args[i].flags & CTL_BEARG_ASCII) == 0) continue; opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); - opt->name = malloc(strlen(args[i].kname) + 1, M_CTL, M_WAITOK); - strcpy(opt->name, args[i].kname); - opt->value = malloc(strlen(args[i].kvalue) + 1, M_CTL, M_WAITOK); - strcpy(opt->value, args[i].kvalue); + opt->name = strdup(args[i].kname, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); STAILQ_INSERT_TAIL(opts, opt, links); } } void +ctl_update_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args) +{ + struct ctl_option *opt; + int i; + + for (i = 0; i < num_args; i++) { + if ((args[i].flags & CTL_BEARG_RD) == 0) + continue; + if ((args[i].flags & CTL_BEARG_ASCII) == 0) + continue; + STAILQ_FOREACH(opt, opts, links) { + if (strcmp(opt->name, args[i].kname) == 0) + break; + } + if (args[i].kvalue != NULL && + ((char *)args[i].kvalue)[0] != 0) { + if (opt) { + free(opt->value, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); + } else { + opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); + opt->name = strdup(args[i].kname, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); + STAILQ_INSERT_TAIL(opts, opt, links); + } + } else if (opt) { + STAILQ_REMOVE(opts, opt, ctl_option, links); + free(opt->name, M_CTL); + free(opt->value, M_CTL); + free(opt, M_CTL); + } + } +} + +void ctl_free_opts(ctl_options_t *opts) { struct ctl_option *opt; Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:52:37 2015 (r288728) @@ -2437,9 +2437,6 @@ ctl_be_block_rm(struct ctl_be_block_soft params = &req->reqdata.rm; mtx_lock(&softc->lock); - - be_lun = NULL; - STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) break; @@ -2603,13 +2600,13 @@ ctl_be_block_modify(struct ctl_be_block_ { struct ctl_lun_modify_params *params; struct ctl_be_block_lun *be_lun; + struct ctl_be_lun *cbe_lun; uint64_t oldsize; int error; params = &req->reqdata.modify; mtx_lock(&softc->lock); - be_lun = NULL; STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) break; @@ -2622,8 +2619,11 @@ ctl_be_block_modify(struct ctl_be_block_ params->lun_id); goto bailout_error; } + cbe_lun = &be_lun->cbe_lun; - be_lun->params.lun_size_bytes = params->lun_size_bytes; + if (params->lun_size_bytes != 0) + be_lun->params.lun_size_bytes = params->lun_size_bytes; + ctl_update_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); oldsize = be_lun->size_blocks; if (be_lun->vn == NULL) @@ -2636,11 +2636,11 @@ ctl_be_block_modify(struct ctl_be_block_ error = EINVAL; if (be_lun->size_blocks != oldsize) - ctl_lun_capacity_changed(&be_lun->cbe_lun); - if ((be_lun->cbe_lun.flags & CTL_LUN_FLAG_OFFLINE) && + ctl_lun_capacity_changed(cbe_lun); + if ((cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) && be_lun->vn != NULL) { - be_lun->cbe_lun.flags &= ~CTL_LUN_FLAG_OFFLINE; - ctl_lun_online(&be_lun->cbe_lun); + cbe_lun->flags &= ~CTL_LUN_FLAG_OFFLINE; + ctl_lun_online(cbe_lun); } /* Tell the user the exact size we ended up using */ Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:52:37 2015 (r288728) @@ -73,6 +73,7 @@ typedef enum { } ctl_be_ramdisk_lun_flags; struct ctl_be_ramdisk_lun { + struct ctl_lun_create_params params; char lunname[32]; uint64_t size_bytes; uint64_t size_blocks; @@ -535,6 +536,7 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun = malloc(sizeof(*be_lun), M_RAMDISK, M_ZERO | M_WAITOK); cbe_lun = &be_lun->cbe_lun; cbe_lun->be_lun = be_lun; + be_lun->params = req->reqdata.create; be_lun->softc = softc; sprintf(be_lun->lunname, "cram%d", softc->num_luns); ctl_init_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); @@ -713,13 +715,12 @@ ctl_backend_ramdisk_modify(struct ctl_be struct ctl_lun_req *req) { struct ctl_be_ramdisk_lun *be_lun; + struct ctl_be_lun *cbe_lun; struct ctl_lun_modify_params *params; uint32_t blocksize; params = &req->reqdata.modify; - be_lun = NULL; - mtx_lock(&softc->lock); STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) @@ -733,32 +734,22 @@ ctl_backend_ramdisk_modify(struct ctl_be __func__, params->lun_id); goto bailout_error; } + cbe_lun = &be_lun->cbe_lun; - if (params->lun_size_bytes == 0) { - snprintf(req->error_str, sizeof(req->error_str), - "%s: LUN size \"auto\" not supported " - "by the ramdisk backend", __func__); - goto bailout_error; - } - + if (params->lun_size_bytes != 0) + be_lun->params.lun_size_bytes = params->lun_size_bytes; + ctl_update_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); blocksize = be_lun->cbe_lun.blocksize; - if (params->lun_size_bytes < blocksize) { + if (be_lun->params.lun_size_bytes < blocksize) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN size %ju < blocksize %u", __func__, - params->lun_size_bytes, blocksize); + be_lun->params.lun_size_bytes, blocksize); goto bailout_error; } - be_lun->size_blocks = params->lun_size_bytes / blocksize; + be_lun->size_blocks = be_lun->params.lun_size_bytes / blocksize; be_lun->size_bytes = be_lun->size_blocks * blocksize; - - /* - * The maximum LBA is the size - 1. - * - * XXX: Note that this field is being updated without locking, - * which might cause problems on 32-bit architectures. - */ be_lun->cbe_lun.maxlba = be_lun->size_blocks - 1; ctl_lun_capacity_changed(&be_lun->cbe_lun); Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:52:37 2015 (r288728) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd May 22, 2015 +.Dd September 6, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -166,6 +166,7 @@ .Ic modify .Aq Fl b Ar backend .Aq Fl l Ar lun_id +.Op Fl o Ar name=value .Aq Fl s Ar size_bytes .Nm .Ic devlist @@ -859,6 +860,12 @@ and .Dq block . .It Fl l Ar lun_id Specify the LUN number to remove. +.It Fl o Ar name=value +Specify a backend-specific name/value pair. +Multiple +.Fl o +arguments may be specified. +Refer to the backend documentation for arguments that may be used. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. For the Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:52:37 2015 (r288728) @@ -183,7 +183,7 @@ static struct ctladm_opts option_table[] {"lunlist", CTLADM_CMD_LUNLIST, CTLADM_ARG_NONE, NULL}, {"lunmap", CTLADM_CMD_LUNMAP, CTLADM_ARG_NONE, "p:l:L:"}, {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"}, - {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:s:"}, + {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:o:s:"}, {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"}, {"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:ilp:qvx"}, {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"}, @@ -3169,8 +3169,11 @@ cctl_modify_lun(int fd, int argc, char * uint32_t lun_id = 0; int lun_id_set = 0, lun_size_set = 0; char *backend_name = NULL; + STAILQ_HEAD(, cctl_req_option) option_list; + int num_options = 0; int retval = 0, c; + STAILQ_INIT(&option_list); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'b': @@ -3180,6 +3183,43 @@ cctl_modify_lun(int fd, int argc, char * lun_id = strtoul(optarg, NULL, 0); lun_id_set = 1; break; + case 'o': { + struct cctl_req_option *option; + char *tmpstr; + char *name, *value; + + tmpstr = strdup(optarg); + name = strsep(&tmpstr, "="); + if (name == NULL) { + warnx("%s: option -o takes \"name=value\"" + "argument", __func__); + retval = 1; + goto bailout; + } + value = strsep(&tmpstr, "="); + if (value == NULL) { + warnx("%s: option -o takes \"name=value\"" + "argument", __func__); + retval = 1; + goto bailout; + } + option = malloc(sizeof(*option)); + if (option == NULL) { + warn("%s: error allocating %zd bytes", + __func__, sizeof(*option)); + retval = 1; + goto bailout; + } + option->name = strdup(name); + option->namelen = strlen(name) + 1; + option->value = strdup(value); + option->vallen = strlen(value) + 1; + free(tmpstr); + + STAILQ_INSERT_TAIL(&option_list, option, links); + num_options++; + break; + } case 's': if (strcasecmp(optarg, "auto") != 0) { retval = expand_number(optarg, &lun_size); @@ -3203,8 +3243,9 @@ cctl_modify_lun(int fd, int argc, char * if (lun_id_set == 0) errx(1, "%s: LUN id (-l) must be specified", __func__); - if (lun_size_set == 0) - errx(1, "%s: size (-s) must be specified", __func__); + if (lun_size_set == 0 && num_options == 0) + errx(1, "%s: size (-s) or options (-o) must be specified", + __func__); bzero(&req, sizeof(req)); @@ -3214,6 +3255,42 @@ cctl_modify_lun(int fd, int argc, char * req.reqdata.modify.lun_id = lun_id; req.reqdata.modify.lun_size_bytes = lun_size; + req.num_be_args = num_options; + if (num_options > 0) { + struct cctl_req_option *option, *next_option; + int i; + + req.be_args = malloc(num_options * sizeof(*req.be_args)); + if (req.be_args == NULL) { + warn("%s: error allocating %zd bytes", __func__, + num_options * sizeof(*req.be_args)); + retval = 1; + goto bailout; + } + + for (i = 0, option = STAILQ_FIRST(&option_list); + i < num_options; i++, option = next_option) { + next_option = STAILQ_NEXT(option, links); + + req.be_args[i].namelen = option->namelen; + req.be_args[i].name = strdup(option->name); + req.be_args[i].vallen = option->vallen; + req.be_args[i].value = strdup(option->value); + /* + * XXX KDM do we want a way to specify a writeable + * flag of some sort? Do we want a way to specify + * binary data? + */ + req.be_args[i].flags = CTL_BEARG_ASCII | CTL_BEARG_RD; + + STAILQ_REMOVE(&option_list, option, cctl_req_option, + links); + free(option->name); + free(option->value); + free(option); + } + } + if (ioctl(fd, CTL_LUN_REQ, &req) == -1) { warn("%s: error issuing CTL_LUN_REQ ioctl", __func__); retval = 1; Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 08:52:37 2015 (r288728) @@ -1944,18 +1944,14 @@ conf_apply(struct conf *oldconf, struct TAILQ_FOREACH_SAFE(newlun, &newconf->conf_luns, l_next, tmplun) { oldlun = lun_find(oldconf, newlun->l_name); if (oldlun != NULL) { - if (newlun->l_size != oldlun->l_size || - newlun->l_size == 0) { - log_debugx("resizing lun \"%s\", CTL lun %d", + log_debugx("modifying lun \"%s\", CTL lun %d", + newlun->l_name, newlun->l_ctl_lun); + error = kernel_lun_modify(newlun); + if (error != 0) { + log_warnx("failed to " + "modify lun \"%s\", CTL lun %d", newlun->l_name, newlun->l_ctl_lun); - error = kernel_lun_resize(newlun); - if (error != 0) { - log_warnx("failed to " - "resize lun \"%s\", CTL lun %d", - newlun->l_name, - newlun->l_ctl_lun); - cumulated_error++; - } + cumulated_error++; } continue; } Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 08:52:37 2015 (r288728) @@ -387,7 +387,7 @@ void lun_option_set(struct lun_option void kernel_init(void); int kernel_lun_add(struct lun *lun); -int kernel_lun_resize(struct lun *lun); +int kernel_lun_modify(struct lun *lun); int kernel_lun_remove(struct lun *lun); void kernel_handoff(struct connection *conn); int kernel_port_add(struct port *port); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:51:20 2015 (r288727) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 08:52:37 2015 (r288728) @@ -743,9 +743,11 @@ kernel_lun_add(struct lun *lun) } int -kernel_lun_resize(struct lun *lun) +kernel_lun_modify(struct lun *lun) { + struct lun_option *lo; struct ctl_lun_req req; + int error, i, num_options; bzero(&req, sizeof(req)); @@ -755,7 +757,30 @@ kernel_lun_resize(struct lun *lun) req.reqdata.modify.lun_id = lun->l_ctl_lun; req.reqdata.modify.lun_size_bytes = lun->l_size; - if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) { + num_options = 0; + TAILQ_FOREACH(lo, &lun->l_options, lo_next) + num_options++; + + req.num_be_args = num_options; + if (num_options > 0) { + req.be_args = malloc(num_options * sizeof(*req.be_args)); + if (req.be_args == NULL) { + log_warn("error allocating %zd bytes", + num_options * sizeof(*req.be_args)); + return (1); + } + + i = 0; + TAILQ_FOREACH(lo, &lun->l_options, lo_next) { + str_arg(&req.be_args[i], lo->lo_name, lo->lo_value); + i++; + } + assert(i == num_options); + } + + error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.be_args); + if (error != 0) { log_warn("error issuing CTL_LUN_REQ ioctl"); return (1); } From owner-svn-src-all@freebsd.org Mon Oct 5 08:54:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83AD4A10EA7; Mon, 5 Oct 2015 08:54:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69F71387; Mon, 5 Oct 2015 08:54:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958s4mq018503; Mon, 5 Oct 2015 08:54:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958s3R2018498; Mon, 5 Oct 2015 08:54:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050854.t958s3R2018498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288729 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:54:04 -0000 Author: mav Date: Mon Oct 5 08:54:02 2015 New Revision: 288729 URL: https://svnweb.freebsd.org/changeset/base/288729 Log: MFC r287534: Add two new portal group options "tag" and "foreign". They are going to be useful in clustered setups. Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 08:52:37 2015 (r288728) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 08:54:02 2015 (r288729) @@ -1,4 +1,5 @@ .\" Copyright (c) 2012 The FreeBSD Foundation +.\" Copyright (c) 2015 Alexander Motin .\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -27,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2015 +.Dd September 7, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -239,6 +240,15 @@ Redirection happens before authenticatio or .Sy initiator-portal checks are skipped. +.It Ic tag Ar value +Unique 16-bit tag value of this +.Sy portal-group . +If not specified, the value is generated automatically. +.It Ic foreign +Specifies that this +.Sy portal-group +is listened by some other host. +This host will announce it on discovery stage, but won't listen. .El .Ss target Context .Bl -tag -width indent Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 08:52:37 2015 (r288728) +++ stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 08:54:02 2015 (r288729) @@ -59,7 +59,7 @@ static volatile bool sigterm_received = static volatile bool sigalrm_received = false; static int nchildren = 0; -static uint16_t last_portal_group_tag = 0; +static uint16_t last_portal_group_tag = 0xff; static void usage(void) @@ -1212,6 +1212,7 @@ port_new(struct conf *conf, struct targe port->p_target = target; TAILQ_INSERT_TAIL(&pg->pg_ports, port, p_pgs); port->p_portal_group = pg; + port->p_foreign = pg->pg_foreign; return (port); } @@ -1717,14 +1718,16 @@ conf_verify(struct conf *conf) if (pg->pg_discovery_filter == PG_FILTER_UNKNOWN) pg->pg_discovery_filter = PG_FILTER_NONE; - if (!TAILQ_EMPTY(&pg->pg_ports)) { - if (pg->pg_redirection != NULL) { + if (pg->pg_redirection != NULL) { + if (!TAILQ_EMPTY(&pg->pg_ports)) { log_debugx("portal-group \"%s\" assigned " "to target, but configured " "for redirection", pg->pg_name); } pg->pg_unassigned = false; + } else if (!TAILQ_EMPTY(&pg->pg_ports)) { + pg->pg_unassigned = false; } else { if (strcmp(pg->pg_name, "default") != 0) log_warnx("portal-group \"%s\" not assigned " @@ -1818,6 +1821,8 @@ conf_apply(struct conf *oldconf, struct * Go through the new portal groups, assigning tags or preserving old. */ TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { + if (newpg->pg_tag != 0) + continue; oldpg = portal_group_find(oldconf, newpg->pg_name); if (oldpg != NULL) newpg->pg_tag = oldpg->pg_tag; @@ -1847,8 +1852,10 @@ conf_apply(struct conf *oldconf, struct * and missing in the new one. */ TAILQ_FOREACH_SAFE(oldport, &oldconf->conf_ports, p_next, tmpport) { + if (oldport->p_foreign) + continue; newport = port_find(newconf, oldport->p_name); - if (newport != NULL) + if (newport != NULL && !newport->p_foreign) continue; log_debugx("removing port \"%s\"", oldport->p_name); error = kernel_port_remove(oldport); @@ -1968,9 +1975,11 @@ conf_apply(struct conf *oldconf, struct * Now add new ports or modify existing ones. */ TAILQ_FOREACH(newport, &newconf->conf_ports, p_next) { + if (newport->p_foreign) + continue; oldport = port_find(oldconf, newport->p_name); - if (oldport == NULL) { + if (oldport == NULL || oldport->p_foreign) { log_debugx("adding port \"%s\"", newport->p_name); error = kernel_port_add(newport); } else { @@ -1994,6 +2003,8 @@ conf_apply(struct conf *oldconf, struct * Go through the new portals, opening the sockets as neccessary. */ TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { + if (newpg->pg_foreign) + continue; if (newpg->pg_unassigned) { log_debugx("not listening on portal-group \"%s\", " "not assigned to any target", Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 08:52:37 2015 (r288728) +++ stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 08:54:02 2015 (r288729) @@ -116,6 +116,7 @@ struct portal_group { char *pg_name; struct auth_group *pg_discovery_auth_group; int pg_discovery_filter; + int pg_foreign; bool pg_unassigned; TAILQ_HEAD(, portal) pg_portals; TAILQ_HEAD(, port) pg_ports; @@ -144,6 +145,7 @@ struct port { struct portal_group *p_portal_group; struct pport *p_pport; struct target *p_target; + int p_foreign; uint32_t p_ctl_port; }; Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Mon Oct 5 08:52:37 2015 (r288728) +++ stable/10/usr.sbin/ctld/parse.y Mon Oct 5 08:54:02 2015 (r288729) @@ -58,10 +58,11 @@ extern void yyrestart(FILE *); %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL %token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP DISCOVERY_FILTER +%token FOREIGN %token INITIATOR_NAME INITIATOR_PORTAL ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT %token LISTEN LISTEN_ISER LUN MAXPROC OPENING_BRACKET OPTION %token PATH PIDFILE PORT PORTAL_GROUP REDIRECT SEMICOLON SERIAL SIZE STR -%token TARGET TIMEOUT +%token TAG TARGET TIMEOUT %union { @@ -337,11 +338,15 @@ portal_group_entry: | portal_group_discovery_filter | + portal_group_foreign + | portal_group_listen | portal_group_listen_iser | portal_group_redirect + | + portal_group_tag ; portal_group_discovery_auth_group: DISCOVERY_AUTH_GROUP STR @@ -375,6 +380,13 @@ portal_group_discovery_filter: DISCOVERY } ; +portal_group_foreign: FOREIGN + { + + portal_group->pg_foreign = 1; + } + ; + portal_group_listen: LISTEN STR { int error; @@ -408,6 +420,20 @@ portal_group_redirect: REDIRECT STR } ; +portal_group_tag: TAG STR + { + uint64_t tmp; + + if (expand_number($2, &tmp) != 0) { + yyerror("invalid numeric value"); + free($2); + return (1); + } + + portal_group->pg_tag = tmp; + } + ; + lun: LUN lun_name OPENING_BRACKET lun_entries CLOSING_BRACKET { Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Mon Oct 5 08:52:37 2015 (r288728) +++ stable/10/usr.sbin/ctld/token.l Mon Oct 5 08:54:02 2015 (r288729) @@ -58,6 +58,7 @@ debug { return DEBUG; } device-id { return DEVICE_ID; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } discovery-filter { return DISCOVERY_FILTER; } +foreign { return FOREIGN; } initiator-name { return INITIATOR_NAME; } initiator-portal { return INITIATOR_PORTAL; } listen { return LISTEN; } @@ -75,6 +76,7 @@ portal-group { return PORTAL_GROUP; } redirect { return REDIRECT; } serial { return SERIAL; } size { return SIZE; } +tag { return TAG; } target { return TARGET; } timeout { return TIMEOUT; } \"[^"]+\" { yylval.str = strndup(yytext + 1, From owner-svn-src-all@freebsd.org Mon Oct 5 08:55:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6201A10F86; Mon, 5 Oct 2015 08:55:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76B07A3; Mon, 5 Oct 2015 08:55:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958t1Mk018622; Mon, 5 Oct 2015 08:55:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958t1hj018620; Mon, 5 Oct 2015 08:55:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050855.t958t1hj018620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288730 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:55:02 -0000 Author: mav Date: Mon Oct 5 08:55:00 2015 New Revision: 288730 URL: https://svnweb.freebsd.org/changeset/base/288730 Log: MFC r287618: Disable CTL_IO_DELAY feature. It is too developer-oriented to be enabled by default. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:54:02 2015 (r288729) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:55:00 2015 (r288730) @@ -1190,15 +1190,6 @@ ctl_init(void) SYSCTL_ADD_PROC(&softc->sysctl_ctx,SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "ha_state", CTLTYPE_INT | CTLFLAG_RWTUN, softc, 0, ctl_ha_state_sysctl, "I", "HA state for this head"); - -#ifdef CTL_IO_DELAY - if (sizeof(struct callout) > CTL_TIMER_BYTES) { - printf("sizeof(struct callout) %zd > CTL_TIMER_BYTES %zd\n", - sizeof(struct callout), CTL_TIMER_BYTES); - return (EINVAL); - } -#endif /* CTL_IO_DELAY */ - return (0); } @@ -12200,12 +12191,10 @@ ctl_datamove(union ctl_io *io) lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { - struct callout *callout; - callout = (struct callout *)&io->io_hdr.timer_bytes; - callout_init(callout, /*mpsafe*/ 1); + callout_init(&io->io_hdr.delay_callout, /*mpsafe*/ 1); io->io_hdr.flags |= CTL_FLAG_DELAY_DONE; - callout_reset(callout, + callout_reset(&io->io_hdr.delay_callout, lun->delay_info.datamove_delay * hz, ctl_datamove_timer_wakeup, io); if (lun->delay_info.datamove_type == @@ -13450,12 +13439,10 @@ ctl_done(union ctl_io *io) if ((lun != NULL) && (lun->delay_info.done_delay > 0)) { - struct callout *callout; - callout = (struct callout *)&io->io_hdr.timer_bytes; - callout_init(callout, /*mpsafe*/ 1); + callout_init(&io->io_hdr.delay_callout, /*mpsafe*/ 1); io->io_hdr.flags |= CTL_FLAG_DELAY_DONE; - callout_reset(callout, + callout_reset(&io->io_hdr.delay_callout, lun->delay_info.done_delay * hz, ctl_done_timer_wakeup, io); if (lun->delay_info.done_type == CTL_DELAY_TYPE_ONESHOT) Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:54:02 2015 (r288729) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:55:00 2015 (r288730) @@ -58,13 +58,12 @@ EXTERN(int ctl_time_io_secs, CTL_TIME_IO #endif /* - * Uncomment these next two lines to enable the CTL I/O delay feature. You + * Uncomment this next line to enable the CTL I/O delay feature. You * can delay I/O at two different points -- datamove and done. This is * useful for diagnosing abort conditions (for hosts that send an abort on a * timeout), and for determining how long a host's timeout is. */ -#define CTL_IO_DELAY -#define CTL_TIMER_BYTES sizeof(struct callout) +//#define CTL_IO_DELAY typedef enum { CTL_STATUS_NONE, /* No status */ @@ -231,7 +230,7 @@ struct ctl_io_hdr { uint32_t timeout; /* timeout in ms */ uint32_t retries; /* retry count */ #ifdef CTL_IO_DELAY - uint8_t timer_bytes[CTL_TIMER_BYTES]; /* timer kludge */ + struct callout delay_callout; #endif /* CTL_IO_DELAY */ #ifdef CTL_TIME_IO time_t start_time; /* I/O start time */ From owner-svn-src-all@freebsd.org Mon Oct 5 08:56:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AF07A100BB; Mon, 5 Oct 2015 08:56:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AA2C92C; Mon, 5 Oct 2015 08:56:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958u4kk018735; Mon, 5 Oct 2015 08:56:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958u0gq018719; Mon, 5 Oct 2015 08:56:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050856.t958u0gq018719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288731 - in stable/10: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:56:04 -0000 Author: mav Date: Mon Oct 5 08:55:59 2015 New Revision: 288731 URL: https://svnweb.freebsd.org/changeset/base/288731 Log: MFC r287620: Remove unused target and initiator IDs. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/cam/ctl/ctl_scsi_all.c stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/ctl/ctl_util.c stable/10/sys/cam/ctl/ctl_util.h stable/10/sys/cam/ctl/scsi_ctl.c stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:55:59 2015 (r288731) @@ -571,15 +571,14 @@ ctl_isc_handler_finish_ser_only(struct c printf("%s: %p use after free!\n", __func__, ctsio); printf("%s: type %d msg %d cdb %x iptl: " - "%d:%d:%d:%d tag 0x%04x " + "%u:%u:%u tag 0x%04x " "flag %#x status %x\n", __func__, tmp_io->io_hdr.io_type, tmp_io->io_hdr.msg_type, tmp_io->scsiio.cdb[0], - tmp_io->io_hdr.nexus.initid.id, + tmp_io->io_hdr.nexus.initid, tmp_io->io_hdr.nexus.targ_port, - tmp_io->io_hdr.nexus.targ_target.id, tmp_io->io_hdr.nexus.targ_lun, (tmp_io->io_hdr.io_type == CTL_IO_TASK) ? @@ -667,10 +666,9 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.flags |= CTL_FLAG_INT_COPY; io->io_hdr.nexus = msg_info.hdr.nexus; #if 0 - printf("targ %d, port %d, iid %d, lun %d\n", - io->io_hdr.nexus.targ_target.id, + printf("port %u, iid %u, lun %u\n", io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid.id, + io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_lun); #endif io->scsiio.tag_num = msg_info.scsi.tag_num; @@ -3070,10 +3068,10 @@ uint32_t ctl_get_initindex(struct ctl_nexus *nexus) { if (nexus->targ_port < CTL_MAX_PORTS) - return (nexus->initid.id + + return (nexus->initid + (nexus->targ_port * CTL_MAX_INIT_PER_PORT)); else - return (nexus->initid.id + + return (nexus->initid + ((nexus->targ_port - CTL_MAX_PORTS) * CTL_MAX_INIT_PER_PORT)); } @@ -3081,7 +3079,7 @@ ctl_get_initindex(struct ctl_nexus *nexu uint32_t ctl_get_resindex(struct ctl_nexus *nexus) { - return (nexus->initid.id + (nexus->targ_port * CTL_MAX_INIT_PER_PORT)); + return (nexus->initid + (nexus->targ_port * CTL_MAX_INIT_PER_PORT)); } uint32_t @@ -10434,8 +10432,8 @@ ctl_check_for_blockage(struct ctl_lun *l && (ooa_io->scsiio.tag_type == CTL_TAG_UNTAGGED) && ((pending_io->io_hdr.nexus.targ_port == ooa_io->io_hdr.nexus.targ_port) - && (pending_io->io_hdr.nexus.initid.id == - ooa_io->io_hdr.nexus.initid.id)) + && (pending_io->io_hdr.nexus.initid == + ooa_io->io_hdr.nexus.initid)) && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP); @@ -10456,8 +10454,8 @@ ctl_check_for_blockage(struct ctl_lun *l && (pending_io->scsiio.tag_num == ooa_io->scsiio.tag_num) && ((pending_io->io_hdr.nexus.targ_port == ooa_io->io_hdr.nexus.targ_port) - && (pending_io->io_hdr.nexus.initid.id == - ooa_io->io_hdr.nexus.initid.id)) + && (pending_io->io_hdr.nexus.initid == + ooa_io->io_hdr.nexus.initid)) && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP_TAG); @@ -11571,9 +11569,9 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, if ((targ_port == UINT32_MAX || targ_port == xio->io_hdr.nexus.targ_port) && (init_id == UINT32_MAX || - init_id == xio->io_hdr.nexus.initid.id)) { + init_id == xio->io_hdr.nexus.initid)) { if (targ_port != xio->io_hdr.nexus.targ_port || - init_id != xio->io_hdr.nexus.initid.id) + init_id != xio->io_hdr.nexus.initid) xio->io_hdr.flags |= CTL_FLAG_ABORT_STATUS; xio->io_hdr.flags |= CTL_FLAG_ABORT; if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { @@ -11616,7 +11614,7 @@ ctl_abort_task_set(union ctl_io *io) mtx_unlock(&softc->ctl_lock); if (io->taskio.task_action == CTL_TASK_ABORT_TASK_SET) { ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid.id, + io->io_hdr.nexus.initid, (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); } else { /* CTL_TASK_CLEAR_TASK_SET */ ctl_abort_tasks_lun(lun, UINT32_MAX, UINT32_MAX, @@ -11639,7 +11637,7 @@ ctl_i_t_nexus_reset(union ctl_io *io) STAILQ_FOREACH(lun, &softc->lun_list, links) { mtx_lock(&lun->lun_lock); ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid.id, + io->io_hdr.nexus.initid, (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); #ifdef CTL_WITH_CA ctl_clear_mask(lun->have_ca, initidx); @@ -11718,7 +11716,7 @@ ctl_abort_task(union ctl_io *io) #endif if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) - || (xio->io_hdr.nexus.initid.id != io->io_hdr.nexus.initid.id) + || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) || (xio->io_hdr.flags & CTL_FLAG_ABORT)) continue; @@ -11780,10 +11778,9 @@ ctl_abort_task(union ctl_io *io) */ #if 0 printf("ctl_abort_task: ABORT sent for nonexistent I/O: " - "%d:%d:%d:%d tag %d type %d\n", - io->io_hdr.nexus.initid.id, + "%u:%u:%u tag %d type %d\n", + io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun, io->taskio.tag_num, io->taskio.tag_type); #endif @@ -12210,10 +12207,9 @@ ctl_datamove(union ctl_io *io) * the data move. */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { - printf("ctl_datamove: tag 0x%04x on (%ju:%d:%ju:%d) aborted\n", - io->scsiio.tag_num,(uintmax_t)io->io_hdr.nexus.initid.id, + printf("ctl_datamove: tag 0x%04x on (%u:%u:%u) aborted\n", + io->scsiio.tag_num, io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - (uintmax_t)io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun); io->io_hdr.port_status = 31337; /* @@ -12981,10 +12977,9 @@ ctl_datamove_remote(union ctl_io *io) * have been done if need be on the other controller. */ if (io->io_hdr.flags & CTL_FLAG_ABORT) { - printf("%s: tag 0x%04x on (%d:%d:%d:%d) aborted\n", __func__, - io->scsiio.tag_num, io->io_hdr.nexus.initid.id, + printf("%s: tag 0x%04x on (%u:%u:%u) aborted\n", __func__, + io->scsiio.tag_num, io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun); io->io_hdr.port_status = 31338; ctl_send_datamove_done(io, /*have_lock*/ 0); @@ -13379,15 +13374,14 @@ ctl_done(union ctl_io *io) #if 0 if (io->io_hdr.flags & CTL_FLAG_ALREADY_DONE) { printf("%s: type %d msg %d cdb %x iptl: " - "%d:%d:%d:%d tag 0x%04x " + "%u:%u:%u tag 0x%04x " "flag %#x status %x\n", __func__, io->io_hdr.io_type, io->io_hdr.msg_type, io->scsiio.cdb[0], - io->io_hdr.nexus.initid.id, + io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun, (io->io_hdr.io_type == CTL_IO_TASK) ? @@ -13651,7 +13645,7 @@ ctl_enqueue_incoming(union ctl_io *io) u_int idx; idx = (io->io_hdr.nexus.targ_port * 127 + - io->io_hdr.nexus.initid.id) % worker_threads; + io->io_hdr.nexus.initid) % worker_threads; thr = &softc->threads[idx]; mtx_lock(&thr->queue_lock); STAILQ_INSERT_TAIL(&thr->incoming_queue, &io->io_hdr, links); Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_frontend.h Mon Oct 5 08:55:59 2015 (r288731) @@ -125,12 +125,12 @@ struct ctl_wwpn_iid { * port_online(): This function is called, with onoff_arg as its * argument, by the CTL layer when it wants the FETD * to start responding to selections on the specified - * target ID. (targ_target) + * target ID. * * port_offline(): This function is called, with onoff_arg as its * argument, by the CTL layer when it wants the FETD * to stop responding to selection on the specified - * target ID. (targ_target) + * target ID. * * onoff_arg: This is supplied as an argument to port_online() * and port_offline(). This is specified by the Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 08:55:59 2015 (r288731) @@ -546,12 +546,8 @@ cfcs_action(struct cam_sim *sim, union c * down via the XPT_RESET_BUS/LUN CCBs below. */ io->io_hdr.io_type = CTL_IO_SCSI; - io->io_hdr.nexus.initid.id = 1; + io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - /* - * XXX KDM how do we handle target IDs? - */ - io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id; io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; /* * This tag scheme isn't the best, since we could in theory @@ -639,9 +635,8 @@ cfcs_action(struct cam_sim *sim, union c ccb->ccb_h.io_ptr = io; io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid.id = 1; + io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id; io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; io->taskio.task_action = CTL_TASK_ABORT_TASK; io->taskio.tag_num = abort_ccb->csio.tag_id; @@ -735,9 +730,8 @@ cfcs_action(struct cam_sim *sim, union c ccb->ccb_h.io_ptr = io; io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid.id = 0; + io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - io->io_hdr.nexus.targ_target.id = ccb->ccb_h.target_id; io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; if (ccb->ccb_h.func_code == XPT_RESET_BUS) io->taskio.task_action = CTL_TASK_BUS_RESET; Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 08:55:59 2015 (r288731) @@ -561,9 +561,8 @@ cfiscsi_pdu_handle_scsi_command(struct i ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_SCSI; - io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; + io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhssc->bhssc_lun); io->scsiio.tag_num = bhssc->bhssc_initiator_task_tag; switch ((bhssc->bhssc_flags & BHSSC_FLAGS_ATTR)) { @@ -618,9 +617,8 @@ cfiscsi_pdu_handle_task_request(struct i ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = request; io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; + io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhstmr->bhstmr_lun); io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ @@ -1078,9 +1076,8 @@ cfiscsi_session_terminate_tasks(struct c ctl_zero_io(io); io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = cs; io->io_hdr.io_type = CTL_IO_TASK; - io->io_hdr.nexus.initid.id = cs->cs_ctl_initid; + io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = 0; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 08:55:59 2015 (r288731) @@ -183,11 +183,6 @@ struct ctl_sg_entry { size_t len; }; -struct ctl_id { - uint32_t id; - uint64_t wwid[2]; -}; - typedef enum { CTL_IO_NONE, CTL_IO_SCSI, @@ -195,9 +190,8 @@ typedef enum { } ctl_io_type; struct ctl_nexus { - struct ctl_id initid; /* Initiator ID */ + uint32_t initid; /* Initiator ID */ uint32_t targ_port; /* Target port, filled in by PORT */ - struct ctl_id targ_target; /* Destination target */ uint32_t targ_lun; /* Destination lun */ uint32_t targ_mapped_lun; /* Destination lun CTL-wide */ }; Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 08:55:59 2015 (r288731) @@ -86,7 +86,6 @@ typedef enum { } ctl_ooa_status; struct ctl_ooa_info { - uint32_t target_id; /* Passed in to CTL */ uint32_t lun_id; /* Passed in to CTL */ uint32_t num_entries; /* Returned from CTL */ ctl_ooa_status status; /* Returned from CTL */ @@ -114,7 +113,6 @@ typedef enum { } ctl_delay_status; struct ctl_io_delay_info { - uint32_t target_id; uint32_t lun_id; ctl_delay_type delay_type; ctl_delay_location delay_loc; @@ -133,7 +131,6 @@ typedef enum { * means that we will let through every N SYNCHRONIZE CACHE commands. */ struct ctl_sync_info { - uint32_t target_id; /* passed to kernel */ uint32_t lun_id; /* passed to kernel */ int sync_interval; /* depends on whether get/set */ ctl_gs_sync_status status; /* passed from kernel */ @@ -262,7 +259,6 @@ struct ctl_error_desc_cmd { /* * Error injection descriptor. * - * target_id: Target ID to act on. * lun_id LUN to act on. * lun_error: The type of error to inject. See above for descriptions. * error_pattern: What kind of command to act on. See above. @@ -273,7 +269,6 @@ struct ctl_error_desc_cmd { * links: Kernel use only. */ struct ctl_error_desc { - uint32_t target_id; /* To kernel */ uint32_t lun_id; /* To kernel */ ctl_lun_error lun_error; /* To kernel */ ctl_lun_error_pattern error_pattern; /* To kernel */ Modified: stable/10/sys/cam/ctl/ctl_scsi_all.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_scsi_all.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_scsi_all.c Mon Oct 5 08:55:59 2015 (r288731) @@ -114,7 +114,7 @@ ctl_scsi_path_string(union ctl_io *io, c { snprintf(path_str, len, "(%u:%u:%u/%u): ", - io->io_hdr.nexus.initid.id, io->io_hdr.nexus.targ_port, + io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, io->io_hdr.nexus.targ_lun, io->io_hdr.nexus.targ_mapped_lun); } Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 08:55:59 2015 (r288731) @@ -328,9 +328,8 @@ tpcl_queue(union ctl_io *io, uint64_t lu { struct tpcl_softc *tsoftc = &tpcl_softc; - io->io_hdr.nexus.initid.id = 0; + io->io_hdr.nexus.initid = 0; io->io_hdr.nexus.targ_port = tsoftc->port.targ_port; - io->io_hdr.nexus.targ_target.id = 0; io->io_hdr.nexus.targ_lun = lun; io->scsiio.tag_num = atomic_fetchadd_int(&tsoftc->cur_tag_num, 1); io->scsiio.ext_data_filled = 0; Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 08:55:59 2015 (r288731) @@ -679,7 +679,7 @@ ctl_scsi_maintenance_in(union ctl_io *io #ifndef _KERNEL union ctl_io * -ctl_scsi_alloc_io(struct ctl_id initid) +ctl_scsi_alloc_io(uint32_t initid) { union ctl_io *io; Modified: stable/10/sys/cam/ctl/ctl_util.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.h Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/ctl_util.h Mon Oct 5 08:55:59 2015 (r288731) @@ -94,7 +94,7 @@ void ctl_scsi_maintenance_in(union ctl_i uint32_t data_len, uint8_t action, ctl_tag_type tag_type, uint8_t control); #ifndef _KERNEL -union ctl_io *ctl_scsi_alloc_io(struct ctl_id initid); +union ctl_io *ctl_scsi_alloc_io(uint32_t initid); void ctl_scsi_free_io(union ctl_io *io); #endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io); Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 08:55:59 2015 (r288731) @@ -1164,9 +1164,8 @@ ctlfedone(struct cam_periph *periph, uni * down the immediate notify path below. */ io->io_hdr.io_type = CTL_IO_SCSI; - io->io_hdr.nexus.initid.id = atio->init_id; + io->io_hdr.nexus.initid = atio->init_id; io->io_hdr.nexus.targ_port = bus_softc->port.targ_port; - io->io_hdr.nexus.targ_target.id = atio->ccb_h.target_id; io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun; io->scsiio.tag_num = atio->tag_id; switch (atio->tag_action) { @@ -1200,10 +1199,9 @@ ctlfedone(struct cam_periph *periph, uni io->scsiio.cdb_len); #ifdef CTLFEDEBUG - printf("%s: %ju:%d:%ju:%d: tag %04x CDB %02x\n", __func__, - (uintmax_t)io->io_hdr.nexus.initid.id, + printf("%s: %u:%u:%u: tag %04x CDB %02x\n", __func__, + io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_port, - (uintmax_t)io->io_hdr.nexus.targ_target.id, io->io_hdr.nexus.targ_lun, io->scsiio.tag_num, io->scsiio.cdb[0]); #endif @@ -1440,9 +1438,8 @@ ctlfedone(struct cam_periph *periph, uni io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr =done_ccb; inot->ccb_h.io_ptr = io; - io->io_hdr.nexus.initid.id = inot->initiator_id; + io->io_hdr.nexus.initid = inot->initiator_id; io->io_hdr.nexus.targ_port = bus_softc->port.targ_port; - io->io_hdr.nexus.targ_target.id = inot->ccb_h.target_id; io->io_hdr.nexus.targ_lun = inot->ccb_h.target_lun; /* XXX KDM should this be the tag_id? */ io->taskio.tag_num = inot->seq_id; Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 08:55:59 2015 (r288731) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd September 6, 2015 +.Dd September 10, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -43,28 +43,28 @@ .Sh SYNOPSIS .Nm .Aq Ar command -.Op target:lun +.Op lun .Op generic args .Op command args .Nm .Ic tur -.Aq target:lun +.Aq lun .Op general options .Nm .Ic inquiry -.Aq target:lun +.Aq lun .Op general options .Nm .Ic reqsense -.Aq target:lun +.Aq lun .Op general options .Nm .Ic reportluns -.Aq target:lun +.Aq lun .Op general options .Nm .Ic read -.Aq target:lun +.Aq lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen @@ -74,7 +74,7 @@ .Op Fl N .Nm .Ic write -.Aq target:lun +.Aq lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen @@ -84,12 +84,12 @@ .Op Fl N .Nm .Ic readcap -.Aq target:lun +.Aq lun .Op general options .Op Fl c Ar cdbsize .Nm .Ic modesense -.Aq target:lun +.Aq lun .Aq Fl m Ar page | Fl l .Op Fl P Ar pc .Op Fl d @@ -97,19 +97,19 @@ .Op Fl c Ar size .Nm .Ic start -.Aq target:lun +.Aq lun .Op general options .Op Fl i .Op Fl o .Nm .Ic stop -.Aq target:lun +.Aq lun .Op general options .Op Fl i .Op Fl o .Nm .Ic synccache -.Aq target:lun +.Aq lun .Op general options .Op Fl l Ar lba .Op Fl b Ar blockcount @@ -126,7 +126,7 @@ .Ic lunlist .Nm .Ic delay -.Aq target:lun +.Aq lun .Aq Fl l Ar datamove|done .Aq Fl t Ar secs .Op Fl T Ar oneshot|cont @@ -134,11 +134,11 @@ .Ic realsync Aq on|off|query .Nm .Ic setsync interval -.Aq target:lun +.Aq lun .Aq Fl i Ar interval .Nm .Ic getsync -.Aq target:lun +.Aq lun .Nm .Ic inject .Aq Fl i Ar action @@ -236,8 +236,8 @@ utility has a number of primary function identifier. The device identifier takes the following form: .Bl -tag -width 14n -.It target:lun -Specify the target (almost always 0) and LUN number to operate on. +.It lun +Specify the LUN number to operate on. .El Many of the primary functions of the .Nm @@ -570,7 +570,7 @@ sending SYNCHRONIZE cache commands. An will be flushed for this LUN every time a SYNCHRONIZE CACHE command is received. .Pp -You must specify the target and LUN you want to modify. +You must specify the LUN you want to modify. .It Ic getsync Get the interval at which we actually service the SYNCHRONIZE CACHE command, as set by the @@ -580,7 +580,7 @@ The reported number means that we will a Nth SYNCHRONIZE CACHE command. A value of 0 means that we will flush the cache every time. .Pp -You must specify the target and LUN you want to query. +You must specify the LUN you want to query. .It Ic inject Inject the specified type of error for the LUN specified, when a command that matches the given pattern is seen. @@ -1024,34 +1024,34 @@ Specifies file or device name to use for Specifies number of backend threads to use for this LUN. .El .Sh EXAMPLES -.Dl ctladm tur 0:1 +.Dl ctladm tur 1 .Pp Send a .Tn SCSI TEST UNIT READY command to LUN 1. .Pp -.Dl ctladm modesense 0:1 -l +.Dl ctladm modesense 1 -l .Pp Display the list of mode pages supported by LUN 1. .Pp -.Dl ctladm modesense 0:0 -m 10 -P 3 -d -c 10 +.Dl ctladm modesense 0 -m 10 -P 3 -d -c 10 .Pp Display the saved version of the Control mode page (page 10) on LUN 0. Disable fetching block descriptors, and use a 10 byte MODE SENSE command instead of the default 6 byte command. .Bd -literal -ctladm read 0:2 -l 0 -d 1 -b 512 -f - > foo +ctladm read 2 -l 0 -d 1 -b 512 -f - > foo .Ed .Pp Read the first 512 byte block from LUN 2 and dump it to the file .Pa foo . .Bd -literal -ctladm write 0:3 -l 0xff432140 -d 20 -b 512 -f /tmp/bar +ctladm write 3 -l 0xff432140 -d 20 -b 512 -f /tmp/bar .Ed .Pp Read 10240 bytes from the file .Pa /tmp/bar -and write it to target 0, LUN 3. +and write it to LUN 3. starting at LBA 0xff432140. .Pp .Dl ctladm create -b ramdisk -s 10485760000000000 @@ -1095,12 +1095,12 @@ List all LUNs in the system, along with This only works when the FETDs are enabled, since the commands go through the ioctl port. .Pp -.Dl ctladm inject 0:6 -i mediumerr -p read -r 0,512 -c +.Dl ctladm inject 6 -i mediumerr -p read -r 0,512 -c .Pp Inject a medium error on LUN 6 for every read that covers the first 512 blocks of the LUN. .Bd -literal -offset indent -ctladm inject 0:6 -i custom -p tur -s 18 "f0 0 02 s12 04 02" +ctladm inject 6 -i custom -p tur -s 18 "f0 0 02 s12 04 02" .Ed .Pp Inject a custom error on LUN 6 for the next TEST UNIT READY command only. Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:55:00 2015 (r288730) +++ stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 08:55:59 2015 (r288731) @@ -211,49 +211,47 @@ static struct ctladm_opts option_table[] ctladm_optret getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum, ctladm_cmdargs *argnum, const char **subopt); -static int cctl_parse_tl(char *str, int *target, int *lun); static int cctl_dump_ooa(int fd, int argc, char **argv); static int cctl_port_dump(int fd, int quiet, int xml, int32_t fe_num, ctl_port_type port_type); static int cctl_port(int fd, int argc, char **argv, char *combinedopt); static int cctl_do_io(int fd, int retries, union ctl_io *io, const char *func); -static int cctl_delay(int fd, int target, int lun, int argc, char **argv, +static int cctl_delay(int fd, int lun, int argc, char **argv, char *combinedopt); static int cctl_lunlist(int fd); -static int cctl_startup_shutdown(int fd, int target, int lun, int iid, +static int cctl_startup_shutdown(int fd, int lun, int iid, ctladm_cmdfunction command); -static int cctl_sync_cache(int fd, int target, int lun, int iid, int retries, +static int cctl_sync_cache(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt); -static int cctl_start_stop(int fd, int target, int lun, int iid, int retries, +static int cctl_start_stop(int fd, int lun, int iid, int retries, int start, int argc, char **argv, char *combinedopt); -static int cctl_mode_sense(int fd, int target, int lun, int iid, int retries, +static int cctl_mode_sense(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt); -static int cctl_read_capacity(int fd, int target, int lun, int iid, +static int cctl_read_capacity(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt); -static int cctl_read_write(int fd, int target, int lun, int iid, int retries, +static int cctl_read_write(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt, ctladm_cmdfunction command); -static int cctl_get_luns(int fd, int target, int lun, int iid, int retries, +static int cctl_get_luns(int fd, int lun, int iid, int retries, struct scsi_report_luns_data **lun_data, uint32_t *num_luns); -static int cctl_report_luns(int fd, int target, int lun, int iid, int retries); -static int cctl_tur(int fd, int target, int lun, int iid, int retries); -static int cctl_get_inquiry(int fd, int target, int lun, int iid, int retries, +static int cctl_report_luns(int fd, int lun, int iid, int retries); +static int cctl_tur(int fd, int lun, int iid, int retries); +static int cctl_get_inquiry(int fd, int lun, int iid, int retries, char *path_str, int path_len, struct scsi_inquiry_data *inq_data); -static int cctl_inquiry(int fd, int target, int lun, int iid, int retries); -static int cctl_req_sense(int fd, int target, int lun, int iid, int retries); -static int cctl_persistent_reserve_in(int fd, int target, int lun, +static int cctl_inquiry(int fd, int lun, int iid, int retries); +static int cctl_req_sense(int fd, int lun, int iid, int retries); +static int cctl_persistent_reserve_in(int fd, int lun, int initiator, int argc, char **argv, char *combinedopt, int retry_count); -static int cctl_persistent_reserve_out(int fd, int target, int lun, +static int cctl_persistent_reserve_out(int fd, int lun, int initiator, int argc, char **argv, char *combinedopt, int retry_count); static int cctl_create_lun(int fd, int argc, char **argv, char *combinedopt); -static int cctl_inquiry_vpd_devid(int fd, int target, int lun, int initiator); -static int cctl_report_target_port_group(int fd, int target, int lun, - int initiator); +static int cctl_inquiry_vpd_devid(int fd, int lun, int initiator); +static int cctl_report_target_port_group(int fd, int lun, int initiator); static int cctl_modify_lun(int fd, int argc, char **argv, char *combinedopt); ctladm_optret @@ -284,50 +282,20 @@ getoption(struct ctladm_opts *table, cha return(CC_OR_NOT_FOUND); } - -static int -cctl_parse_tl(char *str, int *target, int *lun) -{ - char *tmpstr; - int retval; - - retval = 0; - - while (isspace(*str) && (*str != '\0')) - str++; - - tmpstr = (char *)strtok(str, ":"); - if ((tmpstr != NULL) && (*tmpstr != '\0')) { - *target = strtol(tmpstr, NULL, 0); - tmpstr = (char *)strtok(NULL, ":"); - if ((tmpstr != NULL) && (*tmpstr != '\0')) { - *lun = strtol(tmpstr, NULL, 0); - } else - retval = -1; - } else - retval = -1; - - return (retval); -} - static int cctl_dump_ooa(int fd, int argc, char **argv) { struct ctl_ooa ooa; long double cmd_latency; int num_entries, len; - int target = -1, lun = -1; + int lun = -1; int retval; unsigned int i; num_entries = 104; - if ((argc > 2) - && (isdigit(argv[2][0]))) { - retval = cctl_parse_tl(argv[2], &target, &lun); - if (retval != 0) - warnx("invalid target:lun argument %s", argv[2]); - } + if ((argc > 2) && (isdigit(argv[2][0]))) + lun = strtol(argv[2], NULL, 0); retry: len = num_entries * sizeof(struct ctl_ooa_entry); @@ -776,7 +744,7 @@ cctl_do_io(int fd, int retries, union ct } static int -cctl_delay(int fd, int target, int lun, int argc, char **argv, +cctl_delay(int fd, int lun, int argc, char **argv, char *combinedopt) { struct ctl_io_delay_info delay_info; @@ -831,7 +799,6 @@ cctl_delay(int fd, int target, int lun, goto bailout; } - delay_info.target_id = target; delay_info.lun_id = lun; delay_info.delay_secs = delaytime; @@ -938,7 +905,7 @@ bailout: } static int -cctl_getsetsync(int fd, int target, int lun, ctladm_cmdfunction command, +cctl_getsetsync(int fd, int lun, ctladm_cmdfunction command, int argc, char **argv, char *combinedopt) { struct ctl_sync_info sync_info; @@ -950,7 +917,6 @@ cctl_getsetsync(int fd, int target, int retval = 0; memset(&sync_info, 0, sizeof(sync_info)); - sync_info.target_id = target; sync_info.lun_id = lun; while ((c = getopt(argc, argv, combinedopt)) != -1) { @@ -986,12 +952,12 @@ cctl_getsetsync(int fd, int target, int switch (sync_info.status) { case CTL_GS_SYNC_OK: if (command == CTLADM_CMD_GETSYNC) { - fprintf(stdout, "%d:%d: sync interval: %d\n", - target, lun, sync_info.sync_interval); + fprintf(stdout, "%d: sync interval: %d\n", + lun, sync_info.sync_interval); } break; case CTL_GS_SYNC_NO_LUN: - warnx("%s: unknown target:LUN %d:%d", __func__, target, lun); + warnx("%s: unknown LUN %d", __func__, lun); retval = 1; break; case CTL_GS_SYNC_NONE: @@ -1030,7 +996,7 @@ static struct ctladm_opts cctl_err_patte }; static int -cctl_error_inject(int fd, uint32_t target, uint32_t lun, int argc, char **argv, +cctl_error_inject(int fd, uint32_t lun, int argc, char **argv, char *combinedopt) { int retval = 0; @@ -1045,7 +1011,6 @@ cctl_error_inject(int fd, uint32_t targe int c; bzero(&err_desc, sizeof(err_desc)); - err_desc.target_id = target; err_desc.lun_id = lun; while ((c = getopt(argc, argv, combinedopt)) != -1) { @@ -1256,7 +1221,6 @@ cctl_lunlist(int fd) struct scsi_report_luns_data *lun_data; struct scsi_inquiry_data *inq_data; uint32_t num_luns; - int target; int initid; unsigned int i; int retval; @@ -1264,14 +1228,13 @@ cctl_lunlist(int fd) retval = 0; inq_data = NULL; - target = 6; initid = 7; /* * XXX KDM assuming LUN 0 is fine, but we may need to change this * if we ever acquire the ability to have multiple targets. */ - if ((retval = cctl_get_luns(fd, target, /*lun*/ 0, initid, + if ((retval = cctl_get_luns(fd, /*lun*/ 0, initid, /*retries*/ 2, &lun_data, &num_luns)) != 0) goto bailout; @@ -1308,7 +1271,7 @@ cctl_lunlist(int fd) if (lun_val == -1) continue; - if ((retval = cctl_get_inquiry(fd, target, lun_val, initid, + if ((retval = cctl_get_inquiry(fd, lun_val, initid, /*retries*/ 2, scsi_path, sizeof(scsi_path), inq_data)) != 0) { @@ -1329,11 +1292,10 @@ bailout: } static int -cctl_startup_shutdown(int fd, int target, int lun, int iid, +cctl_startup_shutdown(int fd, int lun, int iid, ctladm_cmdfunction command) { union ctl_io *io; - struct ctl_id id; struct scsi_report_luns_data *lun_data; struct scsi_inquiry_data *inq_data; uint32_t num_luns; @@ -1353,15 +1315,13 @@ cctl_startup_shutdown(int fd, int target * and reissue the stop with the offline bit set */ - id.id = iid; - - io = ctl_scsi_alloc_io(id); + io = ctl_scsi_alloc_io(iid); if (io == NULL) { warnx("%s: can't allocate memory", __func__); return (1); } - if ((retval = cctl_get_luns(fd, target, lun, iid, /*retries*/ 2, + if ((retval = cctl_get_luns(fd, lun, iid, /*retries*/ 2, &lun_data, &num_luns)) != 0) goto bailout; @@ -1402,7 +1362,7 @@ cctl_startup_shutdown(int fd, int target if (lun_val == -1) continue; - if ((retval = cctl_get_inquiry(fd, target, lun_val, iid, + if ((retval = cctl_get_inquiry(fd, lun_val, iid, /*retries*/ 2, scsi_path, sizeof(scsi_path), inq_data)) != 0) { @@ -1422,7 +1382,6 @@ cctl_startup_shutdown(int fd, int target if (command == CTLADM_CMD_SHUTDOWN) { struct ctl_ooa_info ooa_info; - ooa_info.target_id = target; ooa_info.lun_id = lun_val; if (ioctl(fd, CTL_CHECK_OOA, &ooa_info) == -1) { @@ -1457,9 +1416,8 @@ cctl_startup_shutdown(int fd, int target CTL_TAG_SIMPLE :CTL_TAG_ORDERED, /*control*/ 0); - io->io_hdr.nexus.targ_target.id = target; io->io_hdr.nexus.targ_lun = lun_val; - io->io_hdr.nexus.initid = id; + io->io_hdr.nexus.initid = iid; if (cctl_do_io(fd, /*retries*/ 3, io, __func__) != 0) { retval = 1; @@ -1488,11 +1446,10 @@ bailout: } static int -cctl_sync_cache(int fd, int target, int lun, int iid, int retries, +cctl_sync_cache(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt) { union ctl_io *io; - struct ctl_id id; int cdb_size = -1; int retval; uint64_t our_lba = 0; @@ -1500,10 +1457,9 @@ cctl_sync_cache(int fd, int target, int int reladr = 0, immed = 0; int c; - id.id = iid; retval = 0; - io = ctl_scsi_alloc_io(id); + io = ctl_scsi_alloc_io(iid); if (io == NULL) { warnx("%s: can't allocate memory", __func__); return (1); @@ -1555,9 +1511,8 @@ cctl_sync_cache(int fd, int target, int /*tag_type*/ CTL_TAG_SIMPLE, /*control*/ 0); - io->io_hdr.nexus.targ_target.id = target; io->io_hdr.nexus.targ_lun = lun; - io->io_hdr.nexus.initid = id; + io->io_hdr.nexus.initid = iid; if (cctl_do_io(fd, retries, io, __func__) != 0) { retval = 1; @@ -1575,19 +1530,17 @@ bailout: } static int -cctl_start_stop(int fd, int target, int lun, int iid, int retries, int start, +cctl_start_stop(int fd, int lun, int iid, int retries, int start, int argc, char **argv, char *combinedopt) { union ctl_io *io; - struct ctl_id id; char scsi_path[40]; int immed = 0, onoffline = 0; int retval, c; - id.id = iid; retval = 0; - io = ctl_scsi_alloc_io(id); + io = ctl_scsi_alloc_io(iid); if (io == NULL) { warnx("%s: can't allocate memory", __func__); return (1); @@ -1622,9 +1575,8 @@ cctl_start_stop(int fd, int target, int CTL_TAG_ORDERED, /*control*/ 0); - io->io_hdr.nexus.targ_target.id = target; io->io_hdr.nexus.targ_lun = lun; - io->io_hdr.nexus.initid = id; + io->io_hdr.nexus.initid = iid; if (cctl_do_io(fd, retries, io, __func__) != 0) { retval = 1; @@ -1645,11 +1597,10 @@ bailout: } static int -cctl_mode_sense(int fd, int target, int lun, int iid, int retries, +cctl_mode_sense(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt) { union ctl_io *io; - struct ctl_id id; uint32_t datalen; uint8_t *dataptr; int pc = -1, cdbsize, retval, dbd = 0, subpage = -1; @@ -1657,12 +1608,11 @@ cctl_mode_sense(int fd, int target, int int page_code = -1; int c; - id.id = iid; cdbsize = 0; retval = 0; dataptr = NULL; - io = ctl_scsi_alloc_io(id); + io = ctl_scsi_alloc_io(iid); if (io == NULL) { warn("%s: can't allocate memory", __func__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 08:57:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF34CA10171; Mon, 5 Oct 2015 08:57:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF03EA84; Mon, 5 Oct 2015 08:57:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958vHrF018839; Mon, 5 Oct 2015 08:57:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958vHpL018836; Mon, 5 Oct 2015 08:57:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050857.t958vHpL018836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288732 - in stable/10/sys: cam/ctl conf modules/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:57:17 -0000 Author: mav Date: Mon Oct 5 08:57:16 2015 New Revision: 288732 URL: https://svnweb.freebsd.org/changeset/base/288732 Log: MFC r287621: Reimplement CTL High Availability. CTL HA functionality was originally implemented by Copan many years ago, but large part of the sources was never published. This change includes clean room implementation of the missing code and fixes for many bugs. This code supports dual-node HA with ALUA in four modes: - Active/Unavailable without interlink between nodes; - Active/Standby with second node handling only basic LUN discovery and reservation, synchronizing with the first node through the interlink; - Active/Active with both nodes processing commands and accessing the backing storage, synchronizing with the first node through the interlink; - Active/Active with second node working as proxy, transfering all commands to the first node for execution through the interlink. Unlike original Copan's implementation, depending on specific hardware, this code uses simple custom TCP-based protocol for interlink. It has no authentication, so it should never be enabled on public interfaces. The code may still need some polishing, but generally it is functional. Relnotes: yes Sponsored by: iXsystems, Inc. Added: stable/10/sys/cam/ctl/ctl_ha.c - copied unchanged from r287621, head/sys/cam/ctl/ctl_ha.c Modified: stable/10/sys/cam/ctl/README.ctl.txt stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_ha.h stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/ctl/scsi_ctl.c stable/10/sys/conf/files stable/10/sys/modules/ctl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:55:59 2015 (r288731) +++ stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 08:57:16 2015 (r288732) @@ -43,12 +43,9 @@ Features: - Persistent reservation support - Mode sense/select support - Error injection support - - High Availability support (1) + - High Availability support - All I/O handled in-kernel, no userland context switch overhead. -(1) HA Support is just an API stub, and needs much more to be fully - functional. See the to-do list below. - Configuring and Running CTL: =========================== @@ -245,27 +242,6 @@ To Do List: another data structure in the stack, more memory allocations, etc. This will also require changes to the CAM CCB structure to support CTL. - - Full-featured High Availability support. The HA API that is in ctl_ha.h - is essentially a renamed version of Copan's HA API. There is no - substance to it, but it remains in CTL to show what needs to be done to - implement active/active HA from a CTL standpoint. The things that would - need to be done include: - - A kernel level software API for message passing as well as DMA - between at least two nodes. - - Hardware support and drivers for inter-node communication. This - could be as simples as ethernet hardware and drivers. - - A "supervisor", or startup framework to control and coordinate - HA startup, failover (going from active/active to single mode), - and failback (going from single mode to active/active). - - HA support in other components of the stack. The goal behind HA - is that one node can fail and another node can seamlessly take - over handling I/O requests. This requires support from pretty - much every component in the storage stack, from top to bottom. - CTL is one piece of it, but you also need support in the RAID - stack/filesystem/backing store. You also need full configuration - mirroring, and all peer nodes need to be able to talk to the - underlying storage hardware. - Code Roadmap: ============ @@ -365,11 +341,11 @@ This is a CTL frontend port that is also frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible via this port. +ctl_ha.c: ctl_ha.h: -------- -This is a stubbed-out High Availability API. See the comments in the -header and the description of what is needed as far as HA support above. +This is a High Availability API and TCP-based interlink implementation. ctl_io.h: -------- Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:55:59 2015 (r288731) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:57:16 2015 (r288732) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003-2009 Silicon Graphics International Corp. * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2015 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -84,25 +85,6 @@ __FBSDID("$FreeBSD$"); struct ctl_softc *control_softc = NULL; /* - * Size and alignment macros needed for Copan-specific HA hardware. These - * can go away when the HA code is re-written, and uses busdma for any - * hardware. - */ -#define CTL_ALIGN_8B(target, source, type) \ - if (((uint32_t)source & 0x7) != 0) \ - target = (type)(source + (0x8 - ((uint32_t)source & 0x7)));\ - else \ - target = (type)source; - -#define CTL_SIZE_8B(target, size) \ - if ((size & 0x7) != 0) \ - target = size + (0x8 - (size & 0x7)); \ - else \ - target = size; - -#define CTL_ALIGN_8B_MARGIN 16 - -/* * Template mode pages. */ @@ -351,12 +333,6 @@ const static struct ctl_logical_block_pr } }; -/* - * XXX KDM move these into the softc. - */ -static int rcv_sync_msg; -static uint8_t ctl_pause_rtr; - SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); static int worker_threads = -1; TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); @@ -375,11 +351,10 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debu */ #define SCSI_EVPD_NUM_SUPPORTED_PAGES 10 -#ifdef notyet static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); -#endif +static void ctl_copy_sense_data_back(union ctl_io *src, union ctl_ha_msg *dest); static int ctl_init(void); void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); @@ -395,10 +370,6 @@ static int ctl_alloc_lun(struct ctl_soft static int ctl_free_lun(struct ctl_lun *lun); static void ctl_create_lun(struct ctl_be_lun *be_lun); static struct ctl_port * ctl_io_port(struct ctl_io_hdr *io_hdr); -/** -static void ctl_failover_change_pages(struct ctl_softc *softc, - struct ctl_scsiio *ctsio, int master); -**/ static int ctl_do_mode_select(union ctl_io *io); static int ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun, @@ -435,10 +406,11 @@ static int ctl_check_blocked(struct ctl_ static int ctl_scsiio_lun_check(struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); -//static int ctl_check_rtr(union ctl_io *pending_io, struct ctl_softc *softc); -#ifdef notyet -static void ctl_failover(void); -#endif +static void ctl_failover_lun(struct ctl_lun *lun); +static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +static void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); +static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +static void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); static void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, @@ -477,9 +449,7 @@ static void ctl_work_thread(void *arg); static void ctl_enqueue_incoming(union ctl_io *io); static void ctl_enqueue_rtr(union ctl_io *io); static void ctl_enqueue_done(union ctl_io *io); -#ifdef notyet static void ctl_enqueue_isc(union ctl_io *io); -#endif static const struct ctl_cmd_entry * ctl_get_cmd_entry(struct ctl_scsiio *ctsio, int *sa); static const struct ctl_cmd_entry * @@ -487,6 +457,11 @@ static const struct ctl_cmd_entry * static int ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry); +static uint64_t ctl_get_prkey(struct ctl_lun *lun, uint32_t residx); +static void ctl_clr_prkey(struct ctl_lun *lun, uint32_t residx); +static void ctl_alloc_prkey(struct ctl_lun *lun, uint32_t residx); +static void ctl_set_prkey(struct ctl_lun *lun, uint32_t residx, uint64_t key); + /* * Load the serialization table. This isn't very pretty, but is probably * the easiest way to do it. @@ -519,7 +494,11 @@ static moduledata_t ctl_moduledata = { DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD); MODULE_VERSION(ctl, 1); -#ifdef notyet +static struct ctl_frontend ha_frontend = +{ + .name = "ha", +}; + static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) @@ -541,7 +520,7 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->sense_residual = msg_info->scsi.sense_residual; ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, - sizeof(ctsio->sense_data)); + msg_info->scsi.sense_len); memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); ctl_enqueue_isc((union ctl_io *)ctsio); @@ -560,38 +539,327 @@ ctl_isc_handler_finish_ser_only(struct c } ctsio = &msg_info->hdr.serializing_sc->scsiio; -#if 0 - /* - * Attempt to catch the situation where an I/O has - * been freed, and we're using it again. - */ - if (ctsio->io_hdr.io_type == 0xff) { - union ctl_io *tmp_io; - tmp_io = (union ctl_io *)ctsio; - printf("%s: %p use after free!\n", __func__, - ctsio); - printf("%s: type %d msg %d cdb %x iptl: " - "%u:%u:%u tag 0x%04x " - "flag %#x status %x\n", - __func__, - tmp_io->io_hdr.io_type, - tmp_io->io_hdr.msg_type, - tmp_io->scsiio.cdb[0], - tmp_io->io_hdr.nexus.initid, - tmp_io->io_hdr.nexus.targ_port, - tmp_io->io_hdr.nexus.targ_lun, - (tmp_io->io_hdr.io_type == - CTL_IO_TASK) ? - tmp_io->taskio.tag_num : - tmp_io->scsiio.tag_num, - tmp_io->io_hdr.flags, - tmp_io->io_hdr.status); - } -#endif ctsio->io_hdr.msg_type = CTL_MSG_FINISH_IO; ctl_enqueue_isc((union ctl_io *)ctsio); } +void +ctl_isc_announce_lun(struct ctl_lun *lun) +{ + struct ctl_softc *softc = lun->ctl_softc; + union ctl_ha_msg *msg; + struct ctl_ha_msg_lun_pr_key pr_key; + int i, k; + + if (softc->ha_link != CTL_HA_LINK_ONLINE) + return; + mtx_lock(&lun->lun_lock); + i = sizeof(msg->lun); + if (lun->lun_devid) + i += lun->lun_devid->len; + i += sizeof(pr_key) * lun->pr_key_count; +alloc: + mtx_unlock(&lun->lun_lock); + msg = malloc(i, M_CTL, M_WAITOK); + mtx_lock(&lun->lun_lock); + k = sizeof(msg->lun); + if (lun->lun_devid) + k += lun->lun_devid->len; + k += sizeof(pr_key) * lun->pr_key_count; + if (i < k) { + free(msg, M_CTL); + i = k; + goto alloc; + } + bzero(&msg->lun, sizeof(msg->lun)); + msg->hdr.msg_type = CTL_MSG_LUN_SYNC; + msg->hdr.nexus.targ_lun = lun->lun; + msg->hdr.nexus.targ_mapped_lun = lun->lun; + msg->lun.flags = lun->flags; + msg->lun.pr_generation = lun->PRGeneration; + msg->lun.pr_res_idx = lun->pr_res_idx; + msg->lun.pr_res_type = lun->res_type; + msg->lun.pr_key_count = lun->pr_key_count; + i = 0; + if (lun->lun_devid) { + msg->lun.lun_devid_len = lun->lun_devid->len; + memcpy(&msg->lun.data[i], lun->lun_devid->data, + msg->lun.lun_devid_len); + i += msg->lun.lun_devid_len; + } + for (k = 0; k < CTL_MAX_INITIATORS; k++) { + if ((pr_key.pr_key = ctl_get_prkey(lun, k)) == 0) + continue; + pr_key.pr_iid = k; + memcpy(&msg->lun.data[i], &pr_key, sizeof(pr_key)); + i += sizeof(pr_key); + } + mtx_unlock(&lun->lun_lock); + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->port, sizeof(msg->port) + i, + M_WAITOK); + free(msg, M_CTL); +} + +void +ctl_isc_announce_port(struct ctl_port *port) +{ + struct ctl_softc *softc = control_softc; + union ctl_ha_msg *msg; + int i; + + if (port->targ_port < softc->port_min || + port->targ_port >= softc->port_max || + softc->ha_link != CTL_HA_LINK_ONLINE) + return; + i = sizeof(msg->port) + strlen(port->port_name) + 1; + if (port->lun_map) + i += sizeof(uint32_t) * CTL_MAX_LUNS; + if (port->port_devid) + i += port->port_devid->len; + if (port->target_devid) + i += port->target_devid->len; + msg = malloc(i, M_CTL, M_WAITOK); + bzero(&msg->port, sizeof(msg->port)); + msg->hdr.msg_type = CTL_MSG_PORT_SYNC; + msg->hdr.nexus.targ_port = port->targ_port; + msg->port.port_type = port->port_type; + msg->port.physical_port = port->physical_port; + msg->port.virtual_port = port->virtual_port; + msg->port.status = port->status; + i = 0; + msg->port.name_len = sprintf(&msg->port.data[i], + "%d:%s", softc->ha_id, port->port_name) + 1; + i += msg->port.name_len; + if (port->lun_map) { + msg->port.lun_map_len = sizeof(uint32_t) * CTL_MAX_LUNS; + memcpy(&msg->port.data[i], port->lun_map, + msg->port.lun_map_len); + i += msg->port.lun_map_len; + } + if (port->port_devid) { + msg->port.port_devid_len = port->port_devid->len; + memcpy(&msg->port.data[i], port->port_devid->data, + msg->port.port_devid_len); + i += msg->port.port_devid_len; + } + if (port->target_devid) { + msg->port.target_devid_len = port->target_devid->len; + memcpy(&msg->port.data[i], port->target_devid->data, + msg->port.target_devid_len); + i += msg->port.target_devid_len; + } + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->port, sizeof(msg->port) + i, + M_WAITOK); + free(msg, M_CTL); +} + +static void +ctl_isc_ha_link_up(struct ctl_softc *softc) +{ + struct ctl_port *port; + struct ctl_lun *lun; + + STAILQ_FOREACH(port, &softc->port_list, links) + ctl_isc_announce_port(port); + STAILQ_FOREACH(lun, &softc->lun_list, links) + ctl_isc_announce_lun(lun); +} + +static void +ctl_isc_ha_link_down(struct ctl_softc *softc) +{ + struct ctl_port *port; + struct ctl_lun *lun; + union ctl_io *io; + + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(lun, &softc->lun_list, links) { + mtx_lock(&lun->lun_lock); + lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; + mtx_unlock(&lun->lun_lock); + + mtx_unlock(&softc->ctl_lock); + io = ctl_alloc_io(softc->othersc_pool); + mtx_lock(&softc->ctl_lock); + ctl_zero_io(io); + io->io_hdr.msg_type = CTL_MSG_FAILOVER; + io->io_hdr.nexus.targ_mapped_lun = lun->lun; + ctl_enqueue_isc(io); + } + + STAILQ_FOREACH(port, &softc->port_list, links) { + if (port->targ_port >= softc->port_min && + port->targ_port < softc->port_max) + continue; + port->status &= ~CTL_PORT_STATUS_ONLINE; + } + mtx_unlock(&softc->ctl_lock); +} + +static void +ctl_isc_ua(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_lun *lun; + uint32_t iid = ctl_get_initindex(&msg->hdr.nexus); + + if (msg->hdr.nexus.targ_lun < CTL_MAX_LUNS && + (lun = softc->ctl_luns[msg->hdr.nexus.targ_lun]) != NULL) { + if (msg->ua.ua_all) { + if (msg->ua.ua_set) + ctl_est_ua_all(lun, iid, msg->ua.ua_type); + else + ctl_clr_ua_all(lun, iid, msg->ua.ua_type); + } else { + if (msg->ua.ua_set) + ctl_est_ua(lun, iid, msg->ua.ua_type); + else + ctl_clr_ua(lun, iid, msg->ua.ua_type); + } + } +} + +static void +ctl_isc_lun_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_lun *lun; + struct ctl_ha_msg_lun_pr_key pr_key; + int i, k; + + lun = softc->ctl_luns[msg->hdr.nexus.targ_lun]; + if (lun == NULL) { + CTL_DEBUG_PRINT(("%s: Unknown LUN %d\n", __func__, + msg->hdr.nexus.targ_lun)); + } else { + mtx_lock(&lun->lun_lock); + i = (lun->lun_devid != NULL) ? lun->lun_devid->len : 0; + if (msg->lun.lun_devid_len != i || (i > 0 && + memcmp(&msg->lun.data[0], lun->lun_devid->data, i) != 0)) { + mtx_unlock(&lun->lun_lock); + printf("%s: Received conflicting HA LUN %d\n", + __func__, msg->hdr.nexus.targ_lun); + return; + } else { + /* Record whether peer is primary. */ + if ((msg->lun.flags & CTL_LUN_PRIMARY_SC) && + (msg->lun.flags & CTL_LUN_DISABLED) == 0) + lun->flags |= CTL_LUN_PEER_SC_PRIMARY; + else + lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; + + /* If peer is primary and we are not -- use data */ + if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && + (lun->flags & CTL_LUN_PEER_SC_PRIMARY)) { + lun->PRGeneration = msg->lun.pr_generation; + lun->pr_res_idx = msg->lun.pr_res_idx; + lun->res_type = msg->lun.pr_res_type; + lun->pr_key_count = msg->lun.pr_key_count; + for (k = 0; k < CTL_MAX_INITIATORS; k++) + ctl_clr_prkey(lun, k); + for (k = 0; k < msg->lun.pr_key_count; k++) { + memcpy(&pr_key, &msg->lun.data[i], + sizeof(pr_key)); + ctl_alloc_prkey(lun, pr_key.pr_iid); + ctl_set_prkey(lun, pr_key.pr_iid, + pr_key.pr_key); + i += sizeof(pr_key); + } + } + + mtx_unlock(&lun->lun_lock); + CTL_DEBUG_PRINT(("%s: Known LUN %d, peer is %s\n", + __func__, msg->hdr.nexus.targ_lun, + (msg->lun.flags & CTL_LUN_PRIMARY_SC) ? + "primary" : "secondary")); + + /* If we are primary but peer doesn't know -- notify */ + if ((lun->flags & CTL_LUN_PRIMARY_SC) && + (msg->lun.flags & CTL_LUN_PEER_SC_PRIMARY) == 0) + ctl_isc_announce_lun(lun); + } + } +} + +static void +ctl_isc_port_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_port *port; + int i, new; + + port = softc->ctl_ports[msg->hdr.nexus.targ_port]; + if (port == NULL) { + CTL_DEBUG_PRINT(("%s: New port %d\n", __func__, + msg->hdr.nexus.targ_port)); + new = 1; + port = malloc(sizeof(*port), M_CTL, M_WAITOK | M_ZERO); + port->frontend = &ha_frontend; + port->targ_port = msg->hdr.nexus.targ_port; + } else if (port->frontend == &ha_frontend) { + CTL_DEBUG_PRINT(("%s: Updated port %d\n", __func__, + msg->hdr.nexus.targ_port)); + new = 0; + } else { + printf("%s: Received conflicting HA port %d\n", + __func__, msg->hdr.nexus.targ_port); + return; + } + port->port_type = msg->port.port_type; + port->physical_port = msg->port.physical_port; + port->virtual_port = msg->port.virtual_port; + port->status = msg->port.status; + i = 0; + free(port->port_name, M_CTL); + port->port_name = strndup(&msg->port.data[i], msg->port.name_len, + M_CTL); + i += msg->port.name_len; + if (msg->port.lun_map_len != 0) { + if (port->lun_map == NULL) + port->lun_map = malloc(sizeof(uint32_t) * CTL_MAX_LUNS, + M_CTL, M_WAITOK); + memcpy(port->lun_map, &msg->port.data[i], + sizeof(uint32_t) * CTL_MAX_LUNS); + i += msg->port.lun_map_len; + } else { + free(port->lun_map, M_CTL); + port->lun_map = NULL; + } + if (msg->port.port_devid_len != 0) { + if (port->port_devid == NULL || + port->port_devid->len != msg->port.port_devid_len) { + free(port->port_devid, M_CTL); + port->port_devid = malloc(sizeof(struct ctl_devid) + + msg->port.port_devid_len, M_CTL, M_WAITOK); + } + memcpy(port->port_devid->data, &msg->port.data[i], + msg->port.port_devid_len); + port->port_devid->len = msg->port.port_devid_len; + i += msg->port.port_devid_len; + } else { + free(port->port_devid, M_CTL); + port->port_devid = NULL; + } + if (msg->port.target_devid_len != 0) { + if (port->target_devid == NULL || + port->target_devid->len != msg->port.target_devid_len) { + free(port->target_devid, M_CTL); + port->target_devid = malloc(sizeof(struct ctl_devid) + + msg->port.target_devid_len, M_CTL, M_WAITOK); + } + memcpy(port->target_devid->data, &msg->port.data[i], + msg->port.target_devid_len); + port->target_devid->len = msg->port.target_devid_len; + i += msg->port.target_devid_len; + } else { + free(port->port_devid, M_CTL); + port->port_devid = NULL; + } + if (new) { + if (ctl_port_register(port) != 0) { + printf("%s: ctl_port_register() failed with error\n", + __func__); + } + } +} + /* * ISC (Inter Shelf Communication) event handler. Events from the HA * subsystem come in here. @@ -605,54 +873,33 @@ ctl_isc_event_handler(ctl_ha_channel cha ctl_ha_status isc_status; softc = control_softc; - io = NULL; - - -#if 0 - printf("CTL: Isc Msg event %d\n", event); -#endif + CTL_DEBUG_PRINT(("CTL: Isc Msg event %d\n", event)); if (event == CTL_HA_EVT_MSG_RECV) { - union ctl_ha_msg msg_info; + union ctl_ha_msg *msg, msgbuf; - isc_status = ctl_ha_msg_recv(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info), /*wait*/ 0); -#if 0 - printf("CTL: msg_type %d\n", msg_info.msg_type); -#endif - if (isc_status != 0) { - printf("Error receiving message, status = %d\n", - isc_status); + if (param > sizeof(msgbuf)) + msg = malloc(param, M_CTL, M_WAITOK); + else + msg = &msgbuf; + isc_status = ctl_ha_msg_recv(CTL_HA_CHAN_CTL, msg, param, + M_WAITOK); + if (isc_status != CTL_HA_STATUS_SUCCESS) { + printf("%s: Error receiving message: %d\n", + __func__, isc_status); + if (msg != &msgbuf) + free(msg, M_CTL); return; } - switch (msg_info.hdr.msg_type) { + CTL_DEBUG_PRINT(("CTL: msg_type %d\n", msg->msg_type)); + switch (msg->hdr.msg_type) { case CTL_MSG_SERIALIZE: -#if 0 - printf("Serialize\n"); -#endif - io = ctl_alloc_io_nowait(softc->othersc_pool); - if (io == NULL) { - printf("ctl_isc_event_handler: can't allocate " - "ctl_io!\n"); - /* Bad Juju */ - /* Need to set busy and send msg back */ - msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; - msg_info.hdr.status = CTL_SCSI_ERROR; - msg_info.scsi.scsi_status = SCSI_STATUS_BUSY; - msg_info.scsi.sense_len = 0; - if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info), 0) > CTL_HA_STATUS_SUCCESS){ - } - goto bailout; - } + io = ctl_alloc_io(softc->othersc_pool); ctl_zero_io(io); - // populate ctsio from msg_info + // populate ctsio from msg io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.msg_type = CTL_MSG_SERIALIZE; - io->io_hdr.original_sc = msg_info.hdr.original_sc; -#if 0 - printf("pOrig %x\n", (int)msg_info.original_sc); -#endif + io->io_hdr.original_sc = msg->hdr.original_sc; io->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC | CTL_FLAG_IO_ACTIVE; /* @@ -662,18 +909,23 @@ ctl_isc_event_handler(ctl_ha_channel cha * * XXX KDM add another flag that is more specific. */ - if (softc->ha_mode == CTL_HA_MODE_SER_ONLY) + if (softc->ha_mode != CTL_HA_MODE_XFER) io->io_hdr.flags |= CTL_FLAG_INT_COPY; - io->io_hdr.nexus = msg_info.hdr.nexus; + io->io_hdr.nexus = msg->hdr.nexus; #if 0 printf("port %u, iid %u, lun %u\n", io->io_hdr.nexus.targ_port, io->io_hdr.nexus.initid, io->io_hdr.nexus.targ_lun); #endif - io->scsiio.tag_num = msg_info.scsi.tag_num; - io->scsiio.tag_type = msg_info.scsi.tag_type; - memcpy(io->scsiio.cdb, msg_info.scsi.cdb, + io->scsiio.tag_num = msg->scsi.tag_num; + io->scsiio.tag_type = msg->scsi.tag_type; +#ifdef CTL_TIME_IO + io->io_hdr.start_time = time_uptime; + getbintime(&io->io_hdr.start_bt); +#endif /* CTL_TIME_IO */ + io->scsiio.cdb_len = msg->scsi.cdb_len; + memcpy(io->scsiio.cdb, msg->scsi.cdb, CTL_MAX_CDBLEN); if (softc->ha_mode == CTL_HA_MODE_XFER) { const struct ctl_cmd_entry *entry; @@ -691,7 +943,7 @@ ctl_isc_event_handler(ctl_ha_channel cha struct ctl_sg_entry *sgl; int i, j; - io = msg_info.hdr.original_sc; + io = msg->hdr.original_sc; if (io == NULL) { printf("%s: original_sc == NULL!\n", __func__); /* XXX KDM do something here */ @@ -703,97 +955,66 @@ ctl_isc_event_handler(ctl_ha_channel cha * Keep track of this, we need to send it back over * when the datamove is complete. */ - io->io_hdr.serializing_sc = msg_info.hdr.serializing_sc; + io->io_hdr.serializing_sc = msg->hdr.serializing_sc; - if (msg_info.dt.sg_sequence == 0) { - /* - * XXX KDM we use the preallocated S/G list - * here, but we'll need to change this to - * dynamic allocation if we need larger S/G - * lists. - */ - if (msg_info.dt.kern_sg_entries > - sizeof(io->io_hdr.remote_sglist) / - sizeof(io->io_hdr.remote_sglist[0])) { - printf("%s: number of S/G entries " - "needed %u > allocated num %zd\n", - __func__, - msg_info.dt.kern_sg_entries, - sizeof(io->io_hdr.remote_sglist)/ - sizeof(io->io_hdr.remote_sglist[0])); - - /* - * XXX KDM send a message back to - * the other side to shut down the - * DMA. The error will come back - * through via the normal channel. - */ - break; - } - sgl = io->io_hdr.remote_sglist; - memset(sgl, 0, - sizeof(io->io_hdr.remote_sglist)); + if (msg->dt.sg_sequence == 0) { + i = msg->dt.kern_sg_entries + + io->scsiio.kern_data_len / + CTL_HA_DATAMOVE_SEGMENT + 1; + sgl = malloc(sizeof(*sgl) * i, M_CTL, + M_WAITOK | M_ZERO); + io->io_hdr.remote_sglist = sgl; + io->io_hdr.local_sglist = + &sgl[msg->dt.kern_sg_entries]; io->scsiio.kern_data_ptr = (uint8_t *)sgl; io->scsiio.kern_sg_entries = - msg_info.dt.kern_sg_entries; + msg->dt.kern_sg_entries; io->scsiio.rem_sg_entries = - msg_info.dt.kern_sg_entries; + msg->dt.kern_sg_entries; io->scsiio.kern_data_len = - msg_info.dt.kern_data_len; + msg->dt.kern_data_len; io->scsiio.kern_total_len = - msg_info.dt.kern_total_len; + msg->dt.kern_total_len; io->scsiio.kern_data_resid = - msg_info.dt.kern_data_resid; + msg->dt.kern_data_resid; io->scsiio.kern_rel_offset = - msg_info.dt.kern_rel_offset; - /* - * Clear out per-DMA flags. - */ - io->io_hdr.flags &= ~CTL_FLAG_RDMA_MASK; - /* - * Add per-DMA flags that are set for this - * particular DMA request. - */ - io->io_hdr.flags |= msg_info.dt.flags & - CTL_FLAG_RDMA_MASK; + msg->dt.kern_rel_offset; + io->io_hdr.flags &= ~CTL_FLAG_BUS_ADDR; + io->io_hdr.flags |= msg->dt.flags & + CTL_FLAG_BUS_ADDR; } else sgl = (struct ctl_sg_entry *) io->scsiio.kern_data_ptr; - for (i = msg_info.dt.sent_sg_entries, j = 0; - i < (msg_info.dt.sent_sg_entries + - msg_info.dt.cur_sg_entries); i++, j++) { - sgl[i].addr = msg_info.dt.sg_list[j].addr; - sgl[i].len = msg_info.dt.sg_list[j].len; + for (i = msg->dt.sent_sg_entries, j = 0; + i < (msg->dt.sent_sg_entries + + msg->dt.cur_sg_entries); i++, j++) { + sgl[i].addr = msg->dt.sg_list[j].addr; + sgl[i].len = msg->dt.sg_list[j].len; #if 0 printf("%s: L: %p,%d -> %p,%d j=%d, i=%d\n", __func__, - msg_info.dt.sg_list[j].addr, - msg_info.dt.sg_list[j].len, + msg->dt.sg_list[j].addr, + msg->dt.sg_list[j].len, sgl[i].addr, sgl[i].len, j, i); #endif } -#if 0 - memcpy(&sgl[msg_info.dt.sent_sg_entries], - msg_info.dt.sg_list, - sizeof(*sgl) * msg_info.dt.cur_sg_entries); -#endif /* * If this is the last piece of the I/O, we've got * the full S/G list. Queue processing in the thread. * Otherwise wait for the next piece. */ - if (msg_info.dt.sg_last != 0) + if (msg->dt.sg_last != 0) ctl_enqueue_isc(io); break; } /* Performed on the Serializing (primary) SC, XFER mode only */ case CTL_MSG_DATAMOVE_DONE: { - if (msg_info.hdr.serializing_sc == NULL) { + if (msg->hdr.serializing_sc == NULL) { printf("%s: serializing_sc == NULL!\n", __func__); /* XXX KDM now what? */ @@ -804,33 +1025,35 @@ ctl_isc_event_handler(ctl_ha_channel cha * there was a failure, so we can return status * back to the initiator. */ - io = msg_info.hdr.serializing_sc; + io = msg->hdr.serializing_sc; io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; - io->io_hdr.status = msg_info.hdr.status; - io->scsiio.scsi_status = msg_info.scsi.scsi_status; - io->scsiio.sense_len = msg_info.scsi.sense_len; - io->scsiio.sense_residual =msg_info.scsi.sense_residual; - io->io_hdr.port_status = msg_info.scsi.fetd_status; - io->scsiio.residual = msg_info.scsi.residual; - memcpy(&io->scsiio.sense_data,&msg_info.scsi.sense_data, - sizeof(io->scsiio.sense_data)); + io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; + io->io_hdr.port_status = msg->scsi.fetd_status; + io->scsiio.residual = msg->scsi.residual; + if (msg->hdr.status != CTL_STATUS_NONE) { + io->io_hdr.status = msg->hdr.status; + io->scsiio.scsi_status = msg->scsi.scsi_status; + io->scsiio.sense_len = msg->scsi.sense_len; + io->scsiio.sense_residual =msg->scsi.sense_residual; + memcpy(&io->scsiio.sense_data, + &msg->scsi.sense_data, + msg->scsi.sense_len); + } ctl_enqueue_isc(io); break; } /* Preformed on Originating SC, SER_ONLY mode */ case CTL_MSG_R2R: - io = msg_info.hdr.original_sc; + io = msg->hdr.original_sc; if (io == NULL) { - printf("%s: Major Bummer\n", __func__); - return; - } else { -#if 0 - printf("pOrig %x\n",(int) ctsio); -#endif + printf("%s: original_sc == NULL!\n", + __func__); + break; } + io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; io->io_hdr.msg_type = CTL_MSG_R2R; - io->io_hdr.serializing_sc = msg_info.hdr.serializing_sc; + io->io_hdr.serializing_sc = msg->hdr.serializing_sc; ctl_enqueue_isc(io); break; @@ -842,22 +1065,20 @@ ctl_isc_event_handler(ctl_ha_channel cha */ case CTL_MSG_FINISH_IO: if (softc->ha_mode == CTL_HA_MODE_XFER) - ctl_isc_handler_finish_xfer(softc, - &msg_info); + ctl_isc_handler_finish_xfer(softc, msg); else - ctl_isc_handler_finish_ser_only(softc, - &msg_info); + ctl_isc_handler_finish_ser_only(softc, msg); break; /* Preformed on Originating SC */ case CTL_MSG_BAD_JUJU: - io = msg_info.hdr.original_sc; + io = msg->hdr.original_sc; if (io == NULL) { printf("%s: Bad JUJU!, original_sc is NULL!\n", __func__); break; } - ctl_copy_sense_data(&msg_info, io); + ctl_copy_sense_data(msg, io); /* * IO should have already been cleaned up on other * SC so clear this flag so we won't send a message @@ -866,7 +1087,7 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.flags &= ~CTL_FLAG_SENT_2OTHER_SC; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; - /* io = msg_info.hdr.serializing_sc; */ + /* io = msg->hdr.serializing_sc; */ io->io_hdr.msg_type = CTL_MSG_BAD_JUJU; ctl_enqueue_isc(io); break; @@ -874,91 +1095,99 @@ ctl_isc_event_handler(ctl_ha_channel cha /* Handle resets sent from the other side */ case CTL_MSG_MANAGE_TASKS: { struct ctl_taskio *taskio; - taskio = (struct ctl_taskio *)ctl_alloc_io_nowait( + taskio = (struct ctl_taskio *)ctl_alloc_io( softc->othersc_pool); - if (taskio == NULL) { - printf("ctl_isc_event_handler: can't allocate " - "ctl_io!\n"); - /* Bad Juju */ - /* should I just call the proper reset func - here??? */ - goto bailout; - } ctl_zero_io((union ctl_io *)taskio); taskio->io_hdr.io_type = CTL_IO_TASK; taskio->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC; - taskio->io_hdr.nexus = msg_info.hdr.nexus; - taskio->task_action = msg_info.task.task_action; - taskio->tag_num = msg_info.task.tag_num; - taskio->tag_type = msg_info.task.tag_type; + taskio->io_hdr.nexus = msg->hdr.nexus; + taskio->task_action = msg->task.task_action; + taskio->tag_num = msg->task.tag_num; + taskio->tag_type = msg->task.tag_type; #ifdef CTL_TIME_IO taskio->io_hdr.start_time = time_uptime; getbintime(&taskio->io_hdr.start_bt); -#if 0 - cs_prof_gettime(&taskio->io_hdr.start_ticks); -#endif #endif /* CTL_TIME_IO */ ctl_run_task((union ctl_io *)taskio); break; } /* Persistent Reserve action which needs attention */ case CTL_MSG_PERS_ACTION: - presio = (struct ctl_prio *)ctl_alloc_io_nowait( + presio = (struct ctl_prio *)ctl_alloc_io( softc->othersc_pool); - if (presio == NULL) { - printf("ctl_isc_event_handler: can't allocate " - "ctl_io!\n"); - /* Bad Juju */ - /* Need to set busy and send msg back */ - goto bailout; - } ctl_zero_io((union ctl_io *)presio); presio->io_hdr.msg_type = CTL_MSG_PERS_ACTION; - presio->pr_msg = msg_info.pr; + presio->io_hdr.flags |= CTL_FLAG_FROM_OTHER_SC; + presio->io_hdr.nexus = msg->hdr.nexus; + presio->pr_msg = msg->pr; ctl_enqueue_isc((union ctl_io *)presio); break; - case CTL_MSG_SYNC_FE: - rcv_sync_msg = 1; + case CTL_MSG_UA: + ctl_isc_ua(softc, msg, param); + break; + case CTL_MSG_PORT_SYNC: + ctl_isc_port_sync(softc, msg, param); + break; + case CTL_MSG_LUN_SYNC: + ctl_isc_lun_sync(softc, msg, param); break; default: - printf("How did I get here?\n"); + printf("Received HA message of unknown type %d\n", + msg->hdr.msg_type); + break; } - } else if (event == CTL_HA_EVT_MSG_SENT) { - if (param != CTL_HA_STATUS_SUCCESS) { - printf("Bad status from ctl_ha_msg_send status %d\n", - param); + if (msg != &msgbuf) + free(msg, M_CTL); + } else if (event == CTL_HA_EVT_LINK_CHANGE) { + printf("CTL: HA link status changed from %d to %d\n", + softc->ha_link, param); + if (param == softc->ha_link) + return; + if (softc->ha_link == CTL_HA_LINK_ONLINE) { + softc->ha_link = param; + ctl_isc_ha_link_down(softc); + } else { + softc->ha_link = param; + if (softc->ha_link == CTL_HA_LINK_ONLINE) + ctl_isc_ha_link_up(softc); } return; - } else if (event == CTL_HA_EVT_DISCONNECT) { - printf("CTL: Got a disconnect from Isc\n"); - return; } else { printf("ctl_isc_event_handler: Unknown event %d\n", event); return; } - -bailout: - return; } static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest) { - struct scsi_sense_data *sense; - sense = &dest->scsiio.sense_data; - bcopy(&src->scsi.sense_data, sense, sizeof(*sense)); + memcpy(&dest->scsiio.sense_data, &src->scsi.sense_data, + src->scsi.sense_len); dest->scsiio.scsi_status = src->scsi.scsi_status; dest->scsiio.sense_len = src->scsi.sense_len; dest->io_hdr.status = src->hdr.status; } -#endif + +static void +ctl_copy_sense_data_back(union ctl_io *src, union ctl_ha_msg *dest) +{ + + memcpy(&dest->scsi.sense_data, &src->scsiio.sense_data, + src->scsiio.sense_len); + dest->scsi.scsi_status = src->scsiio.scsi_status; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 08:58:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52EB6A10271; Mon, 5 Oct 2015 08:58:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43945BE3; Mon, 5 Oct 2015 08:58:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958wQBO018950; Mon, 5 Oct 2015 08:58:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958wQc5018949; Mon, 5 Oct 2015 08:58:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050858.t958wQc5018949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288733 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:58:26 -0000 Author: mav Date: Mon Oct 5 08:58:25 2015 New Revision: 288733 URL: https://svnweb.freebsd.org/changeset/base/288733 Log: MFC r287664: Reference/release devices on every I/O, rather on open/close. While this may be slower, it allows device destruction to complete, rather then block waiting for indefinitely long time. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:57:16 2015 (r288732) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:58:25 2015 (r288733) @@ -128,18 +128,11 @@ typedef enum { CTL_BE_BLOCK_FILE } ctl_be_block_type; -struct ctl_be_block_devdata { - struct cdev *cdev; - struct cdevsw *csw; - int dev_ref; -}; - struct ctl_be_block_filedata { struct ucred *cred; }; union ctl_be_block_bedata { - struct ctl_be_block_devdata dev; struct ctl_be_block_filedata file; }; @@ -826,16 +819,15 @@ static void ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { - struct ctl_be_block_devdata *dev_data; union ctl_io *io; + struct cdevsw *csw; + struct cdev *dev; struct uio xuio; struct iovec *xiovec; - int flags; - int error, i; + int error, flags, i, ref; DPRINTF("entered\n"); - dev_data = &be_lun->backend.dev; io = beio->io; flags = 0; if (ARGS(io)->flags & CTL_LLF_DPO) @@ -868,13 +860,20 @@ ctl_be_block_dispatch_zvol(struct ctl_be devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); mtx_unlock(&be_lun->io_lock); - if (beio->bio_cmd == BIO_READ) { - error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, flags); + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw) { + if (beio->bio_cmd == BIO_READ) + error = csw->d_read(dev, &xuio, flags); + else + error = csw->d_write(dev, &xuio, flags); + dev_relthread(dev, ref); + } else + error = ENXIO; + + if (beio->bio_cmd == BIO_READ) SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); - } else { - error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, flags); + else SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); - } mtx_lock(&be_lun->io_lock); devstat_end_transaction(beio->lun->disk_stats, beio->io_len, @@ -918,23 +917,30 @@ static void ctl_be_block_gls_zvol(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { - struct ctl_be_block_devdata *dev_data = &be_lun->backend.dev; union ctl_io *io = beio->io; + struct cdevsw *csw; + struct cdev *dev; struct ctl_lba_len_flags *lbalen = ARGS(io); struct scsi_get_lba_status_data *data; off_t roff, off; - int error, status; + int error, ref, status; DPRINTF("entered\n"); + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw == NULL) { + status = 0; /* unknown up to the end */ + off = be_lun->size_bytes; + goto done; + } off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; - error = (*dev_data->csw->d_ioctl)(dev_data->cdev, FIOSEEKHOLE, - (caddr_t)&off, FREAD, curthread); + error = csw->d_ioctl(dev, FIOSEEKHOLE, (caddr_t)&off, FREAD, + curthread); if (error == 0 && off > roff) status = 0; /* mapped up to off */ else { - error = (*dev_data->csw->d_ioctl)(dev_data->cdev, FIOSEEKDATA, - (caddr_t)&off, FREAD, curthread); + error = csw->d_ioctl(dev, FIOSEEKDATA, (caddr_t)&off, FREAD, + curthread); if (error == 0 && off > roff) status = 1; /* deallocated up to off */ else { @@ -942,7 +948,9 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc off = be_lun->size_bytes; } } + dev_relthread(dev, ref); +done: data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - @@ -958,9 +966,10 @@ ctl_be_block_flush_dev(struct ctl_be_blo { struct bio *bio; union ctl_io *io; - struct ctl_be_block_devdata *dev_data; + struct cdevsw *csw; + struct cdev *dev; + int ref; - dev_data = &be_lun->backend.dev; io = beio->io; DPRINTF("entered\n"); @@ -969,7 +978,6 @@ ctl_be_block_flush_dev(struct ctl_be_blo bio = g_alloc_bio(); bio->bio_cmd = BIO_FLUSH; - bio->bio_dev = dev_data->cdev; bio->bio_offset = 0; bio->bio_data = 0; bio->bio_done = ctl_be_block_biodone; @@ -989,7 +997,15 @@ ctl_be_block_flush_dev(struct ctl_be_blo devstat_start_transaction(be_lun->disk_stats, &beio->ds_t0); mtx_unlock(&be_lun->io_lock); - (*dev_data->csw->d_strategy)(bio); + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw) { + bio->bio_dev = dev; + csw->d_strategy(bio); + dev_relthread(dev, ref); + } else { + bio->bio_error = ENXIO; + ctl_be_block_biodone(bio); + } } static void @@ -998,15 +1014,17 @@ ctl_be_block_unmap_dev_range(struct ctl_ uint64_t off, uint64_t len, int last) { struct bio *bio; - struct ctl_be_block_devdata *dev_data; uint64_t maxlen; + struct cdevsw *csw; + struct cdev *dev; + int ref; - dev_data = &be_lun->backend.dev; + csw = devvn_refthread(be_lun->vn, &dev, &ref); maxlen = LONG_MAX - (LONG_MAX % be_lun->cbe_lun.blocksize); while (len > 0) { bio = g_alloc_bio(); bio->bio_cmd = BIO_DELETE; - bio->bio_dev = dev_data->cdev; + bio->bio_dev = dev; bio->bio_offset = off; bio->bio_length = MIN(len, maxlen); bio->bio_data = 0; @@ -1023,8 +1041,15 @@ ctl_be_block_unmap_dev_range(struct ctl_ beio->send_complete = 1; mtx_unlock(&be_lun->io_lock); - (*dev_data->csw->d_strategy)(bio); + if (csw) { + csw->d_strategy(bio); + } else { + bio->bio_error = ENXIO; + ctl_be_block_biodone(bio); + } } + if (csw) + dev_relthread(dev, ref); } static void @@ -1032,12 +1057,10 @@ ctl_be_block_unmap_dev(struct ctl_be_blo struct ctl_be_block_io *beio) { union ctl_io *io; - struct ctl_be_block_devdata *dev_data; struct ctl_ptr_len_flags *ptrlen; struct scsi_unmap_desc *buf, *end; uint64_t len; - dev_data = &be_lun->backend.dev; io = beio->io; DPRINTF("entered\n"); @@ -1070,23 +1093,25 @@ ctl_be_block_dispatch_dev(struct ctl_be_ struct ctl_be_block_io *beio) { TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue); - int i; struct bio *bio; - struct ctl_be_block_devdata *dev_data; + struct cdevsw *csw; + struct cdev *dev; off_t cur_offset; - int max_iosize; + int i, max_iosize, ref; DPRINTF("entered\n"); - - dev_data = &be_lun->backend.dev; + csw = devvn_refthread(be_lun->vn, &dev, &ref); /* * We have to limit our I/O size to the maximum supported by the * backend device. Hopefully it is MAXPHYS. If the driver doesn't * set it properly, use DFLTPHYS. */ - max_iosize = dev_data->cdev->si_iosize_max; - if (max_iosize < PAGE_SIZE) + if (csw) { + max_iosize = dev->si_iosize_max; + if (max_iosize < PAGE_SIZE) + max_iosize = DFLTPHYS; + } else max_iosize = DFLTPHYS; cur_offset = beio->io_offset; @@ -1104,7 +1129,7 @@ ctl_be_block_dispatch_dev(struct ctl_be_ KASSERT(bio != NULL, ("g_alloc_bio() failed!\n")); bio->bio_cmd = beio->bio_cmd; - bio->bio_dev = dev_data->cdev; + bio->bio_dev = dev; bio->bio_caller1 = beio; bio->bio_length = min(cur_size, max_iosize); bio->bio_offset = cur_offset; @@ -1131,23 +1156,36 @@ ctl_be_block_dispatch_dev(struct ctl_be_ */ while ((bio = TAILQ_FIRST(&queue)) != NULL) { TAILQ_REMOVE(&queue, bio, bio_queue); - (*dev_data->csw->d_strategy)(bio); + if (csw) + csw->d_strategy(bio); + else { + bio->bio_error = ENXIO; + ctl_be_block_biodone(bio); + } } + if (csw) + dev_relthread(dev, ref); } static uint64_t ctl_be_block_getattr_dev(struct ctl_be_block_lun *be_lun, const char *attrname) { - struct ctl_be_block_devdata *dev_data = &be_lun->backend.dev; struct diocgattr_arg arg; - int error; + struct cdevsw *csw; + struct cdev *dev; + int error, ref; - if (dev_data->csw == NULL || dev_data->csw->d_ioctl == NULL) + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw == NULL) return (UINT64_MAX); strlcpy(arg.name, attrname, sizeof(arg.name)); arg.len = sizeof(arg.value.off); - error = dev_data->csw->d_ioctl(dev_data->cdev, - DIOCGATTR, (caddr_t)&arg, FREAD, curthread); + if (csw->d_ioctl) { + error = csw->d_ioctl(dev, DIOCGATTR, (caddr_t)&arg, FREAD, + curthread); + } else + error = ENODEV; + dev_relthread(dev, ref); if (error != 0) return (UINT64_MAX); return (arg.value.off); @@ -1856,22 +1894,19 @@ ctl_be_block_open_dev(struct ctl_be_bloc { struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_lun_create_params *params; - struct vattr vattr; + struct cdevsw *csw; struct cdev *dev; - struct cdevsw *devsw; char *value; - int error, atomic, maxio, unmap, tmp; + int error, atomic, maxio, ref, unmap, tmp; off_t ps, pss, po, pos, us, uss, uo, uos, otmp; params = &be_lun->params; be_lun->dev_type = CTL_BE_BLOCK_DEV; - be_lun->backend.dev.cdev = be_lun->vn->v_rdev; - be_lun->backend.dev.csw = dev_refthread(be_lun->backend.dev.cdev, - &be_lun->backend.dev.dev_ref); - if (be_lun->backend.dev.csw == NULL) - panic("Unable to retrieve device switch"); - if (strcmp(be_lun->backend.dev.csw->d_name, "zvol") == 0) { + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw == NULL) + return (ENXIO); + if (strcmp(csw->d_name, "zvol") == 0) { be_lun->dispatch = ctl_be_block_dispatch_zvol; be_lun->get_lba_status = ctl_be_block_gls_zvol; atomic = maxio = CTLBLK_MAX_IO_SIZE; @@ -1879,7 +1914,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->dispatch = ctl_be_block_dispatch_dev; be_lun->get_lba_status = NULL; atomic = 0; - maxio = be_lun->backend.dev.cdev->si_iosize_max; + maxio = dev->si_iosize_max; if (maxio <= 0) maxio = DFLTPHYS; if (maxio > CTLBLK_MAX_IO_SIZE) @@ -1889,26 +1924,17 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->getattr = ctl_be_block_getattr_dev; be_lun->unmap = ctl_be_block_unmap_dev; - error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED); - if (error) { + if (!csw->d_ioctl) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), - "error getting vnode attributes for device %s", - be_lun->dev_path); - return (error); - } - - dev = be_lun->vn->v_rdev; - devsw = dev->si_devsw; - if (!devsw->d_ioctl) { - snprintf(req->error_str, sizeof(req->error_str), - "no d_ioctl for device %s!", - be_lun->dev_path); + "no d_ioctl for device %s!", be_lun->dev_path); return (ENODEV); } - error = devsw->d_ioctl(dev, DIOCGSECTORSIZE, (caddr_t)&tmp, FREAD, + error = csw->d_ioctl(dev, DIOCGSECTORSIZE, (caddr_t)&tmp, FREAD, curthread); if (error) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "error %d returned for DIOCGSECTORSIZE ioctl " "on %s!", error, be_lun->dev_path); @@ -1926,14 +1952,15 @@ ctl_be_block_open_dev(struct ctl_be_bloc if (params->blocksize_bytes % tmp == 0) { cbe_lun->blocksize = params->blocksize_bytes; } else { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u is not an even " "multiple of backing device blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); - } } else if (params->blocksize_bytes != 0) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u < backing device " "blocksize %u", params->blocksize_bytes, tmp); @@ -1941,9 +1968,10 @@ ctl_be_block_open_dev(struct ctl_be_bloc } else cbe_lun->blocksize = tmp; - error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, - curthread); + error = csw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, + curthread); if (error) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "error %d returned for DIOCGMEDIASIZE " " ioctl on %s!", error, @@ -1953,6 +1981,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc if (params->lun_size_bytes != 0) { if (params->lun_size_bytes > otmp) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "requested LUN size %ju > backing device " "size %ju", @@ -1968,13 +1997,13 @@ ctl_be_block_open_dev(struct ctl_be_bloc cbe_lun->maxlba = (be_lun->size_blocks == 0) ? 0 : (be_lun->size_blocks - 1); - error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, - (caddr_t)&ps, FREAD, curthread); + error = csw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, + curthread); if (error) ps = po = 0; else { - error = devsw->d_ioctl(dev, DIOCGSTRIPEOFFSET, - (caddr_t)&po, FREAD, curthread); + error = csw->d_ioctl(dev, DIOCGSTRIPEOFFSET, (caddr_t)&po, + FREAD, curthread); if (error) po = 0; } @@ -2019,8 +2048,8 @@ ctl_be_block_open_dev(struct ctl_be_bloc strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name)); arg.len = sizeof(arg.value.i); - error = devsw->d_ioctl(dev, DIOCGATTR, - (caddr_t)&arg, FREAD, curthread); + error = csw->d_ioctl(dev, DIOCGATTR, (caddr_t)&arg, FREAD, + curthread); unmap = (error == 0) ? arg.value.i : 0; } value = ctl_get_opt(&cbe_lun->options, "unmap"); @@ -2031,6 +2060,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc else cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP; + dev_relthread(dev, ref); return (0); } @@ -2041,24 +2071,6 @@ ctl_be_block_close(struct ctl_be_block_l int flags; if (be_lun->vn) { - switch (be_lun->dev_type) { - case CTL_BE_BLOCK_DEV: - if (be_lun->backend.dev.csw) { - dev_relthread(be_lun->backend.dev.cdev, - be_lun->backend.dev.dev_ref); - be_lun->backend.dev.csw = NULL; - be_lun->backend.dev.cdev = NULL; - } - break; - case CTL_BE_BLOCK_FILE: - break; - case CTL_BE_BLOCK_NONE: - break; - default: - panic("Unexpected backend type."); - break; - } - flags = FREAD; if ((cbe_lun->flags & CTL_LUN_FLAG_READONLY) == 0) flags |= FWRITE; @@ -2567,21 +2579,25 @@ ctl_be_block_modify_dev(struct ctl_be_bl struct ctl_lun_req *req) { struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; - struct ctl_be_block_devdata *dev_data; - int error; struct ctl_lun_create_params *params = &be_lun->params; + struct cdevsw *csw; + struct cdev *dev; uint64_t size_bytes; + int error, ref; - dev_data = &be_lun->backend.dev; - if (!dev_data->csw->d_ioctl) { + csw = devvn_refthread(be_lun->vn, &dev, &ref); + if (csw == NULL) + return (ENXIO); + if (csw->d_ioctl == NULL) { + dev_relthread(dev, ref); snprintf(req->error_str, sizeof(req->error_str), "no d_ioctl for device %s!", be_lun->dev_path); return (ENODEV); } - error = dev_data->csw->d_ioctl(dev_data->cdev, DIOCGMEDIASIZE, - (caddr_t)&size_bytes, FREAD, - curthread); + error = csw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&size_bytes, FREAD, + curthread); + dev_relthread(dev, ref); if (error) { snprintf(req->error_str, sizeof(req->error_str), "error %d returned for DIOCGMEDIASIZE ioctl " From owner-svn-src-all@freebsd.org Mon Oct 5 08:59:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B392A10338; Mon, 5 Oct 2015 08:59:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0812D40; Mon, 5 Oct 2015 08:59:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t958xJqP019046; Mon, 5 Oct 2015 08:59:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t958xJ2S019044; Mon, 5 Oct 2015 08:59:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050859.t958xJ2S019044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 08:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288734 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 08:59:20 -0000 Author: mav Date: Mon Oct 5 08:59:18 2015 New Revision: 288734 URL: https://svnweb.freebsd.org/changeset/base/288734 Log: MFC r287670: Close races between device close and request processing. All requests arriving for processing after OFFLINE flag set are rejected with BUSY status. Races around OFFLINE flag setting are closed by calling taskqueue_drain_all(). Modified: stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:58:25 2015 (r288733) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 08:59:18 2015 (r288734) @@ -1618,33 +1618,32 @@ ctl_be_block_dispatch(struct ctl_be_bloc static void ctl_be_block_worker(void *context, int pending) { - struct ctl_be_block_lun *be_lun; - struct ctl_be_block_softc *softc; + struct ctl_be_block_lun *be_lun = (struct ctl_be_block_lun *)context; + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; union ctl_io *io; - - be_lun = (struct ctl_be_block_lun *)context; - softc = be_lun->softc; + struct ctl_be_block_io *beio; DPRINTF("entered\n"); - - mtx_lock(&be_lun->queue_lock); + /* + * Fetch and process I/Os from all queues. If we detect LUN + * CTL_LUN_FLAG_OFFLINE status here -- it is result of a race, + * so make response maximally opaque to not confuse initiator. + */ for (;;) { + mtx_lock(&be_lun->queue_lock); io = (union ctl_io *)STAILQ_FIRST(&be_lun->datamove_queue); if (io != NULL) { - struct ctl_be_block_io *beio; - DPRINTF("datamove queue\n"); - STAILQ_REMOVE(&be_lun->datamove_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->queue_lock); - beio = (struct ctl_be_block_io *)PRIV(io)->ptr; - + if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + ctl_set_busy(&io->scsiio); + ctl_complete_beio(beio); + return; + } be_lun->dispatch(be_lun, beio); - - mtx_lock(&be_lun->queue_lock); continue; } io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_write_queue); @@ -1653,8 +1652,12 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->config_write_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); + if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + ctl_set_busy(&io->scsiio); + ctl_config_write_done(io); + return; + } ctl_be_block_cw_dispatch(be_lun, io); - mtx_lock(&be_lun->queue_lock); continue; } io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_read_queue); @@ -1663,25 +1666,26 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->config_read_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); + if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + ctl_set_busy(&io->scsiio); + ctl_config_read_done(io); + return; + } ctl_be_block_cr_dispatch(be_lun, io); - mtx_lock(&be_lun->queue_lock); continue; } io = (union ctl_io *)STAILQ_FIRST(&be_lun->input_queue); if (io != NULL) { DPRINTF("input queue\n"); - STAILQ_REMOVE(&be_lun->input_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - - /* - * We must drop the lock, since this routine and - * its children may sleep. - */ + if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + ctl_set_busy(&io->scsiio); + ctl_data_submit_done(io); + return; + } ctl_be_block_dispatch(be_lun, io); - - mtx_lock(&be_lun->queue_lock); continue; } @@ -1689,9 +1693,9 @@ ctl_be_block_worker(void *context, int p * If we get here, there is no work left in the queues, so * just break out and let the task queue go to sleep. */ + mtx_unlock(&be_lun->queue_lock); break; } - mtx_unlock(&be_lun->queue_lock); } /* @@ -2457,6 +2461,7 @@ ctl_be_block_rm(struct ctl_be_block_soft { struct ctl_lun_rm_params *params; struct ctl_be_block_lun *be_lun; + struct ctl_be_lun *cbe_lun; int retval; params = &req->reqdata.rm; @@ -2474,18 +2479,24 @@ ctl_be_block_rm(struct ctl_be_block_soft params->lun_id); goto bailout_error; } + cbe_lun = &be_lun->cbe_lun; - retval = ctl_disable_lun(&be_lun->cbe_lun); - + retval = ctl_disable_lun(cbe_lun); if (retval != 0) { snprintf(req->error_str, sizeof(req->error_str), "error %d returned from ctl_disable_lun() for " "LUN %d", retval, params->lun_id); goto bailout_error; + } + if (be_lun->vn != NULL) { + cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; + ctl_lun_offline(cbe_lun); + taskqueue_drain_all(be_lun->io_taskqueue); + ctl_be_block_close(be_lun); } - retval = ctl_invalidate_lun(&be_lun->cbe_lun); + retval = ctl_invalidate_lun(cbe_lun); if (retval != 0) { snprintf(req->error_str, sizeof(req->error_str), "error %d returned from ctl_invalidate_lun() for " @@ -2494,15 +2505,12 @@ ctl_be_block_rm(struct ctl_be_block_soft } mtx_lock(&softc->lock); - be_lun->flags |= CTL_BE_BLOCK_LUN_WAITING; - while ((be_lun->flags & CTL_BE_BLOCK_LUN_UNCONFIGURED) == 0) { retval = msleep(be_lun, &softc->lock, PCATCH, "ctlblk", 0); if (retval == EINTR) break; } - be_lun->flags &= ~CTL_BE_BLOCK_LUN_WAITING; if ((be_lun->flags & CTL_BE_BLOCK_LUN_UNCONFIGURED) == 0) { @@ -2517,18 +2525,15 @@ ctl_be_block_rm(struct ctl_be_block_soft softc->num_luns--; mtx_unlock(&softc->lock); - taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); - + taskqueue_drain_all(be_lun->io_taskqueue); taskqueue_free(be_lun->io_taskqueue); - ctl_be_block_close(be_lun); - if (be_lun->disk_stats != NULL) devstat_remove_entry(be_lun->disk_stats); uma_zdestroy(be_lun->lun_zone); - ctl_free_opts(&be_lun->cbe_lun.options); + ctl_free_opts(&cbe_lun->options); free(be_lun->dev_path, M_CTLBLK); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); @@ -2693,7 +2698,7 @@ ctl_be_block_modify(struct ctl_be_block_ if (be_lun->vn != NULL) { cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; ctl_lun_offline(cbe_lun); - pause("CTL LUN offline", hz / 8); // XXX + taskqueue_drain_all(be_lun->io_taskqueue); error = ctl_be_block_close(be_lun); } else error = 0; Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:58:25 2015 (r288733) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 08:59:18 2015 (r288734) @@ -507,7 +507,7 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram mtx_unlock(&softc->lock); if (retval == 0) { - taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task); + taskqueue_drain_all(be_lun->io_taskqueue); taskqueue_free(be_lun->io_taskqueue); ctl_free_opts(&be_lun->cbe_lun.options); mtx_destroy(&be_lun->queue_lock); From owner-svn-src-all@freebsd.org Mon Oct 5 09:00:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E234A1063E; Mon, 5 Oct 2015 09:00:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FC58ED9; Mon, 5 Oct 2015 09:00:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9590AKU019189; Mon, 5 Oct 2015 09:00:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9590A9n019188; Mon, 5 Oct 2015 09:00:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050900.t9590A9n019188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288735 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:00:10 -0000 Author: mav Date: Mon Oct 5 09:00:09 2015 New Revision: 288735 URL: https://svnweb.freebsd.org/changeset/base/288735 Log: MFC r287671: Make ctld restart on primary HA node less invasive for secondary. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 08:59:18 2015 (r288734) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:00:09 2015 (r288735) @@ -1748,12 +1748,12 @@ ctl_serialize_other_sc_cmd(struct ctl_sc lun = NULL; if (lun == NULL) { /* - * Why isn't LUN defined? The other side wouldn't - * send a cmd if the LUN is undefined. + * The other node would not send this request to us unless + * received announce that we are primary node for this LUN. + * If this LUN does not exist now, it is probably result of + * a race, so respond to initiator in the most opaque way. */ - printf("%s: Bad JUJU!, LUN is NULL!\n", __func__); - - ctl_set_unsupported_lun(ctsio); + ctl_set_busy(ctsio); ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; msg_info.hdr.serializing_sc = NULL; From owner-svn-src-all@freebsd.org Mon Oct 5 09:01:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87678A1078A; Mon, 5 Oct 2015 09:01:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77B131212; Mon, 5 Oct 2015 09:01:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9591LYB020294; Mon, 5 Oct 2015 09:01:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9591KaX020291; Mon, 5 Oct 2015 09:01:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050901.t9591KaX020291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288736 - in stable/10: share/man/man4 sys/cam/ctl usr.sbin/ctladm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:01:21 -0000 Author: mav Date: Mon Oct 5 09:01:19 2015 New Revision: 288736 URL: https://svnweb.freebsd.org/changeset/base/288736 Log: MFC r287707: CTL documentation update, mostly for HA. Modified: stable/10/share/man/man4/ctl.4 stable/10/sys/cam/ctl/README.ctl.txt stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 ============================================================================== --- stable/10/share/man/man4/ctl.4 Mon Oct 5 09:00:09 2015 (r288735) +++ stable/10/share/man/man4/ctl.4 Mon Oct 5 09:01:19 2015 (r288736) @@ -1,4 +1,5 @@ .\" Copyright (c) 2013 Edward Tomasz Napierala +.\" Copyright (c) 2015 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 9, 2015 +.Dd September 12, 2015 .Dt CTL 4 .Os .Sh NAME @@ -80,6 +81,8 @@ Mode sense/select support .It Error injection support .It +High Availability clustering support with ALUA +.It All I/O handled in-kernel, no userland context switch overhead .El .Pp @@ -99,9 +102,57 @@ log commands with errors; .It 2 log all commands; .It 4 -log received data for commands except READ/WRITE. +log data for commands other then READ/WRITE. .El Defaults to 0. +.It Va kern.cam.ctl.ha_id +Specifies unique position of this node within High Availability cluster. +Default is 0 -- no HA, 1 and 2 -- HA enabled at specified position. +.It Va kern.cam.ctl.ha_mode +Specifies High Availability cluster operation mode: +.Bl -tag -offset indent -compact +.It 0 +Active/Standby -- primary node has backend access and processes requests, +while secondary can only do basic LUN discovery and reservation; +.It 1 +Active/Active -- both nodes have backend access and process requests, +while secondary node synchronizes processing with primary one; +.It 2 +Active/Active -- primary node has backend access and processes requests, +while secondary node forwards all requests and data to primary one; +.El +All above modes require established connection between HA cluster nodes. +If connection is not configured, secondary node will report Unavailable +state; if configured but not established -- Transitioning state. +Defaults to 0. +.It Va kern.cam.ctl.ha_peer +String value, specifying method to establish connection to peer HA node. +Can be "listen IP:port", "connect IP:port" or empty. +.It Va kern.cam.ctl.ha_link +Reports present state of connection between HA cluster nodes: +.Bl -tag -offset indent -compact +.It 0 +not configured; +.It 1 +configured but not established; +.It 2 +established. +.El +.It Va kern.cam.ctl.ha_role +Specifies default role of this node: +.Bl -tag -offset indent -compact +.It 0 +primary; +.It 1 +secondary. +.El +This role can be overriden on per-LUN basis using "ha_role" LUN option, +so that for one LUN one node is primary, while for another -- another. +Role change from primary to secondary for HA modes 0 and 2 closes backends, +the opposite change -- opens. +If there is no primary node (both nodes are secondary, or secondary node has +no connection to primary one), secondary node(s) report Transitioning state. +State with two primary nodes is illegal (split brain condition). .It Va kern.cam.ctl.iscsi.debug Verbosity level for log messages from the kernel part of iSCSI target. Set to 0 to disable logging or 1 to warn about potential problems. @@ -131,5 +182,7 @@ subsystem first appeared in .Sh AUTHORS The .Nm -subsystem was written by -.An Kenneth Merry Aq ken@FreeBSD.org . +subsystem was originally written by +.An Kenneth Merry Aq Mt ken@FreeBSD.org . +Later work was done by +.An Alexander Motin Aq Mt mav@FreeBSD.org . Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 09:00:09 2015 (r288735) +++ stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 09:01:19 2015 (r288736) @@ -40,25 +40,24 @@ Features: - Support for multiple ports - Support for multiple simultaneous initiators - Support for multiple simultaneous backing stores + - Support for VMWare VAAI: COMPARE AND WRITE, XCOPY, WRITE SAME and + UNMAP commands + - Support for Microsoft ODX: POPULATE TOKEN/WRITE USING TOKEN, WRITE SAME + and UNMAP commands - Persistent reservation support - Mode sense/select support - Error injection support - - High Availability support + - High Availability clustering support with ALUA - All I/O handled in-kernel, no userland context switch overhead. Configuring and Running CTL: =========================== - - After applying the CTL patchset to your tree, build world and install it - on your target system. - - - Add 'device ctl' to your kernel configuration file. + - Add 'device ctl' to your kernel configuration file or load the module. - If you're running with a 8Gb or 4Gb Qlogic FC board, add - 'options ISP_TARGET_MODE' to your kernel config file. Keep in mind that - the isp(4) driver can run in target or initiator mode, but not both on - the same machine. 'device ispfw' or loading the ispfw module is also - recommended. + 'options ISP_TARGET_MODE' to your kernel config file. 'device ispfw' or + loading the ispfw module is also recommended. - Rebuild and install a new kernel. Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 09:00:09 2015 (r288735) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 09:01:19 2015 (r288736) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Silicon Graphics International Corp. +.\" Copyright (c) 2015 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -34,7 +35,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd September 10, 2015 +.Dd September 12, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -964,6 +965,9 @@ Specifies LUN NAA identifier. Either EUI or NAA identifier should be set to UNIQUE value to allow EXTENDED COPY command access the LUN. Non-unique LUN identifiers may lead to data corruption. +.It Va ha_role +Setting to "primary" or "secondary" overrides default role of the node +in HA cluster, set by kern.cam.ctl.ha_role sysctl. .It Va insecure_tpc Setting to "on" allows EXTENDED COPY command sent to this LUN access other LUNs on this host, not accessible otherwise. @@ -995,7 +999,6 @@ Specify physical block size and offset o .It Va ublockoffset Specify UNMAP block size and offset of the device. .It Va rpm -.It Va rpm Specifies medium rotation rate of the device: 0 -- not reported, 1 -- non-rotating (SSD), >1024 -- value in revolutions per minute. .It Va formfactor From owner-svn-src-all@freebsd.org Mon Oct 5 09:02:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91518A10925; Mon, 5 Oct 2015 09:02:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 766C3142F; Mon, 5 Oct 2015 09:02:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9592EXg022967; Mon, 5 Oct 2015 09:02:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9592EfB022966; Mon, 5 Oct 2015 09:02:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050902.t9592EfB022966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288737 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:02:14 -0000 Author: mav Date: Mon Oct 5 09:02:13 2015 New Revision: 288737 URL: https://svnweb.freebsd.org/changeset/base/288737 Log: MFC r287711: Some HA polishing. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:01:19 2015 (r288736) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:02:13 2015 (r288737) @@ -675,7 +675,10 @@ ctl_isc_ha_link_down(struct ctl_softc *s mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { mtx_lock(&lun->lun_lock); - lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; + if (lun->flags & CTL_LUN_PEER_SC_PRIMARY) { + lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; + ctl_est_ua_all(lun, -1, CTL_UA_ASYM_ACC_CHANGE); + } mtx_unlock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); @@ -702,8 +705,11 @@ ctl_isc_ua(struct ctl_softc *softc, unio struct ctl_lun *lun; uint32_t iid = ctl_get_initindex(&msg->hdr.nexus); + mtx_lock(&softc->ctl_lock); if (msg->hdr.nexus.targ_lun < CTL_MAX_LUNS && - (lun = softc->ctl_luns[msg->hdr.nexus.targ_lun]) != NULL) { + (lun = softc->ctl_luns[msg->hdr.nexus.targ_mapped_lun]) != NULL) { + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); if (msg->ua.ua_all) { if (msg->ua.ua_set) ctl_est_ua_all(lun, iid, msg->ua.ua_type); @@ -715,7 +721,9 @@ ctl_isc_ua(struct ctl_softc *softc, unio else ctl_clr_ua(lun, iid, msg->ua.ua_type); } - } + mtx_unlock(&lun->lun_lock); + } else + mtx_unlock(&softc->ctl_lock); } static void @@ -724,58 +732,69 @@ ctl_isc_lun_sync(struct ctl_softc *softc struct ctl_lun *lun; struct ctl_ha_msg_lun_pr_key pr_key; int i, k; + ctl_lun_flags oflags; + uint32_t targ_lun; - lun = softc->ctl_luns[msg->hdr.nexus.targ_lun]; - if (lun == NULL) { - CTL_DEBUG_PRINT(("%s: Unknown LUN %d\n", __func__, - msg->hdr.nexus.targ_lun)); + targ_lun = msg->hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + ((lun = softc->ctl_luns[targ_lun]) == NULL)) { + mtx_unlock(&softc->ctl_lock); + return; + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + if (lun->flags & CTL_LUN_DISABLED) { + mtx_unlock(&lun->lun_lock); + return; + } + i = (lun->lun_devid != NULL) ? lun->lun_devid->len : 0; + if (msg->lun.lun_devid_len != i || (i > 0 && + memcmp(&msg->lun.data[0], lun->lun_devid->data, i) != 0)) { + mtx_unlock(&lun->lun_lock); + printf("%s: Received conflicting HA LUN %d\n", + __func__, msg->hdr.nexus.targ_lun); + return; } else { - mtx_lock(&lun->lun_lock); - i = (lun->lun_devid != NULL) ? lun->lun_devid->len : 0; - if (msg->lun.lun_devid_len != i || (i > 0 && - memcmp(&msg->lun.data[0], lun->lun_devid->data, i) != 0)) { - mtx_unlock(&lun->lun_lock); - printf("%s: Received conflicting HA LUN %d\n", - __func__, msg->hdr.nexus.targ_lun); - return; - } else { - /* Record whether peer is primary. */ - if ((msg->lun.flags & CTL_LUN_PRIMARY_SC) && - (msg->lun.flags & CTL_LUN_DISABLED) == 0) - lun->flags |= CTL_LUN_PEER_SC_PRIMARY; - else - lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; - - /* If peer is primary and we are not -- use data */ - if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && - (lun->flags & CTL_LUN_PEER_SC_PRIMARY)) { - lun->PRGeneration = msg->lun.pr_generation; - lun->pr_res_idx = msg->lun.pr_res_idx; - lun->res_type = msg->lun.pr_res_type; - lun->pr_key_count = msg->lun.pr_key_count; - for (k = 0; k < CTL_MAX_INITIATORS; k++) - ctl_clr_prkey(lun, k); - for (k = 0; k < msg->lun.pr_key_count; k++) { - memcpy(&pr_key, &msg->lun.data[i], - sizeof(pr_key)); - ctl_alloc_prkey(lun, pr_key.pr_iid); - ctl_set_prkey(lun, pr_key.pr_iid, - pr_key.pr_key); - i += sizeof(pr_key); - } + /* Record whether peer is primary. */ + oflags = lun->flags; + if ((msg->lun.flags & CTL_LUN_PRIMARY_SC) && + (msg->lun.flags & CTL_LUN_DISABLED) == 0) + lun->flags |= CTL_LUN_PEER_SC_PRIMARY; + else + lun->flags &= ~CTL_LUN_PEER_SC_PRIMARY; + if (oflags != lun->flags) + ctl_est_ua_all(lun, -1, CTL_UA_ASYM_ACC_CHANGE); + + /* If peer is primary and we are not -- use data */ + if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && + (lun->flags & CTL_LUN_PEER_SC_PRIMARY)) { + lun->PRGeneration = msg->lun.pr_generation; + lun->pr_res_idx = msg->lun.pr_res_idx; + lun->res_type = msg->lun.pr_res_type; + lun->pr_key_count = msg->lun.pr_key_count; + for (k = 0; k < CTL_MAX_INITIATORS; k++) + ctl_clr_prkey(lun, k); + for (k = 0; k < msg->lun.pr_key_count; k++) { + memcpy(&pr_key, &msg->lun.data[i], + sizeof(pr_key)); + ctl_alloc_prkey(lun, pr_key.pr_iid); + ctl_set_prkey(lun, pr_key.pr_iid, + pr_key.pr_key); + i += sizeof(pr_key); } - - mtx_unlock(&lun->lun_lock); - CTL_DEBUG_PRINT(("%s: Known LUN %d, peer is %s\n", - __func__, msg->hdr.nexus.targ_lun, - (msg->lun.flags & CTL_LUN_PRIMARY_SC) ? - "primary" : "secondary")); - - /* If we are primary but peer doesn't know -- notify */ - if ((lun->flags & CTL_LUN_PRIMARY_SC) && - (msg->lun.flags & CTL_LUN_PEER_SC_PRIMARY) == 0) - ctl_isc_announce_lun(lun); } + + mtx_unlock(&lun->lun_lock); + CTL_DEBUG_PRINT(("%s: Known LUN %d, peer is %s\n", + __func__, msg->hdr.nexus.targ_lun, + (msg->lun.flags & CTL_LUN_PRIMARY_SC) ? + "primary" : "secondary")); + + /* If we are primary but peer doesn't know -- notify */ + if ((lun->flags & CTL_LUN_PRIMARY_SC) && + (msg->lun.flags & CTL_LUN_PEER_SC_PRIMARY) == 0) + ctl_isc_announce_lun(lun); } } @@ -1732,20 +1751,24 @@ ctl_serialize_other_sc_cmd(struct ctl_sc softc = control_softc; targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); if ((targ_lun < CTL_MAX_LUNS) && ((lun = softc->ctl_luns[targ_lun]) != NULL)) { + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); /* * If the LUN is invalid, pretend that it doesn't exist. * It will go away as soon as all pending I/O has been * completed. */ - mtx_lock(&lun->lun_lock); if (lun->flags & CTL_LUN_DISABLED) { mtx_unlock(&lun->lun_lock); lun = NULL; } - } else + } else { + mtx_unlock(&softc->ctl_lock); lun = NULL; + } if (lun == NULL) { /* * The other node would not send this request to us unless @@ -2516,6 +2539,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (lun == NULL) { mtx_unlock(&softc->ctl_lock); sync_info->status = CTL_GS_SYNC_NO_LUN; + break; } /* * Get or set the sync interval. We're not bounds checking @@ -4533,8 +4557,8 @@ ctl_lun_primary(struct ctl_be_lun *be_lu mtx_lock(&lun->lun_lock); lun->flags |= CTL_LUN_PRIMARY_SC; - mtx_unlock(&lun->lun_lock); ctl_est_ua_all(lun, -1, CTL_UA_ASYM_ACC_CHANGE); + mtx_unlock(&lun->lun_lock); ctl_isc_announce_lun(lun); return (0); } @@ -4546,8 +4570,8 @@ ctl_lun_secondary(struct ctl_be_lun *be_ mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_PRIMARY_SC; - mtx_unlock(&lun->lun_lock); ctl_est_ua_all(lun, -1, CTL_UA_ASYM_ACC_CHANGE); + mtx_unlock(&lun->lun_lock); ctl_isc_announce_lun(lun); return (0); } @@ -8385,10 +8409,19 @@ ctl_hndl_per_res_out_on_other_sc(union c uint32_t targ_lun; softc = control_softc; - targ_lun = msg->hdr.nexus.targ_mapped_lun; - lun = softc->ctl_luns[targ_lun]; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + ((lun = softc->ctl_luns[targ_lun]) == NULL)) { + mtx_unlock(&softc->ctl_lock); + return; + } mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + if (lun->flags & CTL_LUN_DISABLED) { + mtx_unlock(&lun->lun_lock); + return; + } switch(msg->pr.pr_info.action) { case CTL_PR_REG_KEY: ctl_alloc_prkey(lun, msg->pr.pr_info.residx); From owner-svn-src-all@freebsd.org Mon Oct 5 09:03:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BBD0A109DB; Mon, 5 Oct 2015 09:03:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1E015E5; Mon, 5 Oct 2015 09:03:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95930w5023054; Mon, 5 Oct 2015 09:03:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95930Ot023053; Mon, 5 Oct 2015 09:03:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050903.t95930Ot023053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288738 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:03:01 -0000 Author: mav Date: Mon Oct 5 09:03:00 2015 New Revision: 288738 URL: https://svnweb.freebsd.org/changeset/base/288738 Log: MFC r287712: Correct RTPG bitmask. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 09:02:13 2015 (r288737) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 09:03:00 2015 (r288738) @@ -486,7 +486,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 12, {0x0a, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + 12, {0xea, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 0B */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, From owner-svn-src-all@freebsd.org Mon Oct 5 09:03:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01859A10B52; Mon, 5 Oct 2015 09:03:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E74C81894; Mon, 5 Oct 2015 09:03:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9593ole023139; Mon, 5 Oct 2015 09:03:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9593oIo023138; Mon, 5 Oct 2015 09:03:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050903.t9593oIo023138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288739 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:03:51 -0000 Author: mav Date: Mon Oct 5 09:03:50 2015 New Revision: 288739 URL: https://svnweb.freebsd.org/changeset/base/288739 Log: MFC r287714: Report that we have no limit on POPULATE TOKEN segment size. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 09:03:00 2015 (r288738) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 09:03:50 2015 (r288739) @@ -394,8 +394,7 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * scsi_ulto2b(0, rtfb_ptr->optimal_length_granularity); scsi_u64to8b(0, rtfb_ptr->maximum_bytes); scsi_u64to8b(0, rtfb_ptr->optimal_bytes); - scsi_u64to8b(TPC_MAX_IOCHUNK_SIZE, - rtfb_ptr->optimal_bytes_to_token_per_segment); + scsi_u64to8b(UINT64_MAX, rtfb_ptr->optimal_bytes_to_token_per_segment); scsi_u64to8b(TPC_MAX_IOCHUNK_SIZE, rtfb_ptr->optimal_bytes_from_token_per_segment); From owner-svn-src-all@freebsd.org Mon Oct 5 09:04:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA42EA10BCF; Mon, 5 Oct 2015 09:04:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABAFA19FD; Mon, 5 Oct 2015 09:04:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9594buc023391; Mon, 5 Oct 2015 09:04:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9594bQC023389; Mon, 5 Oct 2015 09:04:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050904.t9594bQC023389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288740 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:04:37 -0000 Author: mav Date: Mon Oct 5 09:04:36 2015 New Revision: 288740 URL: https://svnweb.freebsd.org/changeset/base/288740 Log: MFC r287715: Improve XCOPY error reporting. Modified: stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/ctl/ctl_tpc_local.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 09:03:50 2015 (r288739) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 09:04:36 2015 (r288740) @@ -1589,6 +1589,10 @@ ctl_extended_copy_lid1(struct ctl_scsiio cdb = (struct scsi_extended_copy *)ctsio->cdb; len = scsi_4btoul(cdb->length); + if (len == 0) { + ctl_set_success(ctsio); + goto done; + } if (len < sizeof(struct scsi_extended_copy_lid1_data) || len > sizeof(struct scsi_extended_copy_lid1_data) + TPC_MAX_LIST + TPC_MAX_INLINE) { @@ -1619,20 +1623,22 @@ ctl_extended_copy_lid1(struct ctl_scsiio lencscd = scsi_2btoul(data->cscd_list_length); lenseg = scsi_4btoul(data->segment_list_length); leninl = scsi_4btoul(data->inline_data_length); - if (len < sizeof(struct scsi_extended_copy_lid1_data) + - lencscd + lenseg + leninl || - leninl > TPC_MAX_INLINE) { - ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, - /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); - goto done; - } if (lencscd > TPC_MAX_CSCDS * sizeof(struct scsi_ec_cscd)) { ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, /*asc*/ 0x26, /*ascq*/ 0x06, SSD_ELEM_NONE); goto done; } - if (lencscd + lenseg > TPC_MAX_LIST) { + if (lenseg > TPC_MAX_SEGS * sizeof(struct scsi_ec_segment)) { + ctl_set_sense(ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, + /*asc*/ 0x26, /*ascq*/ 0x08, SSD_ELEM_NONE); + goto done; + } + if (lencscd + lenseg > TPC_MAX_LIST || + leninl > TPC_MAX_INLINE || + len < sizeof(struct scsi_extended_copy_lid1_data) + + lencscd + lenseg + leninl) { ctl_set_param_len_error(ctsio); goto done; } @@ -1716,6 +1722,10 @@ ctl_extended_copy_lid4(struct ctl_scsiio cdb = (struct scsi_extended_copy *)ctsio->cdb; len = scsi_4btoul(cdb->length); + if (len == 0) { + ctl_set_success(ctsio); + goto done; + } if (len < sizeof(struct scsi_extended_copy_lid4_data) || len > sizeof(struct scsi_extended_copy_lid4_data) + TPC_MAX_LIST + TPC_MAX_INLINE) { @@ -1746,20 +1756,22 @@ ctl_extended_copy_lid4(struct ctl_scsiio lencscd = scsi_2btoul(data->cscd_list_length); lenseg = scsi_2btoul(data->segment_list_length); leninl = scsi_2btoul(data->inline_data_length); - if (len < sizeof(struct scsi_extended_copy_lid4_data) + - lencscd + lenseg + leninl || - leninl > TPC_MAX_INLINE) { - ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, - /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); - goto done; - } if (lencscd > TPC_MAX_CSCDS * sizeof(struct scsi_ec_cscd)) { ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, /*asc*/ 0x26, /*ascq*/ 0x06, SSD_ELEM_NONE); goto done; } - if (lencscd + lenseg > TPC_MAX_LIST) { + if (lenseg > TPC_MAX_SEGS * sizeof(struct scsi_ec_segment)) { + ctl_set_sense(ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, + /*asc*/ 0x26, /*ascq*/ 0x08, SSD_ELEM_NONE); + goto done; + } + if (lencscd + lenseg > TPC_MAX_LIST || + leninl > TPC_MAX_INLINE || + len < sizeof(struct scsi_extended_copy_lid1_data) + + lencscd + lenseg + leninl) { ctl_set_param_len_error(ctsio); goto done; } Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 09:03:50 2015 (r288739) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 09:04:36 2015 (r288740) @@ -281,7 +281,8 @@ tpcl_resolve(struct ctl_softc *softc, in struct ctl_lun *lun; uint64_t lunid = UINT64_MAX; - if (cscd->type_code != EC_CSCD_ID) + if (cscd->type_code != EC_CSCD_ID || + (cscd->luidt_pdt & EC_LUIDT_MASK) != EC_LUIDT_LUN) return (lunid); cscdid = (struct scsi_ec_cscd_id *)cscd; From owner-svn-src-all@freebsd.org Mon Oct 5 09:05:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A16F8A10CEB; Mon, 5 Oct 2015 09:05:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92D651BA2; Mon, 5 Oct 2015 09:05:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9595OeK023484; Mon, 5 Oct 2015 09:05:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9595OC4023483; Mon, 5 Oct 2015 09:05:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050905.t9595OC4023483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288741 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:05:24 -0000 Author: mav Date: Mon Oct 5 09:05:23 2015 New Revision: 288741 URL: https://svnweb.freebsd.org/changeset/base/288741 Log: MFC r287718: Decode WRITE ATOMIC(16) command. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 09:04:36 2015 (r288740) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 09:05:23 2015 (r288741) @@ -509,7 +509,8 @@ static struct op_table_entry scsi_op_cod /* 99 */ /* 9A */ /* 9B */ - /* 9C */ + /* 9C O WRITE ATOMIC(16) */ + { 0x9C, D, "WRITE ATOMIC(16)" }, /* 9D */ /* XXX KDM ALL for this? op-num.txt defines it for none.. */ /* 9E SERVICE ACTION IN(16) */ From owner-svn-src-all@freebsd.org Mon Oct 5 09:06:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F282CA10E59; Mon, 5 Oct 2015 09:06:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36B41D31; Mon, 5 Oct 2015 09:06:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9596I9g023576; Mon, 5 Oct 2015 09:06:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9596I4u023575; Mon, 5 Oct 2015 09:06:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050906.t9596I4u023575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288742 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:06:19 -0000 Author: mav Date: Mon Oct 5 09:06:18 2015 New Revision: 288742 URL: https://svnweb.freebsd.org/changeset/base/288742 Log: MFC r287720: Fix false CTL_UA_RES_RELEASE on secondary HA node. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:05:23 2015 (r288741) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:06:18 2015 (r288742) @@ -8406,7 +8406,7 @@ ctl_hndl_per_res_out_on_other_sc(union c struct ctl_lun *lun; struct ctl_softc *softc; int i; - uint32_t targ_lun; + uint32_t residx, targ_lun; softc = control_softc; targ_lun = msg->hdr.nexus.targ_mapped_lun; @@ -8422,6 +8422,7 @@ ctl_hndl_per_res_out_on_other_sc(union c mtx_unlock(&lun->lun_lock); return; } + residx = ctl_get_initindex(&msg->hdr.nexus); switch(msg->pr.pr_info.action) { case CTL_PR_REG_KEY: ctl_alloc_prkey(lun, msg->pr.pr_info.residx); @@ -8486,8 +8487,9 @@ ctl_hndl_per_res_out_on_other_sc(union c if (lun->res_type != SPR_TYPE_EX_AC && lun->res_type != SPR_TYPE_WR_EX) { for (i = softc->init_min; i < softc->init_max; i++) - if (ctl_get_prkey(lun, i) != 0) - ctl_est_ua(lun, i, CTL_UA_RES_RELEASE); + if (i == residx || ctl_get_prkey(lun, i) == 0) + continue; + ctl_est_ua(lun, i, CTL_UA_RES_RELEASE); } lun->flags &= ~CTL_LUN_PR_RESERVED; From owner-svn-src-all@freebsd.org Mon Oct 5 09:07:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC273A10EF7; Mon, 5 Oct 2015 09:07:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD6331EA8; Mon, 5 Oct 2015 09:07:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9597Gue023666; Mon, 5 Oct 2015 09:07:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9597GFN023665; Mon, 5 Oct 2015 09:07:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050907.t9597GFN023665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288743 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:07:16 -0000 Author: mav Date: Mon Oct 5 09:07:15 2015 New Revision: 288743 URL: https://svnweb.freebsd.org/changeset/base/288743 Log: MFC r287721: Add HA support for CTL_TASK_I_T_NEXUS_RESET. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:06:18 2015 (r288742) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:07:15 2015 (r288743) @@ -11518,13 +11518,24 @@ ctl_i_t_nexus_reset(union ctl_io *io) struct ctl_lun *lun; uint32_t initidx; + if (!(io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) { + union ctl_ha_msg msg_info; + + msg_info.hdr.nexus = io->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_I_T_NEXUS_RESET; + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.task), M_WAITOK); + } + initidx = ctl_get_initindex(&io->io_hdr.nexus); mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { mtx_lock(&lun->lun_lock); ctl_abort_tasks_lun(lun, io->io_hdr.nexus.targ_port, - io->io_hdr.nexus.initid, - (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); + io->io_hdr.nexus.initid, 1); #ifdef CTL_WITH_CA ctl_clear_mask(lun->have_ca, initidx); #endif From owner-svn-src-all@freebsd.org Mon Oct 5 09:08:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAC61A10F9F; Mon, 5 Oct 2015 09:08:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B952698; Mon, 5 Oct 2015 09:08:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95987Zg023763; Mon, 5 Oct 2015 09:08:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959877l023761; Mon, 5 Oct 2015 09:08:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050908.t959877l023761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288744 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:08:07 -0000 Author: mav Date: Mon Oct 5 09:08:06 2015 New Revision: 288744 URL: https://svnweb.freebsd.org/changeset/base/288744 Log: MFC r287724: Check for obsolete NUL bin in CSCD descriptor. Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 09:07:15 2015 (r288743) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 09:08:06 2015 (r288744) @@ -282,7 +282,8 @@ tpcl_resolve(struct ctl_softc *softc, in uint64_t lunid = UINT64_MAX; if (cscd->type_code != EC_CSCD_ID || - (cscd->luidt_pdt & EC_LUIDT_MASK) != EC_LUIDT_LUN) + (cscd->luidt_pdt & EC_LUIDT_MASK) != EC_LUIDT_LUN || + (cscd->luidt_pdt & EC_NUL) != 0) return (lunid); cscdid = (struct scsi_ec_cscd_id *)cscd; Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 09:07:15 2015 (r288743) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 09:08:06 2015 (r288744) @@ -1669,6 +1669,7 @@ struct scsi_ec_cscd uint8_t type_code; #define EC_CSCD_EXT 0xff uint8_t luidt_pdt; +#define EC_NUL 0x20 #define EC_LUIDT_MASK 0xc0 #define EC_LUIDT_LUN 0x00 #define EC_LUIDT_PROXY_TOKEN 0x40 From owner-svn-src-all@freebsd.org Mon Oct 5 09:08:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05BB8A110AE; Mon, 5 Oct 2015 09:08:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB3E5220; Mon, 5 Oct 2015 09:08:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9598wPQ023846; Mon, 5 Oct 2015 09:08:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9598wHd023845; Mon, 5 Oct 2015 09:08:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050908.t9598wHd023845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288745 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:08:59 -0000 Author: mav Date: Mon Oct 5 09:08:58 2015 New Revision: 288745 URL: https://svnweb.freebsd.org/changeset/base/288745 Log: MFC r287748: Make TARGET RESET respect LUN mapping. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:08:06 2015 (r288744) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:08:58 2015 (r288745) @@ -11338,6 +11338,7 @@ static int ctl_target_reset(struct ctl_softc *softc, union ctl_io *io, ctl_ua_type ua_type) { + struct ctl_port *port; struct ctl_lun *lun; int retval; @@ -11358,8 +11359,13 @@ ctl_target_reset(struct ctl_softc *softc retval = 0; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(lun, &softc->lun_list, links) + port = softc->ctl_ports[io->io_hdr.nexus.targ_port]; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (port != NULL && + ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; retval += ctl_lun_reset(lun, io, ua_type); + } mtx_unlock(&softc->ctl_lock); return (retval); From owner-svn-src-all@freebsd.org Mon Oct 5 09:09:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E142EA11123; Mon, 5 Oct 2015 09:09:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3BA33A4; Mon, 5 Oct 2015 09:09:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9599nG2023942; Mon, 5 Oct 2015 09:09:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9599nox023941; Mon, 5 Oct 2015 09:09:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050909.t9599nox023941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288746 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:09:50 -0000 Author: mav Date: Mon Oct 5 09:09:48 2015 New Revision: 288746 URL: https://svnweb.freebsd.org/changeset/base/288746 Log: MFC r287754: Report CTL_UA_LUN_CHANGE on LUN map change. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:08:58 2015 (r288745) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:09:48 2015 (r288746) @@ -408,6 +408,8 @@ static int ctl_scsiio_lun_check(struct c struct ctl_scsiio *ctsio); static void ctl_failover_lun(struct ctl_lun *lun); static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +static void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, + ctl_ua_type ua); static void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); static void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); @@ -1215,24 +1217,32 @@ ctl_est_ua(struct ctl_lun *lun, uint32_t } static void -ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) +ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, ctl_ua_type ua) { - struct ctl_softc *softc = lun->ctl_softc; - int i, j; + int i; mtx_assert(&lun->lun_lock, MA_OWNED); - for (i = softc->port_min; i < softc->port_max; i++) { - if (lun->pending_ua[i] == NULL) + if (lun->pending_ua[port] == NULL) + return; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port * CTL_MAX_INIT_PER_PORT + i == except) continue; - for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) { - if (i * CTL_MAX_INIT_PER_PORT + j == except) - continue; - lun->pending_ua[i][j] |= ua; - } + lun->pending_ua[port][i] |= ua; } } static void +ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) +{ + struct ctl_softc *softc = lun->ctl_softc; + int i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + for (i = softc->port_min; i < softc->port_max; i++) + ctl_est_ua_port(lun, i, except, ua); +} + +static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -2117,6 +2127,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct ctl_softc *softc; + struct ctl_lun *lun; int retval; softc = control_softc; @@ -2275,7 +2286,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_DUMP_OOA: { - struct ctl_lun *lun; union ctl_io *io; char printbuf[128]; struct sbuf sb; @@ -2312,7 +2322,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_GET_OOA: { - struct ctl_lun *lun; struct ctl_ooa *ooa_hdr; struct ctl_ooa_entry *entries; uint32_t cur_fill_num; @@ -2404,7 +2413,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_CHECK_OOA: { union ctl_io *io; - struct ctl_lun *lun; struct ctl_ooa_info *ooa_info; @@ -2437,9 +2445,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_DELAY_IO: { struct ctl_io_delay_info *delay_info; -#ifdef CTL_IO_DELAY - struct ctl_lun *lun; -#endif /* CTL_IO_DELAY */ delay_info = (struct ctl_io_delay_info *)addr; @@ -2530,7 +2535,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, case CTL_SETSYNC: case CTL_GETSYNC: { struct ctl_sync_info *sync_info; - struct ctl_lun *lun; sync_info = (struct ctl_sync_info *)addr; @@ -2560,7 +2564,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_GETSTATS: { struct ctl_stats *stats; - struct ctl_lun *lun; int i; stats = (struct ctl_stats *)addr; @@ -2596,7 +2599,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_ERROR_INJECT: { struct ctl_error_desc *err_desc, *new_err_desc; - struct ctl_lun *lun; err_desc = (struct ctl_error_desc *)addr; @@ -2643,7 +2645,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_ERROR_INJECT_DELETE: { struct ctl_error_desc *delete_desc, *desc, *desc2; - struct ctl_lun *lun; int delete_done; delete_desc = (struct ctl_error_desc *)addr; @@ -2687,8 +2688,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); printf("CTL Persistent Reservation information start:\n"); for (i = 0; i < CTL_MAX_LUNS; i++) { - struct ctl_lun *lun; - lun = softc->ctl_luns[i]; if ((lun == NULL) @@ -2782,7 +2781,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_LUN_LIST: { struct sbuf *sb; - struct ctl_lun *lun; struct ctl_lun_list *list; struct ctl_option *opt; @@ -3155,6 +3153,13 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_unlock(&softc->ctl_lock); return (ENXIO); } + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_port(lun, lm->port, -1, CTL_UA_LUN_CHANGE); + mtx_unlock(&lun->lun_lock); + } mtx_unlock(&softc->ctl_lock); // XXX: port_enable sleeps if (lm->plun < CTL_MAX_LUNS) { if (lm->lun == UINT32_MAX) From owner-svn-src-all@freebsd.org Mon Oct 5 09:11:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A914A113A0; Mon, 5 Oct 2015 09:11:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFB73887; Mon, 5 Oct 2015 09:10:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959AxXO025223; Mon, 5 Oct 2015 09:10:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959Awwc025216; Mon, 5 Oct 2015 09:10:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050910.t959Awwc025216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288747 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:11:00 -0000 Author: mav Date: Mon Oct 5 09:10:58 2015 New Revision: 288747 URL: https://svnweb.freebsd.org/changeset/base/288747 Log: MFC r287756: Report INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_frontend.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:09:48 2015 (r288746) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:10:58 2015 (r288747) @@ -407,14 +407,6 @@ static int ctl_scsiio_lun_check(struct c const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); static void ctl_failover_lun(struct ctl_lun *lun); -static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); -static void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, - ctl_ua_type ua); -static void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); -static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); -static void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); -static void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, - ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio); static int ctl_scsiio(struct ctl_scsiio *ctsio); @@ -804,6 +796,7 @@ static void ctl_isc_port_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) { struct ctl_port *port; + struct ctl_lun *lun; int i, new; port = softc->ctl_ports[msg->hdr.nexus.targ_port]; @@ -879,6 +872,15 @@ ctl_isc_port_sync(struct ctl_softc *soft __func__); } } + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); } /* @@ -1201,7 +1203,7 @@ ctl_copy_sense_data_back(union ctl_io *s dest->hdr.status = src->io_hdr.status; } -static void +void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1216,7 +1218,7 @@ ctl_est_ua(struct ctl_lun *lun, uint32_t pu[initidx % CTL_MAX_INIT_PER_PORT] |= ua; } -static void +void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, ctl_ua_type ua) { int i; @@ -1231,7 +1233,7 @@ ctl_est_ua_port(struct ctl_lun *lun, int } } -static void +void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1242,7 +1244,7 @@ ctl_est_ua_all(struct ctl_lun *lun, uint ctl_est_ua_port(lun, i, except, ua); } -static void +void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1257,7 +1259,7 @@ ctl_clr_ua(struct ctl_lun *lun, uint32_t pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua; } -static void +void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1275,7 +1277,7 @@ ctl_clr_ua_all(struct ctl_lun *lun, uint } } -static void +void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type) { Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 09:09:48 2015 (r288746) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 09:10:58 2015 (r288747) @@ -120,6 +120,7 @@ typedef enum { CTL_UA_LUN_CHANGE = 0x0020, CTL_UA_MODE_CHANGE = 0x0040, CTL_UA_LOG_CHANGE = 0x0080, + CTL_UA_INQ_CHANGE = 0x0100, CTL_UA_RES_PREEMPT = 0x0400, CTL_UA_RES_RELEASE = 0x0800, CTL_UA_REG_PREEMPT = 0x1000, @@ -138,6 +139,10 @@ struct ctl_page_index; SYSCTL_DECL(_kern_cam_ctl); #endif +struct ctl_lun; +struct ctl_port; +struct ctl_softc; + /* * Put a string into an sbuf, escaping characters that are illegal or not * recommended in XML. Note this doesn't escape everything, just > < and &. @@ -174,9 +179,17 @@ void ctl_config_write_done(union ctl_io void ctl_portDB_changed(int portnum); int ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); -struct ctl_lun; + +void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, + ctl_ua_type ua); +void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); +void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); +void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, + ctl_ua_type ua_type); + void ctl_isc_announce_lun(struct ctl_lun *lun); -struct ctl_port; void ctl_isc_announce_port(struct ctl_port *port); /* Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:09:48 2015 (r288746) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:10:58 2015 (r288747) @@ -446,6 +446,11 @@ ctl_build_ua(struct ctl_lun *lun, uint32 asc = 0x2A; ascq = 0x02; break; + case CTL_UA_INQ_CHANGE: + /* 3Fh/03h INQUIRY DATA HAS CHANGED */ + asc = 0x3F; + ascq = 0x03; + break; case CTL_UA_RES_PREEMPT: /* 2Ah/03h RESERVATIONS PREEMPTED */ asc = 0x2A; Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 09:09:48 2015 (r288746) +++ stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 09:10:58 2015 (r288747) @@ -328,8 +328,16 @@ ctl_port_online(struct ctl_port *port) } if (port->port_online != NULL) port->port_online(port->onoff_arg); - /* XXX KDM need a lock here? */ + mtx_lock(&softc->ctl_lock); port->status |= CTL_PORT_STATUS_ONLINE; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); ctl_isc_announce_port(port); } @@ -355,8 +363,16 @@ ctl_port_offline(struct ctl_port *port) port->lun_disable(port->targ_lun_arg, lun->lun); } } - /* XXX KDM need a lock here? */ + mtx_lock(&softc->ctl_lock); port->status &= ~CTL_PORT_STATUS_ONLINE; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); ctl_isc_announce_port(port); } From owner-svn-src-all@freebsd.org Mon Oct 5 09:11:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96F96A11431; Mon, 5 Oct 2015 09:11:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC2CA6D; Mon, 5 Oct 2015 09:11:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959Bmmc027375; Mon, 5 Oct 2015 09:11:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959Blui027367; Mon, 5 Oct 2015 09:11:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050911.t959Blui027367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288748 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:11:48 -0000 Author: mav Date: Mon Oct 5 09:11:46 2015 New Revision: 288748 URL: https://svnweb.freebsd.org/changeset/base/288748 Log: MFC r287757: When updating port, apply only change of LUN map, not whole. Modified: stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 09:10:58 2015 (r288747) +++ stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 09:11:46 2015 (r288748) @@ -1985,7 +1985,7 @@ conf_apply(struct conf *oldconf, struct } else { log_debugx("updating port \"%s\"", newport->p_name); newport->p_ctl_port = oldport->p_ctl_port; - error = kernel_port_update(newport); + error = kernel_port_update(newport, oldport); } if (error != 0) { log_warnx("failed to %s port %s", Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 09:10:58 2015 (r288747) +++ stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 09:11:46 2015 (r288748) @@ -393,7 +393,7 @@ int kernel_lun_modify(struct lun *lun) int kernel_lun_remove(struct lun *lun); void kernel_handoff(struct connection *conn); int kernel_port_add(struct port *port); -int kernel_port_update(struct port *port); +int kernel_port_update(struct port *port, struct port *old); int kernel_port_remove(struct port *port); void kernel_capsicate(void); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 09:10:58 2015 (r288747) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 09:11:46 2015 (r288748) @@ -986,11 +986,13 @@ kernel_port_add(struct port *port) } int -kernel_port_update(struct port *port) +kernel_port_update(struct port *port, struct port *oport) { struct ctl_lun_map lm; struct target *targ = port->p_target; + struct target *otarg = oport->p_target; int error, i; + uint32_t olun; /* Map configured LUNs and unmap others */ for (i = 0; i < MAX_LUNS; i++) { @@ -1000,6 +1002,12 @@ kernel_port_update(struct port *port) lm.lun = UINT32_MAX; else lm.lun = targ->t_luns[i]->l_ctl_lun; + if (otarg->t_luns[i] == NULL) + olun = UINT32_MAX; + else + olun = otarg->t_luns[i]->l_ctl_lun; + if (lm.lun == olun) + continue; error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); if (error != 0) log_warn("CTL_LUN_MAP ioctl failed"); From owner-svn-src-all@freebsd.org Mon Oct 5 09:12:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 999B9A114E1; Mon, 5 Oct 2015 09:12:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACF9DE1; Mon, 5 Oct 2015 09:12:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959CdfU027502; Mon, 5 Oct 2015 09:12:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959CdAM027501; Mon, 5 Oct 2015 09:12:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050912.t959CdAM027501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288749 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:12:39 -0000 Author: mav Date: Mon Oct 5 09:12:38 2015 New Revision: 288749 URL: https://svnweb.freebsd.org/changeset/base/288749 Log: MFC r287758: Reannounce port to HA peer if LUN map changed after online. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:11:46 2015 (r288748) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:12:38 2015 (r288749) @@ -3155,12 +3155,16 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_unlock(&softc->ctl_lock); return (ENXIO); } - STAILQ_FOREACH(lun, &softc->lun_list, links) { - if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) - continue; - mtx_lock(&lun->lun_lock); - ctl_est_ua_port(lun, lm->port, -1, CTL_UA_LUN_CHANGE); - mtx_unlock(&lun->lun_lock); + if (port->status & CTL_PORT_STATUS_ONLINE) { + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= + CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_port(lun, lm->port, -1, + CTL_UA_LUN_CHANGE); + mtx_unlock(&lun->lun_lock); + } } mtx_unlock(&softc->ctl_lock); // XXX: port_enable sleeps if (lm->plun < CTL_MAX_LUNS) { @@ -3178,6 +3182,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = ctl_lun_map_init(port); } else return (ENXIO); + if (port->status & CTL_PORT_STATUS_ONLINE) + ctl_isc_announce_port(port); break; } default: { From owner-svn-src-all@freebsd.org Mon Oct 5 09:13:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CCD2A115CD; Mon, 5 Oct 2015 09:13:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5FB1F3B; Mon, 5 Oct 2015 09:13:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959DWIP027596; Mon, 5 Oct 2015 09:13:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959DVkw027591; Mon, 5 Oct 2015 09:13:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050913.t959DVkw027591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288750 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:13:33 -0000 Author: mav Date: Mon Oct 5 09:13:30 2015 New Revision: 288750 URL: https://svnweb.freebsd.org/changeset/base/288750 Log: MFC r287760: Improve read-only support. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:12:38 2015 (r288749) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:13:30 2015 (r288750) @@ -10848,9 +10848,7 @@ ctl_scsiio_lun_check(struct ctl_lun *lun if (entry->pattern & CTL_LUN_PAT_WRITE) { if (lun->be_lun && lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { - ctl_set_sense(ctsio, /*current_error*/ 1, - /*sense_key*/ SSD_KEY_DATA_PROTECT, - /*asc*/ 0x27, /*ascq*/ 0x01, SSD_ELEM_NONE); + ctl_set_hw_write_protected(ctsio); retval = 1; goto bailout; } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:12:38 2015 (r288749) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:13:30 2015 (r288750) @@ -511,6 +511,8 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_invalid_opcode(&io->scsiio); } else if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else if (beio->bio_cmd == BIO_FLUSH) { /* XXX KDM is there is a better error here? */ ctl_set_internal_failure(&io->scsiio, @@ -723,6 +725,8 @@ ctl_be_block_dispatch_file(struct ctl_be (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); ctl_complete_beio(beio); @@ -888,6 +892,8 @@ ctl_be_block_dispatch_zvol(struct ctl_be if (error != 0) { if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); ctl_complete_beio(beio); Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 09:12:38 2015 (r288749) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 09:13:30 2015 (r288750) @@ -768,7 +768,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 35 SYNCHRONIZE CACHE(10) */ {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_NONE, - CTL_LUN_PAT_NONE, + CTL_LUN_PAT_WRITE, 10, {0x02, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 36 LOCK UNLOCK CACHE(10) */ @@ -1117,7 +1117,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 91 SYNCHRONIZE CACHE(16) */ {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_NONE, - CTL_LUN_PAT_NONE, + CTL_LUN_PAT_WRITE, 16, {0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:12:38 2015 (r288749) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:13:30 2015 (r288750) @@ -848,6 +848,18 @@ ctl_set_task_aborted(struct ctl_scsiio * } void +ctl_set_hw_write_protected(struct ctl_scsiio *ctsio) +{ + /* "Hardware write protected" */ + ctl_set_sense(ctsio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_DATA_PROTECT, + /*asc*/ 0x27, + /*ascq*/ 0x01, + SSD_ELEM_NONE); +} + +void ctl_set_space_alloc_fail(struct ctl_scsiio *ctsio) { /* "Space allocation failed write protect" */ Modified: stable/10/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:12:38 2015 (r288749) +++ stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:13:30 2015 (r288750) @@ -85,6 +85,7 @@ void ctl_set_reservation_conflict(struct void ctl_set_queue_full(struct ctl_scsiio *ctsio); void ctl_set_busy(struct ctl_scsiio *ctsio); void ctl_set_task_aborted(struct ctl_scsiio *ctsio); +void ctl_set_hw_write_protected(struct ctl_scsiio *ctsio); void ctl_set_space_alloc_fail(struct ctl_scsiio *ctsio); void ctl_set_success(struct ctl_scsiio *ctsio); From owner-svn-src-all@freebsd.org Mon Oct 5 09:14:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4152EA11699; Mon, 5 Oct 2015 09:14:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 189731EB; Mon, 5 Oct 2015 09:14:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959EKmr027839; Mon, 5 Oct 2015 09:14:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959EKKG027838; Mon, 5 Oct 2015 09:14:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050914.t959EKKG027838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288751 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:14:21 -0000 Author: mav Date: Mon Oct 5 09:14:20 2015 New Revision: 288751 URL: https://svnweb.freebsd.org/changeset/base/288751 Log: MFC r287764: Implement iSCSI TARGET COLD RESET task management function. Implement it as CTL_TASK_TARGET_RESET plus termination of all sessions. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:13:30 2015 (r288750) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:14:20 2015 (r288751) @@ -648,6 +648,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_TARGET_COLD_RESET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_TARGET_COLD_RESET"); +#endif + io->taskio.task_action = CTL_TASK_TARGET_RESET; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); @@ -2769,7 +2775,9 @@ cfiscsi_task_management_done(union ctl_i struct iscsi_bhs_task_management_request *bhstmr; struct iscsi_bhs_task_management_response *bhstmr2; struct cfiscsi_data_wait *cdw, *tmpcdw; - struct cfiscsi_session *cs; + struct cfiscsi_session *cs, *tcs; + struct cfiscsi_softc *softc; + int cold_reset = 0; request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; cs = PDU_SESSION(request); @@ -2807,6 +2815,10 @@ cfiscsi_task_management_done(union ctl_i } CFISCSI_SESSION_UNLOCK(cs); } + if ((bhstmr->bhstmr_function & ~0x80) == + BHSTMR_FUNCTION_TARGET_COLD_RESET && + io->io_hdr.status == CTL_SUCCESS) + cold_reset = 1; response = cfiscsi_pdu_new_response(request, M_WAITOK); bhstmr2 = (struct iscsi_bhs_task_management_response *) @@ -2830,6 +2842,16 @@ cfiscsi_task_management_done(union ctl_i ctl_free_io(io); icl_pdu_free(request); cfiscsi_pdu_queue(response); + + if (cold_reset) { + softc = cs->cs_target->ct_softc; + mtx_lock(&softc->lock); + TAILQ_FOREACH(tcs, &softc->sessions, cs_next) { + if (tcs->cs_target == cs->cs_target) + cfiscsi_session_terminate(tcs); + } + mtx_unlock(&softc->lock); + } } static void From owner-svn-src-all@freebsd.org Mon Oct 5 09:15:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DBC4A11794; Mon, 5 Oct 2015 09:15:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F10C3D5; Mon, 5 Oct 2015 09:15:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959FCko027940; Mon, 5 Oct 2015 09:15:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959FCZ2027939; Mon, 5 Oct 2015 09:15:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050915.t959FCZ2027939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288752 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:15:12 -0000 Author: mav Date: Mon Oct 5 09:15:11 2015 New Revision: 288752 URL: https://svnweb.freebsd.org/changeset/base/288752 Log: MFC r287765: Map CLEAR TASK SET and I_T NEXUS RESET for iSCSI. The last should not be called without iSCSIProtocolLevel negotiation. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:14:20 2015 (r288751) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:15:11 2015 (r288752) @@ -636,6 +636,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; break; + case BHSTMR_FUNCTION_CLEAR_TASK_SET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_CLEAR_TASK_SET"); +#endif + io->taskio.task_action = CTL_TASK_CLEAR_TASK_SET; + break; case BHSTMR_FUNCTION_LOGICAL_UNIT_RESET: #if 0 CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_LOGICAL_UNIT_RESET"); @@ -654,6 +660,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_I_T_NEXUS_RESET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_I_T_NEXUS_RESET"); +#endif + io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); From owner-svn-src-all@freebsd.org Mon Oct 5 09:16:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E56C7A1190D; Mon, 5 Oct 2015 09:16:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6B957F9; Mon, 5 Oct 2015 09:16:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959G1IQ028027; Mon, 5 Oct 2015 09:16:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959G1Wl028026; Mon, 5 Oct 2015 09:16:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050916.t959G1Wl028026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288753 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:16:02 -0000 Author: mav Date: Mon Oct 5 09:16:01 2015 New Revision: 288753 URL: https://svnweb.freebsd.org/changeset/base/288753 Log: MFC r287766: Add negotiation of iSCSIProtocolLevel to 2 (RFC7144). We may need to pass negotiated value to kernel level, but so far it is not necessary, since it does not use any new features without request. Modified: stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Mon Oct 5 09:15:11 2015 (r288752) +++ stable/10/usr.sbin/ctld/login.c Mon Oct 5 09:16:01 2015 (r288753) @@ -601,6 +601,11 @@ login_negotiate_key(struct pdu *request, keys_add(response_keys, name, "No"); } else if (strcmp(name, "IFMarker") == 0) { keys_add(response_keys, name, "No"); + } else if (strcmp(name, "iSCSIProtocolLevel") == 0) { + tmp = strtoul(value, NULL, 10); + if (tmp > 2) + tmp = 2; + keys_add_int(response_keys, name, tmp); } else { log_debugx("unknown key \"%s\"; responding " "with NotUnderstood", name); From owner-svn-src-all@freebsd.org Mon Oct 5 09:16:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB7FA11997; Mon, 5 Oct 2015 09:16:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC23A947; Mon, 5 Oct 2015 09:16:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959GvLV028129; Mon, 5 Oct 2015 09:16:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959GuFv028123; Mon, 5 Oct 2015 09:16:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050916.t959GuFv028123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288754 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:16:57 -0000 Author: mav Date: Mon Oct 5 09:16:55 2015 New Revision: 288754 URL: https://svnweb.freebsd.org/changeset/base/288754 Log: MFC r287774: Implement QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT. Now we support most of SAM-5 task management. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:16:55 2015 (r288754) @@ -414,11 +414,14 @@ static int ctl_scsiio(struct ctl_scsiio static int ctl_bus_reset(struct ctl_softc *ctl_softc, union ctl_io *io); static int ctl_target_reset(struct ctl_softc *ctl_softc, union ctl_io *io, ctl_ua_type ua_type); -static int ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, +static int ctl_do_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type); +static int ctl_lun_reset(struct ctl_softc *ctl_softc, union ctl_io *io); static int ctl_abort_task(union ctl_io *io); static int ctl_abort_task_set(union ctl_io *io); +static int ctl_query_task(union ctl_io *io, int task_set); static int ctl_i_t_nexus_reset(union ctl_io *io); +static int ctl_query_async_event(union ctl_io *io); static void ctl_run_task(union ctl_io *io); #ifdef CTL_IO_DELAY static void ctl_datamove_timer_wakeup(void *arg); @@ -7364,8 +7367,9 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_data *)ctsio->kern_data_ptr; - data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_TRS; - data->byte2 |= RST_ITNRS; + data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_QTS | + RST_TRS; + data->byte2 |= RST_QAES | RST_QTSS | RST_ITNRS; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -11375,10 +11379,10 @@ ctl_target_reset(struct ctl_softc *softc if (port != NULL && ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) continue; - retval += ctl_lun_reset(lun, io, ua_type); + retval += ctl_do_lun_reset(lun, io, ua_type); } mtx_unlock(&softc->ctl_lock); - + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (retval); } @@ -11404,7 +11408,7 @@ ctl_target_reset(struct ctl_softc *softc * XXX KDM for now, we're setting unit attention for all initiators. */ static int -ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type) +ctl_do_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type) { union ctl_io *xio; #if 0 @@ -11452,6 +11456,39 @@ ctl_lun_reset(struct ctl_lun *lun, union return (0); } +static int +ctl_lun_reset(struct ctl_softc *softc, union ctl_io *io) +{ + struct ctl_lun *lun; + uint32_t targ_lun; + int retval; + + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + retval = ctl_do_lun_reset(lun, io, CTL_UA_LUN_RESET); + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0) { + union ctl_ha_msg msg_info; + + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.nexus = io->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_LUN_RESET; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.task), M_WAITOK); + } + return (retval); +} + static void ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) @@ -11507,10 +11544,10 @@ ctl_abort_task_set(union ctl_io *io) */ targ_lun = io->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; return (1); } @@ -11525,6 +11562,7 @@ ctl_abort_task_set(union ctl_io *io) (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); } mtx_unlock(&lun->lun_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11562,6 +11600,7 @@ ctl_i_t_nexus_reset(union ctl_io *io) mtx_unlock(&lun->lun_lock); } mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11586,11 +11625,10 @@ ctl_abort_task(union ctl_io *io) */ targ_lun = io->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) - && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; return (1); } @@ -11696,6 +11734,77 @@ ctl_abort_task(union ctl_io *io) io->taskio.tag_type); #endif } + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + return (0); +} + +static int +ctl_query_task(union ctl_io *io, int task_set) +{ + union ctl_io *xio; + struct ctl_lun *lun; + struct ctl_softc *softc; + int found = 0; + uint32_t targ_lun; + + softc = control_softc; + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; + xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { + + if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) + || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) + || (xio->io_hdr.flags & CTL_FLAG_ABORT)) + continue; + + if (task_set || xio->scsiio.tag_num == io->taskio.tag_num) { + found = 1; + break; + } + } + mtx_unlock(&lun->lun_lock); + if (found) + io->taskio.task_status = CTL_TASK_FUNCTION_SUCCEEDED; + else + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + return (0); +} + +static int +ctl_query_async_event(union ctl_io *io) +{ + struct ctl_lun *lun; + struct ctl_softc *softc; + ctl_ua_type ua; + uint32_t targ_lun, initidx; + + softc = control_softc; + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + initidx = ctl_get_initindex(&io->io_hdr.nexus); + ua = ctl_build_qae(lun, initidx, io->taskio.task_resp); + mtx_unlock(&lun->lun_lock); + if (ua != CTL_UA_NONE) + io->taskio.task_status = CTL_TASK_FUNCTION_SUCCEEDED; + else + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11704,41 +11813,12 @@ ctl_run_task(union ctl_io *io) { struct ctl_softc *softc = control_softc; int retval = 1; - const char *task_desc; CTL_DEBUG_PRINT(("ctl_run_task\n")); - KASSERT(io->io_hdr.io_type == CTL_IO_TASK, - ("ctl_run_task: Unextected io_type %d\n", - io->io_hdr.io_type)); - - task_desc = ctl_scsi_task_string(&io->taskio); - if (task_desc != NULL) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TASK_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "CTL: received task: %s",task_desc); -#endif - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TASK_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "CTL: received unknown task " - "type: %d (%#x)", - io->taskio.task_action, - io->taskio.task_action); -#endif - } + ("ctl_run_task: Unextected io_type %d\n", io->io_hdr.io_type)); + io->taskio.task_status = CTL_TASK_FUNCTION_NOT_SUPPORTED; + bzero(io->taskio.task_resp, sizeof(io->taskio.task_resp)); switch (io->taskio.task_action) { case CTL_TASK_ABORT_TASK: retval = ctl_abort_task(io); @@ -11752,36 +11832,9 @@ ctl_run_task(union ctl_io *io) case CTL_TASK_I_T_NEXUS_RESET: retval = ctl_i_t_nexus_reset(io); break; - case CTL_TASK_LUN_RESET: { - struct ctl_lun *lun; - uint32_t targ_lun; - - targ_lun = io->io_hdr.nexus.targ_mapped_lun; - mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) - && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { - mtx_unlock(&softc->ctl_lock); - retval = 1; - break; - } - retval = ctl_lun_reset(lun, io, CTL_UA_LUN_RESET); - mtx_unlock(&softc->ctl_lock); - - if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0) { - union ctl_ha_msg msg_info; - - msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; - msg_info.hdr.nexus = io->io_hdr.nexus; - msg_info.task.task_action = CTL_TASK_LUN_RESET; - msg_info.hdr.original_sc = NULL; - msg_info.hdr.serializing_sc = NULL; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.task), M_WAITOK); - } + case CTL_TASK_LUN_RESET: + retval = ctl_lun_reset(softc, io); break; - } case CTL_TASK_TARGET_RESET: retval = ctl_target_reset(softc, io, CTL_UA_TARG_RESET); break; @@ -11792,9 +11845,18 @@ ctl_run_task(union ctl_io *io) break; case CTL_TASK_PORT_LOGOUT: break; + case CTL_TASK_QUERY_TASK: + retval = ctl_query_task(io, 0); + break; + case CTL_TASK_QUERY_TASK_SET: + retval = ctl_query_task(io, 1); + break; + case CTL_TASK_QUERY_ASYNC_EVENT: + retval = ctl_query_async_event(io); + break; default: - printf("ctl_run_task: got unknown task management event %d\n", - io->taskio.task_action); + printf("%s: got unknown task management event %d\n", + __func__, io->taskio.task_action); break; } if (retval == 0) Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:16:55 2015 (r288754) @@ -365,62 +365,35 @@ ctl_set_ua(struct ctl_scsiio *ctsio, int SSD_ELEM_NONE); } -ctl_ua_type -ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, - struct scsi_sense_data *sense, scsi_sense_data_type sense_format) +static void +ctl_ua_to_acsq(ctl_ua_type ua_to_build, int *asc, int *ascq, + ctl_ua_type *ua_to_clear) { - ctl_ua_type *ua; - ctl_ua_type ua_to_build, ua_to_clear; - int asc, ascq; - uint32_t p, i; - - mtx_assert(&lun->lun_lock, MA_OWNED); - p = initidx / CTL_MAX_INIT_PER_PORT; - if ((ua = lun->pending_ua[p]) == NULL) { - mtx_unlock(&lun->lun_lock); - ua = malloc(sizeof(ctl_ua_type) * CTL_MAX_INIT_PER_PORT, - M_CTL, M_WAITOK); - mtx_lock(&lun->lun_lock); - if (lun->pending_ua[p] == NULL) { - lun->pending_ua[p] = ua; - for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) - ua[i] = CTL_UA_POWERON; - } else { - free(ua, M_CTL); - ua = lun->pending_ua[p]; - } - } - i = initidx % CTL_MAX_INIT_PER_PORT; - if (ua[i] == CTL_UA_NONE) - return (CTL_UA_NONE); - - ua_to_build = (1 << (ffs(ua[i]) - 1)); - ua_to_clear = ua_to_build; switch (ua_to_build) { case CTL_UA_POWERON: /* 29h/01h POWER ON OCCURRED */ - asc = 0x29; - ascq = 0x01; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x01; + *ua_to_clear = ~0; break; case CTL_UA_BUS_RESET: /* 29h/02h SCSI BUS RESET OCCURRED */ - asc = 0x29; - ascq = 0x02; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x02; + *ua_to_clear = ~0; break; case CTL_UA_TARG_RESET: /* 29h/03h BUS DEVICE RESET FUNCTION OCCURRED*/ - asc = 0x29; - ascq = 0x03; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x03; + *ua_to_clear = ~0; break; case CTL_UA_I_T_NEXUS_LOSS: /* 29h/07h I_T NEXUS LOSS OCCURRED */ - asc = 0x29; - ascq = 0x07; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x07; + *ua_to_clear = ~0; break; case CTL_UA_LUN_RESET: /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */ @@ -428,62 +401,128 @@ ctl_build_ua(struct ctl_lun *lun, uint32 * Since we don't have a specific ASC/ASCQ pair for a LUN * reset, just return the generic reset code. */ - asc = 0x29; - ascq = 0x00; + *asc = 0x29; + *ascq = 0x00; break; case CTL_UA_LUN_CHANGE: /* 3Fh/0Eh REPORTED LUNS DATA HAS CHANGED */ - asc = 0x3F; - ascq = 0x0E; + *asc = 0x3F; + *ascq = 0x0E; break; case CTL_UA_MODE_CHANGE: /* 2Ah/01h MODE PARAMETERS CHANGED */ - asc = 0x2A; - ascq = 0x01; + *asc = 0x2A; + *ascq = 0x01; break; case CTL_UA_LOG_CHANGE: /* 2Ah/02h LOG PARAMETERS CHANGED */ - asc = 0x2A; - ascq = 0x02; + *asc = 0x2A; + *ascq = 0x02; break; case CTL_UA_INQ_CHANGE: /* 3Fh/03h INQUIRY DATA HAS CHANGED */ - asc = 0x3F; - ascq = 0x03; + *asc = 0x3F; + *ascq = 0x03; break; case CTL_UA_RES_PREEMPT: /* 2Ah/03h RESERVATIONS PREEMPTED */ - asc = 0x2A; - ascq = 0x03; + *asc = 0x2A; + *ascq = 0x03; break; case CTL_UA_RES_RELEASE: /* 2Ah/04h RESERVATIONS RELEASED */ - asc = 0x2A; - ascq = 0x04; + *asc = 0x2A; + *ascq = 0x04; break; case CTL_UA_REG_PREEMPT: /* 2Ah/05h REGISTRATIONS PREEMPTED */ - asc = 0x2A; - ascq = 0x05; + *asc = 0x2A; + *ascq = 0x05; break; case CTL_UA_ASYM_ACC_CHANGE: - /* 2Ah/06n ASYMMETRIC ACCESS STATE CHANGED */ - asc = 0x2A; - ascq = 0x06; + /* 2Ah/06h ASYMMETRIC ACCESS STATE CHANGED */ + *asc = 0x2A; + *ascq = 0x06; break; case CTL_UA_CAPACITY_CHANGED: - /* 2Ah/09n CAPACITY DATA HAS CHANGED */ - asc = 0x2A; - ascq = 0x09; + /* 2Ah/09h CAPACITY DATA HAS CHANGED */ + *asc = 0x2A; + *ascq = 0x09; break; case CTL_UA_THIN_PROV_THRES: - /* 38h/07n THIN PROVISIONING SOFT THRESHOLD REACHED */ - asc = 0x38; - ascq = 0x07; + /* 38h/07h THIN PROVISIONING SOFT THRESHOLD REACHED */ + *asc = 0x38; + *ascq = 0x07; break; default: - panic("ctl_build_ua: Unknown UA %x", ua_to_build); + panic("%s: Unknown UA %x", __func__, ua_to_build); + } +} + +ctl_ua_type +ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp) +{ + ctl_ua_type ua; + ctl_ua_type ua_to_build, ua_to_clear; + int asc, ascq; + uint32_t p, i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + p = initidx / CTL_MAX_INIT_PER_PORT; + i = initidx % CTL_MAX_INIT_PER_PORT; + if (lun->pending_ua[p] == NULL) + ua = CTL_UA_POWERON; + else + ua = lun->pending_ua[p][i]; + if (ua == CTL_UA_NONE) + return (CTL_UA_NONE); + + ua_to_build = (1 << (ffs(ua) - 1)); + ua_to_clear = ua_to_build; + ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + + resp[0] = SSD_KEY_UNIT_ATTENTION; + if (ua_to_build == ua) + resp[0] |= 0x10; + else + resp[0] |= 0x20; + resp[1] = asc; + resp[2] = ascq; + return (ua); +} + +ctl_ua_type +ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, + struct scsi_sense_data *sense, scsi_sense_data_type sense_format) +{ + ctl_ua_type *ua; + ctl_ua_type ua_to_build, ua_to_clear; + int asc, ascq; + uint32_t p, i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + p = initidx / CTL_MAX_INIT_PER_PORT; + if ((ua = lun->pending_ua[p]) == NULL) { + mtx_unlock(&lun->lun_lock); + ua = malloc(sizeof(ctl_ua_type) * CTL_MAX_INIT_PER_PORT, + M_CTL, M_WAITOK); + mtx_lock(&lun->lun_lock); + if (lun->pending_ua[p] == NULL) { + lun->pending_ua[p] = ua; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) + ua[i] = CTL_UA_POWERON; + } else { + free(ua, M_CTL); + ua = lun->pending_ua[p]; + } } + i = initidx % CTL_MAX_INIT_PER_PORT; + if (ua[i] == CTL_UA_NONE) + return (CTL_UA_NONE); + + ua_to_build = (1 << (ffs(ua[i]) - 1)); + ua_to_clear = ua_to_build; + ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); ctl_set_sense_data(sense, /*lun*/ NULL, Modified: stable/10/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:16:55 2015 (r288754) @@ -57,6 +57,7 @@ void ctl_sense_to_desc(struct scsi_sense void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src, struct scsi_sense_data_fixed *sense_dest); void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq); +ctl_ua_type ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp); ctl_ua_type ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, struct scsi_sense_data *sense, scsi_sense_data_type sense_format); void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio); Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 09:16:55 2015 (r288754) @@ -660,12 +660,31 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_QUERY_TASK: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_TASK"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_TASK; + io->taskio.tag_num = bhstmr->bhstmr_referenced_task_tag; + break; + case BHSTMR_FUNCTION_QUERY_TASK_SET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_TASK_SET"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_TASK_SET; + break; case BHSTMR_FUNCTION_I_T_NEXUS_RESET: #if 0 CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_I_T_NEXUS_RESET"); #endif io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; break; + case BHSTMR_FUNCTION_QUERY_ASYNC_EVENT: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_ASYNC_EVENT"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_ASYNC_EVENT; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); @@ -2837,18 +2856,23 @@ cfiscsi_task_management_done(union ctl_i response->ip_bhs; bhstmr2->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_RESPONSE; bhstmr2->bhstmr_flags = 0x80; - if (io->io_hdr.status == CTL_SUCCESS) { + switch (io->taskio.task_status) { + case CTL_TASK_FUNCTION_COMPLETE: bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_COMPLETE; - } else { - /* - * XXX: How to figure out what exactly went wrong? iSCSI spec - * expects us to provide detailed error, e.g. "Task does - * not exist" or "LUN does not exist". - */ - CFISCSI_SESSION_DEBUG(cs, "BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED"); - bhstmr2->bhstmr_response = - BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED; + break; + case CTL_TASK_FUNCTION_SUCCEEDED: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_SUCCEEDED; + break; + case CTL_TASK_LUN_DOES_NOT_EXIST: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_LUN_DOES_NOT_EXIST; + break; + case CTL_TASK_FUNCTION_NOT_SUPPORTED: + default: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED; + break; } + memcpy(bhstmr2->bhstmr_additional_reponse_information, + io->taskio.task_resp, sizeof(io->taskio.task_resp)); bhstmr2->bhstmr_initiator_task_tag = bhstmr->bhstmr_initiator_task_tag; ctl_free_io(io); Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 09:16:55 2015 (r288754) @@ -328,9 +328,20 @@ typedef enum { CTL_TASK_TARGET_RESET, CTL_TASK_BUS_RESET, CTL_TASK_PORT_LOGIN, - CTL_TASK_PORT_LOGOUT + CTL_TASK_PORT_LOGOUT, + CTL_TASK_QUERY_TASK, + CTL_TASK_QUERY_TASK_SET, + CTL_TASK_QUERY_ASYNC_EVENT } ctl_task_type; +typedef enum { + CTL_TASK_FUNCTION_COMPLETE, + CTL_TASK_FUNCTION_SUCCEEDED, + CTL_TASK_FUNCTION_REJECTED, + CTL_TASK_LUN_DOES_NOT_EXIST, + CTL_TASK_FUNCTION_NOT_SUPPORTED +} ctl_task_status; + /* * Task management I/O structure. Aborts, bus resets, etc., are sent using * this structure. @@ -343,6 +354,8 @@ struct ctl_taskio { ctl_task_type task_action; /* Target Reset, Abort, etc. */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, etc. */ + uint8_t task_status; /* Complete, Succeeded, etc. */ + uint8_t task_resp[3];/* Response information */ }; typedef enum { Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 09:16:01 2015 (r288753) +++ stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 09:16:55 2015 (r288754) @@ -89,7 +89,10 @@ static struct ctl_task_desc ctl_task_tab {CTL_TASK_TARGET_RESET, "Target Reset"}, {CTL_TASK_BUS_RESET, "Bus Reset"}, {CTL_TASK_PORT_LOGIN, "Port Login"}, - {CTL_TASK_PORT_LOGOUT, "Port Logout"} + {CTL_TASK_PORT_LOGOUT, "Port Logout"}, + {CTL_TASK_QUERY_TASK, "Query Task"}, + {CTL_TASK_QUERY_TASK_SET, "Query Task Set"}, + {CTL_TASK_QUERY_ASYNC_EVENT, "Query Async Event"} }; void From owner-svn-src-all@freebsd.org Mon Oct 5 09:18:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD3DA11A9B; Mon, 5 Oct 2015 09:18:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 135F7AD3; Mon, 5 Oct 2015 09:18:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959INkR036730; Mon, 5 Oct 2015 09:18:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959INp3036405; Mon, 5 Oct 2015 09:18:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050918.t959INp3036405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288755 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:18:24 -0000 Author: mav Date: Mon Oct 5 09:18:22 2015 New Revision: 288755 URL: https://svnweb.freebsd.org/changeset/base/288755 Log: MFC r287778: Remove CTL_PRIV_LBA_LEN from HA messages. Previously it was used for statistics, but now just a 16 extra bytes. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:16:55 2015 (r288754) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:18:22 2015 (r288755) @@ -518,8 +518,6 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, msg_info->scsi.sense_len); - memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); ctl_enqueue_isc((union ctl_io *)ctsio); } @@ -12978,15 +12976,6 @@ bailout: msg.scsi.residual = io->scsiio.residual; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); - /* - * We copy this whether or not this is an I/O-related - * command. Otherwise, we'd have to go and check to see - * whether it's a read/write command, and it really isn't - * worth it. - */ - memcpy(&msg.scsi.lbalen, - &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(msg.scsi.lbalen)); ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.scsi) - sizeof(msg.scsi.sense_data) + Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 09:16:55 2015 (r288754) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 09:18:22 2015 (r288755) @@ -452,7 +452,6 @@ struct ctl_ha_msg_scsi { uint32_t residual; /* data residual length */ uint32_t fetd_status; /* trans status, set by FETD, 0 = good*/ - struct ctl_lba_len lbalen; /* used for stats */ struct scsi_sense_data sense_data; /* sense data */ }; From owner-svn-src-all@freebsd.org Mon Oct 5 09:19:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15641A11B46; Mon, 5 Oct 2015 09:19:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06CCEC36; Mon, 5 Oct 2015 09:19:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959JEZj039416; Mon, 5 Oct 2015 09:19:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959JEBM039415; Mon, 5 Oct 2015 09:19:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050919.t959JEBM039415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288756 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:19:15 -0000 Author: mav Date: Mon Oct 5 09:19:14 2015 New Revision: 288756 URL: https://svnweb.freebsd.org/changeset/base/288756 Log: MFC r287783: Implement data/status aggregation for camsim backend. This is almost pointless for primary HA node, but useful for secondary, where between fe_datamove and fe_done calls goes another link roundtrip. Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 09:18:22 2015 (r288755) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 09:19:14 2015 (r288756) @@ -435,6 +435,13 @@ cfcs_datamove(union ctl_io *io) io->scsiio.ext_data_filled += len_copied; + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + } + io->scsiio.be_move_done(io); } From owner-svn-src-all@freebsd.org Mon Oct 5 09:20:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30CF7A11C2C; Mon, 5 Oct 2015 09:20:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080E5DDA; Mon, 5 Oct 2015 09:20:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959K99g039986; Mon, 5 Oct 2015 09:20:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959K9aO039985; Mon, 5 Oct 2015 09:20:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050920.t959K9aO039985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288757 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:20:10 -0000 Author: mav Date: Mon Oct 5 09:20:09 2015 New Revision: 288757 URL: https://svnweb.freebsd.org/changeset/base/288757 Log: MFC r287784: Implement data/status aggregation for secondary HA node. For short read requests this reduces latency by 30%, reporting command completion after two interlink roundtrips instead of full three. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:19:14 2015 (r288756) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:20:09 2015 (r288757) @@ -980,6 +980,8 @@ ctl_isc_event_handler(ctl_ha_channel cha * when the datamove is complete. */ io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.status = msg->hdr.status; if (msg->dt.sg_sequence == 0) { i = msg->dt.kern_sg_entries + @@ -1062,6 +1064,8 @@ ctl_isc_event_handler(ctl_ha_channel cha memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; } ctl_enqueue_isc(io); break; @@ -12209,6 +12213,7 @@ ctl_datamove(union ctl_io *io) msg.hdr.original_sc = io->io_hdr.original_sc; msg.hdr.serializing_sc = io; msg.hdr.nexus = io->io_hdr.nexus; + msg.hdr.status = io->io_hdr.status; msg.dt.flags = io->io_hdr.flags; /* * We convert everything into a S/G list here. We can't @@ -12592,10 +12597,12 @@ ctl_datamove_remote_xfer(union ctl_io *i * failure. */ if ((rq == NULL) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)) + && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) ctl_set_busy(&io->scsiio); - if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) { + if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) { if (rq != NULL) ctl_dt_req_free(rq); From owner-svn-src-all@freebsd.org Mon Oct 5 09:20:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB0EDA11D67; Mon, 5 Oct 2015 09:20:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92622FA2; Mon, 5 Oct 2015 09:20:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959KwJg041947; Mon, 5 Oct 2015 09:20:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959Kw6O041946; Mon, 5 Oct 2015 09:20:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050920.t959Kw6O041946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288758 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:20:58 -0000 Author: mav Date: Mon Oct 5 09:20:57 2015 New Revision: 288758 URL: https://svnweb.freebsd.org/changeset/base/288758 Log: MFC r287816: Close potential race between datamove and HA failover. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:20:09 2015 (r288757) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:20:57 2015 (r288758) @@ -10952,6 +10952,7 @@ ctl_failover_lun(struct ctl_lun *lun) if (io->flags & CTL_FLAG_FROM_OTHER_SC) { if (io->flags & CTL_FLAG_IO_ACTIVE) { io->flags |= CTL_FLAG_ABORT; + io->flags |= CTL_FLAG_FAILOVER; } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; io->flags |= CTL_FLAG_IO_ACTIVE; @@ -12104,12 +12105,14 @@ ctl_datamove_timer_wakeup(void *arg) void ctl_datamove(union ctl_io *io) { + struct ctl_lun *lun; void (*fe_datamove)(union ctl_io *io); mtx_assert(&control_softc->ctl_lock, MA_NOTOWNED); CTL_DEBUG_PRINT(("ctl_datamove\n")); + lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { char str[256]; @@ -12150,9 +12153,6 @@ ctl_datamove(union ctl_io *io) if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) { io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE; } else { - struct ctl_lun *lun; - - lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { @@ -12328,7 +12328,24 @@ ctl_datamove(union ctl_io *io) msg.dt.sent_sg_entries = sg_entries_sent; } + + /* + * Officially handover the request from us to peer. + * If failover has just happened, then we must return error. + * If failover happen just after, then it is not our problem. + */ + if (lun) + mtx_lock(&lun->lun_lock); + if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { + if (lun) + mtx_unlock(&lun->lun_lock); + io->io_hdr.port_status = 31342; + io->scsiio.be_move_done(io); + return; + } io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + if (lun) + mtx_unlock(&lun->lun_lock); } else { /* From owner-svn-src-all@freebsd.org Mon Oct 5 09:21:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE4FAA11E9C; Mon, 5 Oct 2015 09:21:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5A7328A; Mon, 5 Oct 2015 09:21:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959LjvM042389; Mon, 5 Oct 2015 09:21:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959Lj3C042378; Mon, 5 Oct 2015 09:21:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050921.t959Lj3C042378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288759 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:21:46 -0000 Author: mav Date: Mon Oct 5 09:21:45 2015 New Revision: 288759 URL: https://svnweb.freebsd.org/changeset/base/288759 Log: MFC r287818: Fix completion/error status reporting. Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 09:20:57 2015 (r288758) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 09:21:45 2015 (r288759) @@ -438,7 +438,8 @@ cfcs_datamove(union ctl_io *io) if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; - ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status &= ~CAM_STATUS_MASK; + ccb->ccb_h.status |= CAM_REQ_CMP; xpt_done(ccb); } @@ -465,12 +466,13 @@ cfcs_done(union ctl_io *io) /* * Translate CTL status to CAM status. */ + ccb->ccb_h.status &= ~CAM_STATUS_MASK; switch (io->io_hdr.status & CTL_STATUS_MASK) { case CTL_SUCCESS: - ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status |= CAM_REQ_CMP; break; case CTL_SCSI_ERROR: - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; + ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; ccb->csio.scsi_status = io->scsiio.scsi_status; bcopy(&io->scsiio.sense_data, &ccb->csio.sense_data, min(io->scsiio.sense_len, ccb->csio.sense_len)); @@ -486,14 +488,18 @@ cfcs_done(union ctl_io *io) } break; case CTL_CMD_ABORTED: - ccb->ccb_h.status = CAM_REQ_ABORTED; + ccb->ccb_h.status |= CAM_REQ_ABORTED; break; case CTL_ERROR: default: - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + ccb->ccb_h.status |= CAM_REQ_CMP_ERR; break; } - + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP && + (ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + xpt_freeze_devq(ccb->ccb_h.path, 1); + ccb->ccb_h.status |= CAM_DEV_QFRZN; + } xpt_done(ccb); ctl_free_io(io); } From owner-svn-src-all@freebsd.org Mon Oct 5 09:22:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F5C5A11F44; Mon, 5 Oct 2015 09:22:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 105E168A; Mon, 5 Oct 2015 09:22:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959MXmW042797; Mon, 5 Oct 2015 09:22:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959MWCL042790; Mon, 5 Oct 2015 09:22:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050922.t959MWCL042790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288760 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:22:34 -0000 Author: mav Date: Mon Oct 5 09:22:31 2015 New Revision: 288760 URL: https://svnweb.freebsd.org/changeset/base/288760 Log: MFC r287823: Add ctl-lun config option for consistency in HA setups. Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 09:21:45 2015 (r288759) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 09:22:31 2015 (r288760) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2015 +.Dd September 15, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -365,6 +365,10 @@ The default backend is block. .It Ic blocksize Ar size The blocksize visible to the initiator. The default blocksize is 512. +.It Ic ctl-lun Ar lun_id +Global numeric identifier to use for a given LUN inside CTL. +By default CTL allocates those IDs dynamically, but explicit specification +may be needed for consistency in HA configurations. .It Ic device-id Ar string The SCSI Device Identification string presented to the initiator. .It Ic option Ar name Ar value Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 09:21:45 2015 (r288759) +++ stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 09:22:31 2015 (r288760) @@ -1380,6 +1380,7 @@ lun_new(struct conf *conf, const char *n lun->l_name = checked_strdup(name); TAILQ_INIT(&lun->l_options); TAILQ_INSERT_TAIL(&conf->conf_luns, lun, l_next); + lun->l_ctl_lun = -1; return (lun); } Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 09:21:45 2015 (r288759) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 09:22:31 2015 (r288760) @@ -656,6 +656,11 @@ kernel_lun_add(struct lun *lun) if (lun->l_size != 0) req.reqdata.create.lun_size_bytes = lun->l_size; + if (lun->l_ctl_lun >= 0) { + req.reqdata.create.req_lun_id = lun->l_ctl_lun; + req.reqdata.create.flags |= CTL_LUN_FLAG_ID_REQ; + } + req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE; req.reqdata.create.device_type = T_DIRECT; Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Mon Oct 5 09:21:45 2015 (r288759) +++ stable/10/usr.sbin/ctld/parse.y Mon Oct 5 09:22:31 2015 (r288760) @@ -57,8 +57,8 @@ extern void yyrestart(FILE *); %} %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL -%token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP DISCOVERY_FILTER -%token FOREIGN +%token CLOSING_BRACKET CTL_LUN DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP +%token DISCOVERY_FILTER FOREIGN %token INITIATOR_NAME INITIATOR_PORTAL ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT %token LISTEN LISTEN_ISER LUN MAXPROC OPENING_BRACKET OPTION %token PATH PIDFILE PORT PORTAL_GROUP REDIRECT SEMICOLON SERIAL SIZE STR @@ -842,6 +842,8 @@ lun_entry: | lun_device_id | + lun_ctl_lun + | lun_option | lun_path @@ -899,6 +901,26 @@ lun_device_id: DEVICE_ID STR } ; +lun_ctl_lun: CTL_LUN STR + { + uint64_t tmp; + + if (expand_number($2, &tmp) != 0) { + yyerror("invalid numeric value"); + free($2); + return (1); + } + + if (lun->l_ctl_lun >= 0) { + log_warnx("ctl_lun for lun \"%s\" " + "specified more than once", + lun->l_name); + return (1); + } + lun_set_ctl_lun(lun, tmp); + } + ; + lun_option: OPTION STR STR { struct lun_option *clo; Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Mon Oct 5 09:21:45 2015 (r288759) +++ stable/10/usr.sbin/ctld/token.l Mon Oct 5 09:22:31 2015 (r288760) @@ -54,6 +54,7 @@ backend { return BACKEND; } blocksize { return BLOCKSIZE; } chap { return CHAP; } chap-mutual { return CHAP_MUTUAL; } +ctl-lun { return CTL_LUN; } debug { return DEBUG; } device-id { return DEVICE_ID; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } From owner-svn-src-all@freebsd.org Mon Oct 5 09:23:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDE29A11FF2; Mon, 5 Oct 2015 09:23:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96D05893; Mon, 5 Oct 2015 09:23:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959NL02042883; Mon, 5 Oct 2015 09:23:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959NL3A042882; Mon, 5 Oct 2015 09:23:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050923.t959NL3A042882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288761 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:23:21 -0000 Author: mav Date: Mon Oct 5 09:23:20 2015 New Revision: 288761 URL: https://svnweb.freebsd.org/changeset/base/288761 Log: MFC r287855: Don't flap the HA link if sysctl is reset to the same value. Modified: stable/10/sys/cam/ctl/ctl_ha.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 09:22:31 2015 (r288760) +++ stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 09:23:20 2015 (r288761) @@ -622,28 +622,33 @@ ctl_ha_peer_sysctl(SYSCTL_HANDLER_ARGS) struct ha_softc *softc = (struct ha_softc *)arg1; struct sockaddr_in *sa; int error, b1, b2, b3, b4, p, num; + char buf[128]; - error = sysctl_handle_string(oidp, softc->ha_peer, - sizeof(softc->ha_peer), req); - if ((error != 0) || (req->newptr == NULL)) + strlcpy(buf, softc->ha_peer, sizeof(buf)); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if ((error != 0) || (req->newptr == NULL) || + strncmp(buf, softc->ha_peer, sizeof(buf)) == 0) return (error); sa = &softc->ha_peer_in; mtx_lock(&softc->ha_lock); - if ((num = sscanf(softc->ha_peer, "connect %d.%d.%d.%d:%d", + if ((num = sscanf(buf, "connect %d.%d.%d.%d:%d", &b1, &b2, &b3, &b4, &p)) >= 4) { softc->ha_connect = 1; softc->ha_listen = 0; - } else if ((num = sscanf(softc->ha_peer, "listen %d.%d.%d.%d:%d", + } else if ((num = sscanf(buf, "listen %d.%d.%d.%d:%d", &b1, &b2, &b3, &b4, &p)) >= 4) { softc->ha_connect = 0; softc->ha_listen = 1; } else { softc->ha_connect = 0; softc->ha_listen = 0; - if (softc->ha_peer[0] != 0) + if (buf[0] != 0) { + buf[0] = 0; error = EINVAL; + } } + strlcpy(softc->ha_peer, buf, sizeof(softc->ha_peer)); if (softc->ha_connect || softc->ha_listen) { memset(sa, 0, sizeof(*sa)); sa->sin_len = sizeof(struct sockaddr_in); From owner-svn-src-all@freebsd.org Mon Oct 5 09:24:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1B2DA100C4; Mon, 5 Oct 2015 09:24:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B31309FA; Mon, 5 Oct 2015 09:24:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959O9qv042978; Mon, 5 Oct 2015 09:24:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959O9wn042977; Mon, 5 Oct 2015 09:24:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050924.t959O9wn042977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288762 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:24:09 -0000 Author: mav Date: Mon Oct 5 09:24:08 2015 New Revision: 288762 URL: https://svnweb.freebsd.org/changeset/base/288762 Log: MFC r287860: Frontends don't need to set errors themselves. Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 09:23:20 2015 (r288761) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 09:24:08 2015 (r288762) @@ -157,11 +157,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL, M_WAITOK); ext_sglist_malloced = 1; - if (copyin(ctsio->ext_data_ptr, ext_sglist, - ext_sglen) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); + if (copyin(ctsio->ext_data_ptr, ext_sglist, ext_sglen) != 0) { + ctsio->io_hdr.port_status = 31343; goto bailout; } ext_sg_entries = ctsio->ext_sg_entries; @@ -229,9 +226,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " "to %p\n", kern_ptr, ext_ptr)); if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); + ctsio->io_hdr.port_status = 31344; goto bailout; } } else { @@ -240,9 +235,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " "to %p\n", ext_ptr, kern_ptr)); if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){ - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/0); + ctsio->io_hdr.port_status = 31345; goto bailout; } } From owner-svn-src-all@freebsd.org Mon Oct 5 09:25:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45319A101FA; Mon, 5 Oct 2015 09:25:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA1DB96; Mon, 5 Oct 2015 09:25:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959P4V4043077; Mon, 5 Oct 2015 09:25:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959P4aO043076; Mon, 5 Oct 2015 09:25:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050925.t959P4aO043076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288763 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:25:05 -0000 Author: mav Date: Mon Oct 5 09:25:04 2015 New Revision: 288763 URL: https://svnweb.freebsd.org/changeset/base/288763 Log: MFC r287868: Make COMPARE AND WRITE report offset of difference. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:24:08 2015 (r288762) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:25:04 2015 (r288763) @@ -354,6 +354,48 @@ ctl_complete_beio(struct ctl_be_block_io } } +static size_t +cmp(uint8_t *a, uint8_t *b, size_t size) +{ + size_t i; + + for (i = 0; i < size; i++) { + if (a[i] != b[i]) + break; + } + return (i); +} + +static void +ctl_be_block_compare(union ctl_io *io) +{ + struct ctl_be_block_io *beio; + uint64_t off, res; + int i; + uint8_t info[8]; + + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; + off = 0; + for (i = 0; i < beio->num_segs; i++) { + res = cmp(beio->sg_segs[i].addr, + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr, + beio->sg_segs[i].len); + off += res; + if (res < beio->sg_segs[i].len) + break; + } + if (i < beio->num_segs) { + scsi_u64to8b(off, info); + ctl_set_sense(&io->scsiio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_MISCOMPARE, + /*asc*/ 0x1D, /*ascq*/ 0x00, + /*type*/ SSD_ELEM_INFO, + /*size*/ sizeof(info), /*data*/ &info, + /*type*/ SSD_ELEM_NONE); + } else + ctl_set_success(&io->scsiio); +} + static int ctl_be_block_move_done(union ctl_io *io) { @@ -363,7 +405,6 @@ ctl_be_block_move_done(union ctl_io *io) #ifdef CTL_TIME_IO struct bintime cur_bt; #endif - int i; beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun = beio->lun; @@ -391,21 +432,7 @@ ctl_be_block_move_done(union ctl_io *io) ctl_set_success(&io->scsiio); } else if (lbalen->flags & CTL_LLF_COMPARE) { /* We have two data blocks ready for comparison. */ - for (i = 0; i < beio->num_segs; i++) { - if (memcmp(beio->sg_segs[i].addr, - beio->sg_segs[i + CTLBLK_HALF_SEGS].addr, - beio->sg_segs[i].len) != 0) - break; - } - if (i < beio->num_segs) - ctl_set_sense(&io->scsiio, - /*current_error*/ 1, - /*sense_key*/ SSD_KEY_MISCOMPARE, - /*asc*/ 0x1D, - /*ascq*/ 0x00, - SSD_ELEM_NONE); - else - ctl_set_success(&io->scsiio); + ctl_be_block_compare(io); } } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || From owner-svn-src-all@freebsd.org Mon Oct 5 09:26:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A712A10355; Mon, 5 Oct 2015 09:26:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE40D1F; Mon, 5 Oct 2015 09:26:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959Q0La043167; Mon, 5 Oct 2015 09:26:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959Q04r043166; Mon, 5 Oct 2015 09:26:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050926.t959Q04r043166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288764 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:26:01 -0000 Author: mav Date: Mon Oct 5 09:26:00 2015 New Revision: 288764 URL: https://svnweb.freebsd.org/changeset/base/288764 Log: MFC r287875: Fix reading after end of file for file-backed LUNs. If backing file is smaller then the LUN size, we have to explicitly clear the rest of the buffer to not leak some random data from previous I/Os. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:25:04 2015 (r288763) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:26:00 2015 (r288764) @@ -635,8 +635,8 @@ ctl_be_block_dispatch_file(struct ctl_be union ctl_io *io; struct uio xuio; struct iovec *xiovec; - int flags; - int error, i; + size_t s; + int error, flags, i; DPRINTF("entered\n"); @@ -697,6 +697,22 @@ ctl_be_block_dispatch_file(struct ctl_be VOP_UNLOCK(be_lun->vn, 0); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); + if (error == 0 && xuio.uio_resid > 0) { + /* + * If we red less then requested (EOF), then + * we should clean the rest of the buffer. + */ + s = beio->io_len - xuio.uio_resid; + for (i = 0; i < beio->num_segs; i++) { + if (s >= beio->sg_segs[i].len) { + s -= beio->sg_segs[i].len; + continue; + } + bzero((uint8_t *)beio->sg_segs[i].addr + s, + beio->sg_segs[i].len - s); + s = 0; + } + } } else { struct mount *mountpoint; int lock_flags; From owner-svn-src-all@freebsd.org Mon Oct 5 09:26:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5258DA1044A; Mon, 5 Oct 2015 09:26:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40A55E76; Mon, 5 Oct 2015 09:26:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959QsIN043262; Mon, 5 Oct 2015 09:26:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959QrW5043258; Mon, 5 Oct 2015 09:26:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050926.t959QrW5043258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288765 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:26:54 -0000 Author: mav Date: Mon Oct 5 09:26:52 2015 New Revision: 288765 URL: https://svnweb.freebsd.org/changeset/base/288765 Log: MFC r287912: Report proper medium error code for VERIFY commands. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:26:00 2015 (r288764) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 09:26:52 2015 (r288765) @@ -12048,7 +12048,9 @@ ctl_inject_error(struct ctl_lun *lun, un ctl_set_aborted(&io->scsiio); break; case CTL_LUN_INJ_MEDIUM_ERR: - ctl_set_medium_error(&io->scsiio); + ctl_set_medium_error(&io->scsiio, + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) != + CTL_FLAG_DATA_OUT); break; case CTL_LUN_INJ_UA: /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:26:00 2015 (r288764) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 09:26:52 2015 (r288765) @@ -545,8 +545,10 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, /*retry_count*/ 0xbad2); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } @@ -761,17 +763,14 @@ ctl_be_block_dispatch_file(struct ctl_be * return the I/O to the user. */ if (error != 0) { - char path_str[32]; - - ctl_scsi_path_string(io, path_str, sizeof(path_str)); - printf("%s%s command returned errno %d\n", path_str, - (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else if (error == EROFS || error == EACCES) { ctl_set_hw_write_protected(&io->scsiio); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } @@ -937,8 +936,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_set_space_alloc_fail(&io->scsiio); } else if (error == EROFS || error == EACCES) { ctl_set_hw_write_protected(&io->scsiio); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:26:00 2015 (r288764) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 09:26:52 2015 (r288765) @@ -686,9 +686,9 @@ ctl_set_internal_failure(struct ctl_scsi } void -ctl_set_medium_error(struct ctl_scsiio *ctsio) +ctl_set_medium_error(struct ctl_scsiio *ctsio, int read) { - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { + if (read) { /* "Unrecovered read error" */ ctl_set_sense(ctsio, /*current_error*/ 1, Modified: stable/10/sys/cam/ctl/ctl_error.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:26:00 2015 (r288764) +++ stable/10/sys/cam/ctl/ctl_error.h Mon Oct 5 09:26:52 2015 (r288765) @@ -73,7 +73,7 @@ void ctl_set_lun_standby(struct ctl_scsi void ctl_set_lun_unavail(struct ctl_scsiio *ctsio); void ctl_set_internal_failure(struct ctl_scsiio *ctsio, int sks_valid, uint16_t retry_count); -void ctl_set_medium_error(struct ctl_scsiio *ctsio); +void ctl_set_medium_error(struct ctl_scsiio *ctsio, int read); void ctl_set_aborted(struct ctl_scsiio *ctsio); void ctl_set_lba_out_of_range(struct ctl_scsiio *ctsio); void ctl_set_lun_stopped(struct ctl_scsiio *ctsio); From owner-svn-src-all@freebsd.org Mon Oct 5 09:46:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 844DC9B1018; Mon, 5 Oct 2015 09:46:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69C416E5; Mon, 5 Oct 2015 09:46:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t959kOOD052635; Mon, 5 Oct 2015 09:46:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t959kNbt052631; Mon, 5 Oct 2015 09:46:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510050946.t959kNbt052631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 09:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288766 - in stable/10/sys: conf libkern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 09:46:24 -0000 Author: mav Date: Mon Oct 5 09:46:23 2015 New Revision: 288766 URL: https://svnweb.freebsd.org/changeset/base/288766 Log: MFC r279433 (by rstone): Implement asprintf in libkern Added: stable/10/sys/libkern/asprintf.c - copied unchanged from r279433, head/sys/libkern/asprintf.c Modified: stable/10/sys/conf/files stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Oct 5 09:26:52 2015 (r288765) +++ stable/10/sys/conf/files Mon Oct 5 09:46:23 2015 (r288766) @@ -3215,6 +3215,7 @@ kgssapi/gsstest.c optional kgssapi_debu # the file should be moved to conf/files. from here. # libkern/arc4random.c standard +libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard Copied: stable/10/sys/libkern/asprintf.c (from r279433, head/sys/libkern/asprintf.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/libkern/asprintf.c Mon Oct 5 09:46:23 2015 (r288766, copy of r279433, head/sys/libkern/asprintf.c) @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2013-2015 Sandvine Inc. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +int +vasprintf(char **buf, struct malloc_type *mtp, const char *format, va_list va) +{ + int len, ret; + va_list tmp_va; + char dummy; + + va_copy(tmp_va, va); + len = vsnprintf(&dummy, 0, format, tmp_va); + va_end(tmp_va); + if (len < 0) { + *buf = NULL; + return (len); + } + + /* Account for null terminator. */ + len += 1; + *buf = malloc(len, mtp, M_NOWAIT); + if (*buf == NULL) + return (-1); + + ret = vsnprintf(*buf, len, format, va); + if (ret < 0) { + free(*buf, mtp); + *buf = NULL; + } + + return (ret); +} + +int +asprintf(char **buf, struct malloc_type *mtp, const char *format, ...) +{ + int ret; + va_list va; + + va_start(va, format); + ret = vasprintf(buf, mtp, format, va); + va_end(va); + + return (ret); +} Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Mon Oct 5 09:26:52 2015 (r288765) +++ stable/10/sys/sys/systm.h Mon Oct 5 09:46:23 2015 (r288766) @@ -206,11 +206,15 @@ int kvprintf(char const *, void (*)(int, __va_list) __printflike(1, 0); void log(int, const char *, ...) __printflike(2, 3); void log_console(struct uio *); +int asprintf(char **ret, struct malloc_type *mtp, const char *format, + ...) __printflike(3, 4); int printf(const char *, ...) __printflike(1, 2); int snprintf(char *, size_t, const char *, ...) __printflike(3, 4); int sprintf(char *buf, const char *, ...) __printflike(2, 3); int uprintf(const char *, ...) __printflike(1, 2); int vprintf(const char *, __va_list) __printflike(1, 0); +int vasprintf(char **ret, struct malloc_type *mtp, const char *format, + __va_list ap) __printflike(3, 0); int vsnprintf(char *, size_t, const char *, __va_list) __printflike(3, 0); int vsnrprintf(char *, size_t, int, const char *, __va_list) __printflike(4, 0); int vsprintf(char *buf, const char *, __va_list) __printflike(2, 0); From owner-svn-src-all@freebsd.org Mon Oct 5 10:34:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 027F099AEAB; Mon, 5 Oct 2015 10:34:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD0ECAAF; Mon, 5 Oct 2015 10:34:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AYfML068735; Mon, 5 Oct 2015 10:34:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AYfma068734; Mon, 5 Oct 2015 10:34:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051034.t95AYfma068734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288767 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:34:42 -0000 Author: mav Date: Mon Oct 5 10:34:40 2015 New Revision: 288767 URL: https://svnweb.freebsd.org/changeset/base/288767 Log: MFC r287913: Report number of failed XCOPY segment. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 09:46:23 2015 (r288766) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 10:34:40 2015 (r288767) @@ -820,7 +820,9 @@ tpc_process_b2b(struct tpc_list *list) off_t srclba, dstlba, numbytes, donebytes, roundbytes; int numlba; uint32_t srcblock, dstblock, pb, pbo, adj; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tior, links); @@ -834,7 +836,9 @@ tpc_process_b2b(struct tpc_list *list) } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } list->cursectors += list->segsectors; @@ -849,7 +853,9 @@ tpc_process_b2b(struct tpc_list *list) if (sl >= CTL_MAX_LUNS || dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } if (pbo > 0) @@ -878,7 +884,9 @@ tpc_process_b2b(struct tpc_list *list) if (numbytes % srcblock != 0 || numbytes % dstblock != 0) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x26, /*ascq*/ 0x0A, SSD_ELEM_NONE); + /*asc*/ 0x26, /*ascq*/ 0x0A, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -962,7 +970,9 @@ tpc_process_verify(struct tpc_list *list struct scsi_ec_segment_verify *seg; struct tpc_io *tio; uint64_t sl; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); @@ -975,7 +985,9 @@ tpc_process_verify(struct tpc_list *list } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else return (CTL_RETVAL_COMPLETE); @@ -987,7 +999,9 @@ tpc_process_verify(struct tpc_list *list if (sl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1019,7 +1033,9 @@ tpc_process_register_key(struct tpc_list struct tpc_io *tio; uint64_t dl; int datalen; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); @@ -1033,7 +1049,9 @@ tpc_process_register_key(struct tpc_list } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else return (CTL_RETVAL_COMPLETE); @@ -1045,7 +1063,9 @@ tpc_process_register_key(struct tpc_list if (dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1346,6 +1366,7 @@ tpc_process(struct tpc_list *list) struct scsi_ec_segment *seg; struct ctl_scsiio *ctsio = list->ctsio; int retval = CTL_RETVAL_COMPLETE; + uint8_t csi[4]; if (list->service_action == EC_WUT) { if (list->token != NULL) @@ -1373,9 +1394,12 @@ tpc_process(struct tpc_list *list) retval = tpc_process_register_key(list); break; default: + scsi_ulto4b(list->curseg, csi); ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x26, /*ascq*/ 0x09, SSD_ELEM_NONE); + /*asc*/ 0x26, /*ascq*/ 0x09, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); goto done; } if (retval == CTL_RETVAL_QUEUED) From owner-svn-src-all@freebsd.org Mon Oct 5 10:35:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F077099AFD4; Mon, 5 Oct 2015 10:35:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D64E8C2F; Mon, 5 Oct 2015 10:35:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AZb2w068840; Mon, 5 Oct 2015 10:35:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AZa5f068835; Mon, 5 Oct 2015 10:35:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051035.t95AZa5f068835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288768 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:35:38 -0000 Author: mav Date: Mon Oct 5 10:35:36 2015 New Revision: 288768 URL: https://svnweb.freebsd.org/changeset/base/288768 Log: MFC r287921: When reporting TPT UA, report which of thresholds was reached. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:34:40 2015 (r288767) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:35:36 2015 (r288768) @@ -705,6 +705,9 @@ ctl_isc_ua(struct ctl_softc *softc, unio (lun = softc->ctl_luns[msg->hdr.nexus.targ_mapped_lun]) != NULL) { mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); + if (msg->ua.ua_type == CTL_UA_THIN_PROV_THRES && + msg->ua.ua_set) + memcpy(lun->ua_tpt_info, msg->ua.ua_info, 8); if (msg->ua.ua_all) { if (msg->ua.ua_set) ctl_est_ua_all(lun, iid, msg->ua.ua_type); @@ -11133,15 +11136,9 @@ ctl_scsiio_precheck(struct ctl_softc *so */ if ((entry->flags & CTL_CMD_FLAG_NO_SENSE) == 0) { ctl_ua_type ua_type; - scsi_sense_data_type sense_format; - - if (lun->flags & CTL_LUN_SENSE_DESC) - sense_format = SSD_TYPE_DESC; - else - sense_format = SSD_TYPE_FIXED; ua_type = ctl_build_ua(lun, initidx, &ctsio->sense_data, - sense_format); + SSD_TYPE_NONE); if (ua_type != CTL_UA_NONE) { mtx_unlock(&lun->lun_lock); ctsio->scsi_status = SCSI_STATUS_CHECK_COND; @@ -13340,12 +13337,16 @@ ctl_thresh_thread(void *arg) continue; if ((page->descr[i].flags & SLBPPD_ARMING_MASK) == SLBPPD_ARMING_INC) - e |= (val >= thres); + e = (val >= thres); else - e |= (val <= thres); + e = (val <= thres); + if (e) + break; } mtx_lock(&lun->lun_lock); if (e) { + scsi_u64to8b((uint8_t *)&page->descr[i] - + (uint8_t *)page, lun->ua_tpt_info); if (lun->lasttpt == 0 || time_uptime - lun->lasttpt >= CTL_LBP_UA_PERIOD) { lun->lasttpt = time_uptime; @@ -13371,6 +13372,7 @@ ctl_thresh_thread(void *arg) msg.ua.ua_all = 1; msg.ua.ua_set = (set > 0); msg.ua.ua_type = CTL_UA_THIN_PROV_THRES; + memcpy(msg.ua.ua_info, lun->ua_tpt_info, 8); mtx_unlock(&softc->ctl_lock); // XXX ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.ua), M_WAITOK); Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 10:34:40 2015 (r288767) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 10:35:36 2015 (r288768) @@ -366,8 +366,8 @@ ctl_set_ua(struct ctl_scsiio *ctsio, int } static void -ctl_ua_to_acsq(ctl_ua_type ua_to_build, int *asc, int *ascq, - ctl_ua_type *ua_to_clear) +ctl_ua_to_acsq(struct ctl_lun *lun, ctl_ua_type ua_to_build, int *asc, + int *ascq, ctl_ua_type *ua_to_clear, uint8_t **info) { switch (ua_to_build) { @@ -453,6 +453,7 @@ ctl_ua_to_acsq(ctl_ua_type ua_to_build, /* 38h/07h THIN PROVISIONING SOFT THRESHOLD REACHED */ *asc = 0x38; *ascq = 0x07; + *info = lun->ua_tpt_info; break; default: panic("%s: Unknown UA %x", __func__, ua_to_build); @@ -464,6 +465,7 @@ ctl_build_qae(struct ctl_lun *lun, uint3 { ctl_ua_type ua; ctl_ua_type ua_to_build, ua_to_clear; + uint8_t *info; int asc, ascq; uint32_t p, i; @@ -479,7 +481,8 @@ ctl_build_qae(struct ctl_lun *lun, uint3 ua_to_build = (1 << (ffs(ua) - 1)); ua_to_clear = ua_to_build; - ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + info = NULL; + ctl_ua_to_acsq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info); resp[0] = SSD_KEY_UNIT_ATTENTION; if (ua_to_build == ua) @@ -497,6 +500,7 @@ ctl_build_ua(struct ctl_lun *lun, uint32 { ctl_ua_type *ua; ctl_ua_type ua_to_build, ua_to_clear; + uint8_t *info; int asc, ascq; uint32_t p, i; @@ -522,16 +526,13 @@ ctl_build_ua(struct ctl_lun *lun, uint32 ua_to_build = (1 << (ffs(ua[i]) - 1)); ua_to_clear = ua_to_build; - ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + info = NULL; + ctl_ua_to_acsq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info); - ctl_set_sense_data(sense, - /*lun*/ NULL, - sense_format, - /*current_error*/ 1, - /*sense_key*/ SSD_KEY_UNIT_ATTENTION, - asc, - ascq, - SSD_ELEM_NONE); + ctl_set_sense_data(sense, lun, sense_format, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_UNIT_ATTENTION, asc, ascq, + ((info != NULL) ? SSD_ELEM_INFO : SSD_ELEM_SKIP), 8, info, + SSD_ELEM_NONE); /* We're reporting this UA, so clear it */ ua[i] &= ~ua_to_clear; Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:34:40 2015 (r288767) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:35:36 2015 (r288768) @@ -408,6 +408,7 @@ struct ctl_ha_msg_ua { int ua_all; int ua_set; int ua_type; + uint8_t ua_info[8]; }; /* Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:34:40 2015 (r288767) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:35:36 2015 (r288768) @@ -393,6 +393,7 @@ struct ctl_lun { struct scsi_sense_data pending_sense[CTL_MAX_INITIATORS]; #endif ctl_ua_type *pending_ua[CTL_MAX_PORTS]; + uint8_t ua_tpt_info[8]; time_t lasttpt; struct ctl_mode_pages mode_pages; struct ctl_log_pages log_pages; From owner-svn-src-all@freebsd.org Mon Oct 5 10:36:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D219B10BB; Mon, 5 Oct 2015 10:36:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEE8DEF; Mon, 5 Oct 2015 10:36:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AaTWM068930; Mon, 5 Oct 2015 10:36:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AaSSf068928; Mon, 5 Oct 2015 10:36:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051036.t95AaSSf068928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288769 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:36:29 -0000 Author: mav Date: Mon Oct 5 10:36:28 2015 New Revision: 288769 URL: https://svnweb.freebsd.org/changeset/base/288769 Log: MFC r287933: Replicate port->init_devid to HA peer. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:35:36 2015 (r288768) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:36:28 2015 (r288769) @@ -613,6 +613,8 @@ ctl_isc_announce_port(struct ctl_port *p i += port->port_devid->len; if (port->target_devid) i += port->target_devid->len; + if (port->init_devid) + i += port->init_devid->len; msg = malloc(i, M_CTL, M_WAITOK); bzero(&msg->port, sizeof(msg->port)); msg->hdr.msg_type = CTL_MSG_PORT_SYNC; @@ -643,6 +645,12 @@ ctl_isc_announce_port(struct ctl_port *p msg->port.target_devid_len); i += msg->port.target_devid_len; } + if (port->init_devid) { + msg->port.init_devid_len = port->init_devid->len; + memcpy(&msg->port.data[i], port->init_devid->data, + msg->port.init_devid_len); + i += msg->port.init_devid_len; + } ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->port, sizeof(msg->port) + i, M_WAITOK); free(msg, M_CTL); @@ -867,8 +875,23 @@ ctl_isc_port_sync(struct ctl_softc *soft port->target_devid->len = msg->port.target_devid_len; i += msg->port.target_devid_len; } else { - free(port->port_devid, M_CTL); - port->port_devid = NULL; + free(port->target_devid, M_CTL); + port->target_devid = NULL; + } + if (msg->port.init_devid_len != 0) { + if (port->init_devid == NULL || + port->init_devid->len != msg->port.init_devid_len) { + free(port->init_devid, M_CTL); + port->init_devid = malloc(sizeof(struct ctl_devid) + + msg->port.init_devid_len, M_CTL, M_WAITOK); + } + memcpy(port->init_devid->data, &msg->port.data[i], + msg->port.init_devid_len); + port->init_devid->len = msg->port.init_devid_len; + i += msg->port.init_devid_len; + } else { + free(port->init_devid, M_CTL); + port->init_devid = NULL; } if (new) { if (ctl_port_register(port) != 0) { Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:35:36 2015 (r288768) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:36:28 2015 (r288769) @@ -479,6 +479,7 @@ struct ctl_ha_msg_port { int lun_map_len; int port_devid_len; int target_devid_len; + int init_devid_len; uint8_t data[]; }; From owner-svn-src-all@freebsd.org Mon Oct 5 10:37:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8634D9B1174; Mon, 5 Oct 2015 10:37:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1DDF38; Mon, 5 Oct 2015 10:37:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AbMsS069026; Mon, 5 Oct 2015 10:37:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AbL5l069023; Mon, 5 Oct 2015 10:37:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051037.t95AbL5l069023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288770 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:37:22 -0000 Author: mav Date: Mon Oct 5 10:37:20 2015 New Revision: 288770 URL: https://svnweb.freebsd.org/changeset/base/288770 Log: MFC r287940: Replicate initiators WWPNs and names between HA peers. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:36:28 2015 (r288769) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:37:20 2015 (r288770) @@ -656,14 +656,56 @@ ctl_isc_announce_port(struct ctl_port *p free(msg, M_CTL); } +void +ctl_isc_announce_iid(struct ctl_port *port, int iid) +{ + struct ctl_softc *softc = control_softc; + union ctl_ha_msg *msg; + int i, l; + + if (port->targ_port < softc->port_min || + port->targ_port >= softc->port_max || + softc->ha_link != CTL_HA_LINK_ONLINE) + return; + mtx_lock(&softc->ctl_lock); + i = sizeof(msg->iid); + l = 0; + if (port->wwpn_iid[iid].name) + l = strlen(port->wwpn_iid[iid].name) + 1; + i += l; + msg = malloc(i, M_CTL, M_NOWAIT); + if (msg == NULL) { + mtx_unlock(&softc->ctl_lock); + return; + } + bzero(&msg->iid, sizeof(msg->iid)); + msg->hdr.msg_type = CTL_MSG_IID_SYNC; + msg->hdr.nexus.targ_port = port->targ_port; + msg->hdr.nexus.initid = iid; + msg->iid.in_use = port->wwpn_iid[iid].in_use; + msg->iid.name_len = l; + msg->iid.wwpn = port->wwpn_iid[iid].wwpn; + if (port->wwpn_iid[iid].name) + strlcpy(msg->iid.data, port->wwpn_iid[iid].name, l); + mtx_unlock(&softc->ctl_lock); + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->iid, i, M_NOWAIT); + free(msg, M_CTL); +} + static void ctl_isc_ha_link_up(struct ctl_softc *softc) { struct ctl_port *port; struct ctl_lun *lun; + int i; - STAILQ_FOREACH(port, &softc->port_list, links) + STAILQ_FOREACH(port, &softc->port_list, links) { ctl_isc_announce_port(port); + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port->wwpn_iid[i].in_use) + ctl_isc_announce_iid(port, i); + } + } STAILQ_FOREACH(lun, &softc->lun_list, links) ctl_isc_announce_lun(lun); } @@ -674,6 +716,7 @@ ctl_isc_ha_link_down(struct ctl_softc *s struct ctl_port *port; struct ctl_lun *lun; union ctl_io *io; + int i; mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { @@ -698,6 +741,11 @@ ctl_isc_ha_link_down(struct ctl_softc *s port->targ_port < softc->port_max) continue; port->status &= ~CTL_PORT_STATUS_ONLINE; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + port->wwpn_iid[i].in_use = 0; + free(port->wwpn_iid[i].name, M_CTL); + port->wwpn_iid[i].name = NULL; + } } mtx_unlock(&softc->ctl_lock); } @@ -910,6 +958,29 @@ ctl_isc_port_sync(struct ctl_softc *soft mtx_unlock(&softc->ctl_lock); } +static void +ctl_isc_iid_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_port *port; + int iid; + + port = softc->ctl_ports[msg->hdr.nexus.targ_port]; + if (port == NULL) { + printf("%s: Received IID for unknown port %d\n", + __func__, msg->hdr.nexus.targ_port); + return; + } + iid = msg->hdr.nexus.initid; + port->wwpn_iid[iid].in_use = msg->iid.in_use; + port->wwpn_iid[iid].wwpn = msg->iid.wwpn; + free(port->wwpn_iid[iid].name, M_CTL); + if (msg->iid.name_len) { + port->wwpn_iid[iid].name = strndup(&msg->iid.data[0], + msg->iid.name_len, M_CTL); + } else + port->wwpn_iid[iid].name = NULL; +} + /* * ISC (Inter Shelf Communication) event handler. Events from the HA * subsystem come in here. @@ -1185,6 +1256,9 @@ ctl_isc_event_handler(ctl_ha_channel cha case CTL_MSG_LUN_SYNC: ctl_isc_lun_sync(softc, msg, param); break; + case CTL_MSG_IID_SYNC: + ctl_isc_iid_sync(softc, msg, param); + break; default: printf("Received HA message of unknown type %d\n", msg->hdr.msg_type); @@ -1599,6 +1673,7 @@ ctl_remove_initiator(struct ctl_port *po port->wwpn_iid[iid].in_use--; port->wwpn_iid[iid].last_use = time_uptime; mtx_unlock(&softc->ctl_lock); + ctl_isc_announce_iid(port, iid); return (0); } @@ -1714,6 +1789,7 @@ take: port->wwpn_iid[iid].wwpn = wwpn; port->wwpn_iid[iid].in_use++; mtx_unlock(&softc->ctl_lock); + ctl_isc_announce_iid(port, iid); return (iid); } Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:36:28 2015 (r288769) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:37:20 2015 (r288770) @@ -191,6 +191,7 @@ void ctl_clr_ua_allluns(struct ctl_softc void ctl_isc_announce_lun(struct ctl_lun *lun); void ctl_isc_announce_port(struct ctl_port *port); +void ctl_isc_announce_iid(struct ctl_port *port, int iid); /* * KPI to manipulate LUN/port options Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:36:28 2015 (r288769) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:37:20 2015 (r288770) @@ -197,6 +197,7 @@ typedef enum { CTL_MSG_UA, /* Set/clear UA on secondary. */ CTL_MSG_PORT_SYNC, /* Information about port. */ CTL_MSG_LUN_SYNC, /* Information about LUN. */ + CTL_MSG_IID_SYNC, /* Information about initiator. */ CTL_MSG_FAILOVER /* Fake, never sent though the wire */ } ctl_msg_type; @@ -502,6 +503,17 @@ struct ctl_ha_msg_lun_pr_key { uint64_t pr_key; }; +/* + * Used for CTL_MSG_IID_SYNC. + */ +struct ctl_ha_msg_iid { + struct ctl_ha_msg_hdr hdr; + int in_use; + int name_len; + uint64_t wwpn; + uint8_t data[]; +}; + union ctl_ha_msg { struct ctl_ha_msg_hdr hdr; struct ctl_ha_msg_task task; @@ -511,6 +523,7 @@ union ctl_ha_msg { struct ctl_ha_msg_ua ua; struct ctl_ha_msg_port port; struct ctl_ha_msg_lun lun; + struct ctl_ha_msg_iid iid; }; From owner-svn-src-all@freebsd.org Mon Oct 5 10:38:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8FF09B1289; Mon, 5 Oct 2015 10:38:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA476E3; Mon, 5 Oct 2015 10:38:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AcXsN069126; Mon, 5 Oct 2015 10:38:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AcXaa069125; Mon, 5 Oct 2015 10:38:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051038.t95AcXaa069125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288771 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:38:33 -0000 Author: mav Date: Mon Oct 5 10:38:32 2015 New Revision: 288771 URL: https://svnweb.freebsd.org/changeset/base/288771 Log: MFC r287955: Update list of ASC/ASCQ codes from 5/20/12 to 8/12/15. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 10:37:20 2015 (r288770) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 10:38:32 2015 (r288771) @@ -969,7 +969,7 @@ static struct asc_table_entry asc_table[ * * SCSI ASC/ASCQ Assignments * Numeric Sorted Listing - * as of 5/20/12 + * as of 8/12/15 * * D - DIRECT ACCESS DEVICE (SBC-2) device column key * .T - SEQUENTIAL ACCESS DEVICE (SSC) ------------------- @@ -1061,6 +1061,9 @@ static struct asc_table_entry asc_table[ /* DT P B */ { SST(0x00, 0x20, SS_RDEF, /* XXX TBD */ "Extended copy information available") }, + /* D */ + { SST(0x00, 0x21, SS_RDEF, /* XXX TBD */ + "Atomic command aborted due to ACA") }, /* D W O BK */ { SST(0x01, 0x00, SS_RDEF, "No index/sector signal") }, @@ -1118,6 +1121,9 @@ static struct asc_table_entry asc_table[ /* F */ { SST(0x04, 0x0D, SS_RDEF, /* XXX TBD */ "Logical unit not ready, structure check required") }, + /* DTL WR MAEBKVF */ + { SST(0x04, 0x0E, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, security session in progress") }, /* DT WROM B */ { SST(0x04, 0x10, SS_RDEF, /* XXX TBD */ "Logical unit not ready, auxiliary memory not accessible") }, @@ -1157,6 +1163,24 @@ static struct asc_table_entry asc_table[ /* DT MAEB */ { SST(0x04, 0x1C, SS_RDEF, /* XXX TBD */ "Logical unit not ready, additional power use not yet granted") }, + /* D */ + { SST(0x04, 0x1D, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, configuration in progress") }, + /* D */ + { SST(0x04, 0x1E, SS_FATAL | ENXIO, + "Logical unit not ready, microcode activation required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x1F, SS_FATAL | ENXIO, + "Logical unit not ready, microcode download required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x20, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, logical unit reset required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x21, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, hard reset required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x22, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, power cycle required") }, /* DTL WROMAEBKVF */ { SST(0x05, 0x00, SS_RDEF, "Logical unit does not respond to selection") }, @@ -1196,6 +1220,9 @@ static struct asc_table_entry asc_table[ /* DT WRO B */ { SST(0x09, 0x04, SS_RDEF, "Head select fault") }, + /* DT RO B */ + { SST(0x09, 0x05, SS_RDEF, + "Vibration induced tracking error") }, /* DTLPWROMAEBKVF */ { SST(0x0A, 0x00, SS_FATAL | ENOSPC, "Error log overflow") }, @@ -1229,6 +1256,30 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x0B, 0x09, SS_RDEF, /* XXX TBD */ "Warning - device statistics notification available") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0A, SS_RDEF, /* XXX TBD */ + "Warning - High critical temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0B, SS_RDEF, /* XXX TBD */ + "Warning - Low critical temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0C, SS_RDEF, /* XXX TBD */ + "Warning - High operating temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0D, SS_RDEF, /* XXX TBD */ + "Warning - Low operating temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0E, SS_RDEF, /* XXX TBD */ + "Warning - High citical humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0F, SS_RDEF, /* XXX TBD */ + "Warning - Low citical humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x10, SS_RDEF, /* XXX TBD */ + "Warning - High operating humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x11, SS_RDEF, /* XXX TBD */ + "Warning - Low operating humidity limit exceeded") }, /* T R */ { SST(0x0C, 0x00, SS_RDEF, "Write error") }, @@ -1277,6 +1328,15 @@ static struct asc_table_entry asc_table[ /* R */ { SST(0x0C, 0x0F, SS_RDEF, /* XXX TBD */ "Defects in error window") }, + /* D */ + { SST(0x0C, 0x10, SS_RDEF, /* XXX TBD */ + "Incomplete multiple atomic write operations") }, + /* D */ + { SST(0x0C, 0x11, SS_RDEF, /* XXX TBD */ + "Write error - recovery scan needed") }, + /* D */ + { SST(0x0C, 0x12, SS_RDEF, /* XXX TBD */ + "Write error - insufficient zone resources") }, /* DTLPWRO A K */ { SST(0x0D, 0x00, SS_RDEF, /* XXX TBD */ "Error detected by third party temporary initiator") }, @@ -1388,6 +1448,9 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x11, 0x14, SS_RDEF, /* XXX TBD */ "Read error - LBA marked bad by application client") }, + /* D */ + { SST(0x11, 0x15, SS_RDEF, /* XXX TBD */ + "Write after sanitize required") }, /* D W O BK */ { SST(0x12, 0x00, SS_RDEF, "Address mark not found for ID field") }, @@ -1590,6 +1653,18 @@ static struct asc_table_entry asc_table[ { SST(0x21, 0x03, SS_RDEF, /* XXX TBD */ "Invalid write crossing layer jump") }, /* D */ + { SST(0x21, 0x04, SS_RDEF, /* XXX TBD */ + "Unaligned write command") }, + /* D */ + { SST(0x21, 0x05, SS_RDEF, /* XXX TBD */ + "Write boundary violation") }, + /* D */ + { SST(0x21, 0x06, SS_RDEF, /* XXX TBD */ + "Attempt to read invalid data") }, + /* D */ + { SST(0x21, 0x07, SS_RDEF, /* XXX TBD */ + "Read boundary violation") }, + /* D */ { SST(0x22, 0x00, SS_FATAL | EINVAL, "Illegal function (use 20 00, 24 00, or 26 00)") }, /* DT P B */ @@ -1712,6 +1787,9 @@ static struct asc_table_entry asc_table[ /* T */ { SST(0x26, 0x12, SS_RDEF, /* XXX TBD */ "Vendor specific key reference not found") }, + /* D */ + { SST(0x26, 0x13, SS_RDEF, /* XXX TBD */ + "Application tag mode page is invalid") }, /* DT WRO BK */ { SST(0x27, 0x00, SS_FATAL | EACCES, "Write protected") }, @@ -1736,6 +1814,9 @@ static struct asc_table_entry asc_table[ /* D B */ { SST(0x27, 0x07, SS_FATAL | ENOSPC, "Space allocation failed write protect") }, + /* D */ + { SST(0x27, 0x08, SS_FATAL | EACCES, + "Zone is read only") }, /* DTLPWROMAEBKVF */ { SST(0x28, 0x00, SS_FATAL | ENXIO, "Not ready to ready change, medium may have changed") }, @@ -1879,12 +1960,33 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x2C, 0x0C, SS_RDEF, /* XXX TBD */ "ORWRITE generation does not match") }, + /* D */ + { SST(0x2C, 0x0D, SS_RDEF, /* XXX TBD */ + "Reset write pointer not allowed") }, + /* D */ + { SST(0x2C, 0x0E, SS_RDEF, /* XXX TBD */ + "Zone is offline") }, + /* D */ + { SST(0x2C, 0x0F, SS_RDEF, /* XXX TBD */ + "Stream not open") }, + /* D */ + { SST(0x2C, 0x10, SS_RDEF, /* XXX TBD */ + "Unwritten data in zone") }, /* T */ { SST(0x2D, 0x00, SS_RDEF, "Overwrite error on update in place") }, /* R */ { SST(0x2E, 0x00, SS_RDEF, /* XXX TBD */ "Insufficient time for operation") }, + /* D */ + { SST(0x2E, 0x01, SS_RDEF, /* XXX TBD */ + "Command timeout before processing") }, + /* D */ + { SST(0x2E, 0x02, SS_RDEF, /* XXX TBD */ + "Command timeout during processing") }, + /* D */ + { SST(0x2E, 0x03, SS_RDEF, /* XXX TBD */ + "Command timeout during processing due to error recovery") }, /* DTLPWROMAEBKVF */ { SST(0x2F, 0x00, SS_RDEF, "Commands cleared by another initiator") }, @@ -1894,6 +1996,9 @@ static struct asc_table_entry asc_table[ /* DTLPWROMAEBKVF */ { SST(0x2F, 0x02, SS_RDEF, /* XXX TBD */ "Commands cleared by device server") }, + /* DTLPWROMAEBKVF */ + { SST(0x2F, 0x03, SS_RDEF, /* XXX TBD */ + "Some commands cleared by queuing layer event") }, /* DT WROM BK */ { SST(0x30, 0x00, SS_RDEF, "Incompatible medium installed") }, @@ -2191,6 +2296,15 @@ static struct asc_table_entry asc_table[ /* DTLPWR MAEBK F */ { SST(0x3F, 0x14, SS_RDEF, /* XXX TBD */ "iSCSI IP address changed") }, + /* DTLPWR MAEBK */ + { SST(0x3F, 0x15, SS_RDEF, /* XXX TBD */ + "Inspect referrals sense descriptors") }, + /* DTLPWROMAEBKVF */ + { SST(0x3F, 0x16, SS_RDEF, /* XXX TBD */ + "Microcode has been changed without reset") }, + /* D */ + { SST(0x3F, 0x17, SS_RDEF, /* XXX TBD */ + "Zone transition to full") }, /* D */ { SST(0x40, 0x00, SS_RDEF, "RAM failure") }, /* deprecated - use 40 NN instead */ @@ -2300,6 +2414,30 @@ static struct asc_table_entry asc_table[ /* DT PWROMAEBK F */ { SST(0x4B, 0x0D, SS_RDEF, /* XXX TBD */ "Data-out buffer error") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x0E, SS_RDEF, /* XXX TBD */ + "PCIe fabric error") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x0F, SS_RDEF, /* XXX TBD */ + "PCIe completion timeout") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x10, SS_RDEF, /* XXX TBD */ + "PCIe completer abort") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x11, SS_RDEF, /* XXX TBD */ + "PCIe poisoned TLP received") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x12, SS_RDEF, /* XXX TBD */ + "PCIe ECRC check failed") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x13, SS_RDEF, /* XXX TBD */ + "PCIe unsupported request") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x14, SS_RDEF, /* XXX TBD */ + "PCIe ACS violation") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x15, SS_RDEF, /* XXX TBD */ + "PCIe TLP prefix blocket") }, /* DTLPWROMAEBKVF */ { SST(0x4C, 0x00, SS_RDEF, "Logical unit failed self-configuration") }, @@ -2357,6 +2495,21 @@ static struct asc_table_entry asc_table[ /* M */ { SST(0x53, 0x08, SS_RDEF, /* XXX TBD */ "Element status unknown") }, + /* M */ + { SST(0x53, 0x09, SS_RDEF, /* XXX TBD */ + "Data transfer device error - load failed") }, + /* M */ + { SST(0x53, 0x0A, SS_RDEF, /* XXX TBD */ + "Data transfer device error - unload failed") }, + /* M */ + { SST(0x53, 0x0B, SS_RDEF, /* XXX TBD */ + "Data transfer device error - unload missing") }, + /* M */ + { SST(0x53, 0x0C, SS_RDEF, /* XXX TBD */ + "Data transfer device error - eject failed") }, + /* M */ + { SST(0x53, 0x0D, SS_RDEF, /* XXX TBD */ + "Data transfer device error - library communication failed") }, /* P */ { SST(0x54, 0x00, SS_RDEF, "SCSI to host system interface failure") }, @@ -2402,6 +2555,15 @@ static struct asc_table_entry asc_table[ /* DT P B */ { SST(0x55, 0x0D, SS_RDEF, /* XXX TBD */ "Insufficient resources to create ROD token") }, + /* D */ + { SST(0x55, 0x0E, SS_RDEF, /* XXX TBD */ + "Insufficient zone resources") }, + /* D */ + { SST(0x55, 0x0F, SS_RDEF, /* XXX TBD */ + "Insufficient zone resources to complete write") }, + /* D */ + { SST(0x55, 0x10, SS_RDEF, /* XXX TBD */ + "Maximum number of streams open") }, /* R */ { SST(0x57, 0x00, SS_RDEF, "Unable to recover table-of-contents") }, @@ -2822,6 +2984,9 @@ static struct asc_table_entry asc_table[ /* A */ { SST(0x68, 0x00, SS_RDEF, "Logical unit not configured") }, + /* D */ + { SST(0x68, 0x01, SS_RDEF, + "Subsidiary logical unit not configured") }, /* A */ { SST(0x69, 0x00, SS_RDEF, "Data loss on logical unit") }, From owner-svn-src-all@freebsd.org Mon Oct 5 10:39:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BA329B133D; Mon, 5 Oct 2015 10:39:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33BC8238; Mon, 5 Oct 2015 10:39:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AdMFK069215; Mon, 5 Oct 2015 10:39:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AdMJr069214; Mon, 5 Oct 2015 10:39:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051039.t95AdMJr069214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288772 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:39:22 -0000 Author: mav Date: Mon Oct 5 10:39:21 2015 New Revision: 288772 URL: https://svnweb.freebsd.org/changeset/base/288772 Log: MFC r287956: Update list of opcodes to 5/26/15. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 10:38:32 2015 (r288771) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 5 10:39:21 2015 (r288772) @@ -175,7 +175,7 @@ static struct op_table_entry scsi_op_cod * * SCSI Operation Codes * Numeric Sorted Listing - * as of 3/11/08 + * as of 5/26/15 * * D - DIRECT ACCESS DEVICE (SBC-2) device column key * .T - SEQUENTIAL ACCESS DEVICE (SSC-2) ----------------- @@ -501,17 +501,22 @@ static struct op_table_entry scsi_op_cod { 0x93, D, "WRITE SAME(16)" }, /* 93 M ERASE(16) */ { 0x93, T, "ERASE(16)" }, - /* 94 [usage proposed by SCSI Socket Services project] */ - /* 95 [usage proposed by SCSI Socket Services project] */ - /* 96 [usage proposed by SCSI Socket Services project] */ - /* 97 [usage proposed by SCSI Socket Services project] */ + /* 94 O ZBC OUT */ + { 0x94, D, "ZBC OUT" }, + /* 95 O ZBC OUT */ + { 0x95, D, "ZBC OUT" }, + /* 96 */ + /* 97 */ /* 98 */ /* 99 */ - /* 9A */ - /* 9B */ + /* 9A O WRITE STREAM(16) */ + { 0x9A, D, "WRITE STREAM(16)" }, + /* 9B OOOOOOOOOO OOO READ BUFFER(16) */ + { 0x9B, ALL & ~(B) , "READ BUFFER(16)" }, /* 9C O WRITE ATOMIC(16) */ { 0x9C, D, "WRITE ATOMIC(16)" }, - /* 9D */ + /* 9D SERVICE ACTION BIDIRECTIONAL */ + { 0x9D, ALL, "SERVICE ACTION BIDIRECTIONAL" }, /* XXX KDM ALL for this? op-num.txt defines it for none.. */ /* 9E SERVICE ACTION IN(16) */ { 0x9E, ALL, "SERVICE ACTION IN(16)" }, From owner-svn-src-all@freebsd.org Mon Oct 5 10:40:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8CA99B14C2; Mon, 5 Oct 2015 10:40:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF9903F4; Mon, 5 Oct 2015 10:40:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AeG1H069330; Mon, 5 Oct 2015 10:40:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AeFRB069327; Mon, 5 Oct 2015 10:40:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051040.t95AeFRB069327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288773 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:40:16 -0000 Author: mav Date: Mon Oct 5 10:40:15 2015 New Revision: 288773 URL: https://svnweb.freebsd.org/changeset/base/288773 Log: MFC r287957: Kill HA link and shutdown the threads on shutdown. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_ha.c stable/10/sys/cam/ctl/ctl_ha.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:39:21 2015 (r288772) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:40:15 2015 (r288773) @@ -1583,13 +1583,12 @@ ctl_shutdown(void) softc = (struct ctl_softc *)control_softc; if (softc->is_single == 0) { + ctl_ha_msg_shutdown(softc); if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) - != CTL_HA_STATUS_SUCCESS) { - printf("ctl_shutdown: ctl_ha_msg_deregister failed.\n"); - } - if (ctl_ha_msg_shutdown(softc) != CTL_HA_STATUS_SUCCESS) { - printf("ctl_shutdown: ctl_ha_msg_shutdown failed.\n"); - } + != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_deregister failed.\n", __func__); + if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_destroy failed.\n", __func__); ctl_frontend_deregister(&ha_frontend); } Modified: stable/10/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:39:21 2015 (r288772) +++ stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:40:15 2015 (r288773) @@ -155,6 +155,8 @@ struct ha_softc { int ha_receiving; int ha_wakeup; int ha_disconnect; + int ha_shutdown; + eventhandler_tag ha_shutdown_eh; TAILQ_HEAD(, ctl_ha_dt_req) ha_dts; } ha_softc; @@ -568,10 +570,12 @@ ctl_ha_conn_thread(void *arg) int error; while (1) { - if (softc->ha_disconnect) { + if (softc->ha_disconnect || softc->ha_shutdown) { ctl_ha_close(softc); ctl_ha_lclose(softc); softc->ha_disconnect = 0; + if (softc->ha_shutdown) + break; } else if (softc->ha_so != NULL && (softc->ha_so->so_error || softc->ha_so->so_rcv.sb_state & SBS_CANTRCVMORE)) @@ -614,6 +618,11 @@ ctl_ha_conn_thread(void *arg) softc->ha_wakeup = 0; mtx_unlock(&softc->ha_lock); } + mtx_lock(&softc->ha_lock); + softc->ha_shutdown = 2; + wakeup(&softc->ha_wakeup); + mtx_unlock(&softc->ha_lock); + kthread_exit(); } static int @@ -936,6 +945,8 @@ ctl_ha_msg_init(struct ctl_softc *ctl_so mtx_destroy(&softc->ha_lock); return (CTL_HA_STATUS_ERROR); } + softc->ha_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, + ctl_ha_msg_shutdown, ctl_softc, SHUTDOWN_PRI_FIRST); SYSCTL_ADD_PROC(&ctl_softc->sysctl_ctx, SYSCTL_CHILDREN(ctl_softc->sysctl_tree), OID_AUTO, "ha_peer", CTLTYPE_STRING | CTLFLAG_RWTUN, @@ -949,14 +960,40 @@ ctl_ha_msg_init(struct ctl_softc *ctl_so return (CTL_HA_STATUS_SUCCESS); }; -ctl_ha_status +void ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc) { struct ha_softc *softc = &ha_softc; - if (ctl_ha_msg_deregister(CTL_HA_CHAN_DATA) != CTL_HA_STATUS_SUCCESS) { - printf("%s: ctl_ha_msg_deregister failed.\n", __func__); + /* Disconnect and shutdown threads. */ + mtx_lock(&softc->ha_lock); + if (softc->ha_shutdown < 2) { + softc->ha_shutdown = 1; + softc->ha_wakeup = 1; + wakeup(&softc->ha_wakeup); + while (softc->ha_shutdown < 2) { + msleep(&softc->ha_wakeup, &softc->ha_lock, 0, + "shutdown", hz); + } } + mtx_unlock(&softc->ha_lock); +}; + +ctl_ha_status +ctl_ha_msg_destroy(struct ctl_softc *ctl_softc) +{ + struct ha_softc *softc = &ha_softc; + + if (softc->ha_shutdown_eh != NULL) { + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, + softc->ha_shutdown_eh); + softc->ha_shutdown_eh = NULL; + } + + ctl_ha_msg_shutdown(ctl_softc); /* Just in case. */ + + if (ctl_ha_msg_deregister(CTL_HA_CHAN_DATA) != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_deregister failed.\n", __func__); mtx_destroy(&softc->ha_lock); return (CTL_HA_STATUS_SUCCESS); Modified: stable/10/sys/cam/ctl/ctl_ha.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.h Mon Oct 5 10:39:21 2015 (r288772) +++ stable/10/sys/cam/ctl/ctl_ha.h Mon Oct 5 10:40:15 2015 (r288773) @@ -109,7 +109,8 @@ struct ctl_ha_dt_req { struct ctl_softc; ctl_ha_status ctl_ha_msg_init(struct ctl_softc *softc); -ctl_ha_status ctl_ha_msg_shutdown(struct ctl_softc *softc); +void ctl_ha_msg_shutdown(struct ctl_softc *softc); +ctl_ha_status ctl_ha_msg_destroy(struct ctl_softc *softc); typedef void (*ctl_evt_handler)(ctl_ha_channel channel, ctl_ha_event event, int param); From owner-svn-src-all@freebsd.org Mon Oct 5 10:41:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 647FA9B161B; Mon, 5 Oct 2015 10:41:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 565E9976; Mon, 5 Oct 2015 10:41:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AfApu071848; Mon, 5 Oct 2015 10:41:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Af9PT071844; Mon, 5 Oct 2015 10:41:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051041.t95Af9PT071844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288774 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:41:10 -0000 Author: mav Date: Mon Oct 5 10:41:08 2015 New Revision: 288774 URL: https://svnweb.freebsd.org/changeset/base/288774 Log: MFC r287967: Relax serseq option operation for reads. Previously, with serseq enabled, next command was unblocked only after previous completed. With this change, for read operations, next command is unblocked as soon as last media read completed. This is important for frontends that actually wait for data move completion (like camtgt), or when data are moved through the HA link, or especially when both. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:40:15 2015 (r288773) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:41:08 2015 (r288774) @@ -10594,6 +10594,8 @@ ctl_extent_check(union ctl_io *io1, unio if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); + if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) + seq = FALSE; return (ctl_extent_check_lba(lba1, len1, lba2, len2, seq)); } @@ -10603,6 +10605,8 @@ ctl_extent_check_seq(union ctl_io *io1, uint64_t lba1, lba2; uint64_t len1, len2; + if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) + return (CTL_ACTION_PASS); if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); if (ctl_get_lba_len(io2, &lba2, &len2) != 0) @@ -13220,6 +13224,21 @@ ctl_done_timer_wakeup(void *arg) #endif /* CTL_IO_DELAY */ void +ctl_serseq_done(union ctl_io *io) +{ + struct ctl_lun *lun; + + lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + if (lun->be_lun == NULL || + lun->be_lun->serseq == CTL_LUN_SERSEQ_OFF) + return; + mtx_lock(&lun->lun_lock); + io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; + ctl_check_blocked(lun); + mtx_unlock(&lun->lun_lock); +} + +void ctl_done(union ctl_io *io) { Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:40:15 2015 (r288773) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:41:08 2015 (r288774) @@ -172,6 +172,7 @@ int ctl_sap_log_sense_handler(struct ctl int pc); int ctl_config_move_done(union ctl_io *io); void ctl_datamove(union ctl_io *io); +void ctl_serseq_done(union ctl_io *io); void ctl_done(union ctl_io *io); void ctl_data_submit_done(union ctl_io *io); void ctl_config_read_done(union ctl_io *io); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:40:15 2015 (r288773) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:41:08 2015 (r288774) @@ -565,8 +565,10 @@ ctl_be_block_biodone(struct bio *bio) ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -785,8 +787,10 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -954,8 +958,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:40:15 2015 (r288773) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:41:08 2015 (r288774) @@ -115,7 +115,8 @@ typedef enum { CTL_FLAG_FAILOVER = 0x04000000, /* Killed by a failover */ CTL_FLAG_IO_ACTIVE = 0x08000000, /* I/O active on this SC */ - CTL_FLAG_STATUS_SENT = 0x10000000 /* Status sent by datamove */ + CTL_FLAG_STATUS_SENT = 0x10000000, /* Status sent by datamove */ + CTL_FLAG_SERSEQ_DONE = 0x20000000 /* All storage I/O started */ } ctl_io_flags; From owner-svn-src-all@freebsd.org Mon Oct 5 10:42:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEAAB9B171D; Mon, 5 Oct 2015 10:42:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0AABB5F; Mon, 5 Oct 2015 10:42:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Ag8jB072597; Mon, 5 Oct 2015 10:42:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Ag88J072596; Mon, 5 Oct 2015 10:42:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051042.t95Ag88J072596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288775 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:42:08 -0000 Author: mav Date: Mon Oct 5 10:42:07 2015 New Revision: 288775 URL: https://svnweb.freebsd.org/changeset/base/288775 Log: MFC r287968: Mark I/Os with DMA flag while moving data through the HA link. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:41:08 2015 (r288774) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:42:07 2015 (r288775) @@ -1150,6 +1150,7 @@ ctl_isc_event_handler(ctl_ha_channel cha */ io = msg->hdr.serializing_sc; io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; + io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; io->io_hdr.port_status = msg->scsi.fetd_status; io->scsiio.residual = msg->scsi.residual; @@ -11060,6 +11061,7 @@ ctl_failover_lun(struct ctl_lun *lun) io->flags |= CTL_FLAG_FAILOVER; } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; + io->flags &= ~CTL_FLAG_DMA_INPROG; io->flags |= CTL_FLAG_IO_ACTIVE; io->port_status = 31340; ctl_enqueue_isc((union ctl_io *)io); @@ -12445,6 +12447,7 @@ ctl_datamove(union ctl_io *io) return; } io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; if (lun) mtx_unlock(&lun->lun_lock); } else { From owner-svn-src-all@freebsd.org Mon Oct 5 10:42:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2126D9B1808; Mon, 5 Oct 2015 10:42:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13080CF9; Mon, 5 Oct 2015 10:42:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AgwHD072683; Mon, 5 Oct 2015 10:42:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Agwv5072682; Mon, 5 Oct 2015 10:42:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051042.t95Agwv5072682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288776 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:42:59 -0000 Author: mav Date: Mon Oct 5 10:42:58 2015 New Revision: 288776 URL: https://svnweb.freebsd.org/changeset/base/288776 Log: MFC r287986: Fix memory corruption when >128K transferred through HA link. While there, do some cleaning. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:42:07 2015 (r288775) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:42:58 2015 (r288776) @@ -1082,7 +1082,7 @@ ctl_isc_event_handler(ctl_ha_channel cha if (msg->dt.sg_sequence == 0) { i = msg->dt.kern_sg_entries + - io->scsiio.kern_data_len / + msg->dt.kern_data_len / CTL_HA_DATAMOVE_SEGMENT + 1; sgl = malloc(sizeof(*sgl) * i, M_CTL, M_WAITOK | M_ZERO); @@ -1118,11 +1118,8 @@ ctl_isc_event_handler(ctl_ha_channel cha sgl[i].len = msg->dt.sg_list[j].len; #if 0 - printf("%s: L: %p,%d -> %p,%d j=%d, i=%d\n", - __func__, - msg->dt.sg_list[j].addr, - msg->dt.sg_list[j].len, - sgl[i].addr, sgl[i].len, j, i); + printf("%s: DATAMOVE: %p,%lu j=%d, i=%d\n", + __func__, sgl[i].addr, sgl[i].len, j, i); #endif } @@ -12539,11 +12536,8 @@ ctl_datamove_remote_dm_write_cb(union ct { int retval; - retval = 0; - retval = ctl_datamove_remote_xfer(io, CTL_HA_DT_CMD_WRITE, ctl_datamove_remote_write_cb); - return (retval); } @@ -12573,11 +12567,7 @@ ctl_datamove_remote_write(union ctl_io * io->scsiio.be_move_done = ctl_datamove_remote_dm_write_cb; fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; - fe_datamove(io); - - return; - } static int @@ -12652,14 +12642,13 @@ ctl_datamove_remote_read_cb(struct ctl_h /* XXX KDM add checks like the ones in ctl_datamove? */ fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; - fe_datamove(io); } static int ctl_datamove_remote_sgl_setup(union ctl_io *io) { - struct ctl_sg_entry *local_sglist, *remote_sglist; + struct ctl_sg_entry *local_sglist; struct ctl_softc *softc; uint32_t len_to_go; int retval; @@ -12668,7 +12657,6 @@ ctl_datamove_remote_sgl_setup(union ctl_ retval = 0; softc = control_softc; local_sglist = io->io_hdr.local_sglist; - remote_sglist = io->io_hdr.remote_sglist; len_to_go = io->scsiio.kern_data_len; /* @@ -12694,7 +12682,7 @@ ctl_datamove_remote_sgl_setup(union ctl_ printf("%s: kern_sg_entries = %d\n", __func__, io->scsiio.kern_sg_entries); for (i = 0; i < io->scsiio.kern_sg_entries; i++) - printf("%s: sg[%d] = %p, %d\n", __func__, i, + printf("%s: sg[%d] = %p, %lu\n", __func__, i, local_sglist[i].addr, local_sglist[i].len); #endif @@ -12812,7 +12800,7 @@ ctl_datamove_remote_xfer(union ctl_io *i rq->callback = callback; #if 0 - printf("%s: %s: local %#x remote %#x size %d\n", __func__, + printf("%s: %s: local %p remote %p size %d\n", __func__, (command == CTL_HA_DT_CMD_WRITE) ? "WRITE" : "READ", rq->local, rq->remote, rq->size); #endif @@ -12858,8 +12846,6 @@ ctl_datamove_remote_read(union ctl_io *i io->io_hdr.remote_sglist = NULL; io->io_hdr.local_sglist = NULL; } - - return; } /* From owner-svn-src-all@freebsd.org Mon Oct 5 10:43:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 591319B18CB; Mon, 5 Oct 2015 10:43:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B41CE5B; Mon, 5 Oct 2015 10:43:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AhkVX072769; Mon, 5 Oct 2015 10:43:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AhkZ8072768; Mon, 5 Oct 2015 10:43:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051043.t95AhkZ8072768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288777 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:43:46 -0000 Author: mav Date: Mon Oct 5 10:43:45 2015 New Revision: 288777 URL: https://svnweb.freebsd.org/changeset/base/288777 Log: MFC r287991: Pack struct ctl_ha_msg_hdr by 8 bytes. Modified: stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:42:58 2015 (r288776) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:43:45 2015 (r288777) @@ -385,10 +385,10 @@ struct ctl_pr_info { struct ctl_ha_msg_hdr { ctl_msg_type msg_type; + uint32_t status; /* transaction status */ union ctl_io *original_sc; union ctl_io *serializing_sc; struct ctl_nexus nexus; /* Initiator, port, target, lun */ - uint32_t status; /* transaction status */ }; #define CTL_HA_MAX_SG_ENTRIES 16 From owner-svn-src-all@freebsd.org Mon Oct 5 10:44:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 625059B1956; Mon, 5 Oct 2015 10:44:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5456CFB1; Mon, 5 Oct 2015 10:44:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AibF3072884; Mon, 5 Oct 2015 10:44:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AiaOZ072881; Mon, 5 Oct 2015 10:44:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051044.t95AiaOZ072881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288778 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:44:37 -0000 Author: mav Date: Mon Oct 5 10:44:36 2015 New Revision: 288778 URL: https://svnweb.freebsd.org/changeset/base/288778 Log: MFC r287993: Split two command flags with different meaning. This is only a cosmetical change. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:43:45 2015 (r288777) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:44:36 2015 (r288778) @@ -11176,7 +11176,7 @@ ctl_scsiio_precheck(struct ctl_softc *so * it on the rtr queue. */ if (lun == NULL) { - if (entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) { + if (entry->flags & CTL_CMD_FLAG_OK_ON_NO_LUN) { ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; ctl_enqueue_rtr((union ctl_io *)ctsio); return (retval); @@ -11394,13 +11394,11 @@ ctl_cmd_applicable(uint8_t lun_type, con switch (lun_type) { case T_PROCESSOR: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) && - ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + if ((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) return (0); break; case T_DIRECT: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) && - ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + if ((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) return (0); break; default: Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:43:45 2015 (r288777) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:44:36 2015 (r288778) @@ -546,7 +546,8 @@ const struct ctl_cmd_entry ctl_cmd_table /* 03 REQUEST SENSE */ {ctl_request_sense, CTL_SERIDX_RQ_SNS, CTL_FLAG_DATA_IN | - CTL_CMD_FLAG_OK_ON_ALL_LUNS | + CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | @@ -607,7 +608,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 12 INQUIRY */ -{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS | +{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | @@ -1172,7 +1174,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* A0 REPORT LUNS */ -{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS | +{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:43:45 2015 (r288777) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:44:36 2015 (r288778) @@ -91,14 +91,14 @@ typedef enum { * WARNING: Keep the bottom nibble here free, we OR in the data direction * flags for each command. * - * Note: "OK_ON_ALL_LUNS" == we don't have to have a lun configured + * Note: "OK_ON_NO_LUN" == we don't have to have a lun configured * "OK_ON_BOTH" == we have to have a lun configured * "SA5" == command has 5-bit service action at byte 1 */ typedef enum { CTL_CMD_FLAG_NONE = 0x0000, CTL_CMD_FLAG_NO_SENSE = 0x0010, - CTL_CMD_FLAG_OK_ON_ALL_LUNS = 0x0020, + CTL_CMD_FLAG_OK_ON_NO_LUN = 0x0020, CTL_CMD_FLAG_ALLOW_ON_RESV = 0x0040, CTL_CMD_FLAG_ALLOW_ON_PR_WRESV = 0x0080, CTL_CMD_FLAG_OK_ON_PROC = 0x0100, @@ -109,7 +109,8 @@ typedef enum { CTL_CMD_FLAG_OK_ON_STANDBY = 0x1000, CTL_CMD_FLAG_OK_ON_UNAVAIL = 0x2000, CTL_CMD_FLAG_ALLOW_ON_PR_RESV = 0x4000, - CTL_CMD_FLAG_SA5 = 0x8000 + CTL_CMD_FLAG_SA5 = 0x8000, + CTL_CMD_FLAG_RUN_HERE = 0x10000 } ctl_cmd_flags; typedef enum { From owner-svn-src-all@freebsd.org Mon Oct 5 10:45:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11FEE9B1A4F; Mon, 5 Oct 2015 10:45:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEBA616E; Mon, 5 Oct 2015 10:45:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AjY1k072994; Mon, 5 Oct 2015 10:45:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AjYfQ072992; Mon, 5 Oct 2015 10:45:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051045.t95AjYfQ072992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288779 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:45:35 -0000 Author: mav Date: Mon Oct 5 10:45:33 2015 New Revision: 288779 URL: https://svnweb.freebsd.org/changeset/base/288779 Log: MFC r287994: Always execute REPORT LUNS and REQUEST SENSE commands locally. REPORT LUNS command is more related to target rather then specific LUN. This node may be primary for LUNs for some reason unknown to another, and command forwarded to another node won't be able to report them. REQUEST SENSE is related to LUN, but in our implementation it reports only UAs and CAs, that are stored locally rather then on primary node. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:44:36 2015 (r288778) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:45:33 2015 (r288779) @@ -11267,7 +11267,8 @@ ctl_scsiio_precheck(struct ctl_softc *so * side so when we are done we can find the copy. */ if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && - (lun->flags & CTL_LUN_PEER_SC_PRIMARY) != 0) { + (lun->flags & CTL_LUN_PEER_SC_PRIMARY) != 0 && + (entry->flags & CTL_CMD_FLAG_RUN_HERE) == 0) { union ctl_ha_msg msg_info; int isc_retval; Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:44:36 2015 (r288778) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:45:33 2015 (r288779) @@ -554,7 +554,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | - CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_CMD_FLAG_ALLOW_ON_PR_RESV | + CTL_CMD_FLAG_RUN_HERE, CTL_LUN_PAT_NONE, 6, {0x01, 0, 0, 0xff, 0x07}}, /* 04 FORMAT UNIT */ @@ -1174,7 +1175,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* A0 REPORT LUNS */ -{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | +{ctl_report_luns, CTL_SERIDX_INQ, CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_OK_ON_NO_LUN | CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | @@ -1182,8 +1184,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | - CTL_FLAG_DATA_IN | - CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_CMD_FLAG_ALLOW_ON_PR_RESV | + CTL_CMD_FLAG_RUN_HERE, CTL_LUN_PAT_NONE, 12, {0, 0xff, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, From owner-svn-src-all@freebsd.org Mon Oct 5 10:45:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28C8C9B1B50; Mon, 5 Oct 2015 10:45:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7212EB; Mon, 5 Oct 2015 10:45:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AjqSL073058; Mon, 5 Oct 2015 10:45:52 GMT (envelope-from markm@FreeBSD.org) Received: (from markm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Ajq1r073057; Mon, 5 Oct 2015 10:45:52 GMT (envelope-from markm@FreeBSD.org) Message-Id: <201510051045.t95Ajq1r073057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markm set sender to markm@FreeBSD.org using -f From: Mark Murray Date: Mon, 5 Oct 2015 10:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288780 - head/sys/dev/random X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:45:53 -0000 Author: markm Date: Mon Oct 5 10:45:52 2015 New Revision: 288780 URL: https://svnweb.freebsd.org/changeset/base/288780 Log: Fix printf-like formats for KASSERT. Submitted by: jenkins Approved by: so (/dev/random blanket) Modified: head/sys/dev/random/random_harvestq.c Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Mon Oct 5 10:45:33 2015 (r288779) +++ head/sys/dev/random/random_harvestq.c Mon Oct 5 10:45:52 2015 (r288780) @@ -211,7 +211,7 @@ random_sources_feed(void) LIST_FOREACH(rrs, &source_list, rrs_entries) { for (i = 0; i < p_random_alg_context->ra_poolcount*(local_read_rate + 1); i++) { n = rrs->rrs_source->rs_read(entropy, sizeof(entropy)); - KASSERT((n <= sizeof(entropy)), ("%s: rs_read returned too much data (%d > %d) in %s", __func__, n, sizeof(entropy))); + KASSERT((n <= sizeof(entropy)), ("%s: rs_read returned too much data (%u > %zu)", __func__, n, sizeof(entropy))); /* It would appear that in some circumstances (e.g. virtualisation), * the underlying hardware entropy source might not always return * random numbers. Accept this but make a noise. If too much happens, From owner-svn-src-all@freebsd.org Mon Oct 5 10:46:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F15B99B1D34; Mon, 5 Oct 2015 10:46:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E323E6EF; Mon, 5 Oct 2015 10:46:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AkQjJ073167; Mon, 5 Oct 2015 10:46:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AkPmi073158; Mon, 5 Oct 2015 10:46:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051046.t95AkPmi073158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288781 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:46:27 -0000 Author: mav Date: Mon Oct 5 10:46:24 2015 New Revision: 288781 URL: https://svnweb.freebsd.org/changeset/base/288781 Log: MFC r288020: Remove couple excess SGLIST I/O flags. Those flags duplicated respective (sg_entries > 0) values. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_tpc_local.c stable/10/sys/cam/ctl/ctl_util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:46:24 2015 (r288781) @@ -1652,7 +1652,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc io->scsiio.kern_data_len = beio->io_len; io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED; /* * For the read case, we need to read the data into our buffers and Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 10:46:24 2015 (r288781) @@ -321,7 +321,6 @@ ctl_backend_ramdisk_continue(union ctl_i sg_entries[i].len = MIN(PAGE_SIZE, len - len_filled); len_filled += sg_entries[i].len; } - io->io_hdr.flags |= CTL_FLAG_KDPTR_SGLIST; } else { sg_filled = 0; len_filled = len; Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 10:46:24 2015 (r288781) @@ -149,7 +149,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio * To simplify things here, if we have a single buffer, stick it in * a S/G entry and just make it a single entry S/G list. */ - if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { + if (ctsio->ext_sg_entries > 0) { int len_seen; ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:46:24 2015 (r288781) @@ -88,8 +88,6 @@ typedef enum { CTL_FLAG_DATA_OUT = 0x00000002, /* DATA OUT */ CTL_FLAG_DATA_NONE = 0x00000003, /* no data */ CTL_FLAG_DATA_MASK = 0x00000003, - CTL_FLAG_KDPTR_SGLIST = 0x00000008, /* kern_data_ptr is S/G list*/ - CTL_FLAG_EDPTR_SGLIST = 0x00000010, /* ext_data_ptr is S/G list */ CTL_FLAG_DO_AUTOSENSE = 0x00000020, /* grab sense info */ CTL_FLAG_USER_REQ = 0x00000040, /* request came from userland */ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */ Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 10:46:24 2015 (r288781) @@ -162,7 +162,7 @@ tpcl_datamove(union ctl_io *io) * To simplify things here, if we have a single buffer, stick it in * a S/G entry and just make it a single entry S/G list. */ - if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { + if (ctsio->ext_sg_entries > 0) { int len_seen; ext_sglist = (struct ctl_sg_entry *)ctsio->ext_data_ptr; Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 10:45:52 2015 (r288780) +++ stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 10:46:24 2015 (r288781) @@ -882,7 +882,7 @@ ctl_data_print(union ctl_io *io) return; if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) return; - if (io->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) /* XXX: Implement */ + if (io->scsiio.ext_sg_entries > 0) /* XXX: Implement */ return; ctl_scsi_path_string(io, path_str, sizeof(path_str)); len = min(io->scsiio.kern_data_len, 4096); From owner-svn-src-all@freebsd.org Mon Oct 5 10:47:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1894C9B1EEF; Mon, 5 Oct 2015 10:47:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4D549E9; Mon, 5 Oct 2015 10:47:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AlJBp073271; Mon, 5 Oct 2015 10:47:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AlJJV073270; Mon, 5 Oct 2015 10:47:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051047.t95AlJJV073270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288782 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:47:20 -0000 Author: mav Date: Mon Oct 5 10:47:18 2015 New Revision: 288782 URL: https://svnweb.freebsd.org/changeset/base/288782 Log: MFC r288021: Mark with DMA flag I/Os waiting for iSCSI write data after R2T. Reads and immediate writes are not blocking, so don't bother. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:46:24 2015 (r288781) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:47:18 2015 (r288782) @@ -963,6 +963,7 @@ cfiscsi_pdu_handle_data_out(struct icl_p done = (io->scsiio.ext_data_filled != cdw->cdw_r2t_end || io->scsiio.ext_data_filled == io->scsiio.kern_data_len); uma_zfree(cfiscsi_data_wait_zone, cdw); + io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; if (done) io->scsiio.be_move_done(io); else @@ -1136,6 +1137,7 @@ cfiscsi_session_terminate_tasks(struct c * assuming that the data transfer actually succeeded * and writing uninitialized data to disk. */ + cdw->cdw_ctl_io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); uma_zfree(cfiscsi_data_wait_zone, cdw); @@ -2665,6 +2667,7 @@ cfiscsi_datamove_out(union ctl_io *io) cfiscsi_session_terminate(cs); return; } + io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; bhsr2t = (struct iscsi_bhs_r2t *)response->ip_bhs; bhsr2t->bhsr2t_opcode = ISCSI_BHS_OPCODE_R2T; bhsr2t->bhsr2t_flags = 0x80; @@ -2841,6 +2844,8 @@ cfiscsi_task_management_done(union ctl_i #endif TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next); + io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; + cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 43; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); uma_zfree(cfiscsi_data_wait_zone, cdw); } From owner-svn-src-all@freebsd.org Mon Oct 5 10:48:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 024589B2035; Mon, 5 Oct 2015 10:48:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E81B5C2F; Mon, 5 Oct 2015 10:48:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AmEXa073515; Mon, 5 Oct 2015 10:48:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AmEMp073514; Mon, 5 Oct 2015 10:48:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051048.t95AmEMp073514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288783 - stable/10/usr.bin/ctlstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:48:15 -0000 Author: mav Date: Mon Oct 5 10:48:14 2015 New Revision: 288783 URL: https://svnweb.freebsd.org/changeset/base/288783 Log: MFC r288043: Output times as normal microseconds, rather then in bintime format. Modified: stable/10/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 10:47:18 2015 (r288782) +++ stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 10:48:14 2015 (r288783) @@ -326,8 +326,8 @@ compute_stats(struct ctl_lun_io_stats *c */ #define PRINT_BINTIME(prefix, bt) \ - printf("%s %jd s %ju frac\n", prefix, (intmax_t)(bt).sec, \ - (uintmax_t)(bt).frac) + printf("%s %jd.%06ju\n", prefix, (intmax_t)(bt).sec, \ + (uintmax_t)(((bt).frac >> 32) * 1000000 >> 32)) static const char *iotypes[] = {"NO IO", "READ", "WRITE"}; static void @@ -360,9 +360,8 @@ ctlstat_dump(struct ctlstat_context *ctx } #define JSON_BINTIME(prefix, bt) \ - printf("\"%s\":{\"sec\":%jd,\"frac\":%ju},", \ - prefix, (intmax_t)(bt).sec, (uintmax_t)(bt).frac) - + printf("\"%s\":%jd.%06ju,", prefix, (intmax_t)(bt).sec, \ + (uintmax_t)(((bt).frac >> 32) * 1000000 >> 32)) static void ctlstat_json(struct ctlstat_context *ctx) { int iotype, lun, port; From owner-svn-src-all@freebsd.org Mon Oct 5 10:49:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D00F9B2134; Mon, 5 Oct 2015 10:49:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DB25D8F; Mon, 5 Oct 2015 10:49:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95An2EI073593; Mon, 5 Oct 2015 10:49:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95An2bv073591; Mon, 5 Oct 2015 10:49:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051049.t95An2bv073591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288784 - stable/10/usr.bin/ctlstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:49:02 -0000 Author: mav Date: Mon Oct 5 10:49:01 2015 New Revision: 288784 URL: https://svnweb.freebsd.org/changeset/base/288784 Log: MFC r288059: Bunch of improvements to ctlstat. Add -p option to allow filtering by ports. Make -l and -p options work in all modes as filters. Improve output formatting to better fit columns. Modified: stable/10/usr.bin/ctlstat/ctlstat.8 stable/10/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.8 Mon Oct 5 10:48:14 2015 (r288783) +++ stable/10/usr.bin/ctlstat/ctlstat.8 Mon Oct 5 10:49:01 2015 (r288784) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $ .\" $FreeBSD$ .\" -.Dd May 22, 2015 +.Dd September 21, 2015 .Dt CTLSTAT 8 .Os .Sh NAME @@ -50,6 +50,7 @@ .Op Fl j .Op Fl l Ar lun .Op Fl n Ar numdevs +.Op Fl p Ar port .Op Fl w Ar wait .Sh DESCRIPTION The @@ -64,7 +65,7 @@ The options are as follows: .Bl -tag -width 10n .It Fl t Total mode. -This displays separate columns with the total CTL read and write output, +This displays separate columns with the total read and write output, and a combined total column that also includes non I/O operations. .It Fl c Ar count Display statistics this many times. @@ -74,23 +75,20 @@ Disable CPU statistics display. Display DMA operation time (latency) instead of overall I/O time (latency). .It Fl D Text dump mode. -Dump all available statistics every 30 seconds in a text format suitable -for parsing. +Dump statistics every 30 seconds in a text format suitable for parsing. No statistics are computed in this mode, only raw numbers are displayed. .It Fl h Suppress display of the header. .It Fl j JSON dump mode. -Dump all available statistics every 30 seconds in JavaScript Object -Notation (JSON) format. +Dump statistics every 30 seconds in JavaScript Object Notation (JSON) format. No statistics are computed in this mode, only raw numbers are displayed. .It Fl l Ar lun Request statistics for the specified LUN. -This option is incompatible with total -.Fl ( t ) -mode. .It Fl n Ar numdevs Display statistics for this many devices. +.It Fl p Ar port +Request statistics for the specified port. .It Fl w Ar wait Wait this many seconds in between displays. If this option is not specified, Modified: stable/10/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 10:48:14 2015 (r288783) +++ stable/10/usr.bin/ctlstat/ctlstat.c Mon Oct 5 10:49:01 2015 (r288784) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); */ #define CTL_STAT_LUN_BITS 1024L -static const char *ctlstat_opts = "Cc:Ddhjl:n:tw:"; +static const char *ctlstat_opts = "Cc:Ddhjl:n:p:tw:"; static const char *ctlstat_usage = "Usage: ctlstat [-CDdjht] [-l lunnum]" "[-c count] [-n numdevs] [-w wait]\n"; @@ -102,12 +102,16 @@ typedef enum { #define CTLSTAT_FLAG_TOTALS (1 << 3) #define CTLSTAT_FLAG_DMA_TIME (1 << 4) #define CTLSTAT_FLAG_LUN_TIME_VALID (1 << 5) +#define CTLSTAT_FLAG_LUN_MASK (1 << 6) +#define CTLSTAT_FLAG_PORT_MASK (1 << 7) #define F_CPU(ctx) ((ctx)->flags & CTLSTAT_FLAG_CPU) #define F_HDR(ctx) ((ctx)->flags & CTLSTAT_FLAG_HEADER) #define F_FIRST(ctx) ((ctx)->flags & CTLSTAT_FLAG_FIRST_RUN) #define F_TOTALS(ctx) ((ctx)->flags & CTLSTAT_FLAG_TOTALS) #define F_DMA(ctx) ((ctx)->flags & CTLSTAT_FLAG_DMA_TIME) #define F_LUNVAL(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUN_TIME_VALID) +#define F_LUNMASK(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUN_MASK) +#define F_PORTMASK(ctx) ((ctx)->flags & CTLSTAT_FLAG_PORT_MASK) struct ctlstat_context { ctlstat_mode_types mode; @@ -120,6 +124,7 @@ struct ctlstat_context { uint64_t cur_total_jiffies, prev_total_jiffies; uint64_t cur_idle, prev_idle; bitstr_t bit_decl(lun_mask, CTL_STAT_LUN_BITS); + bitstr_t bit_decl(port_mask, CTL_MAX_PORTS); int num_luns; int numdevs; int header_interval; @@ -133,7 +138,8 @@ static void usage(int error); static int getstats(int fd, int *num_luns, struct ctl_lun_io_stats **xlun_stats, struct timespec *cur_time, int *lun_time_valid); static int getcpu(struct ctl_cpu_stats *cpu_stats); -static void compute_stats(struct ctl_lun_io_stats *cur_stats, +static void compute_stats(struct ctlstat_context *ctx, + struct ctl_lun_io_stats *cur_stats, struct ctl_lun_io_stats *prev_stats, long double etime, long double *mbsec, long double *kb_per_transfer, @@ -234,7 +240,7 @@ getcpu(struct ctl_cpu_stats *cpu_stats) } static void -compute_stats(struct ctl_lun_io_stats *cur_stats, +compute_stats(struct ctlstat_context *ctx, struct ctl_lun_io_stats *cur_stats, struct ctl_lun_io_stats *prev_stats, long double etime, long double *mbsec, long double *kb_per_transfer, long double *transfers_per_second, long double *ms_per_transfer, @@ -251,6 +257,9 @@ compute_stats(struct ctl_lun_io_stats *c bzero(&total_time_ts, sizeof(total_time_ts)); bzero(&total_dma_ts, sizeof(total_dma_ts)); for (port = 0; port < CTL_MAX_PORTS; port++) { + if (F_PORTMASK(ctx) && + bit_test(ctx->port_mask, port) == 0) + continue; for (i = 0; i < CTL_STATS_NUM_TYPES; i++) { total_bytes += cur_stats->ports[port].bytes[i]; total_operations += @@ -336,8 +345,13 @@ ctlstat_dump(struct ctlstat_context *ctx struct ctl_lun_io_stats *stats = ctx->cur_lun_stats; for (lun = 0; lun < ctx->num_luns;lun++) { + if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, lun) == 0) + continue; printf("lun %d\n", lun); for (port = 0; port < CTL_MAX_PORTS; port++) { + if (F_PORTMASK(ctx) && + bit_test(ctx->port_mask, port) == 0) + continue; printf(" port %d\n", stats[lun].ports[port].targ_port); for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; @@ -369,8 +383,13 @@ ctlstat_json(struct ctlstat_context *ctx printf("{\"luns\":["); for (lun = 0; lun < ctx->num_luns; lun++) { + if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, lun) == 0) + continue; printf("{\"ports\":["); for (port = 0; port < CTL_MAX_PORTS;port++) { + if (F_PORTMASK(ctx) && + bit_test(ctx->port_mask, port) == 0) + continue; printf("{\"num\":%d,\"io\":[", stats[lun].ports[port].targ_port); for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; @@ -441,17 +460,16 @@ ctlstat_standard(struct ctlstat_context hdr_devs = 0; + if (F_CPU(ctx)) + fprintf(stdout, " CPU"); if (F_TOTALS(ctx)) { - fprintf(stdout, "%s System Read %s" - "System Write %sSystem Total%s\n", - (F_LUNVAL(ctx) != 0) ? " " : "", - (F_LUNVAL(ctx) != 0) ? " " : "", - (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx)) ? " CPU" : ""); + fprintf(stdout, "%s Read %s" + " Write %s Total\n", + (F_LUNVAL(ctx) != 0) ? " " : "", + (F_LUNVAL(ctx) != 0) ? " " : "", + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs = 3; } else { - if (F_CPU(ctx)) - fprintf(stdout, " CPU "); for (i = 0; i < min(CTL_STAT_LUN_BITS, ctx->num_luns); i++) { int lun; @@ -464,7 +482,8 @@ ctlstat_standard(struct ctlstat_context lun = (int)ctx->cur_lun_stats[i ].lun_number; - if (bit_test(ctx->lun_mask, lun) == 0) + if (F_LUNMASK(ctx) && + bit_test(ctx->lun_mask, lun) == 0) continue; fprintf(stdout, "%15.6s%d %s", "lun", lun, @@ -473,17 +492,19 @@ ctlstat_standard(struct ctlstat_context } fprintf(stdout, "\n"); } + if (F_CPU(ctx)) + fprintf(stdout, " "); for (i = 0; i < hdr_devs; i++) - fprintf(stdout, "%s %sKB/t %s MB/s ", - ((F_CPU(ctx) != 0) && (i == 0) && - (F_TOTALS(ctx) == 0)) ? " " : "", - (F_LUNVAL(ctx) != 0) ? " ms " : "", + fprintf(stdout, "%s KB/t %s MB/s", + (F_LUNVAL(ctx) != 0) ? " ms" : "", (F_DMA(ctx) == 0) ? "tps" : "dps"); fprintf(stdout, "\n"); ctx->header_interval = 20; } } + if (F_CPU(ctx)) + fprintf(stdout, "%3.0Lf%%", cpu_percentage); if (F_TOTALS(ctx) != 0) { long double mbsec[3]; long double kb_per_transfer[3]; @@ -515,7 +536,13 @@ ctlstat_standard(struct ctlstat_context &ctx->cur_lun_stats[i].ports[p].dma_time[j]) for (i = 0; i < ctx->num_luns; i++) { + if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, + (int)ctx->cur_lun_stats[i].lun_number) == 0) + continue; for (port = 0; port < CTL_MAX_PORTS; port++) { + if (F_PORTMASK(ctx) && + bit_test(ctx->port_mask, port) == 0) + continue; for (j = 0; j < CTL_STATS_NUM_TYPES; j++) { ADD_STATS_BYTES(2, port, i, j); ADD_STATS_OPERATIONS(2, port, i, j); @@ -540,29 +567,24 @@ ctlstat_standard(struct ctlstat_context } for (i = 0; i < 3; i++) { - compute_stats(&ctx->cur_total_stats[i], + compute_stats(ctx, &ctx->cur_total_stats[i], F_FIRST(ctx) ? NULL : &ctx->prev_total_stats[i], etime, &mbsec[i], &kb_per_transfer[i], &transfers_per_sec[i], &ms_per_transfer[i], &ms_per_dma[i], &dmas_per_sec[i]); if (F_DMA(ctx) != 0) - fprintf(stdout, " %2.2Lf", + fprintf(stdout, " %5.1Lf", ms_per_dma[i]); else if (F_LUNVAL(ctx) != 0) - fprintf(stdout, " %2.2Lf", + fprintf(stdout, " %5.1Lf", ms_per_transfer[i]); - fprintf(stdout, " %5.2Lf %3.0Lf %5.2Lf ", + fprintf(stdout, " %4.0Lf %5.0Lf %4.0Lf", kb_per_transfer[i], (F_DMA(ctx) == 0) ? transfers_per_sec[i] : dmas_per_sec[i], mbsec[i]); } - if (F_CPU(ctx)) - fprintf(stdout, " %5.1Lf%%", cpu_percentage); } else { - if (F_CPU(ctx)) - fprintf(stdout, "%5.1Lf%% ", cpu_percentage); - for (i = 0; i < min(CTL_STAT_LUN_BITS, ctx->num_luns); i++) { long double mbsec, kb_per_transfer; long double transfers_per_sec; @@ -570,21 +592,21 @@ ctlstat_standard(struct ctlstat_context long double ms_per_dma; long double dmas_per_sec; - if (bit_test(ctx->lun_mask, + if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, (int)ctx->cur_lun_stats[i].lun_number) == 0) continue; - compute_stats(&ctx->cur_lun_stats[i], F_FIRST(ctx) ? - NULL : &ctx->prev_lun_stats[i], etime, - &mbsec, &kb_per_transfer, - &transfers_per_sec, &ms_per_transfer, - &ms_per_dma, &dmas_per_sec); + compute_stats(ctx, &ctx->cur_lun_stats[i], + F_FIRST(ctx) ? NULL : &ctx->prev_lun_stats[i], + etime, &mbsec, &kb_per_transfer, + &transfers_per_sec, &ms_per_transfer, + &ms_per_dma, &dmas_per_sec); if (F_DMA(ctx)) - fprintf(stdout, " %2.2Lf", + fprintf(stdout, " %5.1Lf", ms_per_dma); else if (F_LUNVAL(ctx) != 0) - fprintf(stdout, " %2.2Lf", + fprintf(stdout, " %5.1Lf", ms_per_transfer); - fprintf(stdout, " %5.2Lf %3.0Lf %5.2Lf ", + fprintf(stdout, " %4.0Lf %5.0Lf %4.0Lf", kb_per_transfer, (F_DMA(ctx) == 0) ? transfers_per_sec : dmas_per_sec, mbsec); } @@ -596,7 +618,6 @@ main(int argc, char **argv) { int c; int count, waittime; - int set_lun; int fd, retval; struct ctlstat_context ctx; @@ -640,20 +661,30 @@ main(int argc, char **argv) if (cur_lun > CTL_STAT_LUN_BITS) errx(1, "Invalid LUN number %d", cur_lun); - bit_ffs(ctx.lun_mask, CTL_STAT_LUN_BITS, &set_lun); - if (set_lun == -1) + if (!F_LUNMASK(&ctx)) ctx.numdevs = 1; else ctx.numdevs++; bit_set(ctx.lun_mask, cur_lun); + ctx.flags |= CTLSTAT_FLAG_LUN_MASK; break; } case 'n': ctx.numdevs = atoi(optarg); break; + case 'p': { + int cur_port; + + cur_port = atoi(optarg); + if (cur_port > CTL_MAX_PORTS) + errx(1, "Invalid LUN number %d", cur_port); + + bit_set(ctx.port_mask, cur_port); + ctx.flags |= CTLSTAT_FLAG_PORT_MASK; + break; + } case 't': ctx.flags |= CTLSTAT_FLAG_TOTALS; - ctx.numdevs = 3; break; case 'w': waittime = atoi(optarg); @@ -666,13 +697,7 @@ main(int argc, char **argv) } } - bit_ffs(ctx.lun_mask, CTL_STAT_LUN_BITS, &set_lun); - - if ((F_TOTALS(&ctx)) - && (set_lun != -1)) { - errx(1, "Total Mode (-t) is incompatible with individual " - "LUN mode (-l)"); - } else if (set_lun == -1) { + if (!F_TOTALS(&ctx) && !F_LUNMASK(&ctx)) { /* * Note that this just selects the first N LUNs to display, * but at this point we have no knoweledge of which LUN @@ -681,6 +706,7 @@ main(int argc, char **argv) */ bit_nset(ctx.lun_mask, 0, min(ctx.numdevs - 1, CTL_STAT_LUN_BITS - 1)); + ctx.flags |= CTLSTAT_FLAG_LUN_MASK; } if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1) From owner-svn-src-all@freebsd.org Mon Oct 5 10:49:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE39C9B21B7; Mon, 5 Oct 2015 10:49:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFDCDED0; Mon, 5 Oct 2015 10:49:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AnmDv073675; Mon, 5 Oct 2015 10:49:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AnmB1073674; Mon, 5 Oct 2015 10:49:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051049.t95AnmB1073674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288785 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:49:48 -0000 Author: mav Date: Mon Oct 5 10:49:47 2015 New Revision: 288785 URL: https://svnweb.freebsd.org/changeset/base/288785 Log: MFC r288061: Make cltd ignore HA ports. Modified: stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 10:49:01 2015 (r288784) +++ stable/10/usr.sbin/ctld/kernel.c Mon Oct 5 10:49:47 2015 (r288785) @@ -119,6 +119,7 @@ struct cctl_lun { struct cctl_port { uint32_t port_id; + char *port_frontend; char *port_name; int pp; int vp; @@ -331,7 +332,10 @@ cctl_end_pelement(void *user_data, const devlist->cur_sb[devlist->level] = NULL; devlist->level--; - if (strcmp(name, "port_name") == 0) { + if (strcmp(name, "frontend_type") == 0) { + cur_port->port_frontend = str; + str = NULL; + } else if (strcmp(name, "port_name") == 0) { cur_port->port_name = str; str = NULL; } else if (strcmp(name, "physical_port") == 0) { @@ -506,6 +510,8 @@ retry_port: name = NULL; STAILQ_FOREACH(port, &devlist.port_list, links) { + if (strcmp(port->port_frontend, "ha") == 0) + continue; if (name) free(name); if (port->pp == 0 && port->vp == 0) From owner-svn-src-all@freebsd.org Mon Oct 5 10:50:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3325E9B22C9; Mon, 5 Oct 2015 10:50:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2548E108E; Mon, 5 Oct 2015 10:50:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AoaUh073788; Mon, 5 Oct 2015 10:50:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AoaMx073787; Mon, 5 Oct 2015 10:50:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051050.t95AoaMx073787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288786 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:50:36 -0000 Author: mav Date: Mon Oct 5 10:50:35 2015 New Revision: 288786 URL: https://svnweb.freebsd.org/changeset/base/288786 Log: MFC r288067: Log iSCSI session reinstatements. False session reinstatements can be result of misconfiguration, when several initiators use the same initiator name and ISID. Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:49:47 2015 (r288785) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:50:35 2015 (r288786) @@ -1565,6 +1565,16 @@ restart: if (cs2 != cs && cs2->cs_tasks_aborted == false && cs->cs_target == cs2->cs_target && strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) { + if (strcmp(cs->cs_initiator_addr, + cs2->cs_initiator_addr) != 0) { + CFISCSI_SESSION_WARN(cs2, + "session reinstatement from " + "different address %s", + cs->cs_initiator_addr); + } else { + CFISCSI_SESSION_DEBUG(cs2, + "session reinstatement"); + } cfiscsi_session_terminate(cs2); mtx_unlock(&softc->lock); pause("cfiscsi_reinstate", 1); From owner-svn-src-all@freebsd.org Mon Oct 5 10:51:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2058A9B2479; Mon, 5 Oct 2015 10:51:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07997127E; Mon, 5 Oct 2015 10:51:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95ApOT2076300; Mon, 5 Oct 2015 10:51:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95ApO26076299; Mon, 5 Oct 2015 10:51:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051051.t95ApO26076299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288787 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:51:25 -0000 Author: mav Date: Mon Oct 5 10:51:24 2015 New Revision: 288787 URL: https://svnweb.freebsd.org/changeset/base/288787 Log: MFC r288104: Remove duplicate and incomplete code handling LUN modify. Instead reuse code from LUN creation. This allows most of LUN media options to be changed live with modify request without full restart. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:50:35 2015 (r288786) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:51:24 2015 (r288787) @@ -266,10 +266,6 @@ static int ctl_be_block_create(struct ct struct ctl_lun_req *req); static int ctl_be_block_rm(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); -static int ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, - struct ctl_lun_req *req); -static int ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, - struct ctl_lun_req *req); static int ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); static void ctl_be_block_lun_shutdown(void *be_lun); @@ -2607,85 +2603,6 @@ bailout_error: } static int -ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, - struct ctl_lun_req *req) -{ - struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; - struct vattr vattr; - int error; - struct ctl_lun_create_params *params = &be_lun->params; - - if (params->lun_size_bytes != 0) { - be_lun->size_bytes = params->lun_size_bytes; - } else { - vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); - error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); - VOP_UNLOCK(be_lun->vn, 0); - if (error != 0) { - snprintf(req->error_str, sizeof(req->error_str), - "error calling VOP_GETATTR() for file %s", - be_lun->dev_path); - return (error); - } - be_lun->size_bytes = vattr.va_size; - } - be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; - cbe_lun->maxlba = (be_lun->size_blocks == 0) ? - 0 : (be_lun->size_blocks - 1); - return (0); -} - -static int -ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, - struct ctl_lun_req *req) -{ - struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; - struct ctl_lun_create_params *params = &be_lun->params; - struct cdevsw *csw; - struct cdev *dev; - uint64_t size_bytes; - int error, ref; - - csw = devvn_refthread(be_lun->vn, &dev, &ref); - if (csw == NULL) - return (ENXIO); - if (csw->d_ioctl == NULL) { - dev_relthread(dev, ref); - snprintf(req->error_str, sizeof(req->error_str), - "no d_ioctl for device %s!", be_lun->dev_path); - return (ENODEV); - } - - error = csw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&size_bytes, FREAD, - curthread); - dev_relthread(dev, ref); - if (error) { - snprintf(req->error_str, sizeof(req->error_str), - "error %d returned for DIOCGMEDIASIZE ioctl " - "on %s!", error, be_lun->dev_path); - return (error); - } - - if (params->lun_size_bytes != 0) { - if (params->lun_size_bytes > size_bytes) { - snprintf(req->error_str, sizeof(req->error_str), - "requested LUN size %ju > backing device " - "size %ju", - (uintmax_t)params->lun_size_bytes, - (uintmax_t)size_bytes); - return (EINVAL); - } - be_lun->size_bytes = params->lun_size_bytes; - } else { - be_lun->size_bytes = size_bytes; - } - be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; - cbe_lun->maxlba = (be_lun->size_blocks == 0) ? - 0 : (be_lun->size_blocks - 1); - return (0); -} - -static int ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) { struct ctl_lun_modify_params *params; @@ -2740,9 +2657,9 @@ ctl_be_block_modify(struct ctl_be_block_ if (be_lun->vn == NULL) error = ctl_be_block_open(softc, be_lun, req); else if (vn_isdisk(be_lun->vn, &error)) - error = ctl_be_block_modify_dev(be_lun, req); + error = ctl_be_block_open_dev(be_lun, req); else if (be_lun->vn->v_type == VREG) - error = ctl_be_block_modify_file(be_lun, req); + error = ctl_be_block_open_file(be_lun, req); else error = EINVAL; if ((cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) && From owner-svn-src-all@freebsd.org Mon Oct 5 10:52:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 465F79B25E8; Mon, 5 Oct 2015 10:52:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380591423; Mon, 5 Oct 2015 10:52:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AqOlk077062; Mon, 5 Oct 2015 10:52:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AqNeL077058; Mon, 5 Oct 2015 10:52:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051052.t95AqNeL077058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288788 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:52:24 -0000 Author: mav Date: Mon Oct 5 10:52:22 2015 New Revision: 288788 URL: https://svnweb.freebsd.org/changeset/base/288788 Log: MFC r288110: Add support for Control extension mode page. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:51:24 2015 (r288787) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:52:22 2015 (r288788) @@ -261,6 +261,26 @@ const static struct scsi_control_page co /*extended_selftest_completion_time*/{0, 0} }; +#define CTL_CEM_LEN (sizeof(struct scsi_control_ext_page) - 4) + +const static struct scsi_control_ext_page control_ext_page_default = { + /*page_code*/SMS_CONTROL_MODE_PAGE | SMPH_SPF, + /*subpage_code*/0x01, + /*page_length*/{CTL_CEM_LEN >> 8, CTL_CEM_LEN}, + /*flags*/0, + /*prio*/0, + /*max_sense*/0 +}; + +const static struct scsi_control_ext_page control_ext_page_changeable = { + /*page_code*/SMS_CONTROL_MODE_PAGE | SMPH_SPF, + /*subpage_code*/0x01, + /*page_length*/{CTL_CEM_LEN >> 8, CTL_CEM_LEN}, + /*flags*/0, + /*prio*/0, + /*max_sense*/0 +}; + const static struct scsi_info_exceptions_page ie_page_default = { /*page_code*/SMS_INFO_EXCEPTIONS_PAGE, /*page_length*/sizeof(struct scsi_info_exceptions_page) - 2, @@ -3958,35 +3978,65 @@ ctl_init_page_index(struct ctl_lun *lun) break; } case SMS_CONTROL_MODE_PAGE: { - struct scsi_control_page *control_page; - - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("invalid subpage value %d", - page_index->subpage); + switch (page_index->subpage) { + case SMS_SUBPAGE_PAGE_0: { + struct scsi_control_page *control_page; - memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT], - &control_page_default, - sizeof(control_page_default)); - memcpy(&lun->mode_pages.control_page[ - CTL_PAGE_CHANGEABLE], &control_page_changeable, - sizeof(control_page_changeable)); - memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED], - &control_page_default, - sizeof(control_page_default)); - control_page = &lun->mode_pages.control_page[ - CTL_PAGE_SAVED]; - value = ctl_get_opt(&lun->be_lun->options, "reordering"); - if (value != NULL && strcmp(value, "unrestricted") == 0) { - control_page->queue_flags &= ~SCP_QUEUE_ALG_MASK; - control_page->queue_flags |= SCP_QUEUE_ALG_UNRESTRICTED; - } - memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT], - &lun->mode_pages.control_page[CTL_PAGE_SAVED], - sizeof(control_page_default)); - page_index->page_data = - (uint8_t *)lun->mode_pages.control_page; + memcpy(&lun->mode_pages.control_page[ + CTL_PAGE_DEFAULT], + &control_page_default, + sizeof(control_page_default)); + memcpy(&lun->mode_pages.control_page[ + CTL_PAGE_CHANGEABLE], + &control_page_changeable, + sizeof(control_page_changeable)); + memcpy(&lun->mode_pages.control_page[ + CTL_PAGE_SAVED], + &control_page_default, + sizeof(control_page_default)); + control_page = &lun->mode_pages.control_page[ + CTL_PAGE_SAVED]; + value = ctl_get_opt(&lun->be_lun->options, + "reordering"); + if (value != NULL && + strcmp(value, "unrestricted") == 0) { + control_page->queue_flags &= + ~SCP_QUEUE_ALG_MASK; + control_page->queue_flags |= + SCP_QUEUE_ALG_UNRESTRICTED; + } + memcpy(&lun->mode_pages.control_page[ + CTL_PAGE_CURRENT], + &lun->mode_pages.control_page[ + CTL_PAGE_SAVED], + sizeof(control_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.control_page; + break; + } + case 0x01: + memcpy(&lun->mode_pages.control_ext_page[ + CTL_PAGE_DEFAULT], + &control_ext_page_default, + sizeof(control_ext_page_default)); + memcpy(&lun->mode_pages.control_ext_page[ + CTL_PAGE_CHANGEABLE], + &control_ext_page_changeable, + sizeof(control_ext_page_changeable)); + memcpy(&lun->mode_pages.control_ext_page[ + CTL_PAGE_SAVED], + &control_ext_page_default, + sizeof(control_ext_page_default)); + memcpy(&lun->mode_pages.control_ext_page[ + CTL_PAGE_CURRENT], + &lun->mode_pages.control_ext_page[ + CTL_PAGE_SAVED], + sizeof(control_ext_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.control_ext_page; + break; + } break; - } case SMS_INFO_EXCEPTIONS_PAGE: { switch (page_index->subpage) { Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:51:24 2015 (r288787) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 10:52:22 2015 (r288788) @@ -283,6 +283,9 @@ static const struct ctl_page_index page_ CTL_PAGE_FLAG_DISK_ONLY, NULL, ctl_caching_sp_handler}, {SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL, CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler}, + {SMS_CONTROL_MODE_PAGE | SMPH_SPF, 0x01, + sizeof(struct scsi_control_ext_page), NULL, + CTL_PAGE_FLAG_NONE, NULL, NULL}, {SMS_INFO_EXCEPTIONS_PAGE, 0, sizeof(struct scsi_info_exceptions_page), NULL, CTL_PAGE_FLAG_NONE, NULL, NULL}, {SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, 0x02, @@ -302,6 +305,7 @@ struct ctl_mode_pages { struct scsi_rigid_disk_page rigid_disk_page[4]; struct scsi_caching_page caching_page[4]; struct scsi_control_page control_page[4]; + struct scsi_control_ext_page control_ext_page[4]; struct scsi_info_exceptions_page ie_page[4]; struct ctl_logical_block_provisioning_page lbp_page[4]; struct copan_debugconf_subpage debugconf_subpage[4]; Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:51:24 2015 (r288787) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:52:22 2015 (r288788) @@ -700,6 +700,19 @@ struct scsi_control_page { u_int8_t extended_selftest_completion_time[2]; }; +struct scsi_control_ext_page { + uint8_t page_code; + uint8_t subpage_code; + uint8_t page_length[2]; + uint8_t flags; +#define SCEP_TCMOS 0x04 /* Timestamp Changeable by */ +#define SCEP_SCSIP 0x02 /* SCSI Precedence (clock) */ +#define SCEP_IALUAE 0x01 /* Implicit ALUA Enabled */ + uint8_t prio; + uint8_t max_sense; + uint8_t reserve[25]; +}; + struct scsi_cache_page { u_int8_t page_code; #define SCHP_PAGE_SAVABLE 0x80 /* Page is savable */ From owner-svn-src-all@freebsd.org Mon Oct 5 10:53:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E18BD9B2752; Mon, 5 Oct 2015 10:53:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7C061493; Mon, 5 Oct 2015 10:53:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95ArFHU077156; Mon, 5 Oct 2015 10:53:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95ArEFl077151; Mon, 5 Oct 2015 10:53:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051053.t95ArEFl077151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288789 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:53:16 -0000 Author: mav Date: Mon Oct 5 10:53:13 2015 New Revision: 288789 URL: https://svnweb.freebsd.org/changeset/base/288789 Log: MFC r288146: Make HA peers announce their parameters on connect. HA protocol requires strict version, parameters and configuration match. Differences there may cause full set of problems up to kernel panic. To avoid that, validate peer parameters on connect, and abort connection immediately if some mismatch detected. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_ha.c stable/10/sys/cam/ctl/ctl_ha.h stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:52:22 2015 (r288788) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:53:13 2015 (r288789) @@ -717,8 +717,20 @@ ctl_isc_ha_link_up(struct ctl_softc *sof { struct ctl_port *port; struct ctl_lun *lun; + union ctl_ha_msg msg; int i; + /* Announce this node parameters to peer for validation. */ + msg.login.msg_type = CTL_MSG_LOGIN; + msg.login.version = CTL_HA_VERSION; + msg.login.ha_mode = softc->ha_mode; + msg.login.ha_id = softc->ha_id; + msg.login.max_luns = CTL_MAX_LUNS; + msg.login.max_ports = CTL_MAX_PORTS; + msg.login.max_init_per_port = CTL_MAX_INIT_PER_PORT; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg.login, sizeof(msg.login), + M_WAITOK); + STAILQ_FOREACH(port, &softc->port_list, links) { ctl_isc_announce_port(port); for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { @@ -1001,6 +1013,36 @@ ctl_isc_iid_sync(struct ctl_softc *softc port->wwpn_iid[iid].name = NULL; } +static void +ctl_isc_login(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + + if (msg->login.version != CTL_HA_VERSION) { + printf("CTL HA peers have different versions %d != %d\n", + msg->login.version, CTL_HA_VERSION); + ctl_ha_msg_abort(CTL_HA_CHAN_CTL); + return; + } + if (msg->login.ha_mode != softc->ha_mode) { + printf("CTL HA peers have different ha_mode %d != %d\n", + msg->login.ha_mode, softc->ha_mode); + ctl_ha_msg_abort(CTL_HA_CHAN_CTL); + return; + } + if (msg->login.ha_id == softc->ha_id) { + printf("CTL HA peers have same ha_id %d\n", msg->login.ha_id); + ctl_ha_msg_abort(CTL_HA_CHAN_CTL); + return; + } + if (msg->login.max_luns != CTL_MAX_LUNS || + msg->login.max_ports != CTL_MAX_PORTS || + msg->login.max_init_per_port != CTL_MAX_INIT_PER_PORT) { + printf("CTL HA peers have different limits\n"); + ctl_ha_msg_abort(CTL_HA_CHAN_CTL); + return; + } +} + /* * ISC (Inter Shelf Communication) event handler. Events from the HA * subsystem come in here. @@ -1277,9 +1319,13 @@ ctl_isc_event_handler(ctl_ha_channel cha case CTL_MSG_IID_SYNC: ctl_isc_iid_sync(softc, msg, param); break; + case CTL_MSG_LOGIN: + ctl_isc_login(softc, msg, param); + break; default: printf("Received HA message of unknown type %d\n", msg->hdr.msg_type); + ctl_ha_msg_abort(CTL_HA_CHAN_CTL); break; } if (msg != &msgbuf) Modified: stable/10/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:52:22 2015 (r288788) +++ stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:53:13 2015 (r288789) @@ -283,8 +283,9 @@ ctl_ha_rx_thread(void *arg) else next = sizeof(wire_hdr); SOCKBUF_LOCK(&so->so_rcv); - while (sbavail(&so->so_rcv) < next) { - if (softc->ha_connected == 0 || so->so_error || + while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) { + if (softc->ha_connected == 0 || softc->ha_disconnect || + so->so_error || (so->so_rcv.sb_state & SBS_CANTRCVMORE)) { goto errout; } @@ -541,6 +542,18 @@ ctl_ha_listen(struct ha_softc *softc) printf("%s: REUSEADDR setting failed %d\n", __func__, error); } + bzero(&opt, sizeof(struct sockopt)); + opt.sopt_dir = SOPT_SET; + opt.sopt_level = SOL_SOCKET; + opt.sopt_name = SO_REUSEPORT; + opt.sopt_val = &val; + opt.sopt_valsize = sizeof(val); + val = 1; + error = sosetopt(softc->ha_lso, &opt); + if (error) { + printf("%s: REUSEPORT setting failed %d\n", + __func__, error); + } SOCKBUF_LOCK(&softc->ha_lso->so_rcv); soupcall_set(softc->ha_lso, SO_RCV, ctl_ha_lupcall, softc); SOCKBUF_UNLOCK(&softc->ha_lso->so_rcv); @@ -572,7 +585,8 @@ ctl_ha_conn_thread(void *arg) while (1) { if (softc->ha_disconnect || softc->ha_shutdown) { ctl_ha_close(softc); - ctl_ha_lclose(softc); + if (softc->ha_disconnect == 2 || softc->ha_shutdown) + ctl_ha_lclose(softc); softc->ha_disconnect = 0; if (softc->ha_shutdown) break; @@ -666,7 +680,7 @@ ctl_ha_peer_sysctl(SYSCTL_HANDLER_ARGS) sa->sin_addr.s_addr = htonl((b1 << 24) + (b2 << 16) + (b3 << 8) + b4); } - softc->ha_disconnect = 1; + softc->ha_disconnect = 2; softc->ha_wakeup = 1; mtx_unlock(&softc->ha_lock); wakeup(&softc->ha_wakeup); @@ -811,6 +825,19 @@ ctl_ha_msg_send(ctl_ha_channel channel, return (ctl_ha_msg_send2(channel, addr, len, NULL, 0, wait)); } +ctl_ha_status +ctl_ha_msg_abort(ctl_ha_channel channel) +{ + struct ha_softc *softc = &ha_softc; + + mtx_lock(&softc->ha_lock); + softc->ha_disconnect = 1; + softc->ha_wakeup = 1; + mtx_unlock(&softc->ha_lock); + wakeup(&softc->ha_wakeup); + return (CTL_HA_STATUS_SUCCESS); +} + /* * Allocate a data transfer request structure. */ Modified: stable/10/sys/cam/ctl/ctl_ha.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.h Mon Oct 5 10:52:22 2015 (r288788) +++ stable/10/sys/cam/ctl/ctl_ha.h Mon Oct 5 10:53:13 2015 (r288789) @@ -125,6 +125,7 @@ ctl_ha_status ctl_ha_msg_send(ctl_ha_cha size_t len, int wait); ctl_ha_status ctl_ha_msg_send2(ctl_ha_channel channel, const void *addr, size_t len, const void *addr2, size_t len2, int wait); +ctl_ha_status ctl_ha_msg_abort(ctl_ha_channel channel); ctl_ha_status ctl_ha_msg_deregister(ctl_ha_channel channel); struct ctl_ha_dt_req * ctl_dt_req_alloc(void); Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:52:22 2015 (r288788) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:53:13 2015 (r288789) @@ -197,6 +197,7 @@ typedef enum { CTL_MSG_PORT_SYNC, /* Information about port. */ CTL_MSG_LUN_SYNC, /* Information about LUN. */ CTL_MSG_IID_SYNC, /* Information about initiator. */ + CTL_MSG_LOGIN, /* Information about HA peer. */ CTL_MSG_FAILOVER /* Fake, never sent though the wire */ } ctl_msg_type; @@ -358,6 +359,25 @@ struct ctl_taskio { uint8_t task_resp[3];/* Response information */ }; + +/* + * HA link messages. + */ +#define CTL_HA_VERSION 1 + +/* + * Used for CTL_MSG_LOGIN. + */ +struct ctl_ha_msg_login { + ctl_msg_type msg_type; + int version; + int ha_mode; + int ha_id; + int max_luns; + int max_ports; + int max_init_per_port; +}; + typedef enum { CTL_PR_REG_KEY, CTL_PR_UNREG_KEY, @@ -523,16 +543,14 @@ union ctl_ha_msg { struct ctl_ha_msg_port port; struct ctl_ha_msg_lun lun; struct ctl_ha_msg_iid iid; + struct ctl_ha_msg_login login; }; - struct ctl_prio { struct ctl_io_hdr io_hdr; struct ctl_ha_msg_pr pr_msg; }; - - union ctl_io { struct ctl_io_hdr io_hdr; /* common to all I/O types */ struct ctl_scsiio scsiio; /* Normal SCSI commands */ From owner-svn-src-all@freebsd.org Mon Oct 5 10:54:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028639B282A; Mon, 5 Oct 2015 10:54:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E83F01513; Mon, 5 Oct 2015 10:54:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95As7Nb077247; Mon, 5 Oct 2015 10:54:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95As7Wg077244; Mon, 5 Oct 2015 10:54:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051054.t95As7Wg077244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288790 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:54:08 -0000 Author: mav Date: Mon Oct 5 10:54:06 2015 New Revision: 288790 URL: https://svnweb.freebsd.org/changeset/base/288790 Log: MFC r288148: Synchronize mode pages between HA peers. We allow to modify only few fields in mode pages now, but still it is not good if they unexpectedly change during failover. Also this fixes reporting of "Mode parameters changed" UAs on secondary node. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:53:13 2015 (r288789) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:54:06 2015 (r288790) @@ -613,6 +613,14 @@ alloc: ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->port, sizeof(msg->port) + i, M_WAITOK); free(msg, M_CTL); + + if (lun->flags & CTL_LUN_PRIMARY_SC) { + for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { + ctl_isc_announce_mode(lun, -1, + lun->mode_pages.index[i].page_code & SMPH_PC_MASK, + lun->mode_pages.index[i].subpage); + } + } } void @@ -712,6 +720,38 @@ ctl_isc_announce_iid(struct ctl_port *po free(msg, M_CTL); } +void +ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx, + uint8_t page, uint8_t subpage) +{ + struct ctl_softc *softc = lun->ctl_softc; + union ctl_ha_msg msg; + int i; + + if (softc->ha_link != CTL_HA_LINK_ONLINE) + return; + for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { + if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) == + page && lun->mode_pages.index[i].subpage == subpage) + break; + } + if (i == CTL_NUM_MODE_PAGES) + return; + bzero(&msg.mode, sizeof(msg.mode)); + msg.hdr.msg_type = CTL_MSG_MODE_SYNC; + msg.hdr.nexus.targ_port = initidx / CTL_MAX_INIT_PER_PORT; + msg.hdr.nexus.initid = initidx % CTL_MAX_INIT_PER_PORT; + msg.hdr.nexus.targ_lun = lun->lun; + msg.hdr.nexus.targ_mapped_lun = lun->lun; + msg.mode.page_code = page; + msg.mode.subpage = subpage; + msg.mode.page_len = lun->mode_pages.index[i].page_len; + memcpy(msg.mode.data, lun->mode_pages.index[i].page_data, + msg.mode.page_len); + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg.mode, sizeof(msg.mode), + M_WAITOK); +} + static void ctl_isc_ha_link_up(struct ctl_softc *softc) { @@ -1043,6 +1083,44 @@ ctl_isc_login(struct ctl_softc *softc, u } } +static void +ctl_isc_mode_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_lun *lun; + int i; + uint32_t initidx, targ_lun; + + targ_lun = msg->hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + ((lun = softc->ctl_luns[targ_lun]) == NULL)) { + mtx_unlock(&softc->ctl_lock); + return; + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + if (lun->flags & CTL_LUN_DISABLED) { + mtx_unlock(&lun->lun_lock); + return; + } + for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { + if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) == + msg->mode.page_code && + lun->mode_pages.index[i].subpage == msg->mode.subpage) + break; + } + if (i == CTL_NUM_MODE_PAGES) { + mtx_unlock(&lun->lun_lock); + return; + } + memcpy(lun->mode_pages.index[i].page_data, msg->mode.data, + lun->mode_pages.index[i].page_len); + initidx = ctl_get_initindex(&msg->hdr.nexus); + if (initidx != -1) + ctl_est_ua_all(lun, initidx, CTL_UA_MODE_CHANGE); + mtx_unlock(&lun->lun_lock); +} + /* * ISC (Inter Shelf Communication) event handler. Events from the HA * subsystem come in here. @@ -1322,6 +1400,9 @@ ctl_isc_event_handler(ctl_ha_channel cha case CTL_MSG_LOGIN: ctl_isc_login(softc, msg, param); break; + case CTL_MSG_MODE_SYNC: + ctl_isc_mode_sync(softc, msg, param); + break; default: printf("Received HA message of unknown type %d\n", msg->hdr.msg_type); @@ -5954,7 +6035,11 @@ ctl_control_page_handler(struct ctl_scsi if (set_ua != 0) ctl_est_ua_all(lun, initidx, CTL_UA_MODE_CHANGE); mtx_unlock(&lun->lun_lock); - + if (set_ua) { + ctl_isc_announce_mode(lun, + ctl_get_initindex(&ctsio->io_hdr.nexus), + page_index->page_code, page_index->subpage); + } return (0); } @@ -5991,7 +6076,11 @@ ctl_caching_sp_handler(struct ctl_scsiio if (set_ua != 0) ctl_est_ua_all(lun, initidx, CTL_UA_MODE_CHANGE); mtx_unlock(&lun->lun_lock); - + if (set_ua) { + ctl_isc_announce_mode(lun, + ctl_get_initindex(&ctsio->io_hdr.nexus), + page_index->page_code, page_index->subpage); + } return (0); } Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:53:13 2015 (r288789) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 10:54:06 2015 (r288790) @@ -193,6 +193,8 @@ void ctl_clr_ua_allluns(struct ctl_softc void ctl_isc_announce_lun(struct ctl_lun *lun); void ctl_isc_announce_port(struct ctl_port *port); void ctl_isc_announce_iid(struct ctl_port *port, int iid); +void ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx, + uint8_t page, uint8_t subpage); /* * KPI to manipulate LUN/port options Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:53:13 2015 (r288789) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 10:54:06 2015 (r288790) @@ -198,6 +198,7 @@ typedef enum { CTL_MSG_LUN_SYNC, /* Information about LUN. */ CTL_MSG_IID_SYNC, /* Information about initiator. */ CTL_MSG_LOGIN, /* Information about HA peer. */ + CTL_MSG_MODE_SYNC, /* Mode page current content. */ CTL_MSG_FAILOVER /* Fake, never sent though the wire */ } ctl_msg_type; @@ -533,6 +534,17 @@ struct ctl_ha_msg_iid { uint8_t data[]; }; +/* + * Used for CTL_MSG_MODE_SYNC. + */ +struct ctl_ha_msg_mode { + struct ctl_ha_msg_hdr hdr; + uint8_t page_code; + uint8_t subpage; + uint16_t page_len; + uint8_t data[]; +}; + union ctl_ha_msg { struct ctl_ha_msg_hdr hdr; struct ctl_ha_msg_task task; @@ -544,6 +556,7 @@ union ctl_ha_msg { struct ctl_ha_msg_lun lun; struct ctl_ha_msg_iid iid; struct ctl_ha_msg_login login; + struct ctl_ha_msg_mode mode; }; struct ctl_prio { From owner-svn-src-all@freebsd.org Mon Oct 5 10:55:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A0C9B2926; Mon, 5 Oct 2015 10:55:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F36A1591; Mon, 5 Oct 2015 10:55:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95At9Ec077371; Mon, 5 Oct 2015 10:55:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95At8Mv077368; Mon, 5 Oct 2015 10:55:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051055.t95At8Mv077368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288791 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:55:09 -0000 Author: mav Date: Mon Oct 5 10:55:08 2015 New Revision: 288791 URL: https://svnweb.freebsd.org/changeset/base/288791 Log: MFC r288165: Add support for READ BUFFER(16) command. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:54:06 2015 (r288790) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:55:08 2015 (r288791) @@ -5612,20 +5612,43 @@ bailout: int ctl_read_buffer(struct ctl_scsiio *ctsio) { - struct scsi_read_buffer *cdb; struct ctl_lun *lun; - int buffer_offset, len; + uint64_t buffer_offset; + uint32_t len; + uint8_t byte2; static uint8_t descr[4]; static uint8_t echo_descr[4] = { 0 }; CTL_DEBUG_PRINT(("ctl_read_buffer\n")); - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - cdb = (struct scsi_read_buffer *)ctsio->cdb; + switch (ctsio->cdb[0]) { + case READ_BUFFER: { + struct scsi_read_buffer *cdb; - if ((cdb->byte2 & RWB_MODE) != RWB_MODE_DATA && - (cdb->byte2 & RWB_MODE) != RWB_MODE_ECHO_DESCR && - (cdb->byte2 & RWB_MODE) != RWB_MODE_DESCR) { + cdb = (struct scsi_read_buffer *)ctsio->cdb; + buffer_offset = scsi_3btoul(cdb->offset); + len = scsi_3btoul(cdb->length); + byte2 = cdb->byte2; + break; + } + case READ_BUFFER_16: { + struct scsi_read_buffer_16 *cdb; + + cdb = (struct scsi_read_buffer_16 *)ctsio->cdb; + buffer_offset = scsi_8btou64(cdb->offset); + len = scsi_4btoul(cdb->length); + byte2 = cdb->byte2; + break; + } + default: /* This shouldn't happen. */ + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + if ((byte2 & RWB_MODE) != RWB_MODE_DATA && + (byte2 & RWB_MODE) != RWB_MODE_ECHO_DESCR && + (byte2 & RWB_MODE) != RWB_MODE_DESCR) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, @@ -5636,10 +5659,8 @@ ctl_read_buffer(struct ctl_scsiio *ctsio return (CTL_RETVAL_COMPLETE); } - len = scsi_3btoul(cdb->length); - buffer_offset = scsi_3btoul(cdb->offset); - - if (buffer_offset + len > CTL_WRITE_BUFFER_SIZE) { + if (buffer_offset > CTL_WRITE_BUFFER_SIZE || + buffer_offset + len > CTL_WRITE_BUFFER_SIZE) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, @@ -5650,12 +5671,12 @@ ctl_read_buffer(struct ctl_scsiio *ctsio return (CTL_RETVAL_COMPLETE); } - if ((cdb->byte2 & RWB_MODE) == RWB_MODE_DESCR) { + if ((byte2 & RWB_MODE) == RWB_MODE_DESCR) { descr[0] = 0; scsi_ulto3b(CTL_WRITE_BUFFER_SIZE, &descr[1]); ctsio->kern_data_ptr = descr; len = min(len, sizeof(descr)); - } else if ((cdb->byte2 & RWB_MODE) == RWB_MODE_ECHO_DESCR) { + } else if ((byte2 & RWB_MODE) == RWB_MODE_ECHO_DESCR) { ctsio->kern_data_ptr = echo_descr; len = min(len, sizeof(echo_descr)); } else { Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:54:06 2015 (r288790) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 10:55:08 2015 (r288791) @@ -1155,8 +1155,16 @@ const struct ctl_cmd_entry ctl_cmd_table /* 9A */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, -/* 9B */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +/* 9B READ BUFFER(16) */ +{ctl_read_buffer, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_STANDBY | + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, + CTL_LUN_PAT_NONE, + 10, {0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 9C WRITE ATOMIC (16) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:54:06 2015 (r288790) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:55:08 2015 (r288791) @@ -1002,6 +1002,16 @@ struct scsi_read_buffer u_int8_t control; }; +struct scsi_read_buffer_16 +{ + uint8_t opcode; + uint8_t byte2; + uint8_t offset[8]; + uint8_t length[4]; + uint8_t buffer_id; + uint8_t control; +}; + struct scsi_write_buffer { u_int8_t opcode; @@ -1988,6 +1998,7 @@ struct ata_pass_16 { #define VERIFY_16 0x8F #define SYNCHRONIZE_CACHE_16 0x91 #define WRITE_SAME_16 0x93 +#define READ_BUFFER_16 0x9B #define WRITE_ATOMIC_16 0x9C #define SERVICE_ACTION_IN 0x9E #define REPORT_LUNS 0xA0 From owner-svn-src-all@freebsd.org Mon Oct 5 10:56:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 772C99B2B0C; Mon, 5 Oct 2015 10:56:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690611640; Mon, 5 Oct 2015 10:56:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Au6JV077463; Mon, 5 Oct 2015 10:56:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Au5EE077460; Mon, 5 Oct 2015 10:56:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051056.t95Au5EE077460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288792 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:56:06 -0000 Author: mav Date: Mon Oct 5 10:56:04 2015 New Revision: 288792 URL: https://svnweb.freebsd.org/changeset/base/288792 Log: MFC r288166: Update WRITE ATOMIC(16) support to sbc4r8 draft. This is only a cosmetic change. We still don't support atomic boundary field in the CDB, but at least now we do it formally. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/scsi_ctl.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:55:08 2015 (r288791) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:56:04 2015 (r288792) @@ -8942,7 +8942,7 @@ ctl_read_write(struct ctl_scsiio *ctsio) break; } case WRITE_ATOMIC_16: { - struct scsi_rw_16 *cdb; + struct scsi_write_atomic_16 *cdb; if (lun->be_lun->atomicblock == 0) { ctl_set_invalid_opcode(ctsio); @@ -8950,13 +8950,13 @@ ctl_read_write(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } - cdb = (struct scsi_rw_16 *)ctsio->cdb; + cdb = (struct scsi_write_atomic_16 *)ctsio->cdb; if (cdb->byte2 & SRW12_FUA) flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW12_DPO) flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); - num_blocks = scsi_4btoul(cdb->length); + num_blocks = scsi_2btoul(cdb->length); if (num_blocks > lun->be_lun->atomicblock) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 12, /*bit_valid*/ 0, @@ -10150,6 +10150,8 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr->max_atomic_transfer_length); scsi_ulto4b(0, bl_ptr->atomic_alignment); scsi_ulto4b(0, bl_ptr->atomic_transfer_length_granularity); + scsi_ulto4b(0, bl_ptr->max_atomic_transfer_length_with_atomic_boundary); + scsi_ulto4b(0, bl_ptr->max_atomic_boundary_size); } scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length); @@ -10649,8 +10651,7 @@ ctl_get_lba_len(union ctl_io *io, uint64 break; } case READ_16: - case WRITE_16: - case WRITE_ATOMIC_16: { + case WRITE_16: { struct scsi_rw_16 *cdb; cdb = (struct scsi_rw_16 *)io->scsiio.cdb; @@ -10659,6 +10660,15 @@ ctl_get_lba_len(union ctl_io *io, uint64 *len = scsi_4btoul(cdb->length); break; } + case WRITE_ATOMIC_16: { + struct scsi_write_atomic_16 *cdb; + + cdb = (struct scsi_write_atomic_16 *)io->scsiio.cdb; + + *lba = scsi_8btou64(cdb->addr); + *len = scsi_2btoul(cdb->length); + break; + } case WRITE_VERIFY_16: { struct scsi_write_verify_16 *cdb; Modified: stable/10/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 10:55:08 2015 (r288791) +++ stable/10/sys/cam/ctl/scsi_ctl.c Mon Oct 5 10:56:04 2015 (r288792) @@ -1068,7 +1068,6 @@ ctlfe_adjust_cdb(struct ccb_accept_tio * } case READ_16: case WRITE_16: - case WRITE_ATOMIC_16: { struct scsi_rw_16 *cdb = (struct scsi_rw_16 *)cmdbyt; lba = scsi_8btou64(cdb->addr); Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:55:08 2015 (r288791) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:56:04 2015 (r288792) @@ -1283,6 +1283,17 @@ struct scsi_rw_16 u_int8_t control; }; +struct scsi_write_atomic_16 +{ + uint8_t opcode; + uint8_t byte2; + uint8_t addr[8]; + uint8_t boundary[2]; + uint8_t length[2]; + uint8_t group; + uint8_t control; +}; + struct scsi_write_same_10 { uint8_t opcode; @@ -2757,7 +2768,8 @@ struct scsi_vpd_block_limits u_int8_t max_atomic_transfer_length[4]; u_int8_t atomic_alignment[4]; u_int8_t atomic_transfer_length_granularity[4]; - u_int8_t reserved2[8]; + u_int8_t max_atomic_transfer_length_with_atomic_boundary[4]; + u_int8_t max_atomic_boundary_size[4]; }; struct scsi_read_capacity From owner-svn-src-all@freebsd.org Mon Oct 5 10:56:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88779B2C3C; Mon, 5 Oct 2015 10:56:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0AAE179D; Mon, 5 Oct 2015 10:56:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AuwpQ077550; Mon, 5 Oct 2015 10:56:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Auwnd077548; Mon, 5 Oct 2015 10:56:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051056.t95Auwnd077548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288793 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:56:59 -0000 Author: mav Date: Mon Oct 5 10:56:57 2015 New Revision: 288793 URL: https://svnweb.freebsd.org/changeset/base/288793 Log: MFC r288170: Add new report types to REPORT LUNS command. This is only for completeness, since we have nothing new to report there. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:56:04 2015 (r288792) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:56:57 2015 (r288793) @@ -9267,12 +9267,10 @@ ctl_report_luns(struct ctl_scsiio *ctsio struct ctl_port *port; int num_luns, retval; uint32_t alloc_len, lun_datalen; - int num_filled, well_known; + int num_filled; uint32_t initidx, targ_lun_id, lun_id; retval = CTL_RETVAL_COMPLETE; - well_known = 0; - cdb = (struct scsi_report_luns *)ctsio->cdb; port = ctl_io_port(&ctsio->io_hdr); @@ -9289,9 +9287,11 @@ ctl_report_luns(struct ctl_scsiio *ctsio switch (cdb->select_report) { case RPL_REPORT_DEFAULT: case RPL_REPORT_ALL: + case RPL_REPORT_NONSUBSID: break; case RPL_REPORT_WELLKNOWN: - well_known = 1; + case RPL_REPORT_ADMIN: + case RPL_REPORT_CONGLOM: num_luns = 0; break; default: Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:56:04 2015 (r288792) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 5 10:56:57 2015 (r288793) @@ -2864,6 +2864,9 @@ struct scsi_report_luns #define RPL_REPORT_DEFAULT 0x00 #define RPL_REPORT_WELLKNOWN 0x01 #define RPL_REPORT_ALL 0x02 +#define RPL_REPORT_ADMIN 0x10 +#define RPL_REPORT_NONSUBSID 0x11 +#define RPL_REPORT_CONGLOM 0x12 uint8_t select_report; uint8_t reserved2[3]; uint8_t length[4]; From owner-svn-src-all@freebsd.org Mon Oct 5 10:57:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 703079B2D1C; Mon, 5 Oct 2015 10:57:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 488BE1803; Mon, 5 Oct 2015 10:57:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AvpMp077647; Mon, 5 Oct 2015 10:57:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Avo2i077645; Mon, 5 Oct 2015 10:57:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051057.t95Avo2i077645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288794 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:57:51 -0000 Author: mav Date: Mon Oct 5 10:57:50 2015 New Revision: 288794 URL: https://svnweb.freebsd.org/changeset/base/288794 Log: MFC r288175: Allow WRITE SAME with NDOB bit set but without UNMAP. This combination was originally forbidden, but allowed at spc4r3. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:56:57 2015 (r288793) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:57:50 2015 (r288794) @@ -5810,9 +5810,8 @@ ctl_write_same(struct ctl_scsiio *ctsio) break; /* NOTREACHED */ } - /* NDOB and ANCHOR flags can be used only together with UNMAP */ - if ((byte2 & SWS_UNMAP) == 0 && - (byte2 & (SWS_NDOB | SWS_ANCHOR)) != 0) { + /* ANCHOR flag can be used only together with UNMAP */ + if ((byte2 & SWS_UNMAP) == 0 && (byte2 & SWS_ANCHOR) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 1, /*bit_valid*/ 1, /*bit*/ 0); ctl_done((union ctl_io *)ctsio); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:56:57 2015 (r288793) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 10:57:50 2015 (r288794) @@ -1360,7 +1360,12 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b buf = beio->sg_segs[i].addr; end = buf + seglen; for (; buf < end; buf += cbe_lun->blocksize) { - memcpy(buf, io->scsiio.kern_data_ptr, cbe_lun->blocksize); + if (lbalen->flags & SWS_NDOB) { + memset(buf, 0, cbe_lun->blocksize); + } else { + memcpy(buf, io->scsiio.kern_data_ptr, + cbe_lun->blocksize); + } if (lbalen->flags & SWS_LBDATA) scsi_ulto4b(lbalen->lba + lba, buf); lba++; From owner-svn-src-all@freebsd.org Mon Oct 5 10:58:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1249B2E35; Mon, 5 Oct 2015 10:58:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E061976; Mon, 5 Oct 2015 10:58:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Awh8L077746; Mon, 5 Oct 2015 10:58:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Awg9P077737; Mon, 5 Oct 2015 10:58:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051058.t95Awg9P077737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288795 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:58:44 -0000 Author: mav Date: Mon Oct 5 10:58:41 2015 New Revision: 288795 URL: https://svnweb.freebsd.org/changeset/base/288795 Log: MFC r288211: Remove some control_softc references. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_ha.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:58:41 2015 (r288795) @@ -626,7 +626,7 @@ alloc: void ctl_isc_announce_port(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; union ctl_ha_msg *msg; int i; @@ -687,7 +687,7 @@ ctl_isc_announce_port(struct ctl_port *p void ctl_isc_announce_iid(struct ctl_port *port, int iid) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; union ctl_ha_msg *msg; int i, l; @@ -1128,12 +1128,11 @@ ctl_isc_mode_sync(struct ctl_softc *soft static void ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_event event, int param) { - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; union ctl_io *io; struct ctl_prio *presio; ctl_ha_status isc_status; - softc = control_softc; CTL_DEBUG_PRINT(("CTL: Isc Msg event %d\n", event)); if (event == CTL_HA_EVT_MSG_RECV) { union ctl_ha_msg *msg, msgbuf; @@ -1584,13 +1583,11 @@ ctl_init(void) int i, error, retval; retval = 0; - control_softc = malloc(sizeof(*control_softc), M_DEVBUF, + softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK | M_ZERO); - softc = control_softc; softc->dev = make_dev(&ctl_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0600, "cam/ctl"); - softc->dev->si_drv1 = softc; sysctl_ctx_init(&softc->sysctl_ctx); @@ -1722,11 +1719,9 @@ ctl_init(void) void ctl_shutdown(void) { - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; struct ctl_lun *lun, *next_lun; - softc = (struct ctl_softc *)control_softc; - if (softc->is_single == 0) { ctl_ha_msg_shutdown(softc); if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) @@ -1803,7 +1798,7 @@ ctl_close(struct cdev *dev, int flags, i int ctl_remove_initiator(struct ctl_port *port, int iid) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; mtx_assert(&softc->ctl_lock, MA_NOTOWNED); @@ -1829,7 +1824,7 @@ ctl_remove_initiator(struct ctl_port *po int ctl_add_initiator(struct ctl_port *port, int iid, uint64_t wwpn, char *name) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; time_t best_time; int i, best; @@ -2004,15 +1999,13 @@ ctl_create_iid(struct ctl_port *port, in static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) { - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; union ctl_ha_msg msg_info; struct ctl_lun *lun; const struct ctl_cmd_entry *entry; int retval = 0; uint32_t targ_lun; - softc = control_softc; - targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); if ((targ_lun < CTL_MAX_LUNS) && @@ -2379,12 +2372,10 @@ static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { - struct ctl_softc *softc; + struct ctl_softc *softc = dev->si_drv1; struct ctl_lun *lun; int retval; - softc = control_softc; - retval = 0; switch (cmd) { @@ -3483,7 +3474,7 @@ ctl_get_initindex(struct ctl_nexus *nexu int ctl_lun_map_init(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; struct ctl_lun *lun; uint32_t i; @@ -3507,7 +3498,7 @@ ctl_lun_map_init(struct ctl_port *port) int ctl_lun_map_deinit(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; struct ctl_lun *lun; if (port->lun_map == NULL) @@ -4674,14 +4665,11 @@ ctl_free_lun(struct ctl_lun *lun) static void ctl_create_lun(struct ctl_be_lun *be_lun) { - struct ctl_softc *softc; - - softc = control_softc; /* * ctl_alloc_lun() should handle all potential failure cases. */ - ctl_alloc_lun(softc, NULL, be_lun); + ctl_alloc_lun(control_softc, NULL, be_lun); } int @@ -8726,12 +8714,11 @@ done: static void ctl_hndl_per_res_out_on_other_sc(union ctl_ha_msg *msg) { + struct ctl_softc *softc = control_softc; struct ctl_lun *lun; - struct ctl_softc *softc; int i; uint32_t residx, targ_lun; - softc = control_softc; targ_lun = msg->hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); if ((targ_lun >= CTL_MAX_LUNS) || @@ -9259,7 +9246,7 @@ ctl_verify(struct ctl_scsiio *ctsio) int ctl_report_luns(struct ctl_scsiio *ctsio) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc; struct scsi_report_luns *cdb; struct scsi_report_luns_data *lun_data; struct ctl_lun *lun, *request_lun; @@ -9272,6 +9259,7 @@ ctl_report_luns(struct ctl_scsiio *ctsio retval = CTL_RETVAL_COMPLETE; cdb = (struct scsi_report_luns *)ctsio->cdb; port = ctl_io_port(&ctsio->io_hdr); + softc = port->ctl_softc; CTL_DEBUG_PRINT(("ctl_report_luns\n")); @@ -10348,15 +10336,13 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio { struct scsi_inquiry_data *inq_ptr; struct scsi_inquiry *cdb; - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; struct ctl_port *port; struct ctl_lun *lun; char *val; uint32_t alloc_len, data_len; ctl_port_type port_type; - softc = control_softc; - /* * Figure out whether we're talking to a Fibre Channel port or not. * We treat the ioctl front end, and any SCSI adapters, as packetized @@ -12190,11 +12176,9 @@ ctl_handle_isc(union ctl_io *io) { int free_io; struct ctl_lun *lun; - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; uint32_t targ_lun; - softc = control_softc; - targ_lun = io->io_hdr.nexus.targ_mapped_lun; lun = softc->ctl_luns[targ_lun]; @@ -12863,13 +12847,11 @@ static int ctl_datamove_remote_sgl_setup(union ctl_io *io) { struct ctl_sg_entry *local_sglist; - struct ctl_softc *softc; uint32_t len_to_go; int retval; int i; retval = 0; - softc = control_softc; local_sglist = io->io_hdr.local_sglist; len_to_go = io->scsiio.kern_data_len; Modified: stable/10/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl_backend.c Mon Oct 5 10:58:41 2015 (r288795) @@ -65,11 +65,9 @@ extern struct ctl_softc *control_softc; int ctl_backend_register(struct ctl_backend_driver *be) { - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; struct ctl_backend_driver *be_tmp; - softc = control_softc; - mtx_lock(&softc->ctl_lock); /* * Sanity check, make sure this isn't a duplicate registration. @@ -120,9 +118,7 @@ ctl_backend_register(struct ctl_backend_ int ctl_backend_deregister(struct ctl_backend_driver *be) { - struct ctl_softc *softc; - - softc = control_softc; + struct ctl_softc *softc = control_softc; mtx_lock(&softc->ctl_lock); @@ -153,20 +149,16 @@ ctl_backend_deregister(struct ctl_backen struct ctl_backend_driver * ctl_backend_find(char *backend_name) { - struct ctl_softc *softc; + struct ctl_softc *softc = control_softc; struct ctl_backend_driver *be_tmp; - softc = control_softc; - mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(be_tmp, &softc->be_list, links) { if (strcmp(be_tmp->name, backend_name) == 0) { mtx_unlock(&softc->ctl_lock); return (be_tmp); } } - mtx_unlock(&softc->ctl_lock); return (NULL); Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 10:58:41 2015 (r288795) @@ -148,6 +148,7 @@ ctl_port_register(struct ctl_port *port) retval = 0; KASSERT(softc != NULL, ("CTL is not initialized")); + port->ctl_softc = softc; mtx_lock(&softc->ctl_lock); if (port->targ_port >= 0) @@ -218,7 +219,7 @@ error: int ctl_port_deregister(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; struct ctl_io_pool *pool; int retval, i; @@ -309,7 +310,7 @@ ctl_port_set_wwns(struct ctl_port *port, void ctl_port_online(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; struct ctl_lun *lun; uint32_t l; @@ -344,7 +345,7 @@ ctl_port_online(struct ctl_port *port) void ctl_port_offline(struct ctl_port *port) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = port->ctl_softc; struct ctl_lun *lun; uint32_t l; Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl_frontend.h Mon Oct 5 10:58:41 2015 (r288795) @@ -211,6 +211,7 @@ struct ctl_wwpn_iid { * shouldn't touch this field. */ struct ctl_port { + struct ctl_softc *ctl_softc; struct ctl_frontend *frontend; ctl_port_type port_type; /* passed to CTL */ int num_requested_ctl_io; /* passed to CTL */ Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:58:41 2015 (r288795) @@ -171,7 +171,6 @@ static void cfiscsi_target_release(struc static void cfiscsi_session_delete(struct cfiscsi_session *cs); static struct cfiscsi_softc cfiscsi_softc; -extern struct ctl_softc *control_softc; static struct ctl_frontend cfiscsi_frontend = { Modified: stable/10/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:57:50 2015 (r288794) +++ stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 10:58:41 2015 (r288795) @@ -160,8 +160,6 @@ struct ha_softc { TAILQ_HEAD(, ctl_ha_dt_req) ha_dts; } ha_softc; -extern struct ctl_softc *control_softc; - static void ctl_ha_conn_wake(struct ha_softc *softc) { From owner-svn-src-all@freebsd.org Mon Oct 5 10:59:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20D569B2F12; Mon, 5 Oct 2015 10:59:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B271AD7; Mon, 5 Oct 2015 10:59:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AxcNn077836; Mon, 5 Oct 2015 10:59:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AxcTl077835; Mon, 5 Oct 2015 10:59:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051059.t95AxcTl077835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288796 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:59:38 -0000 Author: mav Date: Mon Oct 5 10:59:37 2015 New Revision: 288796 URL: https://svnweb.freebsd.org/changeset/base/288796 Log: MFC r288213: Make HA handle datamove and done in a universal way, using port methods. Now from primary node point of view requests transferred from secondary node should look almost normal and always have valid port. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:58:41 2015 (r288795) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:59:37 2015 (r288796) @@ -517,6 +517,151 @@ static struct ctl_frontend ha_frontend = }; static void +ctl_ha_datamove(union ctl_io *io) +{ + struct ctl_lun *lun; + struct ctl_sg_entry *sgl; + union ctl_ha_msg msg; + uint32_t sg_entries_sent; + int do_sg_copy, i, j; + + lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + memset(&msg.dt, 0, sizeof(msg.dt)); + msg.hdr.msg_type = CTL_MSG_DATAMOVE; + msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.serializing_sc = io; + msg.hdr.nexus = io->io_hdr.nexus; + msg.hdr.status = io->io_hdr.status; + msg.dt.flags = io->io_hdr.flags; + + /* + * We convert everything into a S/G list here. We can't + * pass by reference, only by value between controllers. + * So we can't pass a pointer to the S/G list, only as many + * S/G entries as we can fit in here. If it's possible for + * us to get more than CTL_HA_MAX_SG_ENTRIES S/G entries, + * then we need to break this up into multiple transfers. + */ + if (io->scsiio.kern_sg_entries == 0) { + msg.dt.kern_sg_entries = 1; +#if 0 + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { + msg.dt.sg_list[0].addr = io->scsiio.kern_data_ptr; + } else { + /* XXX KDM use busdma here! */ + msg.dt.sg_list[0].addr = + (void *)vtophys(io->scsiio.kern_data_ptr); + } +#else + KASSERT((io->io_hdr.flags & CTL_FLAG_BUS_ADDR) == 0, + ("HA does not support BUS_ADDR")); + msg.dt.sg_list[0].addr = io->scsiio.kern_data_ptr; +#endif + msg.dt.sg_list[0].len = io->scsiio.kern_data_len; + do_sg_copy = 0; + } else { + msg.dt.kern_sg_entries = io->scsiio.kern_sg_entries; + do_sg_copy = 1; + } + + msg.dt.kern_data_len = io->scsiio.kern_data_len; + msg.dt.kern_total_len = io->scsiio.kern_total_len; + msg.dt.kern_data_resid = io->scsiio.kern_data_resid; + msg.dt.kern_rel_offset = io->scsiio.kern_rel_offset; + msg.dt.sg_sequence = 0; + + /* + * Loop until we've sent all of the S/G entries. On the + * other end, we'll recompose these S/G entries into one + * contiguous list before processing. + */ + for (sg_entries_sent = 0; sg_entries_sent < msg.dt.kern_sg_entries; + msg.dt.sg_sequence++) { + msg.dt.cur_sg_entries = MIN((sizeof(msg.dt.sg_list) / + sizeof(msg.dt.sg_list[0])), + msg.dt.kern_sg_entries - sg_entries_sent); + if (do_sg_copy != 0) { + sgl = (struct ctl_sg_entry *)io->scsiio.kern_data_ptr; + for (i = sg_entries_sent, j = 0; + i < msg.dt.cur_sg_entries; i++, j++) { +#if 0 + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { + msg.dt.sg_list[j].addr = sgl[i].addr; + } else { + /* XXX KDM use busdma here! */ + msg.dt.sg_list[j].addr = + (void *)vtophys(sgl[i].addr); + } +#else + KASSERT((io->io_hdr.flags & + CTL_FLAG_BUS_ADDR) == 0, + ("HA does not support BUS_ADDR")); + msg.dt.sg_list[j].addr = sgl[i].addr; +#endif + msg.dt.sg_list[j].len = sgl[i].len; + } + } + + sg_entries_sent += msg.dt.cur_sg_entries; + msg.dt.sg_last = (sg_entries_sent >= msg.dt.kern_sg_entries); + if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, + sizeof(msg.dt) - sizeof(msg.dt.sg_list) + + sizeof(struct ctl_sg_entry) * msg.dt.cur_sg_entries, + M_WAITOK) > CTL_HA_STATUS_SUCCESS) { + io->io_hdr.port_status = 31341; + io->scsiio.be_move_done(io); + return; + } + msg.dt.sent_sg_entries = sg_entries_sent; + } + + /* + * Officially handover the request from us to peer. + * If failover has just happened, then we must return error. + * If failover happen just after, then it is not our problem. + */ + if (lun) + mtx_lock(&lun->lun_lock); + if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { + if (lun) + mtx_unlock(&lun->lun_lock); + io->io_hdr.port_status = 31342; + io->scsiio.be_move_done(io); + return; + } + io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; + if (lun) + mtx_unlock(&lun->lun_lock); +} + +static void +ctl_ha_done(union ctl_io *io) +{ + union ctl_ha_msg msg; + + if (io->io_hdr.io_type == CTL_IO_SCSI) { + memset(&msg, 0, sizeof(msg)); + msg.hdr.msg_type = CTL_MSG_FINISH_IO; + msg.hdr.original_sc = io->io_hdr.original_sc; + msg.hdr.nexus = io->io_hdr.nexus; + msg.hdr.status = io->io_hdr.status; + msg.scsi.scsi_status = io->scsiio.scsi_status; + msg.scsi.tag_num = io->scsiio.tag_num; + msg.scsi.tag_type = io->scsiio.tag_type; + msg.scsi.sense_len = io->scsiio.sense_len; + msg.scsi.sense_residual = io->scsiio.sense_residual; + msg.scsi.residual = io->scsiio.residual; + memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, + io->scsiio.sense_len); + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, + sizeof(msg.scsi) - sizeof(msg.scsi.sense_data) + + msg.scsi.sense_len, M_WAITOK); + } + ctl_free_io(io); +} + +static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) { @@ -939,6 +1084,8 @@ ctl_isc_port_sync(struct ctl_softc *soft port = malloc(sizeof(*port), M_CTL, M_WAITOK | M_ZERO); port->frontend = &ha_frontend; port->targ_port = msg->hdr.nexus.targ_port; + port->fe_datamove = ctl_ha_datamove; + port->fe_done = ctl_ha_done; } else if (port->frontend == &ha_frontend) { CTL_DEBUG_PRINT(("%s: Updated port %d\n", __func__, msg->hdr.nexus.targ_port)); @@ -2001,6 +2148,7 @@ ctl_serialize_other_sc_cmd(struct ctl_sc { struct ctl_softc *softc = control_softc; union ctl_ha_msg msg_info; + struct ctl_port *port; struct ctl_lun *lun; const struct ctl_cmd_entry *entry; int retval = 0; @@ -2008,6 +2156,16 @@ ctl_serialize_other_sc_cmd(struct ctl_sc targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); + + /* Make sure that we know about this port. */ + port = ctl_io_port(&ctsio->io_hdr); + if (port == NULL || (port->status & CTL_PORT_STATUS_ONLINE) == 0) { + ctl_set_internal_failure(ctsio, /*sks_valid*/ 0, + /*retry_count*/ 1); + goto badjuju; + } + + /* Make sure that we know about this LUN. */ if ((targ_lun < CTL_MAX_LUNS) && ((lun = softc->ctl_luns[targ_lun]) != NULL)) { mtx_lock(&lun->lun_lock); @@ -2033,25 +2191,13 @@ ctl_serialize_other_sc_cmd(struct ctl_sc * a race, so respond to initiator in the most opaque way. */ ctl_set_busy(ctsio); - ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; - msg_info.hdr.serializing_sc = NULL; - msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.scsi), M_WAITOK); - return(1); + goto badjuju; } entry = ctl_get_cmd_entry(ctsio, NULL); if (ctl_scsiio_lun_check(lun, entry, ctsio) != 0) { mtx_unlock(&lun->lun_lock); - ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; - msg_info.hdr.serializing_sc = NULL; - msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.scsi), M_WAITOK); - return(1); + goto badjuju; } ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr = lun; @@ -2097,42 +2243,28 @@ ctl_serialize_other_sc_cmd(struct ctl_sc case CTL_ACTION_OVERLAP: TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); - retval = 1; - ctl_set_overlapped_cmd(ctsio); - ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; - msg_info.hdr.serializing_sc = NULL; - msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.scsi), M_WAITOK); - break; + goto badjuju; case CTL_ACTION_OVERLAP_TAG: TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); - retval = 1; ctl_set_overlapped_tag(ctsio, ctsio->tag_num); - ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); - msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; - msg_info.hdr.serializing_sc = NULL; - msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.scsi), M_WAITOK); - break; + goto badjuju; case CTL_ACTION_ERROR: default: TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); - retval = 1; ctl_set_internal_failure(ctsio, /*sks_valid*/ 0, /*retry_count*/ 0); +badjuju: ctl_copy_sense_data_back((union ctl_io *)ctsio, &msg_info); msg_info.hdr.original_sc = ctsio->io_hdr.original_sc; msg_info.hdr.serializing_sc = NULL; msg_info.hdr.msg_type = CTL_MSG_BAD_JUJU; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.scsi), M_WAITOK); + retval = 1; break; } return (retval); @@ -10343,16 +10475,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio uint32_t alloc_len, data_len; ctl_port_type port_type; - /* - * Figure out whether we're talking to a Fibre Channel port or not. - * We treat the ioctl front end, and any SCSI adapters, as packetized - * SCSI front ends. - */ port = ctl_io_port(&ctsio->io_hdr); - if (port != NULL) - port_type = port->port_type; - else - port_type = CTL_PORT_SCSI; + port_type = port->port_type; if (port_type == CTL_PORT_IOCTL || port_type == CTL_PORT_INTERNAL) port_type = CTL_PORT_SCSI; @@ -11675,7 +11799,7 @@ ctl_target_reset(struct ctl_softc *softc retval = 0; mtx_lock(&softc->ctl_lock); - port = softc->ctl_ports[io->io_hdr.nexus.targ_port]; + port = ctl_io_port(&io->io_hdr); STAILQ_FOREACH(lun, &softc->lun_list, links) { if (port != NULL && ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) @@ -12492,169 +12616,8 @@ ctl_datamove(union ctl_io *io) return; } - /* - * If we're in XFER mode and this I/O is from the other shelf - * controller, we need to send the DMA to the other side to - * actually transfer the data to/from the host. In serialize only - * mode the transfer happens below CTL and ctl_datamove() is only - * called on the machine that originally received the I/O. - */ - if ((control_softc->ha_mode == CTL_HA_MODE_XFER) - && (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) { - union ctl_ha_msg msg; - uint32_t sg_entries_sent; - int do_sg_copy; - int i; - - memset(&msg, 0, sizeof(msg)); - msg.hdr.msg_type = CTL_MSG_DATAMOVE; - msg.hdr.original_sc = io->io_hdr.original_sc; - msg.hdr.serializing_sc = io; - msg.hdr.nexus = io->io_hdr.nexus; - msg.hdr.status = io->io_hdr.status; - msg.dt.flags = io->io_hdr.flags; - /* - * We convert everything into a S/G list here. We can't - * pass by reference, only by value between controllers. - * So we can't pass a pointer to the S/G list, only as many - * S/G entries as we can fit in here. If it's possible for - * us to get more than CTL_HA_MAX_SG_ENTRIES S/G entries, - * then we need to break this up into multiple transfers. - */ - if (io->scsiio.kern_sg_entries == 0) { - msg.dt.kern_sg_entries = 1; -#if 0 - /* - * Convert to a physical address if this is a - * virtual address. - */ - if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) { - msg.dt.sg_list[0].addr = - io->scsiio.kern_data_ptr; - } else { - /* - * XXX KDM use busdma here! - */ - msg.dt.sg_list[0].addr = (void *) - vtophys(io->scsiio.kern_data_ptr); - } -#else - KASSERT((io->io_hdr.flags & CTL_FLAG_BUS_ADDR) == 0, - ("HA does not support BUS_ADDR")); - msg.dt.sg_list[0].addr = io->scsiio.kern_data_ptr; -#endif - - msg.dt.sg_list[0].len = io->scsiio.kern_data_len; - do_sg_copy = 0; - } else { - msg.dt.kern_sg_entries = io->scsiio.kern_sg_entries; - do_sg_copy = 1; - } - - msg.dt.kern_data_len = io->scsiio.kern_data_len; - msg.dt.kern_total_len = io->scsiio.kern_total_len; - msg.dt.kern_data_resid = io->scsiio.kern_data_resid; - msg.dt.kern_rel_offset = io->scsiio.kern_rel_offset; - msg.dt.sg_sequence = 0; - - /* - * Loop until we've sent all of the S/G entries. On the - * other end, we'll recompose these S/G entries into one - * contiguous list before passing it to the - */ - for (sg_entries_sent = 0; sg_entries_sent < - msg.dt.kern_sg_entries; msg.dt.sg_sequence++) { - msg.dt.cur_sg_entries = MIN((sizeof(msg.dt.sg_list)/ - sizeof(msg.dt.sg_list[0])), - msg.dt.kern_sg_entries - sg_entries_sent); - - if (do_sg_copy != 0) { - struct ctl_sg_entry *sgl; - int j; - - sgl = (struct ctl_sg_entry *) - io->scsiio.kern_data_ptr; - /* - * If this is in cached memory, flush the cache - * before we send the DMA request to the other - * controller. We want to do this in either - * the * read or the write case. The read - * case is straightforward. In the write - * case, we want to make sure nothing is - * in the local cache that could overwrite - * the DMAed data. - */ - - for (i = sg_entries_sent, j = 0; - i < msg.dt.cur_sg_entries; i++, j++) { -#if 0 - if ((io->io_hdr.flags & - CTL_FLAG_BUS_ADDR) == 0) { - /* - * XXX KDM use busdma. - */ - msg.dt.sg_list[j].addr =(void *) - vtophys(sgl[i].addr); - } else { - msg.dt.sg_list[j].addr = - sgl[i].addr; - } -#else - KASSERT((io->io_hdr.flags & - CTL_FLAG_BUS_ADDR) == 0, - ("HA does not support BUS_ADDR")); - msg.dt.sg_list[j].addr = sgl[i].addr; -#endif - msg.dt.sg_list[j].len = sgl[i].len; - } - } - - sg_entries_sent += msg.dt.cur_sg_entries; - if (sg_entries_sent >= msg.dt.kern_sg_entries) - msg.dt.sg_last = 1; - else - msg.dt.sg_last = 0; - - if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, - sizeof(msg.dt) - sizeof(msg.dt.sg_list) + - sizeof(struct ctl_sg_entry)*msg.dt.cur_sg_entries, - M_WAITOK) > CTL_HA_STATUS_SUCCESS) { - io->io_hdr.port_status = 31341; - io->scsiio.be_move_done(io); - return; - } - - msg.dt.sent_sg_entries = sg_entries_sent; - } - - /* - * Officially handover the request from us to peer. - * If failover has just happened, then we must return error. - * If failover happen just after, then it is not our problem. - */ - if (lun) - mtx_lock(&lun->lun_lock); - if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { - if (lun) - mtx_unlock(&lun->lun_lock); - io->io_hdr.port_status = 31342; - io->scsiio.be_move_done(io); - return; - } - io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; - io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; - if (lun) - mtx_unlock(&lun->lun_lock); - } else { - - /* - * Lookup the fe_datamove() function for this particular - * front end. - */ - fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; - - fe_datamove(io); - } + fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; + fe_datamove(io); } static void @@ -13098,11 +13061,7 @@ ctl_process_done(union ctl_io *io) uint32_t targ_port = io->io_hdr.nexus.targ_port; CTL_DEBUG_PRINT(("ctl_process_done\n")); - - if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0) - fe_done = softc->ctl_ports[targ_port]->fe_done; - else - fe_done = NULL; + fe_done = softc->ctl_ports[targ_port]->fe_done; #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { @@ -13146,10 +13105,7 @@ ctl_process_done(union ctl_io *io) case CTL_IO_TASK: if (ctl_debug & CTL_DEBUG_INFO) ctl_io_error_print(io, NULL); - if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) - ctl_free_io(io); - else - fe_done(io); + fe_done(io); return (CTL_RETVAL_COMPLETE); default: panic("ctl_process_done: invalid io type %d\n", @@ -13271,29 +13227,8 @@ bailout: sizeof(msg.scsi) - sizeof(msg.scsi.sense_data), M_WAITOK); } - if ((softc->ha_mode == CTL_HA_MODE_XFER) - && (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)) { - memset(&msg, 0, sizeof(msg)); - msg.hdr.msg_type = CTL_MSG_FINISH_IO; - msg.hdr.original_sc = io->io_hdr.original_sc; - msg.hdr.nexus = io->io_hdr.nexus; - msg.hdr.status = io->io_hdr.status; - msg.scsi.scsi_status = io->scsiio.scsi_status; - msg.scsi.tag_num = io->scsiio.tag_num; - msg.scsi.tag_type = io->scsiio.tag_type; - msg.scsi.sense_len = io->scsiio.sense_len; - msg.scsi.sense_residual = io->scsiio.sense_residual; - msg.scsi.residual = io->scsiio.residual; - memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, - io->scsiio.sense_len); - - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, - sizeof(msg.scsi) - sizeof(msg.scsi.sense_data) + - msg.scsi.sense_len, M_WAITOK); - ctl_free_io(io); - } else - fe_done(io); + fe_done(io); return (CTL_RETVAL_COMPLETE); } From owner-svn-src-all@freebsd.org Mon Oct 5 11:00:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CBF699A0A2; Mon, 5 Oct 2015 11:00:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C6A71C96; Mon, 5 Oct 2015 11:00:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B0QHK077971; Mon, 5 Oct 2015 11:00:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B0Qdc077970; Mon, 5 Oct 2015 11:00:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051100.t95B0Qdc077970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288797 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:00:26 -0000 Author: mav Date: Mon Oct 5 11:00:25 2015 New Revision: 288797 URL: https://svnweb.freebsd.org/changeset/base/288797 Log: MFC r288214: Collect DMA statistics on secondary HA node. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 10:59:37 2015 (r288796) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:00:25 2015 (r288797) @@ -1367,6 +1367,9 @@ ctl_isc_event_handler(ctl_ha_channel cha io->io_hdr.status = msg->hdr.status; if (msg->dt.sg_sequence == 0) { +#ifdef CTL_TIME_IO + getbintime(&io->io_hdr.dma_start_bt); +#endif i = msg->dt.kern_sg_entries + msg->dt.kern_data_len / CTL_HA_DATAMOVE_SEGMENT + 1; @@ -12624,9 +12627,11 @@ static void ctl_send_datamove_done(union ctl_io *io, int have_lock) { union ctl_ha_msg msg; +#ifdef CTL_TIME_IO + struct bintime cur_bt; +#endif memset(&msg, 0, sizeof(msg)); - msg.hdr.msg_type = CTL_MSG_DATAMOVE_DONE; msg.hdr.original_sc = io; msg.hdr.serializing_sc = io->io_hdr.serializing_sc; @@ -12642,15 +12647,20 @@ ctl_send_datamove_done(union ctl_io *io, msg.scsi.fetd_status = io->io_hdr.port_status; msg.scsi.residual = io->scsiio.residual; io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; - if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { ctl_failover_io(io, /*have_lock*/ have_lock); return; } - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.scsi) - sizeof(msg.scsi.sense_data) + msg.scsi.sense_len, M_WAITOK); + +#ifdef CTL_TIME_IO + getbintime(&cur_bt); + bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); + bintime_add(&io->io_hdr.dma_bt, &cur_bt); + io->io_hdr.num_dmas++; +#endif } /* From owner-svn-src-all@freebsd.org Mon Oct 5 11:01:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37C3899A4A7; Mon, 5 Oct 2015 11:01:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 297287D7; Mon, 5 Oct 2015 11:01:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B1K2j079573; Mon, 5 Oct 2015 11:01:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B1JVt078716; Mon, 5 Oct 2015 11:01:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051101.t95B1JVt078716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288798 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:01:20 -0000 Author: mav Date: Mon Oct 5 11:01:18 2015 New Revision: 288798 URL: https://svnweb.freebsd.org/changeset/base/288798 Log: MFC r288215: Switch I/O time accounting from system time to uptime. While there, make num_dmas accounted independently of CTL_TIME_IO. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_io.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:00:25 2015 (r288797) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:01:18 2015 (r288798) @@ -1329,7 +1329,7 @@ ctl_isc_event_handler(ctl_ha_channel cha io->scsiio.tag_type = msg->scsi.tag_type; #ifdef CTL_TIME_IO io->io_hdr.start_time = time_uptime; - getbintime(&io->io_hdr.start_bt); + getbinuptime(&io->io_hdr.start_bt); #endif /* CTL_TIME_IO */ io->scsiio.cdb_len = msg->scsi.cdb_len; memcpy(io->scsiio.cdb, msg->scsi.cdb, @@ -1368,7 +1368,7 @@ ctl_isc_event_handler(ctl_ha_channel cha if (msg->dt.sg_sequence == 0) { #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); + getbinuptime(&io->io_hdr.dma_start_bt); #endif i = msg->dt.kern_sg_entries + msg->dt.kern_data_len / @@ -1518,7 +1518,7 @@ ctl_isc_event_handler(ctl_ha_channel cha taskio->tag_type = msg->task.tag_type; #ifdef CTL_TIME_IO taskio->io_hdr.start_time = time_uptime; - getbintime(&taskio->io_hdr.start_bt); + getbinuptime(&taskio->io_hdr.start_bt); #endif /* CTL_TIME_IO */ ctl_run_task((union ctl_io *)taskio); break; @@ -2777,7 +2777,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, __func__, ooa_hdr->fill_len); } - getbintime(&ooa_hdr->cur_bt); + getbinuptime(&ooa_hdr->cur_bt); if (cur_fill_num > ooa_hdr->alloc_num) { ooa_hdr->dropped_num = cur_fill_num -ooa_hdr->alloc_num; @@ -12656,11 +12656,11 @@ ctl_send_datamove_done(union ctl_io *io, msg.scsi.sense_len, M_WAITOK); #ifdef CTL_TIME_IO - getbintime(&cur_bt); + getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); bintime_add(&io->io_hdr.dma_bt, &cur_bt); - io->io_hdr.num_dmas++; #endif + io->io_hdr.num_dmas++; } /* @@ -13169,12 +13169,12 @@ ctl_process_done(union ctl_io *io) #ifdef CTL_TIME_IO bintime_add(&lun->stats.ports[targ_port].dma_time[type], &io->io_hdr.dma_bt); - lun->stats.ports[targ_port].num_dmas[type] += - io->io_hdr.num_dmas; - getbintime(&cur_bt); + getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.start_bt); bintime_add(&lun->stats.ports[targ_port].time[type], &cur_bt); #endif + lun->stats.ports[targ_port].num_dmas[type] += + io->io_hdr.num_dmas; } /* @@ -13319,7 +13319,7 @@ ctl_queue(union ctl_io *io) #ifdef CTL_TIME_IO io->io_hdr.start_time = time_uptime; - getbintime(&io->io_hdr.start_bt); + getbinuptime(&io->io_hdr.start_bt); #endif /* CTL_TIME_IO */ /* Map FE-specific LUN ID into global one. */ Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:00:25 2015 (r288797) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:01:18 2015 (r288798) @@ -408,11 +408,11 @@ ctl_be_block_move_done(union ctl_io *io) DPRINTF("entered\n"); #ifdef CTL_TIME_IO - getbintime(&cur_bt); + getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); bintime_add(&io->io_hdr.dma_bt, &cur_bt); +#endif io->io_hdr.num_dmas++; -#endif io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; /* @@ -566,8 +566,8 @@ ctl_be_block_biodone(struct bio *bio) ctl_serseq_done(io); } #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); -#endif + getbinuptime(&io->io_hdr.dma_start_bt); +#endif ctl_datamove(io); } } @@ -788,8 +788,8 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_serseq_done(io); } #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); -#endif + getbinuptime(&io->io_hdr.dma_start_bt); +#endif ctl_datamove(io); } } @@ -959,8 +959,8 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_serseq_done(io); } #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); -#endif + getbinuptime(&io->io_hdr.dma_start_bt); +#endif ctl_datamove(io); } } @@ -1666,8 +1666,8 @@ ctl_be_block_dispatch(struct ctl_be_bloc } else { SDT_PROBE(cbb, kernel, write, alloc_done, 0, 0, 0, 0, 0); #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); -#endif + getbinuptime(&io->io_hdr.dma_start_bt); +#endif ctl_datamove(io); } } Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:00:25 2015 (r288797) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:01:18 2015 (r288798) @@ -235,11 +235,11 @@ ctl_backend_ramdisk_move_done(union ctl_ CTL_PRIV_BACKEND_LUN].ptr; be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun->be_lun; #ifdef CTL_TIME_IO - getbintime(&cur_bt); + getbinuptime(&cur_bt); bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); bintime_add(&io->io_hdr.dma_bt, &cur_bt); - io->io_hdr.num_dmas++; #endif + io->io_hdr.num_dmas++; if (io->scsiio.kern_sg_entries > 0) free(io->scsiio.kern_data_ptr, M_RAMDISK); io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; @@ -339,7 +339,7 @@ ctl_backend_ramdisk_continue(union ctl_i io->io_hdr.flags |= CTL_FLAG_ALLOCATED; io->io_hdr.ctl_private[CTL_PRIV_BACKEND].integer -= len_filled; #ifdef CTL_TIME_IO - getbintime(&io->io_hdr.dma_start_bt); + getbinuptime(&io->io_hdr.dma_start_bt); #endif ctl_datamove(io); } Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 11:00:25 2015 (r288797) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 5 11:01:18 2015 (r288798) @@ -223,8 +223,8 @@ struct ctl_io_hdr { struct bintime start_bt; /* Timer start ticks */ struct bintime dma_start_bt; /* DMA start ticks */ struct bintime dma_bt; /* DMA total ticks */ - uint32_t num_dmas; /* Number of DMAs */ #endif /* CTL_TIME_IO */ + uint32_t num_dmas; /* Number of DMAs */ union ctl_io *original_sc; union ctl_io *serializing_sc; void *pool; /* I/O pool */ From owner-svn-src-all@freebsd.org Mon Oct 5 11:02:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 701D999A572; Mon, 5 Oct 2015 11:02:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E3FA5C; Mon, 5 Oct 2015 11:02:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B2IIb081222; Mon, 5 Oct 2015 11:02:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B2HgJ081220; Mon, 5 Oct 2015 11:02:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051102.t95B2HgJ081220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288799 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:02:18 -0000 Author: mav Date: Mon Oct 5 11:02:17 2015 New Revision: 288799 URL: https://svnweb.freebsd.org/changeset/base/288799 Log: MFC r288220: Remove stale comments and some excessive empty lines. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:01:18 2015 (r288798) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:02:17 2015 (r288799) @@ -466,14 +466,8 @@ ctl_be_block_move_done(union ctl_io *io) * interrupt context, and therefore we cannot block. */ mtx_lock(&be_lun->queue_lock); - /* - * XXX KDM make sure that links is okay to use at this point. - * Otherwise, we either need to add another field to ctl_io_hdr, - * or deal with resource allocation here. - */ STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links); mtx_unlock(&be_lun->queue_lock); - taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); return (0); @@ -589,15 +583,12 @@ ctl_be_block_flush_file(struct ctl_be_bl (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); - if (MNT_SHARED_WRITES(mountpoint) - || ((mountpoint == NULL) - && MNT_SHARED_WRITES(be_lun->vn->v_mount))) + if (MNT_SHARED_WRITES(mountpoint) || + ((mountpoint == NULL) && MNT_SHARED_WRITES(be_lun->vn->v_mount))) lock_flags = LK_SHARED; else lock_flags = LK_EXCLUSIVE; - vn_lock(be_lun->vn, lock_flags | LK_RETRY); - error = VOP_FSYNC(be_lun->vn, beio->io_arg ? MNT_NOWAIT : MNT_WAIT, curthread); VOP_UNLOCK(be_lun->vn, 0); @@ -719,13 +710,11 @@ ctl_be_block_dispatch_file(struct ctl_be (void)vn_start_write(be_lun->vn, &mountpoint, V_WAIT); - if (MNT_SHARED_WRITES(mountpoint) - || ((mountpoint == NULL) + if (MNT_SHARED_WRITES(mountpoint) || ((mountpoint == NULL) && MNT_SHARED_WRITES(be_lun->vn->v_mount))) lock_flags = LK_SHARED; else lock_flags = LK_EXCLUSIVE; - vn_lock(be_lun->vn, lock_flags | LK_RETRY); /* @@ -1543,14 +1532,8 @@ ctl_be_block_next(struct ctl_be_block_io io->io_hdr.status |= CTL_STATUS_NONE; mtx_lock(&be_lun->queue_lock); - /* - * XXX KDM make sure that links is okay to use at this point. - * Otherwise, we either need to add another field to ctl_io_hdr, - * or deal with resource allocation here. - */ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); mtx_unlock(&be_lun->queue_lock); - taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); } @@ -1781,11 +1764,6 @@ ctl_be_block_submit(union ctl_io *io) PRIV(io)->len = 0; mtx_lock(&be_lun->queue_lock); - /* - * XXX KDM make sure that links is okay to use at this point. - * Otherwise, we either need to add another field to ctl_io_hdr, - * or deal with resource allocation here. - */ STAILQ_INSERT_TAIL(&be_lun->input_queue, &io->io_hdr, links); mtx_unlock(&be_lun->queue_lock); taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); @@ -2336,10 +2314,6 @@ ctl_be_block_create(struct ctl_be_block_ num_threads = 1; } - /* - * XXX This searching loop might be refactored to be combined with - * the loop above, - */ value = ctl_get_opt(&cbe_lun->options, "num_threads"); if (value != NULL) { tmp_num_threads = strtol(value, NULL, 0); @@ -2529,7 +2503,6 @@ ctl_be_block_rm(struct ctl_be_block_soft break; } mtx_unlock(&softc->lock); - if (be_lun == NULL) { snprintf(req->error_str, sizeof(req->error_str), "LUN %u is not managed by the block backend", @@ -2597,13 +2570,10 @@ ctl_be_block_rm(struct ctl_be_block_soft free(be_lun, M_CTLBLK); req->status = CTL_LUN_OK; - return (0); bailout_error: - req->status = CTL_LUN_ERROR; - return (0); } @@ -2625,7 +2595,6 @@ ctl_be_block_modify(struct ctl_be_block_ break; } mtx_unlock(&softc->lock); - if (be_lun == NULL) { snprintf(req->error_str, sizeof(req->error_str), "LUN %u is not managed by the block backend", @@ -2702,7 +2671,6 @@ ctl_be_block_lun_shutdown(void *be_lun) struct ctl_be_block_softc *softc; lun = (struct ctl_be_block_lun *)be_lun; - softc = lun->softc; mtx_lock(&softc->lock); @@ -2710,7 +2678,6 @@ ctl_be_block_lun_shutdown(void *be_lun) if (lun->flags & CTL_BE_BLOCK_LUN_WAITING) wakeup(lun); mtx_unlock(&softc->lock); - } static void @@ -2759,14 +2726,13 @@ ctl_be_block_config_write(union ctl_io * struct ctl_be_lun *cbe_lun; int retval; - retval = 0; - DPRINTF("entered\n"); cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; + retval = 0; switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: case SYNCHRONIZE_CACHE_16: @@ -2884,22 +2850,16 @@ ctl_be_block_lun_info(void *be_lun, stru int retval; lun = (struct ctl_be_block_lun *)be_lun; - retval = 0; retval = sbuf_printf(sb, "\t"); - if (retval != 0) goto bailout; - retval = sbuf_printf(sb, "%d", lun->num_threads); - if (retval != 0) goto bailout; - retval = sbuf_printf(sb, "\n"); bailout: - return (retval); } Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:01:18 2015 (r288798) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:02:17 2015 (r288799) @@ -145,18 +145,13 @@ CTL_BACKEND_DECLARE(cbr, ctl_be_ramdisk_ int ctl_backend_ramdisk_init(void) { - struct ctl_be_ramdisk_softc *softc; + struct ctl_be_ramdisk_softc *softc = &rd_softc; #ifdef CTL_RAMDISK_PAGES int i; #endif - - softc = &rd_softc; - memset(softc, 0, sizeof(*softc)); - mtx_init(&softc->lock, "ctlramdisk", NULL, MTX_DEF); - STAILQ_INIT(&softc->lun_list); softc->rd_size = 1024 * 1024; #ifdef CTL_RAMDISK_PAGES @@ -177,14 +172,12 @@ ctl_backend_ramdisk_init(void) void ctl_backend_ramdisk_shutdown(void) { - struct ctl_be_ramdisk_softc *softc; + struct ctl_be_ramdisk_softc *softc = &rd_softc; struct ctl_be_ramdisk_lun *lun, *next_lun; #ifdef CTL_RAMDISK_PAGES int i; #endif - softc = &rd_softc; - mtx_lock(&softc->lock); for (lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; lun = next_lun){ /* @@ -360,11 +353,8 @@ ctl_backend_ramdisk_worker(void *context if (io != NULL) { STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, ctl_io_hdr, links); - mtx_unlock(&be_lun->queue_lock); - ctl_backend_ramdisk_continue(io); - mtx_lock(&be_lun->queue_lock); continue; } @@ -382,18 +372,14 @@ static int ctl_backend_ramdisk_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { - struct ctl_be_ramdisk_softc *softc; + struct ctl_be_ramdisk_softc *softc = &rd_softc; + struct ctl_lun_req *lun_req; int retval; retval = 0; - softc = &rd_softc; - switch (cmd) { - case CTL_LUN_REQ: { - struct ctl_lun_req *lun_req; - + case CTL_LUN_REQ: lun_req = (struct ctl_lun_req *)addr; - switch (lun_req->reqtype) { case CTL_LUNREQ_CREATE: retval = ctl_backend_ramdisk_create(softc, lun_req); @@ -412,7 +398,6 @@ ctl_backend_ramdisk_ioctl(struct cdev *d break; } break; - } default: retval = ENOTTY; break; @@ -429,20 +414,14 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram struct ctl_lun_rm_params *params; int retval; - retval = 0; params = &req->reqdata.rm; - - be_lun = NULL; - mtx_lock(&softc->lock); - STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) break; } mtx_unlock(&softc->lock); - if (be_lun == NULL) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN %u is not managed by the ramdisk backend", @@ -451,7 +430,6 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram } retval = ctl_disable_lun(&be_lun->cbe_lun); - if (retval != 0) { snprintf(req->error_str, sizeof(req->error_str), "%s: error %d returned from ctl_disable_lun() for " @@ -483,10 +461,9 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram } mtx_lock(&softc->lock); - while ((be_lun->flags & CTL_BE_RAMDISK_LUN_UNCONFIGURED) == 0) { retval = msleep(be_lun, &softc->lock, PCATCH, "ctlram", 0); - if (retval == EINTR) + if (retval == EINTR) break; } be_lun->flags &= ~CTL_BE_RAMDISK_LUN_WAITING; @@ -514,12 +491,10 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram } req->status = CTL_LUN_OK; - return (retval); bailout_error: req->status = CTL_LUN_ERROR; - return (0); } @@ -656,7 +631,6 @@ ctl_backend_ramdisk_create(struct ctl_be mtx_lock(&softc->lock); softc->num_luns++; STAILQ_INSERT_TAIL(&softc->lun_list, be_lun, links); - mtx_unlock(&softc->lock); retval = ctl_add_lun(&be_lun->cbe_lun); @@ -703,7 +677,6 @@ ctl_backend_ramdisk_create(struct ctl_be mtx_unlock(&softc->lock); req->status = CTL_LUN_OK; - return (retval); bailout_error: @@ -716,7 +689,6 @@ bailout_error: mtx_destroy(&be_lun->queue_lock); free(be_lun, M_RAMDISK); } - return (retval); } @@ -739,7 +711,6 @@ ctl_backend_ramdisk_modify(struct ctl_be break; } mtx_unlock(&softc->lock); - if (be_lun == NULL) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN %u is not managed by the ramdisk backend", @@ -786,12 +757,10 @@ ctl_backend_ramdisk_modify(struct ctl_be params->lun_size_bytes = be_lun->size_bytes; req->status = CTL_LUN_OK; - return (0); bailout_error: req->status = CTL_LUN_ERROR; - return (0); } @@ -807,9 +776,7 @@ ctl_backend_ramdisk_lun_shutdown(void *b do_free = 0; mtx_lock(&softc->lock); - lun->flags |= CTL_BE_RAMDISK_LUN_UNCONFIGURED; - if (lun->flags & CTL_BE_RAMDISK_LUN_WAITING) { wakeup(lun); } else { @@ -818,7 +785,6 @@ ctl_backend_ramdisk_lun_shutdown(void *b softc->num_luns--; do_free = 1; } - mtx_unlock(&softc->lock); if (do_free != 0) From owner-svn-src-all@freebsd.org Mon Oct 5 11:03:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AF799A680; Mon, 5 Oct 2015 11:03:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF28ABBC; Mon, 5 Oct 2015 11:03:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B3Rmm081330; Mon, 5 Oct 2015 11:03:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B3PtE081317; Mon, 5 Oct 2015 11:03:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051103.t95B3PtE081317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288800 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:03:28 -0000 Author: mav Date: Mon Oct 5 11:03:24 2015 New Revision: 288800 URL: https://svnweb.freebsd.org/changeset/base/288800 Log: MFC r288221: Remove some dead code found by Clang analyzer. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/cam/ctl/ctl_tpc_local.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:03:24 2015 (r288800) @@ -380,7 +380,7 @@ void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio); -static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, +static void ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries); static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, @@ -459,7 +459,7 @@ static int ctl_datamove_remote_xfer(unio ctl_ha_dt_cb callback); static void ctl_datamove_remote_read(union ctl_io *io); static void ctl_datamove_remote(union ctl_io *io); -static int ctl_process_done(union ctl_io *io); +static void ctl_process_done(union ctl_io *io); static void ctl_lun_thread(void *arg); static void ctl_thresh_thread(void *arg); static void ctl_work_thread(void *arg); @@ -1730,9 +1730,8 @@ ctl_init(void) { struct ctl_softc *softc; void *other_pool; - int i, error, retval; + int i, error; - retval = 0; softc = control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK | M_ZERO); @@ -2276,14 +2275,11 @@ badjuju: /* * Returns 0 for success, errno for failure. */ -static int +static void ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) { union ctl_io *io; - int retval; - - retval = 0; mtx_lock(&lun->lun_lock); for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL); @@ -2323,8 +2319,6 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, entry->cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED; } mtx_unlock(&lun->lun_lock); - - return (retval); } static void * @@ -2750,21 +2744,13 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) { STAILQ_FOREACH(lun, &softc->lun_list, links) { - retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num, - ooa_hdr, entries); - if (retval != 0) - break; - } - if (retval != 0) { - mtx_unlock(&softc->ctl_lock); - free(entries, M_CTL); - break; + ctl_ioctl_fill_ooa(lun, &cur_fill_num, + ooa_hdr, entries); } } else { lun = softc->ctl_luns[ooa_hdr->lun_num]; - - retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr, - entries); + ctl_ioctl_fill_ooa(lun, &cur_fill_num, ooa_hdr, + entries); } mtx_unlock(&softc->ctl_lock); @@ -4385,9 +4371,6 @@ ctl_init_page_index(struct ctl_lun *lun) case SMS_VENDOR_SPECIFIC_PAGE:{ switch (page_index->subpage) { case DBGCNF_SUBPAGE_CODE: { - struct copan_debugconf_subpage *current_page, - *saved_page; - memcpy(&lun->mode_pages.debugconf_subpage[ CTL_PAGE_CURRENT], &debugconf_page_default, @@ -4405,16 +4388,7 @@ ctl_init_page_index(struct ctl_lun *lun) &debugconf_page_default, sizeof(debugconf_page_default)); page_index->page_data = - (uint8_t *)lun->mode_pages.debugconf_subpage; - - current_page = (struct copan_debugconf_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_CURRENT)); - saved_page = (struct copan_debugconf_subpage *) - (page_index->page_data + - (page_index->page_len * - CTL_PAGE_SAVED)); + (uint8_t *)lun->mode_pages.debugconf_subpage; break; } default: @@ -5250,36 +5224,14 @@ ctl_config_read_done(union ctl_io *io) int ctl_scsi_release(struct ctl_scsiio *ctsio) { - int length, longid, thirdparty_id, resv_id; struct ctl_lun *lun; uint32_t residx; - length = 0; - resv_id = 0; - CTL_DEBUG_PRINT(("ctl_scsi_release\n")); residx = ctl_get_initindex(&ctsio->io_hdr.nexus); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - switch (ctsio->cdb[0]) { - case RELEASE_10: { - struct scsi_release_10 *cdb; - - cdb = (struct scsi_release_10 *)ctsio->cdb; - - if (cdb->byte2 & SR10_LONGID) - longid = 1; - else - thirdparty_id = cdb->thirdparty_id; - - resv_id = cdb->resv_id; - length = scsi_2btoul(cdb->length); - break; - } - } - - /* * XXX KDM right now, we only support LUN reservation. We don't * support 3rd party reservations, or extent reservations, which @@ -5287,25 +5239,6 @@ ctl_scsi_release(struct ctl_scsiio *ctsi * far, we've got a LUN reservation. Anything else got kicked out * above. So, according to SPC, ignore the length. */ - length = 0; - - if (((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) - && (length > 0)) { - ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK); - ctsio->kern_data_len = length; - ctsio->kern_total_len = length; - ctsio->kern_data_resid = 0; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - - return (CTL_RETVAL_COMPLETE); - } - - if (length > 0) - thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr); mtx_lock(&lun->lun_lock); @@ -5321,11 +5254,6 @@ ctl_scsi_release(struct ctl_scsiio *ctsi mtx_unlock(&lun->lun_lock); - if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { - free(ctsio->kern_data_ptr, M_CTL); - ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED; - } - ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); @@ -5334,41 +5262,14 @@ ctl_scsi_release(struct ctl_scsiio *ctsi int ctl_scsi_reserve(struct ctl_scsiio *ctsio) { - int extent, thirdparty, longid; - int resv_id, length; - uint64_t thirdparty_id; struct ctl_lun *lun; uint32_t residx; - extent = 0; - thirdparty = 0; - longid = 0; - resv_id = 0; - length = 0; - thirdparty_id = 0; - CTL_DEBUG_PRINT(("ctl_reserve\n")); residx = ctl_get_initindex(&ctsio->io_hdr.nexus); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - switch (ctsio->cdb[0]) { - case RESERVE_10: { - struct scsi_reserve_10 *cdb; - - cdb = (struct scsi_reserve_10 *)ctsio->cdb; - - if (cdb->byte2 & SR10_LONGID) - longid = 1; - else - thirdparty_id = cdb->thirdparty_id; - - resv_id = cdb->resv_id; - length = scsi_2btoul(cdb->length); - break; - } - } - /* * XXX KDM right now, we only support LUN reservation. We don't * support 3rd party reservations, or extent reservations, which @@ -5376,45 +5277,18 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi * far, we've got a LUN reservation. Anything else got kicked out * above. So, according to SPC, ignore the length. */ - length = 0; - - if (((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) - && (length > 0)) { - ctsio->kern_data_ptr = malloc(length, M_CTL, M_WAITOK); - ctsio->kern_data_len = length; - ctsio->kern_total_len = length; - ctsio->kern_data_resid = 0; - ctsio->kern_rel_offset = 0; - ctsio->kern_sg_entries = 0; - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - - return (CTL_RETVAL_COMPLETE); - } - - if (length > 0) - thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr); mtx_lock(&lun->lun_lock); if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx != residx)) { ctl_set_reservation_conflict(ctsio); goto bailout; } - lun->flags |= CTL_LUN_RESERVED; lun->res_idx = residx; - ctl_set_success(ctsio); bailout: mtx_unlock(&lun->lun_lock); - - if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { - free(ctsio->kern_data_ptr, M_CTL); - ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED; - } - ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -5894,8 +5768,6 @@ ctl_write_same(struct ctl_scsiio *ctsio) int len, retval; uint8_t byte2; - retval = CTL_RETVAL_COMPLETE; - CTL_DEBUG_PRINT(("ctl_write_same\n")); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -6012,8 +5884,6 @@ ctl_unmap(struct ctl_scsiio *ctsio) int len, retval; uint8_t byte2; - retval = CTL_RETVAL_COMPLETE; - CTL_DEBUG_PRINT(("ctl_unmap\n")); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -6297,8 +6167,6 @@ ctl_do_mode_select(union ctl_io *io) ctsio = &io->scsiio; page_index = NULL; page_len = 0; - retval = CTL_RETVAL_COMPLETE; - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; if (lun->be_lun->lun_type != T_DIRECT) @@ -6516,28 +6384,7 @@ ctl_mode_select(struct ctl_scsiio *ctsio { int param_len, pf, sp; int header_size, bd_len; - int len_left, len_used; - struct ctl_page_index *page_index; - struct ctl_lun *lun; - int control_dev, page_len; union ctl_modepage_info *modepage_info; - int retval; - - pf = 0; - sp = 0; - page_len = 0; - len_used = 0; - len_left = 0; - retval = 0; - bd_len = 0; - page_index = NULL; - - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - - if (lun->be_lun->lun_type != T_DIRECT) - control_dev = 1; - else - control_dev = 0; switch (ctsio->cdb[0]) { case MODE_SELECT_6: { @@ -6547,7 +6394,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio pf = (cdb->byte2 & SMS_PF) ? 1 : 0; sp = (cdb->byte2 & SMS_SP) ? 1 : 0; - param_len = cdb->length; header_size = sizeof(struct scsi_mode_header_6); break; @@ -6559,7 +6405,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio pf = (cdb->byte2 & SMS_PF) ? 1 : 0; sp = (cdb->byte2 & SMS_SP) ? 1 : 0; - param_len = scsi_2btoul(cdb->length); header_size = sizeof(struct scsi_mode_header_10); break; @@ -6568,7 +6413,6 @@ ctl_mode_select(struct ctl_scsiio *ctsio ctl_set_invalid_opcode(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); - break; /* NOTREACHED */ } /* @@ -6650,14 +6494,9 @@ ctl_mode_select(struct ctl_scsiio *ctsio modepage_info = (union ctl_modepage_info *) ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes; - memset(modepage_info, 0, sizeof(*modepage_info)); - - len_left = param_len - header_size - bd_len; - len_used = header_size + bd_len; - - modepage_info->header.len_left = len_left; - modepage_info->header.len_used = len_used; + modepage_info->header.len_left = param_len - header_size - bd_len; + modepage_info->header.len_used = header_size + bd_len; return (ctl_do_mode_select((union ctl_io *)ctsio)); } @@ -8979,8 +8818,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_read_write: command: %#x\n", ctsio->cdb[0])); flags = 0; - retval = CTL_RETVAL_COMPLETE; - isread = ctsio->cdb[0] == READ_6 || ctsio->cdb[0] == READ_10 || ctsio->cdb[0] == READ_12 || ctsio->cdb[0] == READ_16; switch (ctsio->cdb[0]) { @@ -9157,7 +8994,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_read_write: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); - return (retval); } @@ -9197,8 +9033,6 @@ ctl_cnw(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_cnw: command: %#x\n", ctsio->cdb[0])); flags = 0; - retval = CTL_RETVAL_COMPLETE; - switch (ctsio->cdb[0]) { case COMPARE_AND_WRITE: { struct scsi_compare_and_write *cdb; @@ -9289,8 +9123,6 @@ ctl_verify(struct ctl_scsiio *ctsio) bytchk = 0; flags = CTL_LLF_FUA; - retval = CTL_RETVAL_COMPLETE; - switch (ctsio->cdb[0]) { case VERIFY_10: { struct scsi_verify_10 *cdb; @@ -10219,7 +10051,6 @@ ctl_inquiry_evpd_block_limits(struct ctl { struct scsi_vpd_block_limits *bl_ptr; struct ctl_lun *lun; - int bs; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -10256,7 +10087,6 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr->max_cmp_write_len = 0xff; scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len); if (lun != NULL) { - bs = lun->be_lun->blocksize; scsi_ulto4b(lun->be_lun->opttxferlen, bl_ptr->opt_txfer_len); if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); @@ -13061,7 +12891,7 @@ ctl_datamove_remote(union ctl_io *io) } } -static int +static void ctl_process_done(union ctl_io *io) { struct ctl_lun *lun; @@ -13116,7 +12946,7 @@ ctl_process_done(union ctl_io *io) if (ctl_debug & CTL_DEBUG_INFO) ctl_io_error_print(io, NULL); fe_done(io); - return (CTL_RETVAL_COMPLETE); + return; default: panic("ctl_process_done: invalid io type %d\n", io->io_hdr.io_type); @@ -13239,7 +13069,6 @@ bailout: } fe_done(io); - return (CTL_RETVAL_COMPLETE); } #ifdef CTL_WITH_CA @@ -13445,8 +13274,6 @@ ctl_work_thread(void *arg) CTL_DEBUG_PRINT(("ctl_work_thread starting\n")); for (;;) { - retval = 0; - /* * We handle the queues in this order: * - ISC @@ -13470,7 +13297,7 @@ ctl_work_thread(void *arg) STAILQ_REMOVE_HEAD(&thr->done_queue, links); /* clear any blocked commands, call fe_done */ mtx_unlock(&thr->queue_lock); - retval = ctl_process_done(io); + ctl_process_done(io); continue; } io = (union ctl_io *)STAILQ_FIRST(&thr->incoming_queue); @@ -13503,12 +13330,10 @@ ctl_lun_thread(void *arg) { struct ctl_softc *softc = (struct ctl_softc *)arg; struct ctl_be_lun *be_lun; - int retval; CTL_DEBUG_PRINT(("ctl_lun_thread starting\n")); for (;;) { - retval = 0; mtx_lock(&softc->ctl_lock); be_lun = STAILQ_FIRST(&softc->pending_lun_queue); if (be_lun != NULL) { @@ -13529,7 +13354,6 @@ ctl_thresh_thread(void *arg) { struct ctl_softc *softc = (struct ctl_softc *)arg; struct ctl_lun *lun; - struct ctl_be_lun *be_lun; struct scsi_da_rw_recovery_page *rwpage; struct ctl_logical_block_provisioning_page *page; const char *attr; @@ -13542,7 +13366,6 @@ ctl_thresh_thread(void *arg) for (;;) { mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { - be_lun = lun->be_lun; if ((lun->flags & CTL_LUN_DISABLED) || (lun->flags & CTL_LUN_OFFLINE) || lun->backend->lun_attr == NULL) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:03:24 2015 (r288800) @@ -1006,13 +1006,10 @@ ctl_be_block_flush_dev(struct ctl_be_blo struct ctl_be_block_io *beio) { struct bio *bio; - union ctl_io *io; struct cdevsw *csw; struct cdev *dev; int ref; - io = beio->io; - DPRINTF("entered\n"); /* This can't fail, it's a blocking allocation. */ @@ -1826,7 +1823,6 @@ ctl_be_block_open_file(struct ctl_be_blo off_t ps, pss, po, pos, us, uss, uo, uos; int error; - error = 0; cbe_lun = &be_lun->cbe_lun; file_data = &be_lun->backend.file; params = &be_lun->params; Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:03:24 2015 (r288800) @@ -340,12 +340,10 @@ ctl_backend_ramdisk_continue(union ctl_i static void ctl_backend_ramdisk_worker(void *context, int pending) { - struct ctl_be_ramdisk_softc *softc; struct ctl_be_ramdisk_lun *be_lun; union ctl_io *io; be_lun = (struct ctl_be_ramdisk_lun *)context; - softc = be_lun->softc; mtx_lock(&be_lun->queue_lock); for (;;) { @@ -414,7 +412,6 @@ ctl_backend_ramdisk_rm(struct ctl_be_ram struct ctl_lun_rm_params *params; int retval; - retval = 0; params = &req->reqdata.rm; mtx_lock(&softc->lock); STAILQ_FOREACH(be_lun, &softc->lun_list, links) { @@ -845,12 +842,9 @@ ctl_backend_ramdisk_lun_config_status(vo static int ctl_backend_ramdisk_config_write(union ctl_io *io) { - struct ctl_be_ramdisk_softc *softc; int retval; retval = 0; - softc = &rd_softc; - switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: case SYNCHRONIZE_CACHE_16: @@ -875,13 +869,11 @@ ctl_backend_ramdisk_config_write(union c case START_STOP_UNIT: { struct scsi_start_stop_unit *cdb; struct ctl_be_lun *cbe_lun; - struct ctl_be_ramdisk_lun *be_lun; cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; - be_lun = (struct ctl_be_ramdisk_lun *)cbe_lun->be_lun; if (cdb->how & SSS_START) retval = ctl_start_lun(cbe_lun); Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:03:24 2015 (r288800) @@ -134,7 +134,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x01, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, /* 02 RELEASE */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -145,7 +145,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x02, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, /* 03 CLEAR */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 5 11:03:24 2015 (r288800) @@ -606,11 +606,8 @@ ctl_set_invalid_field(struct ctl_scsiio void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio) { - struct scsi_sense_data *sense; uint8_t sks[3]; - sense = &ctsio->sense_data; - sks[0] = SSD_SCS_VALID | SSD_FIELDPTR_CMD; scsi_ulto2b(0, &sks[1]); Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_frontend.c Mon Oct 5 11:03:24 2015 (r288800) @@ -145,8 +145,6 @@ ctl_port_register(struct ctl_port *port) int port_num; int retval; - retval = 0; - KASSERT(softc != NULL, ("CTL is not initialized")); port->ctl_softc = softc; Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 11:03:24 2015 (r288800) @@ -136,7 +136,6 @@ cfcs_init(void) int retval; softc = &cfcs_softc; - retval = 0; bzero(softc, sizeof(*softc)); mtx_init(&softc->lock, "ctl2cam", NULL, MTX_DEF); port = &softc->port; Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 11:03:24 2015 (r288800) @@ -307,10 +307,7 @@ cfi_submit_wait(union ctl_io *io) ctl_fe_ioctl_state last_state; int done, retval; - retval = 0; - bzero(¶ms, sizeof(params)); - mtx_init(¶ms.ioctl_mtx, "ctliocmtx", NULL, MTX_DEF); cv_init(¶ms.sem, "ctlioccv"); params.state = CTL_IOCTL_INPROG; Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 11:03:24 2015 (r288800) @@ -458,6 +458,7 @@ cfiscsi_decode_lun(uint64_t encoded) break; } result = (lun[1] << 16) + (lun[2] << 8) + lun[3]; + break; default: CFISCSI_WARN("unsupported LUN format 0x%jx", (uintmax_t)encoded); @@ -1331,10 +1332,8 @@ int cfiscsi_init(void) { struct cfiscsi_softc *softc; - int retval; softc = &cfiscsi_softc; - retval = 0; bzero(softc, sizeof(*softc)); mtx_init(&softc->lock, "cfiscsi", NULL, MTX_DEF); Modified: stable/10/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 11:02:17 2015 (r288799) +++ stable/10/sys/cam/ctl/ctl_tpc_local.c Mon Oct 5 11:03:24 2015 (r288800) @@ -142,10 +142,6 @@ tpcl_datamove(union ctl_io *io) struct ctl_scsiio *ctsio; int i, j; - ext_sg_start = 0; - ext_offset = 0; - ext_sglist = NULL; - CTL_DEBUG_PRINT(("%s\n", __func__)); ctsio = &io->scsiio; From owner-svn-src-all@freebsd.org Mon Oct 5 11:04:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD2A599A740; Mon, 5 Oct 2015 11:04:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B584FD18; Mon, 5 Oct 2015 11:04:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B4EGv081419; Mon, 5 Oct 2015 11:04:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B4EqL081418; Mon, 5 Oct 2015 11:04:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051104.t95B4EqL081418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288801 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:04:15 -0000 Author: mav Date: Mon Oct 5 11:04:13 2015 New Revision: 288801 URL: https://svnweb.freebsd.org/changeset/base/288801 Log: MFC r288229: Fix bit masks changed for the wrong commands in r288221. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:03:24 2015 (r288800) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:04:13 2015 (r288801) @@ -134,7 +134,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, + 10, { 0x01, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 02 RELEASE */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -145,7 +145,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, + 10, { 0x02, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 03 CLEAR */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -907,7 +907,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT, - CTL_LUN_PAT_NONE, 10, {0x02, 0, 0xff, 0, 0, 0, 0xff, 0xff, 0x07} }, + CTL_LUN_PAT_NONE, 10, {0, 0, 0, 0, 0, 0, 0, 0, 0x07} }, /* 57 RELEASE(10) */ {ctl_scsi_release, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -916,7 +916,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT, - CTL_LUN_PAT_NONE, 10, {0x02, 0, 0xff, 0, 0, 0, 0xff, 0xff, 0x07} }, + CTL_LUN_PAT_NONE, 10, {0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, /* 58 REPAIR TRACK */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, From owner-svn-src-all@freebsd.org Mon Oct 5 11:05:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C05A99A803; Mon, 5 Oct 2015 11:05:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E48CE6C; Mon, 5 Oct 2015 11:05:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B543n081515; Mon, 5 Oct 2015 11:05:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B54Ys081513; Mon, 5 Oct 2015 11:05:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051105.t95B54Ys081513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288802 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:05:05 -0000 Author: mav Date: Mon Oct 5 11:05:04 2015 New Revision: 288802 URL: https://svnweb.freebsd.org/changeset/base/288802 Log: MFC r288224: Constify ctl_serialize_table. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_ser_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:04:13 2015 (r288801) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:05:04 2015 (r288802) @@ -10778,7 +10778,7 @@ ctl_check_for_blockage(struct ctl_lun *l union ctl_io *ooa_io) { const struct ctl_cmd_entry *pending_entry, *ooa_entry; - ctl_serialize_action *serialize_row; + const ctl_serialize_action *serialize_row; /* * The initiator attempted multiple untagged commands at the same Modified: stable/10/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 5 11:04:13 2015 (r288801) +++ stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 5 11:05:04 2015 (r288802) @@ -61,7 +61,7 @@ #define xO CTL_SER_EXTENTOPT /* Optional extent check */ #define xS CTL_SER_EXTENTSEQ /* Sequential extent check */ -static ctl_serialize_action +const static ctl_serialize_action ctl_serialize_table[CTL_SERIDX_COUNT][CTL_SERIDX_COUNT] = { /**>IDX_ :: 2nd:TUR RD WRT UNM SYN MDSN MDSL RQSN INQ RDCP RES LSNS FMT STR*/ /*TUR */{ pS, pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, From owner-svn-src-all@freebsd.org Mon Oct 5 11:05:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0424E99AB16; Mon, 5 Oct 2015 11:05:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEE212C1; Mon, 5 Oct 2015 11:05:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95B5v61081601; Mon, 5 Oct 2015 11:05:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95B5vmV081600; Mon, 5 Oct 2015 11:05:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051105.t95B5vmV081600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288803 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:05:58 -0000 Author: mav Date: Mon Oct 5 11:05:56 2015 New Revision: 288803 URL: https://svnweb.freebsd.org/changeset/base/288803 Log: MFC r288239: Properly lock LUN in ctl_failover_lun(). Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:05:04 2015 (r288802) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:05:56 2015 (r288803) @@ -426,7 +426,7 @@ static int ctl_check_blocked(struct ctl_ static int ctl_scsiio_lun_check(struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); -static void ctl_failover_lun(struct ctl_lun *lun); +static void ctl_failover_lun(union ctl_io *io); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio); static int ctl_scsiio(struct ctl_scsiio *ctsio); @@ -11201,12 +11201,31 @@ ctl_failover_io(union ctl_io *io, int ha } static void -ctl_failover_lun(struct ctl_lun *lun) +ctl_failover_lun(union ctl_io *rio) { - struct ctl_softc *softc = lun->ctl_softc; + struct ctl_softc *softc = control_softc; + struct ctl_lun *lun; struct ctl_io_hdr *io, *next_io; + uint32_t targ_lun; + + targ_lun = rio->io_hdr.nexus.targ_mapped_lun; + CTL_DEBUG_PRINT(("FAILOVER for lun %ju\n", targ_lun)); + + /* Find and lock the LUN. */ + mtx_lock(&softc->ctl_lock); + if ((targ_lun < CTL_MAX_LUNS) && + ((lun = softc->ctl_luns[targ_lun]) != NULL)) { + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + if (lun->flags & CTL_LUN_DISABLED) { + mtx_unlock(&lun->lun_lock); + return; + } + } else { + mtx_unlock(&softc->ctl_lock); + return; + } - CTL_DEBUG_PRINT(("FAILOVER for lun %ju\n", lun->lun)); if (softc->ha_mode == CTL_HA_MODE_XFER) { TAILQ_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { /* We are master */ @@ -11264,6 +11283,7 @@ ctl_failover_lun(struct ctl_lun *lun) } ctl_check_blocked(lun); } + mtx_unlock(&lun->lun_lock); } static int @@ -12196,9 +12216,7 @@ ctl_handle_isc(union ctl_io *io) io->scsiio.be_move_done(io); break; case CTL_MSG_FAILOVER: - mtx_lock(&lun->lun_lock); - ctl_failover_lun(lun); - mtx_unlock(&lun->lun_lock); + ctl_failover_lun(io); free_io = 1; break; default: From owner-svn-src-all@freebsd.org Mon Oct 5 11:24:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20B0E9B1E75; Mon, 5 Oct 2015 11:24:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1276EFAD; Mon, 5 Oct 2015 11:24:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BOprd088814; Mon, 5 Oct 2015 11:24:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BOpeU088813; Mon, 5 Oct 2015 11:24:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051124.t95BOpeU088813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288804 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:24:52 -0000 Author: mav Date: Mon Oct 5 11:24:51 2015 New Revision: 288804 URL: https://svnweb.freebsd.org/changeset/base/288804 Log: MFC r288247: Pass to sobind() copy of the address, not the original. Modified: stable/10/sys/cam/ctl/ctl_ha.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_ha.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 11:05:56 2015 (r288803) +++ stable/10/sys/cam/ctl/ctl_ha.c Mon Oct 5 11:24:51 2015 (r288804) @@ -427,6 +427,7 @@ static int ctl_ha_connect(struct ha_softc *softc) { struct thread *td = curthread; + struct sockaddr_in sa; struct socket *so; int error; @@ -440,7 +441,8 @@ ctl_ha_connect(struct ha_softc *softc) softc->ha_so = so; ctl_ha_sock_setup(softc); - error = soconnect(so, (struct sockaddr *)&softc->ha_peer_in, td); + memcpy(&sa, &softc->ha_peer_in, sizeof(sa)); + error = soconnect(so, (struct sockaddr *)&sa, td); if (error != 0) { printf("%s: soconnect() error %d\n", __func__, error); goto out; @@ -517,6 +519,7 @@ static int ctl_ha_listen(struct ha_softc *softc) { struct thread *td = curthread; + struct sockaddr_in sa; struct sockopt opt; int error, val; @@ -557,7 +560,8 @@ ctl_ha_listen(struct ha_softc *softc) SOCKBUF_UNLOCK(&softc->ha_lso->so_rcv); } - error = sobind(softc->ha_lso, (struct sockaddr *)&softc->ha_peer_in, td); + memcpy(&sa, &softc->ha_peer_in, sizeof(sa)); + error = sobind(softc->ha_lso, (struct sockaddr *)&sa, td); if (error != 0) { printf("%s: sobind() error %d\n", __func__, error); goto out; From owner-svn-src-all@freebsd.org Mon Oct 5 11:25:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B1B29B201F; Mon, 5 Oct 2015 11:25:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B201183; Mon, 5 Oct 2015 11:25:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BPq2i088930; Mon, 5 Oct 2015 11:25:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BPnCT088917; Mon, 5 Oct 2015 11:25:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051125.t95BPnCT088917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288805 - in stable/10: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:25:52 -0000 Author: mav Date: Mon Oct 5 11:25:48 2015 New Revision: 288805 URL: https://svnweb.freebsd.org/changeset/base/288805 Log: MFC r288259: Remove some duplicate, legacy, dead and questionable code. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c stable/10/sys/cam/ctl/ctl_ioctl.h stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_util.c stable/10/sys/cam/ctl/ctl_util.h stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctladm/ctladm.c stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:25:48 2015 (r288805) @@ -1756,12 +1756,7 @@ ctl_init(void) softc->io_zone = uma_zcreate("CTL IO", sizeof(union ctl_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); softc->open_count = 0; - - /* - * Default to actually sending a SYNCHRONIZE CACHE command down to - * the drive. - */ - softc->flags = CTL_FLAG_REAL_SYNC; + softc->flags = 0; SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "ha_mode", CTLFLAG_RDTUN, (int *)&softc->ha_mode, 0, @@ -2588,112 +2583,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_unlock(&softc->ctl_lock); break; } - case CTL_GET_PORT_LIST: { - struct ctl_port *port; - struct ctl_port_list *list; - int i; - - list = (struct ctl_port_list *)addr; - - if (list->alloc_len != (list->alloc_num * - sizeof(struct ctl_port_entry))) { - printf("%s: CTL_GET_PORT_LIST: alloc_len %u != " - "alloc_num %u * sizeof(struct ctl_port_entry) " - "%zu\n", __func__, list->alloc_len, - list->alloc_num, sizeof(struct ctl_port_entry)); - retval = EINVAL; - break; - } - list->fill_len = 0; - list->fill_num = 0; - list->dropped_num = 0; - i = 0; - mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(port, &softc->port_list, links) { - struct ctl_port_entry entry, *list_entry; - - if (list->fill_num >= list->alloc_num) { - list->dropped_num++; - continue; - } - - entry.port_type = port->port_type; - strlcpy(entry.port_name, port->port_name, - sizeof(entry.port_name)); - entry.targ_port = port->targ_port; - entry.physical_port = port->physical_port; - entry.virtual_port = port->virtual_port; - entry.wwnn = port->wwnn; - entry.wwpn = port->wwpn; - if (port->status & CTL_PORT_STATUS_ONLINE) - entry.online = 1; - else - entry.online = 0; - - list_entry = &list->entries[i]; - - retval = copyout(&entry, list_entry, sizeof(entry)); - if (retval != 0) { - printf("%s: CTL_GET_PORT_LIST: copyout " - "returned %d\n", __func__, retval); - break; - } - i++; - list->fill_num++; - list->fill_len += sizeof(entry); - } - mtx_unlock(&softc->ctl_lock); - - /* - * If this is non-zero, we had a copyout fault, so there's - * probably no point in attempting to set the status inside - * the structure. - */ - if (retval != 0) - break; - - if (list->dropped_num > 0) - list->status = CTL_PORT_LIST_NEED_MORE_SPACE; - else - list->status = CTL_PORT_LIST_OK; - break; - } - case CTL_DUMP_OOA: { - union ctl_io *io; - char printbuf[128]; - struct sbuf sb; - - mtx_lock(&softc->ctl_lock); - printf("Dumping OOA queues:\n"); - STAILQ_FOREACH(lun, &softc->lun_list, links) { - mtx_lock(&lun->lun_lock); - for (io = (union ctl_io *)TAILQ_FIRST( - &lun->ooa_queue); io != NULL; - io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, - ooa_links)) { - sbuf_new(&sb, printbuf, sizeof(printbuf), - SBUF_FIXEDLEN); - sbuf_printf(&sb, "LUN %jd tag 0x%04x%s%s%s%s: ", - (intmax_t)lun->lun, - io->scsiio.tag_num, - (io->io_hdr.flags & - CTL_FLAG_BLOCKED) ? "" : " BLOCKED", - (io->io_hdr.flags & - CTL_FLAG_DMA_INPROG) ? " DMA" : "", - (io->io_hdr.flags & - CTL_FLAG_ABORT) ? " ABORT" : "", - (io->io_hdr.flags & - CTL_FLAG_IS_WAS_ON_RTR) ? " RTR" : ""); - ctl_scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_finish(&sb); - printf("%s\n", sbuf_data(&sb)); - } - mtx_unlock(&lun->lun_lock); - } - printf("OOA queues dump done\n"); - mtx_unlock(&softc->ctl_lock); - break; - } case CTL_GET_OOA: { struct ctl_ooa *ooa_hdr; struct ctl_ooa_entry *entries; @@ -2776,38 +2665,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, free(entries, M_CTL); break; } - case CTL_CHECK_OOA: { - union ctl_io *io; - struct ctl_ooa_info *ooa_info; - - - ooa_info = (struct ctl_ooa_info *)addr; - - if (ooa_info->lun_id >= CTL_MAX_LUNS) { - ooa_info->status = CTL_OOA_INVALID_LUN; - break; - } - mtx_lock(&softc->ctl_lock); - lun = softc->ctl_luns[ooa_info->lun_id]; - if (lun == NULL) { - mtx_unlock(&softc->ctl_lock); - ooa_info->status = CTL_OOA_INVALID_LUN; - break; - } - mtx_lock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - ooa_info->num_entries = 0; - for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); - io != NULL; io = (union ctl_io *)TAILQ_NEXT( - &io->io_hdr, ooa_links)) { - ooa_info->num_entries++; - } - mtx_unlock(&lun->lun_lock); - - ooa_info->status = CTL_OOA_SUCCESS; - - break; - } case CTL_DELAY_IO: { struct ctl_io_delay_info *delay_info; @@ -2863,70 +2720,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, #endif /* CTL_IO_DELAY */ break; } - case CTL_REALSYNC_SET: { - int *syncstate; - - syncstate = (int *)addr; - - mtx_lock(&softc->ctl_lock); - switch (*syncstate) { - case 0: - softc->flags &= ~CTL_FLAG_REAL_SYNC; - break; - case 1: - softc->flags |= CTL_FLAG_REAL_SYNC; - break; - default: - retval = EINVAL; - break; - } - mtx_unlock(&softc->ctl_lock); - break; - } - case CTL_REALSYNC_GET: { - int *syncstate; - - syncstate = (int*)addr; - - mtx_lock(&softc->ctl_lock); - if (softc->flags & CTL_FLAG_REAL_SYNC) - *syncstate = 1; - else - *syncstate = 0; - mtx_unlock(&softc->ctl_lock); - - break; - } - case CTL_SETSYNC: - case CTL_GETSYNC: { - struct ctl_sync_info *sync_info; - - sync_info = (struct ctl_sync_info *)addr; - - mtx_lock(&softc->ctl_lock); - lun = softc->ctl_luns[sync_info->lun_id]; - if (lun == NULL) { - mtx_unlock(&softc->ctl_lock); - sync_info->status = CTL_GS_SYNC_NO_LUN; - break; - } - /* - * Get or set the sync interval. We're not bounds checking - * in the set case, hopefully the user won't do something - * silly. - */ - mtx_lock(&lun->lun_lock); - mtx_unlock(&softc->ctl_lock); - if (cmd == CTL_GETSYNC) - sync_info->sync_interval = lun->sync_interval; - else - lun->sync_interval = sync_info->sync_interval; - mtx_unlock(&lun->lun_lock); - - sync_info->status = CTL_GS_SYNC_OK; - - break; - } case CTL_GETSTATS: { struct ctl_stats *stats; int i; @@ -5303,8 +5096,6 @@ ctl_start_stop(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_start_stop\n")); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - retval = 0; - cdb = (struct scsi_start_stop_unit *)ctsio->cdb; /* @@ -5362,54 +5153,27 @@ ctl_start_stop(struct ctl_scsiio *ctsio) } /* - * XXX KDM Copan-specific offline behavior. - * Figure out a reasonable way to port this? - */ -#ifdef NEEDTOPORT - mtx_lock(&lun->lun_lock); - - if (((cdb->byte2 & SSS_ONOFFLINE) == 0) - && (lun->flags & CTL_LUN_OFFLINE)) { - /* - * If the LUN is offline, and the on/offline bit isn't set, - * reject the start or stop. Otherwise, let it through. - */ - mtx_unlock(&lun->lun_lock); - ctl_set_lun_not_ready(ctsio); + * In the non-immediate case, we send the request to + * the backend and return status to the user when + * it is done. + * + * In the immediate case, we allocate a new ctl_io + * to hold a copy of the request, and send that to + * the backend. We then set good status on the + * user's request and return it immediately. + */ + if (cdb->byte2 & SSS_IMMED) { + union ctl_io *new_io; + + new_io = ctl_alloc_io(ctsio->io_hdr.pool); + ctl_copy_io((union ctl_io *)ctsio, new_io); + retval = lun->backend->config_write(new_io); + ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); } else { - mtx_unlock(&lun->lun_lock); -#endif /* NEEDTOPORT */ - /* - * This could be a start or a stop when we're online, - * or a stop/offline or start/online. A start or stop when - * we're offline is covered in the case above. - */ - /* - * In the non-immediate case, we send the request to - * the backend and return status to the user when - * it is done. - * - * In the immediate case, we allocate a new ctl_io - * to hold a copy of the request, and send that to - * the backend. We then set good status on the - * user's request and return it immediately. - */ - if (cdb->byte2 & SSS_IMMED) { - union ctl_io *new_io; - - new_io = ctl_alloc_io(ctsio->io_hdr.pool); - ctl_copy_io((union ctl_io *)ctsio, new_io); - retval = lun->backend->config_write(new_io); - ctl_set_success(ctsio); - ctl_done((union ctl_io *)ctsio); - } else { - retval = lun->backend->config_write( - (union ctl_io *)ctsio); - } -#ifdef NEEDTOPORT + retval = lun->backend->config_write( + (union ctl_io *)ctsio); } -#endif return (retval); } @@ -5487,25 +5251,9 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) lbalen->lba = starting_lba; lbalen->len = block_count; lbalen->flags = byte2; - - /* - * Check to see whether we're configured to send the SYNCHRONIZE - * CACHE command directly to the back end. - */ - mtx_lock(&lun->lun_lock); - if ((softc->flags & CTL_FLAG_REAL_SYNC) - && (++(lun->sync_count) >= lun->sync_interval)) { - lun->sync_count = 0; - mtx_unlock(&lun->lun_lock); - retval = lun->backend->config_write((union ctl_io *)ctsio); - } else { - mtx_unlock(&lun->lun_lock); - ctl_set_success(ctsio); - ctl_done((union ctl_io *)ctsio); - } + retval = lun->backend->config_write((union ctl_io *)ctsio); bailout: - return (retval); } @@ -6142,9 +5890,6 @@ ctl_debugconf_sp_sense_handler(struct ct page->ctl_time_io_secs[1] = ctl_time_io_secs >> 0; break; default: -#ifdef NEEDTOPORT - EPRINT(0, "Invalid PC %d!!", pc); -#endif /* NEEDTOPORT */ break; } return (0); @@ -7800,18 +7545,6 @@ retry: * sync), we've got a problem. */ if (key_count >= lun->pr_key_count) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_PR_ERROR, - csevent_LogType_Fault, - csevent_AlertLevel_Yellow, - csevent_FRU_ShelfController, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "registered keys %d >= key " - "count %d", key_count, - lun->pr_key_count); -#endif key_count++; continue; } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:25:48 2015 (r288805) @@ -2756,18 +2756,8 @@ ctl_be_block_config_write(union ctl_io * if (cdb->how & SSS_START) retval = ctl_start_lun(cbe_lun); - else { + else retval = ctl_stop_lun(cbe_lun); - /* - * XXX KDM Copan-specific offline behavior. - * Figure out a reasonable way to port this? - */ -#ifdef NEEDTOPORT - if ((retval == 0) - && (cdb->byte2 & SSS_ONOFFLINE)) - retval = ctl_lun_offline(cbe_lun); -#endif - } /* * In general, the above routines should not fail. They Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:25:48 2015 (r288805) @@ -877,14 +877,8 @@ ctl_backend_ramdisk_config_write(union c if (cdb->how & SSS_START) retval = ctl_start_lun(cbe_lun); - else { + else retval = ctl_stop_lun(cbe_lun); -#ifdef NEEDTOPORT - if ((retval == 0) - && (cdb->byte2 & SSS_ONOFFLINE)) - retval = ctl_lun_offline(cbe_lun); -#endif - } /* * In general, the above routines should not fail. They Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Oct 5 11:25:48 2015 (r288805) @@ -130,9 +130,6 @@ cfcs_init(void) struct cfcs_softc *softc; struct ccb_setasync csa; struct ctl_port *port; -#ifdef NEEDTOPORT - char wwnn[8]; -#endif int retval; softc = &cfcs_softc; @@ -167,15 +164,6 @@ cfcs_init(void) } /* - * Get the WWNN out of the database, and create a WWPN as well. - */ -#ifdef NEEDTOPORT - ddb_GetWWNN((char *)wwnn); - softc->wwnn = be64dec(wwnn); - softc->wwpn = softc->wwnn + (softc->port.targ_port & 0xff); -#endif - - /* * If the CTL frontend didn't tell us what our WWNN/WWPN is, go * ahead and set something random. */ Modified: stable/10/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_ioctl.h Mon Oct 5 11:25:48 2015 (r288805) @@ -81,17 +81,6 @@ #define CTL_MINOR 225 typedef enum { - CTL_OOA_INVALID_LUN, - CTL_OOA_SUCCESS -} ctl_ooa_status; - -struct ctl_ooa_info { - uint32_t lun_id; /* Passed in to CTL */ - uint32_t num_entries; /* Returned from CTL */ - ctl_ooa_status status; /* Returned from CTL */ -}; - -typedef enum { CTL_DELAY_TYPE_NONE, CTL_DELAY_TYPE_CONT, CTL_DELAY_TYPE_ONESHOT @@ -121,22 +110,6 @@ struct ctl_io_delay_info { }; typedef enum { - CTL_GS_SYNC_NONE, - CTL_GS_SYNC_OK, - CTL_GS_SYNC_NO_LUN -} ctl_gs_sync_status; - -/* - * The target and LUN id specify which device to modify. The sync interval - * means that we will let through every N SYNCHRONIZE CACHE commands. - */ -struct ctl_sync_info { - uint32_t lun_id; /* passed to kernel */ - int sync_interval; /* depends on whether get/set */ - ctl_gs_sync_status status; /* passed from kernel */ -}; - -typedef enum { CTL_STATS_NO_IO, CTL_STATS_READ, CTL_STATS_WRITE @@ -322,23 +295,6 @@ struct ctl_ooa { }; typedef enum { - CTL_PORT_LIST_NONE, - CTL_PORT_LIST_OK, - CTL_PORT_LIST_NEED_MORE_SPACE, - CTL_PORT_LIST_ERROR -} ctl_port_list_status; - -struct ctl_port_list { - uint32_t alloc_len; /* passed to kernel */ - uint32_t alloc_num; /* passed to kernel */ - struct ctl_port_entry *entries; /* filled in kernel */ - uint32_t fill_len; /* passed to userland */ - uint32_t fill_num; /* passed to userland */ - uint32_t dropped_num; /* passed to userland */ - ctl_port_list_status status; /* passed to userland */ -}; - -typedef enum { CTL_LUN_NOSTATUS, CTL_LUN_OK, CTL_LUN_ERROR, @@ -792,18 +748,11 @@ struct ctl_lun_map { #define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io) #define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry) #define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry) -#define CTL_DUMP_OOA _IO(CTL_MINOR, 0x06) -#define CTL_CHECK_OOA _IOWR(CTL_MINOR, 0x07, struct ctl_ooa_info) #define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info) -#define CTL_REALSYNC_GET _IOR(CTL_MINOR, 0x11, int) -#define CTL_REALSYNC_SET _IOW(CTL_MINOR, 0x12, int) -#define CTL_SETSYNC _IOWR(CTL_MINOR, 0x13, struct ctl_sync_info) -#define CTL_GETSYNC _IOWR(CTL_MINOR, 0x14, struct ctl_sync_info) #define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats) #define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc) #define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa) #define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19) -#define CTL_GET_PORT_LIST _IOWR(CTL_MINOR, 0x20, struct ctl_port_list) #define CTL_LUN_REQ _IOWR(CTL_MINOR, 0x21, struct ctl_lun_req) #define CTL_LUN_LIST _IOWR(CTL_MINOR, 0x22, struct ctl_lun_list) #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc) Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:25:48 2015 (r288805) @@ -345,17 +345,6 @@ struct ctl_lun_delay_info { uint32_t done_delay; }; -typedef enum { - CTL_ERR_INJ_NONE = 0x00, - CTL_ERR_INJ_ABORTED = 0x01 -} ctl_err_inject_flags; - -typedef enum { - CTL_PR_FLAG_NONE = 0x00, - CTL_PR_FLAG_REGISTERED = 0x01, - CTL_PR_FLAG_ACTIVE_RES = 0x02 -} ctl_per_res_flags; - #define CTL_PR_ALL_REGISTRANTS 0xFFFFFFFF #define CTL_PR_NO_RESERVATION 0xFFFFFFF0 @@ -381,10 +370,7 @@ struct ctl_lun { struct ctl_softc *ctl_softc; struct ctl_be_lun *be_lun; struct ctl_backend_driver *backend; - int io_count; struct ctl_lun_delay_info delay_info; - int sync_interval; - int sync_count; #ifdef CTL_TIME_IO sbintime_t idle_time; sbintime_t last_busy; @@ -392,7 +378,6 @@ struct ctl_lun { TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; - STAILQ_ENTRY(ctl_lun) run_links; #ifdef CTL_WITH_CA uint32_t have_ca[CTL_MAX_INITIATORS >> 5]; struct scsi_sense_data pending_sense[CTL_MAX_INITIATORS]; @@ -415,7 +400,6 @@ struct ctl_lun { }; typedef enum { - CTL_FLAG_REAL_SYNC = 0x02, CTL_FLAG_ACTIVE_SHELF = 0x04 } ctl_gen_flags; Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_util.c Mon Oct 5 11:25:48 2015 (r288805) @@ -489,8 +489,7 @@ ctl_scsi_mode_sense(union ctl_io *io, ui void ctl_scsi_start_stop(union ctl_io *io, int start, int load_eject, int immediate, - int power_conditions, int onoffline __unused, - ctl_tag_type tag_type, uint8_t control) + int power_conditions, ctl_tag_type tag_type, uint8_t control) { struct scsi_start_stop_unit *cdb; @@ -501,10 +500,6 @@ ctl_scsi_start_stop(union ctl_io *io, in cdb->opcode = START_STOP_UNIT; if (immediate) cdb->byte2 |= SSS_IMMED; -#ifdef NEEDTOPORT - if (onoffline) - cdb->byte2 |= SSS_ONOFFLINE; -#endif cdb->how = power_conditions; if (load_eject) cdb->how |= SSS_LOEJ; @@ -849,24 +844,8 @@ void ctl_io_error_print(union ctl_io *io, struct scsi_inquiry_data *inq_data) { char str[512]; -#ifdef NEEDTOPORT - char *message; - char *line; - - message = io_error_string(io, inq_data, str, sizeof(str)); - - for (line = strsep(&message, "\n"); line != NULL; - line = strsep(&message, "\n")) { - csevent_log(CSC_CTL | CSC_SHELF_SW | CTL_ERROR_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, "%s", line); - } -#else + printf("%s", ctl_io_error_string(io, inq_data, str, sizeof(str))); -#endif } Modified: stable/10/sys/cam/ctl/ctl_util.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.h Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/sys/cam/ctl/ctl_util.h Mon Oct 5 11:25:48 2015 (r288805) @@ -77,7 +77,7 @@ void ctl_scsi_mode_sense(union ctl_io *i int minimum_cdb_size, ctl_tag_type tag_type, uint8_t control); void ctl_scsi_start_stop(union ctl_io *io, int start, int load_eject, - int immediate, int power_conditions, int onoffline, + int immediate, int power_conditions, ctl_tag_type tag_type, uint8_t control); void ctl_scsi_sync_cache(union ctl_io *io, int immed, int reladr, int minimum_cdb_size, uint64_t starting_lba, Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 5 11:25:48 2015 (r288805) @@ -35,7 +35,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd September 12, 2015 +.Dd September 26, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -118,12 +118,6 @@ .Op Fl i .Op Fl c Ar cdbsize .Nm -.Ic shutdown -.Op general options -.Nm -.Ic startup -.Op general options -.Nm .Ic lunlist .Nm .Ic delay @@ -132,15 +126,6 @@ .Aq Fl t Ar secs .Op Fl T Ar oneshot|cont .Nm -.Ic realsync Aq on|off|query -.Nm -.Ic setsync interval -.Aq lun -.Aq Fl i Ar interval -.Nm -.Ic getsync -.Aq lun -.Nm .Ic inject .Aq Fl i Ar action .Aq Fl p Ar pattern @@ -176,14 +161,11 @@ .Op Fl x .Nm .Ic port -.Op Fl l .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn .Op Fl p Ar targ_port .Op Fl t Ar fe_type -.Op Fl q -.Op Fl x .Nm .Ic portlist .Op Fl f Ar frontend @@ -418,17 +400,6 @@ bit set. Set the immediate bit in the CDB. Note that CTL does not support the immediate bit, so this is primarily useful for making sure that CTL returns the proper error. -.It Fl o -Set the Copan proprietary on/offline bit in the CDB. When this flag is -used, the LUN will be marked online again (see the description of the -.Ic shutdown -and -.Ic startup -commands). When this flag is used with a -start command, the LUN will NOT be spun up. You need to use a start -command without the -.Fl o -flag to spin up the disks in the LUN. .El .It Ic stop Send the @@ -444,14 +415,6 @@ sends an ordered tag for completeness.) Set the immediate bit in the CDB. Note that CTL does not support the immediate bit, so this is primarily useful for making sure that CTL returns the proper error. -.It Fl o -Set the Copan proprietary on/offline bit in the CDB. When this flag is -used, the LUN will be spun down and taken offline ("Logical unit not ready, -manual intervention required"). See the description of the -.Ic shutdown -and -.Ic startup -options. .El .It Ic synccache Send the @@ -483,32 +446,6 @@ support this bit. .It Fl c Ar cdbsize Specify the minimum CDB size. Valid values are 10 and 16 bytes. .El -.It Ic shutdown -Issue a -.Tn SCSI -START STOP UNIT command with the start bit cleared and the on/offline bit -set to all direct access LUNs. This will spin down all direct access LUNs, -and mark them offline ("Logical unit not ready, manual intervention -required"). Once marked offline, the state can only be cleared by sending -a START STOP UNIT command with the start bit set and the on/offline bit -set. The -.Nm -commands -.Ic startup -and -.Ic start -will accomplish this. Note that the -on/offline bit is a non-standard Copan extension to the -.Tn SCSI -START STOP UNIT command, so merely sending a normal start command from an -initiator will not clear the condition. (This is by design.) -.It Ic startup -Issue a -.Tn SCSI -START STOP UNIT command with the start bit set and the on/offline bit set -to all direct access LUNs. This will mark all direct access LUNs "online" -again. It will not cause any LUNs to start up. A separate start command -without the on/offline bit set is necessary for that. .It Ic lunlist List all LUNs registered with CTL. Because this command uses the ioctl port, it will only work when the FETDs @@ -549,39 +486,6 @@ the next command sent to the given LUN w commands will be completed normally. This is the default. .El -.It Ic realsync -Query and control CTL's SYNCHRONIZE CACHE behavior. The -.Sq query -argument -will show whether SYNCHRONIZE CACHE commands are being sent to the backend -or not. -The default is to send SYNCHRONIZE CACHE commands to the backend. -The -.Sq on -argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be -sent to the backend. -The -.Sq off -argument will cause all SYNCHRONIZE CACHE commands sent to all LUNs to be -immediately returned to the initiator with successful status. -.It Ic setsync -For a given lun, only actually service every Nth SYNCHRONIZE CACHE command -that is sent. This can be used for debugging the optimal time period for -sending SYNCHRONIZE cache commands. An interval of 0 means that the cache -will be flushed for this LUN every time a SYNCHRONIZE CACHE command is -received. -.Pp -You must specify the LUN you want to modify. -.It Ic getsync -Get the interval at which we actually service the SYNCHRONIZE CACHE -command, as set by the -.Ic setsync -command above. -The reported number means that we will actually flush the cache on every -Nth SYNCHRONIZE CACHE command. A value of 0 means that we will flush the -cache every time. -.Pp -You must specify the LUN you want to query. .It Ic inject Inject the specified type of error for the LUN specified, when a command that matches the given pattern is seen. @@ -689,8 +593,6 @@ must be specified. The WWNN and WWPN may both be specified at the same time, but cannot be combined with enabling/disabling or listing ports. .Bl -tag -width 12n -.It Fl l -List all CTL frontend ports or a specific port type or number. .It Fl o Ar on|off Turn the specified CTL frontend ports off or on. If no port number or port type is specified, all ports are turned on or @@ -698,8 +600,6 @@ off. .It Fl p Ar targ_port Specify the frontend port number. The port numbers can be found in the frontend port list. -.It Fl q -Omit the header in the port list output. .It Fl t Ar fe_type Specify the frontend type. Currently defined port types are @@ -727,8 +627,6 @@ The argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWPN must be different for every port in the system. -.It Fl x -Output the port list in XML format. .El .It Ic portlist List CTL frontend ports. Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 11:24:51 2015 (r288804) +++ stable/10/usr.sbin/ctladm/ctladm.c Mon Oct 5 11:25:48 2015 (r288805) @@ -101,13 +101,8 @@ typedef enum { CTLADM_CMD_START, CTLADM_CMD_STOP, CTLADM_CMD_SYNC_CACHE, - CTLADM_CMD_SHUTDOWN, - CTLADM_CMD_STARTUP, CTLADM_CMD_LUNLIST, CTLADM_CMD_DELAY, - CTLADM_CMD_REALSYNC, - CTLADM_CMD_SETSYNC, - CTLADM_CMD_GETSYNC, CTLADM_CMD_ERR_INJECT, CTLADM_CMD_PRES_IN, CTLADM_CMD_PRES_OUT, @@ -163,7 +158,7 @@ typedef enum { } ctladm_optret; static const char rw_opts[] = "Nb:c:d:f:l:"; -static const char startstop_opts[] = "io"; +static const char startstop_opts[] = "i"; static struct ctladm_opts option_table[] = { {"adddev", CTLADM_CMD_ADDDEV, CTLADM_ARG_NONE, NULL}, @@ -173,7 +168,6 @@ static struct ctladm_opts option_table[] {"devlist", CTLADM_CMD_DEVLIST, CTLADM_ARG_NONE, "b:vx"}, {"dumpooa", CTLADM_CMD_DUMPOOA, CTLADM_ARG_NONE, NULL}, {"dumpstructs", CTLADM_CMD_DUMPSTRUCTS, CTLADM_ARG_NONE, NULL}, - {"getsync", CTLADM_CMD_GETSYNC, CTLADM_ARG_NEED_TL, NULL}, {"help", CTLADM_CMD_HELP, CTLADM_ARG_NONE, NULL}, {"inject", CTLADM_CMD_ERR_INJECT, CTLADM_ARG_NEED_TL, "cd:i:p:r:s:"}, {"inquiry", CTLADM_CMD_INQUIRY, CTLADM_ARG_NEED_TL, NULL}, @@ -190,15 +184,11 @@ static struct ctladm_opts option_table[] {"prout", CTLADM_CMD_PRES_OUT, CTLADM_ARG_NEED_TL, "a:k:r:s:"}, {"read", CTLADM_CMD_READ, CTLADM_ARG_NEED_TL, rw_opts}, {"readcapacity", CTLADM_CMD_READCAPACITY, CTLADM_ARG_NEED_TL, "c:"}, - {"realsync", CTLADM_CMD_REALSYNC, CTLADM_ARG_NONE, NULL}, {"remove", CTLADM_CMD_RM, CTLADM_ARG_NONE, "b:l:o:"}, {"reportluns", CTLADM_CMD_REPORT_LUNS, CTLADM_ARG_NEED_TL, NULL}, {"reqsense", CTLADM_CMD_REQ_SENSE, CTLADM_ARG_NEED_TL, NULL}, {"rtpg", CTLADM_CMD_RTPG, CTLADM_ARG_NEED_TL, NULL}, - {"setsync", CTLADM_CMD_SETSYNC, CTLADM_ARG_NEED_TL, "i:"}, - {"shutdown", CTLADM_CMD_SHUTDOWN, CTLADM_ARG_NONE, NULL}, {"start", CTLADM_CMD_START, CTLADM_ARG_NEED_TL, startstop_opts}, - {"startup", CTLADM_CMD_STARTUP, CTLADM_ARG_NONE, NULL}, {"stop", CTLADM_CMD_STOP, CTLADM_ARG_NEED_TL, startstop_opts}, {"synccache", CTLADM_CMD_SYNC_CACHE, CTLADM_ARG_NEED_TL, "b:c:il:r"}, {"tur", CTLADM_CMD_TUR, CTLADM_ARG_NEED_TL, NULL}, @@ -212,15 +202,11 @@ static struct ctladm_opts option_table[] ctladm_optret getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum, ctladm_cmdargs *argnum, const char **subopt); static int cctl_dump_ooa(int fd, int argc, char **argv); -static int cctl_port_dump(int fd, int quiet, int xml, int32_t fe_num, - ctl_port_type port_type); static int cctl_port(int fd, int argc, char **argv, char *combinedopt); static int cctl_do_io(int fd, int retries, union ctl_io *io, const char *func); static int cctl_delay(int fd, int lun, int argc, char **argv, char *combinedopt); static int cctl_lunlist(int fd); -static int cctl_startup_shutdown(int fd, int lun, int iid, - ctladm_cmdfunction command); static int cctl_sync_cache(int fd, int lun, int iid, int retries, int argc, char **argv, char *combinedopt); static int cctl_start_stop(int fd, int lun, int iid, int retries, @@ -253,6 +239,7 @@ static int cctl_create_lun(int fd, int a static int cctl_inquiry_vpd_devid(int fd, int lun, int initiator); static int cctl_report_target_port_group(int fd, int lun, int initiator); static int cctl_modify_lun(int fd, int argc, char **argv, char *combinedopt); +static int cctl_portlist(int fd, int argc, char **argv, char *combinedopt); ctladm_optret getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum, @@ -287,9 +274,7 @@ cctl_dump_ooa(int fd, int argc, char **a { struct ctl_ooa ooa; long double cmd_latency; - int num_entries, len; - int lun = -1; - int retval; + int num_entries, len, lun = -1, retval = 0; unsigned int i; num_entries = 104; @@ -299,21 +284,16 @@ cctl_dump_ooa(int fd, int argc, char **a retry: len = num_entries * sizeof(struct ctl_ooa_entry); - bzero(&ooa, sizeof(ooa)); - ooa.entries = malloc(len); - if (ooa.entries == NULL) { warn("%s: error mallocing %d bytes", __func__, len); return (1); } - - if (argc > 2) { + if (lun >= 0) { ooa.lun_num = lun; } else ooa.flags |= CTL_OOA_FLAG_ALL_LUNS; - ooa.alloc_len = len; ooa.alloc_num = num_entries; if (ioctl(fd, CTL_GET_OOA, &ooa) == -1) { @@ -368,17 +348,10 @@ retry: cmd_latency); } fprintf(stdout, "OOA queues dump done\n"); -#if 0 - if (ioctl(fd, CTL_DUMP_OOA) == -1) { - warn("%s: CTL_DUMP_OOA ioctl failed", __func__); - return (1); - } -#endif bailout: free(ooa.entries); - - return (0); + return (retval); } static int @@ -391,152 +364,6 @@ cctl_dump_structs(int fd, ctladm_cmdargs return (0); } -static int -cctl_port_dump(int fd, int quiet, int xml, int32_t targ_port, - ctl_port_type port_type) -{ - struct ctl_port_list port_list; - struct ctl_port_entry *entries; - struct sbuf *sb = NULL; - int num_entries; - int did_print = 0; - unsigned int i; - - num_entries = 16; - -retry: - - entries = malloc(sizeof(*entries) * num_entries); - bzero(&port_list, sizeof(port_list)); - port_list.entries = entries; - port_list.alloc_num = num_entries; - port_list.alloc_len = num_entries * sizeof(*entries); - if (ioctl(fd, CTL_GET_PORT_LIST, &port_list) != 0) { - warn("%s: CTL_GET_PORT_LIST ioctl failed", __func__); - return (1); - } - if (port_list.status == CTL_PORT_LIST_NEED_MORE_SPACE) { - printf("%s: allocated %d, need %d, retrying\n", __func__, - num_entries, port_list.fill_num + port_list.dropped_num); - free(entries); - num_entries = port_list.fill_num + port_list.dropped_num; - goto retry; - } - - if ((quiet == 0) - && (xml == 0)) - printf("Port Online Type Name pp vp %-18s %-18s\n", - "WWNN", "WWPN"); - - if (xml != 0) { - sb = sbuf_new_auto(); - sbuf_printf(sb, "\n"); - } - for (i = 0; i < port_list.fill_num; i++) { - struct ctl_port_entry *entry; - const char *type; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 11:26:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72C069B2101; Mon, 5 Oct 2015 11:26:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64A0E301; Mon, 5 Oct 2015 11:26:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BQlZu089033; Mon, 5 Oct 2015 11:26:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BQkka089031; Mon, 5 Oct 2015 11:26:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051126.t95BQkka089031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288806 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:26:47 -0000 Author: mav Date: Mon Oct 5 11:26:46 2015 New Revision: 288806 URL: https://svnweb.freebsd.org/changeset/base/288806 Log: MFC r288260: Remove few more unused variables. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:25:48 2015 (r288805) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:26:46 2015 (r288806) @@ -1755,7 +1755,6 @@ ctl_init(void) mtx_init(&softc->ctl_lock, "CTL mutex", NULL, MTX_DEF); softc->io_zone = uma_zcreate("CTL IO", sizeof(union ctl_io), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - softc->open_count = 0; softc->flags = 0; SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:25:48 2015 (r288805) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:26:46 2015 (r288806) @@ -419,8 +419,6 @@ struct tpc_token; struct ctl_softc { struct mtx ctl_lock; struct cdev *dev; - int open_count; - int num_disks; int num_luns; ctl_gen_flags flags; ctl_ha_mode ha_mode; @@ -436,7 +434,6 @@ struct ctl_softc { struct sysctl_oid *sysctl_tree; void *othersc_pool; struct proc *ctl_proc; - int targ_online; uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32]; struct ctl_lun *ctl_luns[CTL_MAX_LUNS]; uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32]; From owner-svn-src-all@freebsd.org Mon Oct 5 11:27:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DEDC9B21A7; Mon, 5 Oct 2015 11:27:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB6668B; Mon, 5 Oct 2015 11:27:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BRa5V089164; Mon, 5 Oct 2015 11:27:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BRaTR089162; Mon, 5 Oct 2015 11:27:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051127.t95BRaTR089162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288807 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:27:36 -0000 Author: mav Date: Mon Oct 5 11:27:35 2015 New Revision: 288807 URL: https://svnweb.freebsd.org/changeset/base/288807 Log: MFC r288261: Move ioctl frontend defines where they belong. Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 11:26:46 2015 (r288806) +++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c Mon Oct 5 11:27:35 2015 (r288807) @@ -56,6 +56,18 @@ __FBSDID("$FreeBSD$"); #include #include +typedef enum { + CTL_IOCTL_INPROG, + CTL_IOCTL_DATAMOVE, + CTL_IOCTL_DONE +} ctl_fe_ioctl_state; + +struct ctl_fe_ioctl_params { + struct cv sem; + struct mtx ioctl_mtx; + ctl_fe_ioctl_state state; +}; + struct cfi_softc { uint32_t cur_tag_num; struct ctl_port port; Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:26:46 2015 (r288806) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:27:35 2015 (r288807) @@ -47,18 +47,6 @@ #define CTL_PROCESSOR_PRODUCT "CTLPROCESSOR " #define CTL_UNKNOWN_PRODUCT "CTLDEVICE " -typedef enum { - CTL_IOCTL_INPROG, - CTL_IOCTL_DATAMOVE, - CTL_IOCTL_DONE -} ctl_fe_ioctl_state; - -struct ctl_fe_ioctl_params { - struct cv sem; - struct mtx ioctl_mtx; - ctl_fe_ioctl_state state; -}; - #define CTL_POOL_ENTRIES_OTHER_SC 200 struct ctl_io_pool { From owner-svn-src-all@freebsd.org Mon Oct 5 11:28:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B2FD9B22D7; Mon, 5 Oct 2015 11:28:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6BA902; Mon, 5 Oct 2015 11:28:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BSR58089269; Mon, 5 Oct 2015 11:28:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BSRxe089268; Mon, 5 Oct 2015 11:28:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051128.t95BSRxe089268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288808 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:28:27 -0000 Author: mav Date: Mon Oct 5 11:28:26 2015 New Revision: 288808 URL: https://svnweb.freebsd.org/changeset/base/288808 Log: MFC r288262: Remove concept of control device. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:27:35 2015 (r288807) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:28:26 2015 (r288808) @@ -3821,14 +3821,8 @@ ctl_init_page_index(struct ctl_lun *lun) for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { page_index = &lun->mode_pages.index[i]; - /* - * If this is a disk-only mode page, there's no point in - * setting it up. For some pages, we have to have some - * basic information about the disk in order to calculate the - * mode page data. - */ - if ((lun->be_lun->lun_type != T_DIRECT) - && (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type != T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; switch (page_index->page_code & SMPH_PC_MASK) { @@ -4213,18 +4207,12 @@ ctl_init_log_page_index(struct ctl_lun * for (i = 0, j = 0, k = 0; i < CTL_NUM_LOG_PAGES; i++) { page_index = &lun->log_pages.index[i]; - /* - * If this is a disk-only mode page, there's no point in - * setting it up. For some pages, we have to have some - * basic information about the disk in order to calculate the - * mode page data. - */ - if ((lun->be_lun->lun_type != T_DIRECT) - && (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type != T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING && - lun->backend->lun_attr == NULL) + lun->backend->lun_attr == NULL) continue; if (page_index->page_code != prev) { @@ -4496,9 +4484,8 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft /* Setup statistics gathering */ lun->stats.device_type = be_lun->lun_type; lun->stats.lun_number = lun_number; - if (lun->stats.device_type == T_DIRECT) - lun->stats.blocksize = be_lun->blocksize; - else + lun->stats.blocksize = be_lun->blocksize; + if (be_lun->blocksize == 0) lun->stats.flags = CTL_LUN_STATS_NO_BLOCKSIZE; for (i = 0;i < CTL_MAX_PORTS;i++) lun->stats.ports[i].targ_port = i; @@ -5901,8 +5888,7 @@ ctl_do_mode_select(union ctl_io *io) struct scsi_mode_page_header *page_header; struct ctl_page_index *page_index; struct ctl_scsiio *ctsio; - int control_dev, page_len; - int page_len_offset, page_len_size; + int page_len, page_len_offset, page_len_size; union ctl_modepage_info *modepage_info; struct ctl_lun *lun; int *len_left, *len_used; @@ -5913,11 +5899,6 @@ ctl_do_mode_select(union ctl_io *io) page_len = 0; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - if (lun->be_lun->lun_type != T_DIRECT) - control_dev = 1; - else - control_dev = 0; - modepage_info = (union ctl_modepage_info *) ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes; len_left = &modepage_info->header.len_left; @@ -5955,8 +5936,8 @@ do_next_page: */ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { - if ((control_dev != 0) - && (lun->mode_pages.index[i].page_flags & + if (lun->be_lun->lun_type != T_DIRECT && + (lun->mode_pages.index[i].page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; @@ -6253,7 +6234,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) int alloc_len, page_len, header_len, total_len; struct scsi_mode_block_descr *block_desc; struct ctl_page_index *page_index; - int control_dev; dbd = 0; llba = 0; @@ -6263,12 +6243,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_mode_sense\n")); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; - - if (lun->be_lun->lun_type != T_DIRECT) - control_dev = 1; - else - control_dev = 0; - switch (ctsio->cdb[0]) { case MODE_SENSE_6: { struct scsi_mode_sense_6 *cdb; @@ -6341,8 +6315,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { - if ((control_dev != 0) - && (lun->mode_pages.index[i].page_flags & + if (lun->be_lun->lun_type != T_DIRECT && + (lun->mode_pages.index[i].page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; @@ -6381,8 +6355,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) continue; /* Make sure the page is supported for this dev type */ - if ((control_dev != 0) - && (lun->mode_pages.index[i].page_flags & + if (lun->be_lun->lun_type != T_DIRECT && + (lun->mode_pages.index[i].page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; @@ -6437,7 +6411,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) header = (struct scsi_mode_hdr_6 *)ctsio->kern_data_ptr; header->datalen = MIN(total_len - 1, 254); - if (control_dev == 0) { + if (lun->be_lun->lun_type == T_DIRECT) { header->dev_specific = 0x10; /* DPOFUA */ if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] @@ -6460,7 +6434,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) datalen = MIN(total_len - 2, 65533); scsi_ulto2b(datalen, header->datalen); - if (control_dev == 0) { + if (lun->be_lun->lun_type == T_DIRECT) { header->dev_specific = 0x10; /* DPOFUA */ if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] @@ -6485,7 +6459,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) * descriptor. Otherwise, just set it to 0. */ if (dbd == 0) { - if (control_dev == 0) + if (lun->be_lun->lun_type == T_DIRECT) scsi_ulto3b(lun->be_lun->blocksize, block_desc->block_len); else @@ -6502,9 +6476,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) page_index = &lun->mode_pages.index[i]; - if ((control_dev != 0) - && (page_index->page_flags & - CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type != T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; /* @@ -6552,9 +6525,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) continue; /* Make sure the page is supported for this dev type */ - if ((control_dev != 0) - && (page_index->page_flags & - CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type != T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) continue; /* @@ -10111,23 +10083,13 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio inq_ptr->additional_length)); inq_ptr->spc3_flags = SPC3_SID_3PC | SPC3_SID_TPGS_IMPLICIT; - /* 16 bit addressing */ if (port_type == CTL_PORT_SCSI) inq_ptr->spc2_flags = SPC2_SID_ADDR16; - /* XXX set the SID_MultiP bit here if we're actually going to - respond on multiple ports */ inq_ptr->spc2_flags |= SPC2_SID_MultiP; - - /* 16 bit data bus, synchronous transfers */ + inq_ptr->flags = SID_CmdQue; if (port_type == CTL_PORT_SCSI) - inq_ptr->flags = SID_WBus16 | SID_Sync; - /* - * XXX KDM do we want to support tagged queueing on the control - * device at all? - */ - if ((lun == NULL) - || (lun->be_lun->lun_type != T_PROCESSOR)) - inq_ptr->flags |= SID_CmdQue; + inq_ptr->flags |= SID_WBus16 | SID_Sync; + /* * Per SPC-3, unused bytes in ASCII strings are filled with spaces. * We have 8 bytes for the vendor name, and 16 bytes for the device From owner-svn-src-all@freebsd.org Mon Oct 5 11:29:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E4DD9B2423; Mon, 5 Oct 2015 11:29:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9021EA6A; Mon, 5 Oct 2015 11:29:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BTOJC089371; Mon, 5 Oct 2015 11:29:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BTOAK089369; Mon, 5 Oct 2015 11:29:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051129.t95BTOAK089369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288809 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:29:24 -0000 Author: mav Date: Mon Oct 5 11:29:23 2015 New Revision: 288809 URL: https://svnweb.freebsd.org/changeset/base/288809 Log: MFC r288264: Allow LOG SENSE command on non-disk devices. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:28:26 2015 (r288808) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:29:23 2015 (r288809) @@ -866,7 +866,10 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 4D LOG SENSE */ -{ctl_log_sense, CTL_SERIDX_LOG_SNS, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_log_sense, CTL_SERIDX_LOG_SNS, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 10, {0, 0xff, 0xff, 0, 0xff, 0xff, 0xff, 0xff, 0x07} }, Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:28:26 2015 (r288808) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:29:23 2015 (r288809) @@ -306,7 +306,7 @@ static const struct ctl_page_index log_p {SLS_SUPPORTED_PAGES_PAGE, SLS_SUPPORTED_SUBPAGES_SUBPAGE, 0, NULL, CTL_PAGE_FLAG_NONE, NULL, NULL}, {SLS_LOGICAL_BLOCK_PROVISIONING, 0, 0, NULL, - CTL_PAGE_FLAG_NONE, ctl_lbp_log_sense_handler, NULL}, + CTL_PAGE_FLAG_DISK_ONLY, ctl_lbp_log_sense_handler, NULL}, {SLS_STAT_AND_PERF, 0, 0, NULL, CTL_PAGE_FLAG_NONE, ctl_sap_log_sense_handler, NULL}, }; From owner-svn-src-all@freebsd.org Mon Oct 5 11:30:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2779B24E0; Mon, 5 Oct 2015 11:30:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1C0BF8; Mon, 5 Oct 2015 11:30:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BULOx090150; Mon, 5 Oct 2015 11:30:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BUJIN090143; Mon, 5 Oct 2015 11:30:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051130.t95BUJIN090143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288810 - in stable/10: share/man/man4 sys/cam/ctl sys/cam/scsi usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:30:21 -0000 Author: mav Date: Mon Oct 5 11:30:18 2015 New Revision: 288810 URL: https://svnweb.freebsd.org/changeset/base/288810 Log: MFC r288310: Add to CTL initial support for CDROMs and removable devices. Relnotes: yes Modified: stable/10/share/man/man4/ctl.4 stable/10/sys/cam/ctl/README.ctl.txt stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_cd.h stable/10/usr.sbin/ctladm/ctladm.8 stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 ============================================================================== --- stable/10/share/man/man4/ctl.4 Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/share/man/man4/ctl.4 Mon Oct 5 11:30:18 2015 (r288810) @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd September 12, 2015 +.Dd September 27, 2015 .Dt CTL 4 .Os .Sh NAME @@ -53,7 +53,7 @@ It supports features such as: .Pp .Bl -bullet -compact .It -Disk and processor device emulation +Disk, processor and cdrom device emulation .It Tagged queueing .It Modified: stable/10/sys/cam/ctl/README.ctl.txt ============================================================================== --- stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/sys/cam/ctl/README.ctl.txt Mon Oct 5 11:30:18 2015 (r288810) @@ -19,9 +19,9 @@ Userland Commands Introduction: ============ -CTL is a disk and processor device emulation subsystem originally written -for Copan Systems under Linux starting in 2003. It has been shipping in -Copan (now SGI) products since 2005. +CTL is a disk, processor and cdrom device emulation subsystem originally +written for Copan Systems under Linux starting in 2003. It has been +shipping in Copan (now SGI) products since 2005. It was ported to FreeBSD in 2008, and thanks to an agreement between SGI (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is @@ -31,7 +31,7 @@ that Spectra would work to get CTL into Features: ======== - - Disk and processor device emulation. + - Disk, processor and cdrom device emulation. - Tagged queueing - SCSI task attribute support (ordered, head of queue, simple tags) - SCSI implicit command ordering support. (e.g. if a read follows a mode Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:30:18 2015 (r288810) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -3821,8 +3822,14 @@ ctl_init_page_index(struct ctl_lun *lun) for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { page_index = &lun->mode_pages.index[i]; - if (lun->be_lun->lun_type != T_DIRECT && - (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; switch (page_index->page_code & SMPH_PC_MASK) { @@ -4207,8 +4214,14 @@ ctl_init_log_page_index(struct ctl_lun * for (i = 0, j = 0, k = 0; i < CTL_NUM_LOG_PAGES; i++) { page_index = &lun->log_pages.index[i]; - if (lun->be_lun->lun_type != T_DIRECT && - (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING && @@ -4284,7 +4297,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct ctl_lun *nlun, *lun; struct scsi_vpd_id_descriptor *desc; struct scsi_vpd_id_t10 *t10id; - const char *eui, *naa, *scsiname, *vendor; + const char *eui, *naa, *scsiname, *vendor, *value; int lun_number, i, lun_malloced; int devidlen, idlen1, idlen2 = 0, len; @@ -4296,8 +4309,8 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft */ switch (be_lun->lun_type) { case T_DIRECT: - break; case T_PROCESSOR: + case T_CDROM: break; case T_SEQUENTIAL: case T_CHANGER: @@ -4450,6 +4463,13 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (be_lun->flags & CTL_LUN_FLAG_PRIMARY) lun->flags |= CTL_LUN_PRIMARY_SC; + value = ctl_get_opt(&be_lun->options, "removable"); + if (value != NULL) { + if (strcmp(value, "on") == 0) + lun->flags |= CTL_LUN_REMOVABLE; + } else if (be_lun->lun_type == T_CDROM) + lun->flags |= CTL_LUN_REMOVABLE; + lun->ctl_softc = ctl_softc; #ifdef CTL_TIME_IO lun->last_busy = getsbinuptime(); @@ -5126,14 +5146,14 @@ ctl_start_stop(struct ctl_scsiio *ctsio) } } - /* - * If there is no backend on this device, we can't start or stop - * it. In theory we shouldn't get any start/stop commands in the - * first place at this level if the LUN doesn't have a backend. - * That should get stopped by the command decode code. - */ - if (lun->backend == NULL) { - ctl_set_invalid_opcode(ctsio); + if ((cdb->how & SSS_LOEJ) && + (lun->flags & CTL_LUN_REMOVABLE) == 0) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 4, + /*bit_valid*/ 1, + /*bit*/ 1); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -5163,6 +5183,26 @@ ctl_start_stop(struct ctl_scsiio *ctsio) return (retval); } +int +ctl_prevent_allow(struct ctl_scsiio *ctsio) +{ + struct ctl_lun *lun; + int retval; + + CTL_DEBUG_PRINT(("ctl_prevent_allow\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + if ((lun->flags & CTL_LUN_REMOVABLE) == 0) { + ctl_set_invalid_opcode(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + retval = lun->backend->config_write((union ctl_io *)ctsio); + return (retval); +} + /* * We support the SYNCHRONIZE CACHE command (10 and 16 byte versions), but * we don't really do anything with the LBA and length fields if the user @@ -5224,15 +5264,6 @@ ctl_sync_cache(struct ctl_scsiio *ctsio) goto bailout; } - /* - * If this LUN has no backend, we can't flush the cache anyway. - */ - if (lun->backend == NULL) { - ctl_set_invalid_opcode(ctsio); - ctl_done((union ctl_io *)ctsio); - goto bailout; - } - lbalen = (struct ctl_lba_len_flags *)&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; lbalen->lba = starting_lba; lbalen->len = block_count; @@ -5935,13 +5966,18 @@ do_next_page: * XXX KDM should we do something with the block descriptor? */ for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { - - if (lun->be_lun->lun_type != T_DIRECT && - (lun->mode_pages.index[i].page_flags & - CTL_PAGE_FLAG_DISK_ONLY)) + page_index = &lun->mode_pages.index[i]; + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; - if ((lun->mode_pages.index[i].page_code & SMPH_PC_MASK) != + if ((page_index->page_code & SMPH_PC_MASK) != (page_header->page_code & SMPH_PC_MASK)) continue; @@ -5949,9 +5985,8 @@ do_next_page: * If neither page has a subpage code, then we've got a * match. */ - if (((lun->mode_pages.index[i].page_code & SMPH_SPF) == 0) + if (((page_index->page_code & SMPH_SPF) == 0) && ((page_header->page_code & SMPH_SPF) == 0)) { - page_index = &lun->mode_pages.index[i]; page_len = page_header->page_length; break; } @@ -5960,15 +5995,12 @@ do_next_page: * If both pages have subpages, then the subpage numbers * have to match. */ - if ((lun->mode_pages.index[i].page_code & SMPH_SPF) + if ((page_index->page_code & SMPH_SPF) && (page_header->page_code & SMPH_SPF)) { struct scsi_mode_page_header_sp *sph; sph = (struct scsi_mode_page_header_sp *)page_header; - - if (lun->mode_pages.index[i].subpage == - sph->subpage) { - page_index = &lun->mode_pages.index[i]; + if (page_index->subpage == sph->subpage) { page_len = scsi_2btoul(sph->page_length); break; } @@ -5979,7 +6011,7 @@ do_next_page: * If we couldn't find the page, or if we don't have a mode select * handler for it, send back an error to the user. */ - if ((page_index == NULL) + if ((i >= CTL_NUM_MODE_PAGES) || (page_index->select_handler == NULL)) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -6238,7 +6270,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) dbd = 0; llba = 0; block_desc = NULL; - page_index = NULL; CTL_DEBUG_PRINT(("ctl_mode_sense\n")); @@ -6315,26 +6346,33 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) } for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { - if (lun->be_lun->lun_type != T_DIRECT && - (lun->mode_pages.index[i].page_flags & - CTL_PAGE_FLAG_DISK_ONLY)) + page_index = &lun->mode_pages.index[i]; + + /* Make sure the page is supported for this dev type */ + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; /* * We don't use this subpage if the user didn't * request all subpages. */ - if ((lun->mode_pages.index[i].subpage != 0) + if ((page_index->subpage != 0) && (subpage == SMS_SUBPAGE_PAGE_0)) continue; #if 0 printf("found page %#x len %d\n", - lun->mode_pages.index[i].page_code & - SMPH_PC_MASK, - lun->mode_pages.index[i].page_len); + page_index->page_code & SMPH_PC_MASK, + page_index->page_len); #endif - page_len += lun->mode_pages.index[i].page_len; + page_len += page_index->page_len; } break; } @@ -6344,30 +6382,35 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) page_len = 0; for (i = 0; i < CTL_NUM_MODE_PAGES; i++) { + page_index = &lun->mode_pages.index[i]; + + /* Make sure the page is supported for this dev type */ + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) + continue; + /* Look for the right page code */ - if ((lun->mode_pages.index[i].page_code & - SMPH_PC_MASK) != page_code) + if ((page_index->page_code & SMPH_PC_MASK) != page_code) continue; /* Look for the right subpage or the subpage wildcard*/ - if ((lun->mode_pages.index[i].subpage != subpage) + if ((page_index->subpage != subpage) && (subpage != SMS_SUBPAGE_ALL)) continue; - /* Make sure the page is supported for this dev type */ - if (lun->be_lun->lun_type != T_DIRECT && - (lun->mode_pages.index[i].page_flags & - CTL_PAGE_FLAG_DISK_ONLY)) - continue; - #if 0 printf("found page %#x len %d\n", - lun->mode_pages.index[i].page_code & - SMPH_PC_MASK, - lun->mode_pages.index[i].page_len); + page_index->page_code & SMPH_PC_MASK, + page_index->page_len); #endif - page_len += lun->mode_pages.index[i].page_len; + page_len += page_index->page_len; } if (page_len == 0) { @@ -6475,9 +6518,14 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) struct ctl_page_index *page_index; page_index = &lun->mode_pages.index[i]; - - if (lun->be_lun->lun_type != T_DIRECT && - (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; /* @@ -6525,8 +6573,14 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) continue; /* Make sure the page is supported for this dev type */ - if (lun->be_lun->lun_type != T_DIRECT && - (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY)) + if (lun->be_lun->lun_type == T_DIRECT && + (page_index->page_flags & CTL_PAGE_FLAG_DIRECT) == 0) + continue; + if (lun->be_lun->lun_type == T_PROCESSOR && + (page_index->page_flags & CTL_PAGE_FLAG_PROC) == 0) + continue; + if (lun->be_lun->lun_type == T_CDROM && + (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; /* @@ -10052,6 +10106,8 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio inq_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | lun->be_lun->lun_type; } + if (lun->flags & CTL_LUN_REMOVABLE) + inq_ptr->dev_qual2 |= SID_RMB; } else inq_ptr->device = (SID_QUAL_BAD_LU << 5) | T_NODEVICE; @@ -10116,6 +10172,10 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio strncpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT, sizeof(inq_ptr->product)); break; + case T_CDROM: + strncpy(inq_ptr->product, CTL_CDROM_PRODUCT, + sizeof(inq_ptr->product)); + break; default: strncpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT, sizeof(inq_ptr->product)); @@ -10178,6 +10238,11 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio scsi_ulto2b(0x0600, inq_ptr->version4); break; case T_PROCESSOR: + break; + case T_CDROM: + /* MMC-6 (no version claimed) */ + scsi_ulto2b(0x04E0, inq_ptr->version4); + break; default: break; } @@ -10217,6 +10282,344 @@ ctl_inquiry(struct ctl_scsiio *ctsio) return (retval); } +int +ctl_get_config(struct ctl_scsiio *ctsio) +{ + struct scsi_get_config_header *hdr; + struct scsi_get_config_feature *feature; + struct scsi_get_config *cdb; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + int rt, starting; + + lun = ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_get_config *)ctsio->cdb; + rt = (cdb->rt & SGC_RT_MASK); + starting = scsi_2btoul(cdb->starting_feature); + alloc_len = scsi_2btoul(cdb->length); + + data_len = sizeof(struct scsi_get_config_header) + + sizeof(struct scsi_get_config_feature) + 8 + + sizeof(struct scsi_get_config_feature) + 8 + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 8 + + sizeof(struct scsi_get_config_feature) + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4; + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_sg_entries = 0; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + hdr = (struct scsi_get_config_header *)ctsio->kern_data_ptr; + if (lun->flags & CTL_LUN_OFFLINE) + scsi_ulto2b(0x0000, hdr->current_profile); + else + scsi_ulto2b(0x0010, hdr->current_profile); + feature = (struct scsi_get_config_feature *)(hdr + 1); + + if (starting > 0x001f) + goto done; + if (starting > 0x001e) + goto f1f; + if (starting > 0x001d) + goto f1e; + if (starting > 0x0010) + goto f1d; + if (starting > 0x0003) + goto f10; + if (starting > 0x0002) + goto f3; + if (starting > 0x0001) + goto f2; + if (starting > 0x0000) + goto f1; + + /* Profile List */ + scsi_ulto2b(0x0000, feature->feature_code); + feature->flags = SGC_F_PERSISTENT | SGC_F_CURRENT; + feature->add_length = 8; + scsi_ulto2b(0x0008, &feature->feature_data[0]); /* CD-ROM */ + feature->feature_data[2] = 0x00; + scsi_ulto2b(0x0010, &feature->feature_data[4]); /* DVD-ROM */ + feature->feature_data[6] = 0x01; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f1: /* Core */ + scsi_ulto2b(0x0001, feature->feature_code); + feature->flags = 0x08 | SGC_F_PERSISTENT | SGC_F_CURRENT; + feature->add_length = 8; + scsi_ulto4b(0x00000000, &feature->feature_data[0]); + feature->feature_data[4] = 0x03; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f2: /* Morphing */ + scsi_ulto2b(0x0002, feature->feature_code); + feature->flags = 0x04 | SGC_F_PERSISTENT | SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x02; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f3: /* Removable Medium */ + scsi_ulto2b(0x0003, feature->feature_code); + feature->flags = 0x04 | SGC_F_PERSISTENT | SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x39; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + + if (rt == SGC_RT_CURRENT && (lun->flags & CTL_LUN_OFFLINE)) + goto done; + +f10: /* Random Read */ + scsi_ulto2b(0x0010, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_OFFLINE) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 8; + scsi_ulto4b(lun->be_lun->blocksize, &feature->feature_data[0]); + scsi_ulto2b(1, &feature->feature_data[4]); + feature->feature_data[6] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f1d: /* Multi-Read */ + scsi_ulto2b(0x001D, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_OFFLINE) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 0; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f1e: /* CD Read */ + scsi_ulto2b(0x001E, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_OFFLINE) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f1f: /* DVD Read */ + scsi_ulto2b(0x001F, feature->feature_code); + feature->flags = 0x08; + if ((lun->flags & CTL_LUN_OFFLINE) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x01; + feature->feature_data[2] = 0x03; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +done: + data_len = (uint8_t *)feature - (uint8_t *)hdr; + if (rt == SGC_RT_SPECIFIC && data_len > 4) { + feature = (struct scsi_get_config_feature *)(hdr + 1); + if (scsi_2btoul(feature->feature_code) == starting) + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + data_len = (uint8_t *)feature - (uint8_t *)hdr; + } + scsi_ulto4b(data_len - 4, hdr->data_length); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + + ctl_set_success(ctsio); + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +int +ctl_get_event_status(struct ctl_scsiio *ctsio) +{ + struct scsi_get_event_status_header *hdr; + struct scsi_get_event_status *cdb; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + int notif_class; + + lun = ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_get_event_status *)ctsio->cdb; + if ((cdb->byte2 & SGESN_POLLED) == 0) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, + /*field*/ 1, /*bit_valid*/ 1, /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + notif_class = cdb->notif_class; + alloc_len = scsi_2btoul(cdb->length); + + data_len = sizeof(struct scsi_get_event_status_header); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_sg_entries = 0; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + + hdr = (struct scsi_get_event_status_header *)ctsio->kern_data_ptr; + scsi_ulto2b(0, hdr->descr_length); + hdr->nea_class = SGESN_NEA; + hdr->supported_class = 0; + + ctl_set_success(ctsio); + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +int +ctl_mechanism_status(struct ctl_scsiio *ctsio) +{ + struct scsi_mechanism_status_header *hdr; + struct scsi_mechanism_status *cdb; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + + lun = ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_mechanism_status *)ctsio->cdb; + alloc_len = scsi_2btoul(cdb->length); + + data_len = sizeof(struct scsi_mechanism_status_header); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_sg_entries = 0; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + + hdr = (struct scsi_mechanism_status_header *)ctsio->kern_data_ptr; + hdr->state1 = 0x00; + hdr->state2 = 0xe0; + scsi_ulto3b(0, hdr->lba); + hdr->slots_num = 0; + scsi_ulto2b(0, hdr->slots_length); + + ctl_set_success(ctsio); + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +static void +ctl_ultomsf(uint32_t lba, uint8_t *buf) +{ + + lba += 150; + buf[0] = 0; + buf[1] = bin2bcd((lba / 75) / 60); + buf[2] = bin2bcd((lba / 75) % 60); + buf[3] = bin2bcd(lba % 75); +} + +int +ctl_read_toc(struct ctl_scsiio *ctsio) +{ + struct scsi_read_toc_hdr *hdr; + struct scsi_read_toc_type01_descr *descr; + struct scsi_read_toc *cdb; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + int format, msf; + + lun = ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_read_toc *)ctsio->cdb; + msf = (cdb->byte2 & CD_MSF) != 0; + format = cdb->format; + alloc_len = scsi_2btoul(cdb->data_len); + + data_len = sizeof(struct scsi_read_toc_hdr); + if (format == 0) + data_len += 2 * sizeof(struct scsi_read_toc_type01_descr); + else + data_len += sizeof(struct scsi_read_toc_type01_descr); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + ctsio->kern_sg_entries = 0; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + + hdr = (struct scsi_read_toc_hdr *)ctsio->kern_data_ptr; + if (format == 0) { + scsi_ulto2b(0x12, hdr->data_length); + hdr->first = 1; + hdr->last = 1; + descr = (struct scsi_read_toc_type01_descr *)(hdr + 1); + descr->addr_ctl = 0x14; + descr->track_number = 1; + if (msf) + ctl_ultomsf(0, descr->track_start); + else + scsi_ulto4b(0, descr->track_start); + descr++; + descr->addr_ctl = 0x14; + descr->track_number = 0xaa; + if (msf) + ctl_ultomsf(lun->be_lun->maxlba+1, descr->track_start); + else + scsi_ulto4b(lun->be_lun->maxlba+1, descr->track_start); + } else { + scsi_ulto2b(0x0a, hdr->data_length); + hdr->first = 1; + hdr->last = 1; + descr = (struct scsi_read_toc_type01_descr *)(hdr + 1); + descr->addr_ctl = 0x14; + descr->track_number = 1; + if (msf) + ctl_ultomsf(0, descr->track_start); + else + scsi_ulto4b(0, descr->track_start); + } + + ctl_set_success(ctsio); + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + /* * For known CDB types, parse the LBA and length. */ @@ -11266,12 +11669,16 @@ ctl_cmd_applicable(uint8_t lun_type, con { switch (lun_type) { + case T_DIRECT: + if ((entry->flags & CTL_CMD_FLAG_OK_ON_DIRECT) == 0) + return (0); + break; case T_PROCESSOR: if ((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) return (0); break; - case T_DIRECT: - if ((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) + case T_CDROM: + if ((entry->flags & CTL_CMD_FLAG_OK_ON_CDROM) == 0) return (0); break; default: Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:30:18 2015 (r288810) @@ -1872,6 +1872,8 @@ ctl_be_block_open_file(struct ctl_be_blo */ if (params->blocksize_bytes != 0) cbe_lun->blocksize = params->blocksize_bytes; + else if (cbe_lun->lun_type == T_CDROM) + cbe_lun->blocksize = 2048; else cbe_lun->blocksize = 512; be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; @@ -2000,7 +2002,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc "requested blocksize %u < backing device " "blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); - } else + } else if (cbe_lun->lun_type == T_CDROM) + cbe_lun->blocksize = MAX(tmp, 2048); + else cbe_lun->blocksize = tmp; error = csw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, @@ -2171,7 +2175,10 @@ ctl_be_block_open(struct ctl_be_block_so flags = FREAD; value = ctl_get_opt(&cbe_lun->options, "readonly"); - if (value == NULL || strcmp(value, "on") != 0) + if (value != NULL) { + if (strcmp(value, "on") != 0) + flags |= FWRITE; + } else if (cbe_lun->lun_type == T_DIRECT) flags |= FWRITE; again: @@ -2287,10 +2294,13 @@ ctl_be_block_create(struct ctl_be_block_ } else if (control_softc->flags & CTL_FLAG_ACTIVE_SHELF) cbe_lun->flags |= CTL_LUN_FLAG_PRIMARY; - if (cbe_lun->lun_type == T_DIRECT) { + if (cbe_lun->lun_type == T_DIRECT || + cbe_lun->lun_type == T_CDROM) { be_lun->size_bytes = params->lun_size_bytes; if (params->blocksize_bytes != 0) cbe_lun->blocksize = params->blocksize_bytes; + else if (cbe_lun->lun_type == T_CDROM) + cbe_lun->blocksize = 2048; else cbe_lun->blocksize = 512; be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; @@ -2775,6 +2785,10 @@ ctl_be_block_config_write(union ctl_io * ctl_config_write_done(io); break; } + case PREVENT_ALLOW: + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; default: ctl_set_invalid_opcode(&io->scsiio); ctl_config_write_done(io); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:30:18 2015 (r288810) @@ -530,9 +530,12 @@ ctl_backend_ramdisk_create(struct ctl_be } else if (control_softc->flags & CTL_FLAG_ACTIVE_SHELF) cbe_lun->flags |= CTL_LUN_FLAG_PRIMARY; - if (cbe_lun->lun_type == T_DIRECT) { + if (cbe_lun->lun_type == T_DIRECT || + cbe_lun->lun_type == T_CDROM) { if (params->blocksize_bytes != 0) cbe_lun->blocksize = params->blocksize_bytes; + else if (cbe_lun->lun_type == T_CDROM) + cbe_lun->blocksize = 2048; else cbe_lun->blocksize = 512; if (params->lun_size_bytes < cbe_lun->blocksize) { @@ -556,7 +559,10 @@ ctl_backend_ramdisk_create(struct ctl_be if (value != NULL && strcmp(value, "on") == 0) cbe_lun->flags |= CTL_LUN_FLAG_UNMAP; value = ctl_get_opt(&cbe_lun->options, "readonly"); - if (value != NULL && strcmp(value, "on") == 0) + if (value != NULL) { + if (strcmp(value, "on") == 0) + cbe_lun->flags |= CTL_LUN_FLAG_READONLY; + } else if (cbe_lun->lun_type != T_DIRECT) cbe_lun->flags |= CTL_LUN_FLAG_READONLY; cbe_lun->serseq = CTL_LUN_SERSEQ_OFF; value = ctl_get_opt(&cbe_lun->options, "serseq"); @@ -896,6 +902,7 @@ ctl_backend_ramdisk_config_write(union c ctl_config_write_done(io); break; } + case PREVENT_ALLOW: case WRITE_SAME_10: case WRITE_SAME_16: case UNMAP: Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:29:23 2015 (r288809) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:30:18 2015 (r288810) @@ -255,7 +255,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 10 POPULATE TOKEN */ -{ctl_populate_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_populate_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_LUN_PAT_NONE, @@ -263,7 +263,7 @@ const struct ctl_cmd_entry ctl_cmd_table 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 11 WRITE USING TOKEN */ -{ctl_write_using_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_write_using_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 16, { 0x11, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, @@ -422,7 +422,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 10 READ CAPACITY(16) */ -{ctl_read_capacity_16, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_read_capacity_16, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_IN | @@ -434,7 +434,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 12 GET LBA STATUS */ -{ctl_get_lba_status, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_get_lba_status, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, @@ -559,7 +559,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_LUN_PAT_NONE, 6, {0x01, 0, 0, 0xff, 0x07}}, /* 04 FORMAT UNIT */ -{ctl_format, CTL_SERIDX_FORMAT, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_format, CTL_SERIDX_FORMAT, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 6, {0xff, 0, 0, 0, 0x07}}, @@ -574,7 +574,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 08 READ(6) */ -{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, 6, {0x1f, 0xff, 0xff, 0xff, 0x07}}, @@ -583,7 +583,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 0A WRITE(6) */ -{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, 6, {0x1f, 0xff, 0xff, 0xff, 0x07}}, @@ -669,7 +669,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_LUN_PAT_NONE, 6, {0x08, 0xff, 0xff, 0xff, 0x07}}, /* 1B START STOP UNIT */ -{ctl_start_stop, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_start_stop, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_DIRECT | + CTL_CMD_FLAG_OK_ON_CDROM | CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_NONE | @@ -683,7 +684,12 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 1E PREVENT ALLOW MEDIUM REMOVAL */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_prevent_allow, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_DIRECT | + CTL_CMD_FLAG_OK_ON_CDROM | + CTL_CMD_FLAG_OK_ON_STOPPED | + CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_FLAG_DATA_NONE, + CTL_LUN_PAT_NONE, 6, {0x01, 0, 0, 0x03, 0x07}}, /* 1F */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -704,7 +710,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 25 READ CAPACITY(10) */ -{ctl_read_capacity, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN| +{ctl_read_capacity, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_DIRECT | + CTL_CMD_FLAG_OK_ON_CDROM | CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_IN | @@ -718,7 +725,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 28 READ(10) */ -{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | +{ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_DIRECT | + CTL_CMD_FLAG_OK_ON_CDROM | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, @@ -728,7 +736,7 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 2A WRITE(10) */ -{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, +{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_DIRECT| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, 10, {0x1a, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, @@ -742,12 +750,12 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 2E WRITE AND VERIFY(10) */ -{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, +{ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_DIRECT| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 11:31:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 189649B26B2; Mon, 5 Oct 2015 11:31:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06021E36; Mon, 5 Oct 2015 11:31:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BVQJ1092173; Mon, 5 Oct 2015 11:31:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BVPI3092166; Mon, 5 Oct 2015 11:31:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051131.t95BVPI3092166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288811 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:31:27 -0000 Author: mav Date: Mon Oct 5 11:31:24 2015 New Revision: 288811 URL: https://svnweb.freebsd.org/changeset/base/288811 Log: MFC r288348: Umplement media load/eject support for removable devices. In case of block backend eject really closes the backing store, while load tries to open it back. Failed store open is reported as no media. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_error.c stable/10/sys/cam/ctl/ctl_error.h stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:31:24 2015 (r288811) @@ -3718,46 +3718,6 @@ ctl_zero_io(union ctl_io *io) io->io_hdr.pool = pool_ref; } -/* - * This routine is currently used for internal copies of ctl_ios that need - * to persist for some reason after we've already returned status to the - * FETD. (Thus the flag set.) - * - * XXX XXX - * Note that this makes a blind copy of all fields in the ctl_io, except - * for the pool reference. This includes any memory that has been - * allocated! That memory will no longer be valid after done has been - * called, so this would be VERY DANGEROUS for command that actually does - * any reads or writes. Right now (11/7/2005), this is only used for immediate - * start and stop commands, which don't transfer any data, so this is not a - * problem. If it is used for anything else, the caller would also need to - * allocate data buffer space and this routine would need to be modified to - * copy the data buffer(s) as well. - */ -void -ctl_copy_io(union ctl_io *src, union ctl_io *dest) -{ - void *pool_ref; - - if ((src == NULL) - || (dest == NULL)) - return; - - /* - * May need to preserve linked list pointers at some point too. - */ - pool_ref = dest->io_hdr.pool; - - memcpy(dest, src, MIN(sizeof(*src), sizeof(*dest))); - - dest->io_hdr.pool = pool_ref; - /* - * We need to know that this is an internal copy, and doesn't need - * to get passed back to the FETD that allocated it. - */ - dest->io_hdr.flags |= CTL_FLAG_INT_COPY; -} - int ctl_expand_number(const char *buf, uint64_t *num) { @@ -4451,15 +4411,13 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft be_lun->ctl_lun = lun; be_lun->lun_id = lun_number; atomic_add_int(&be_lun->be->num_luns, 1); - if (be_lun->flags & CTL_LUN_FLAG_OFFLINE) - lun->flags |= CTL_LUN_OFFLINE; - - if (be_lun->flags & CTL_LUN_FLAG_POWERED_OFF) + if (be_lun->flags & CTL_LUN_FLAG_EJECTED) + lun->flags |= CTL_LUN_EJECTED; + if (be_lun->flags & CTL_LUN_FLAG_NO_MEDIA) + lun->flags |= CTL_LUN_NO_MEDIA; + if (be_lun->flags & CTL_LUN_FLAG_STOPPED) lun->flags |= CTL_LUN_STOPPED; - if (be_lun->flags & CTL_LUN_FLAG_INOPERABLE) - lun->flags |= CTL_LUN_INOPERABLE; - if (be_lun->flags & CTL_LUN_FLAG_PRIMARY) lun->flags |= CTL_LUN_PRIMARY_SC; @@ -4719,23 +4677,51 @@ ctl_stop_lun(struct ctl_be_lun *be_lun) } int -ctl_lun_offline(struct ctl_be_lun *be_lun) +ctl_lun_no_media(struct ctl_be_lun *be_lun) +{ + struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun; + + mtx_lock(&lun->lun_lock); + lun->flags |= CTL_LUN_NO_MEDIA; + mtx_unlock(&lun->lun_lock); + return (0); +} + +int +ctl_lun_has_media(struct ctl_be_lun *be_lun) { struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun; + union ctl_ha_msg msg; mtx_lock(&lun->lun_lock); - lun->flags |= CTL_LUN_OFFLINE; + lun->flags &= ~(CTL_LUN_NO_MEDIA | CTL_LUN_EJECTED); + if (lun->flags & CTL_LUN_REMOVABLE) + ctl_est_ua_all(lun, -1, CTL_UA_MEDIUM_CHANGE); mtx_unlock(&lun->lun_lock); + if ((lun->flags & CTL_LUN_REMOVABLE) && + lun->ctl_softc->ha_mode == CTL_HA_MODE_XFER) { + bzero(&msg.ua, sizeof(msg.ua)); + msg.hdr.msg_type = CTL_MSG_UA; + msg.hdr.nexus.initid = -1; + msg.hdr.nexus.targ_port = -1; + msg.hdr.nexus.targ_lun = lun->lun; + msg.hdr.nexus.targ_mapped_lun = lun->lun; + msg.ua.ua_all = 1; + msg.ua.ua_set = 1; + msg.ua.ua_type = CTL_UA_MEDIUM_CHANGE; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.ua), + M_WAITOK); + } return (0); } int -ctl_lun_online(struct ctl_be_lun *be_lun) +ctl_lun_ejected(struct ctl_be_lun *be_lun) { struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun; mtx_lock(&lun->lun_lock); - lun->flags &= ~CTL_LUN_OFFLINE; + lun->flags |= CTL_LUN_EJECTED; mtx_unlock(&lun->lun_lock); return (0); } @@ -4805,28 +4791,6 @@ ctl_invalidate_lun(struct ctl_be_lun *be return (0); } -int -ctl_lun_inoperable(struct ctl_be_lun *be_lun) -{ - struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun; - - mtx_lock(&lun->lun_lock); - lun->flags |= CTL_LUN_INOPERABLE; - mtx_unlock(&lun->lun_lock); - return (0); -} - -int -ctl_lun_operable(struct ctl_be_lun *be_lun) -{ - struct ctl_lun *lun = (struct ctl_lun *)be_lun->ctl_lun; - - mtx_lock(&lun->lun_lock); - lun->flags &= ~CTL_LUN_INOPERABLE; - mtx_unlock(&lun->lun_lock); - return (0); -} - void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun) { @@ -4834,7 +4798,7 @@ ctl_lun_capacity_changed(struct ctl_be_l union ctl_ha_msg msg; mtx_lock(&lun->lun_lock); - ctl_est_ua_all(lun, -1, CTL_UA_CAPACITY_CHANGED); + ctl_est_ua_all(lun, -1, CTL_UA_CAPACITY_CHANGE); mtx_unlock(&lun->lun_lock); if (lun->ctl_softc->ha_mode == CTL_HA_MODE_XFER) { /* Send msg to other side. */ @@ -4846,7 +4810,7 @@ ctl_lun_capacity_changed(struct ctl_be_l msg.hdr.nexus.targ_mapped_lun = lun->lun; msg.ua.ua_all = 1; msg.ua.ua_set = 1; - msg.ua.ua_type = CTL_UA_CAPACITY_CHANGED; + msg.ua.ua_type = CTL_UA_CAPACITY_CHANGE; ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.ua), M_WAITOK); } @@ -5104,34 +5068,6 @@ ctl_start_stop(struct ctl_scsiio *ctsio) lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; cdb = (struct scsi_start_stop_unit *)ctsio->cdb; - /* - * XXX KDM - * We don't support the immediate bit on a stop unit. In order to - * do that, we would need to code up a way to know that a stop is - * pending, and hold off any new commands until it completes, one - * way or another. Then we could accept or reject those commands - * depending on its status. We would almost need to do the reverse - * of what we do below for an immediate start -- return the copy of - * the ctl_io to the FETD with status to send to the host (and to - * free the copy!) and then free the original I/O once the stop - * actually completes. That way, the OOA queue mechanism can work - * to block commands that shouldn't proceed. Another alternative - * would be to put the copy in the queue in place of the original, - * and return the original back to the caller. That could be - * slightly safer.. - */ - if ((cdb->byte2 & SSS_IMMED) - && ((cdb->how & SSS_START) == 0)) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 0); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); - } - if ((lun->flags & CTL_LUN_PR_RESERVED) && ((cdb->how & SSS_START)==0)) { uint32_t residx; @@ -5158,28 +5094,7 @@ ctl_start_stop(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } - /* - * In the non-immediate case, we send the request to - * the backend and return status to the user when - * it is done. - * - * In the immediate case, we allocate a new ctl_io - * to hold a copy of the request, and send that to - * the backend. We then set good status on the - * user's request and return it immediately. - */ - if (cdb->byte2 & SSS_IMMED) { - union ctl_io *new_io; - - new_io = ctl_alloc_io(ctsio->io_hdr.pool); - ctl_copy_io((union ctl_io *)ctsio, new_io); - retval = lun->backend->config_write(new_io); - ctl_set_success(ctsio); - ctl_done((union ctl_io *)ctsio); - } else { - retval = lun->backend->config_write( - (union ctl_io *)ctsio); - } + retval = lun->backend->config_write((union ctl_io *)ctsio); return (retval); } @@ -5348,17 +5263,6 @@ ctl_format(struct ctl_scsiio *ctsio) } } - /* - * The format command will clear out the "Medium format corrupted" - * status if set by the configuration code. That status is really - * just a way to notify the host that we have lost the media, and - * get them to issue a command that will basically make them think - * they're blowing away the media. - */ - mtx_lock(&lun->lun_lock); - lun->flags &= ~CTL_LUN_INOPERABLE; - mtx_unlock(&lun->lun_lock); - ctl_set_success(ctsio); bailout: @@ -10313,7 +10217,7 @@ ctl_get_config(struct ctl_scsiio *ctsio) ctsio->kern_rel_offset = 0; hdr = (struct scsi_get_config_header *)ctsio->kern_data_ptr; - if (lun->flags & CTL_LUN_OFFLINE) + if (lun->flags & CTL_LUN_NO_MEDIA) scsi_ulto2b(0x0000, hdr->current_profile); else scsi_ulto2b(0x0010, hdr->current_profile); @@ -10372,13 +10276,13 @@ f3: /* Removable Medium */ feature = (struct scsi_get_config_feature *) &feature->feature_data[feature->add_length]; - if (rt == SGC_RT_CURRENT && (lun->flags & CTL_LUN_OFFLINE)) + if (rt == SGC_RT_CURRENT && (lun->flags & CTL_LUN_NO_MEDIA)) goto done; f10: /* Random Read */ scsi_ulto2b(0x0010, feature->feature_code); feature->flags = 0x00; - if ((lun->flags & CTL_LUN_OFFLINE) == 0) + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) feature->flags |= SGC_F_CURRENT; feature->add_length = 8; scsi_ulto4b(lun->be_lun->blocksize, &feature->feature_data[0]); @@ -10390,7 +10294,7 @@ f10: /* Random Read */ f1d: /* Multi-Read */ scsi_ulto2b(0x001D, feature->feature_code); feature->flags = 0x00; - if ((lun->flags & CTL_LUN_OFFLINE) == 0) + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) feature->flags |= SGC_F_CURRENT; feature->add_length = 0; feature = (struct scsi_get_config_feature *) @@ -10399,7 +10303,7 @@ f1d: /* Multi-Read */ f1e: /* CD Read */ scsi_ulto2b(0x001E, feature->feature_code); feature->flags = 0x00; - if ((lun->flags & CTL_LUN_OFFLINE) == 0) + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) feature->flags |= SGC_F_CURRENT; feature->add_length = 4; feature->feature_data[0] = 0x00; @@ -10409,7 +10313,7 @@ f1e: /* CD Read */ f1f: /* DVD Read */ scsi_ulto2b(0x001F, feature->feature_code); feature->flags = 0x08; - if ((lun->flags & CTL_LUN_OFFLINE) == 0) + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) feature->flags |= SGC_F_CURRENT; feature->add_length = 4; feature->feature_data[0] = 0x01; @@ -11263,25 +11167,18 @@ ctl_scsiio_lun_check(struct ctl_lun *lun } } - if ((lun->flags & CTL_LUN_OFFLINE) - && ((entry->flags & CTL_CMD_FLAG_OK_ON_STANDBY) == 0)) { - ctl_set_lun_not_ready(ctsio); - retval = 1; - goto bailout; - } - - if ((lun->flags & CTL_LUN_STOPPED) - && ((entry->flags & CTL_CMD_FLAG_OK_ON_STOPPED) == 0)) { - /* "Logical unit not ready, initializing cmd. required" */ - ctl_set_lun_stopped(ctsio); - retval = 1; - goto bailout; - } - - if ((lun->flags & CTL_LUN_INOPERABLE) - && ((entry->flags & CTL_CMD_FLAG_OK_ON_INOPERABLE) == 0)) { - /* "Medium format corrupted" */ - ctl_set_medium_format_corrupted(ctsio); + if ((entry->flags & CTL_CMD_FLAG_OK_ON_NO_MEDIA) == 0) { + if (lun->flags & CTL_LUN_EJECTED) + ctl_set_lun_ejected(ctsio); + else if (lun->flags & CTL_LUN_NO_MEDIA) { + if (lun->flags & CTL_LUN_REMOVABLE) + ctl_set_lun_no_media(ctsio); + else + ctl_set_lun_int_reqd(ctsio); + } else if (lun->flags & CTL_LUN_STOPPED) + ctl_set_lun_stopped(ctsio); + else + goto bailout; retval = 1; goto bailout; } @@ -13486,7 +13383,7 @@ ctl_thresh_thread(void *arg) mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { if ((lun->flags & CTL_LUN_DISABLED) || - (lun->flags & CTL_LUN_OFFLINE) || + (lun->flags & CTL_LUN_NO_MEDIA) || lun->backend->lun_attr == NULL) continue; if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 5 11:31:24 2015 (r288811) @@ -123,10 +123,11 @@ typedef enum { CTL_UA_INQ_CHANGE = 0x0100, CTL_UA_RES_PREEMPT = 0x0400, CTL_UA_RES_RELEASE = 0x0800, - CTL_UA_REG_PREEMPT = 0x1000, - CTL_UA_ASYM_ACC_CHANGE = 0x2000, - CTL_UA_CAPACITY_CHANGED = 0x4000, - CTL_UA_THIN_PROV_THRES = 0x8000 + CTL_UA_REG_PREEMPT = 0x1000, + CTL_UA_ASYM_ACC_CHANGE = 0x2000, + CTL_UA_CAPACITY_CHANGE = 0x4000, + CTL_UA_THIN_PROV_THRES = 0x8000, + CTL_UA_MEDIUM_CHANGE = 0x10000 } ctl_ua_type; #ifdef _KERNEL Modified: stable/10/sys/cam/ctl/ctl_backend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend.h Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl_backend.h Mon Oct 5 11:31:24 2015 (r288811) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. + * Copyright (c) 2014-2015 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,14 +50,11 @@ * particular LUN ID in the req_lun_id field. If we cannot allocate that * LUN ID, the ctl_add_lun() call will fail. * - * The POWERED_OFF flag tells us that the LUN should default to the powered + * The STOPPED flag tells us that the LUN should default to the powered * off state. It will return 0x04,0x02 until it is powered up. ("Logical * unit not ready, initializing command required.") * - * The INOPERABLE flag tells us that this LUN is not operable for whatever - * reason. This means that user data may have been (or has been?) lost. - * We will return 0x31,0x00 ("Medium format corrupted") until the host - * issues a FORMAT UNIT command to clear the error. + * The NO_MEDIA flag tells us that the LUN has no media inserted. * * The PRIMARY flag tells us that this LUN is registered as a Primary LUN * which is accessible via the Master shelf controller in an HA. This flag @@ -72,20 +70,22 @@ * * The DEV_TYPE flag tells us that the device_type field is filled in. * + * The EJECTED flag tells us that the removable LUN has tray open. + * * The UNMAP flag tells us that this LUN supports UNMAP. * * The OFFLINE flag tells us that this LUN can not access backing store. */ typedef enum { CTL_LUN_FLAG_ID_REQ = 0x01, - CTL_LUN_FLAG_POWERED_OFF = 0x02, - CTL_LUN_FLAG_INOPERABLE = 0x04, + CTL_LUN_FLAG_STOPPED = 0x02, + CTL_LUN_FLAG_NO_MEDIA = 0x04, CTL_LUN_FLAG_PRIMARY = 0x08, CTL_LUN_FLAG_SERIAL_NUM = 0x10, CTL_LUN_FLAG_DEVID = 0x20, CTL_LUN_FLAG_DEV_TYPE = 0x40, CTL_LUN_FLAG_UNMAP = 0x80, - CTL_LUN_FLAG_OFFLINE = 0x100, + CTL_LUN_FLAG_EJECTED = 0x100, CTL_LUN_FLAG_READONLY = 0x200 } ctl_backend_lun_flags; @@ -289,23 +289,11 @@ int ctl_start_lun(struct ctl_be_lun *be_ int ctl_stop_lun(struct ctl_be_lun *be_lun); /* - * If a LUN is inoperable, call ctl_lun_inoperable(). Generally the LUN - * will become operable once again when the user issues the SCSI FORMAT UNIT - * command. (CTL will automatically clear the inoperable flag.) If we - * need to re-enable the LUN, we can call ctl_lun_operable() to enable it - * without a SCSI command. - */ -int ctl_lun_inoperable(struct ctl_be_lun *be_lun); -int ctl_lun_operable(struct ctl_be_lun *be_lun); - -/* - * To take a LUN offline, call ctl_lun_offline(). Generally the LUN will - * be online again once the user sends a SCSI START STOP UNIT command with - * the start and on/offline bits set. The backend can bring the LUN back - * online via the ctl_lun_online() function, if necessary. + * Methods to notify about media and tray status changes. */ -int ctl_lun_offline(struct ctl_be_lun *be_lun); -int ctl_lun_online(struct ctl_be_lun *be_lun); +int ctl_lun_no_media(struct ctl_be_lun *be_lun); +int ctl_lun_has_media(struct ctl_be_lun *be_lun); +int ctl_lun_ejected(struct ctl_be_lun *be_lun); /* * Called on LUN HA role change. @@ -314,7 +302,7 @@ int ctl_lun_primary(struct ctl_be_lun *b int ctl_lun_secondary(struct ctl_be_lun *be_lun); /* - * Let the backend notify the initiator about changed capacity. + * Let the backend notify the initiators about changes. */ void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:31:24 2015 (r288811) @@ -2,6 +2,7 @@ * Copyright (c) 2003 Silicon Graphics International Corp. * Copyright (c) 2009-2011 Spectra Logic Corporation * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2014-2015 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -259,8 +260,7 @@ static int ctl_be_block_open_file(struct static int ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req); static int ctl_be_block_close(struct ctl_be_block_lun *be_lun); -static int ctl_be_block_open(struct ctl_be_block_softc *softc, - struct ctl_be_block_lun *be_lun, +static int ctl_be_block_open(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req); static int ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); @@ -1663,7 +1663,7 @@ ctl_be_block_worker(void *context, int p DPRINTF("entered\n"); /* * Fetch and process I/Os from all queues. If we detect LUN - * CTL_LUN_FLAG_OFFLINE status here -- it is result of a race, + * CTL_LUN_FLAG_NO_MEDIA status here -- it is result of a race, * so make response maximally opaque to not confuse initiator. */ for (;;) { @@ -1675,7 +1675,7 @@ ctl_be_block_worker(void *context, int p ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); beio = (struct ctl_be_block_io *)PRIV(io)->ptr; - if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_complete_beio(beio); return; @@ -1689,7 +1689,7 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->config_write_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_write_done(io); return; @@ -1703,7 +1703,7 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->config_read_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_read_done(io); return; @@ -1717,7 +1717,7 @@ ctl_be_block_worker(void *context, int p STAILQ_REMOVE(&be_lun->input_queue, &io->io_hdr, ctl_io_hdr, links); mtx_unlock(&be_lun->queue_lock); - if (cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) { + if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_data_submit_done(io); return; @@ -2137,8 +2137,7 @@ ctl_be_block_close(struct ctl_be_block_l } static int -ctl_be_block_open(struct ctl_be_block_softc *softc, - struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) +ctl_be_block_open(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct nameidata nd; @@ -2309,7 +2308,7 @@ ctl_be_block_create(struct ctl_be_block_ if ((cbe_lun->flags & CTL_LUN_FLAG_PRIMARY) || control_softc->ha_mode == CTL_HA_MODE_SER_ONLY) { - retval = ctl_be_block_open(softc, be_lun, req); + retval = ctl_be_block_open(be_lun, req); if (retval != 0) { retval = 0; req->status = CTL_LUN_WARNING; @@ -2339,7 +2338,7 @@ ctl_be_block_create(struct ctl_be_block_ } if (be_lun->vn == NULL) - cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; /* Tell the user the blocksize we ended up using */ params->lun_size_bytes = be_lun->size_bytes; params->blocksize_bytes = cbe_lun->blocksize; @@ -2526,8 +2525,8 @@ ctl_be_block_rm(struct ctl_be_block_soft } if (be_lun->vn != NULL) { - cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; - ctl_lun_offline(cbe_lun); + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_no_media(cbe_lun); taskqueue_drain_all(be_lun->io_taskqueue); ctl_be_block_close(be_lun); } @@ -2635,22 +2634,27 @@ ctl_be_block_modify(struct ctl_be_block_ if ((cbe_lun->flags & CTL_LUN_FLAG_PRIMARY) || control_softc->ha_mode == CTL_HA_MODE_SER_ONLY) { if (be_lun->vn == NULL) - error = ctl_be_block_open(softc, be_lun, req); + error = ctl_be_block_open(be_lun, req); else if (vn_isdisk(be_lun->vn, &error)) error = ctl_be_block_open_dev(be_lun, req); else if (be_lun->vn->v_type == VREG) error = ctl_be_block_open_file(be_lun, req); else error = EINVAL; - if ((cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) && + if ((cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) && be_lun->vn != NULL) { - cbe_lun->flags &= ~CTL_LUN_FLAG_OFFLINE; - ctl_lun_online(cbe_lun); + cbe_lun->flags &= ~CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_has_media(cbe_lun); + } else if ((cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) == 0 && + be_lun->vn == NULL) { + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_no_media(cbe_lun); } + cbe_lun->flags &= ~CTL_LUN_FLAG_EJECTED; } else { if (be_lun->vn != NULL) { - cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; - ctl_lun_offline(cbe_lun); + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_no_media(cbe_lun); taskqueue_drain_all(be_lun->io_taskqueue); error = ctl_be_block_close(be_lun); } else @@ -2761,27 +2765,34 @@ ctl_be_block_config_write(union ctl_io * break; case START_STOP_UNIT: { struct scsi_start_stop_unit *cdb; + struct ctl_lun_req req; cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; - - if (cdb->how & SSS_START) - retval = ctl_start_lun(cbe_lun); - else - retval = ctl_stop_lun(cbe_lun); - - /* - * In general, the above routines should not fail. They - * just set state for the LUN. So we've got something - * pretty wrong here if we can't start or stop the LUN. - */ - if (retval != 0) { - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ 0xf051); - retval = CTL_RETVAL_COMPLETE; + if (cdb->how & SSS_START) { + if ((cdb->how & SSS_LOEJ) && be_lun->vn == NULL) { + retval = ctl_be_block_open(be_lun, &req); + cbe_lun->flags &= ~CTL_LUN_FLAG_EJECTED; + if (retval == 0) { + cbe_lun->flags &= ~CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_has_media(cbe_lun); + } else { + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; + ctl_lun_no_media(cbe_lun); + } + } + ctl_start_lun(cbe_lun); } else { - ctl_set_success(&io->scsiio); + ctl_stop_lun(cbe_lun); + if (cdb->how & SSS_LOEJ) { + cbe_lun->flags |= CTL_LUN_FLAG_NO_MEDIA; + cbe_lun->flags |= CTL_LUN_FLAG_EJECTED; + ctl_lun_ejected(cbe_lun); + if (be_lun->vn != NULL) + ctl_be_block_close(be_lun); + } } + + ctl_set_success(&io->scsiio); ctl_config_write_done(io); break; } Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:31:24 2015 (r288811) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003, 2008 Silicon Graphics International Corp. * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2014-2015 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -848,8 +849,11 @@ ctl_backend_ramdisk_lun_config_status(vo static int ctl_backend_ramdisk_config_write(union ctl_io *io) { + struct ctl_be_lun *cbe_lun; int retval; + cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ + CTL_PRIV_BACKEND_LUN].ptr; retval = 0; switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: @@ -874,31 +878,18 @@ ctl_backend_ramdisk_config_write(union c break; case START_STOP_UNIT: { struct scsi_start_stop_unit *cdb; - struct ctl_be_lun *cbe_lun; cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; - - cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ - CTL_PRIV_BACKEND_LUN].ptr; - - if (cdb->how & SSS_START) - retval = ctl_start_lun(cbe_lun); - else - retval = ctl_stop_lun(cbe_lun); - - /* - * In general, the above routines should not fail. They - * just set state for the LUN. So we've got something - * pretty wrong here if we can't start or stop the LUN. - */ - if (retval != 0) { - ctl_set_internal_failure(&io->scsiio, - /*sks_valid*/ 1, - /*retry_count*/ 0xf051); - retval = CTL_RETVAL_COMPLETE; + if (cdb->how & SSS_START) { + if (cdb->how & SSS_LOEJ) + ctl_lun_has_media(cbe_lun); + ctl_start_lun(cbe_lun); } else { - ctl_set_success(&io->scsiio); + ctl_stop_lun(cbe_lun); + if (cdb->how & SSS_LOEJ) + ctl_lun_ejected(cbe_lun); } + ctl_set_success(&io->scsiio); ctl_config_write_done(io); break; } Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:30:18 2015 (r288810) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:31:24 2015 (r288811) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003, 2004, 2005, 2009 Silicon Graphics International Corp. + * Copyright (c) 2014-2015 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,8 +68,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 00 READ KEYS */ {ctl_persistent_reserve_in, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -78,8 +78,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 01 READ RESERVATION */ {ctl_persistent_reserve_in, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -89,8 +88,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 02 REPORT CAPABILITIES */ {ctl_persistent_reserve_in, CTL_SERIDX_INQ, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -100,8 +98,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 03 READ FULL STATUS */ {ctl_persistent_reserve_in, CTL_SERIDX_INQ, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -117,8 +114,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 00 REGISTER */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -128,8 +124,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 01 RESERVE */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -139,8 +134,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 02 RELEASE */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -150,8 +144,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 03 CLEAR */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -161,8 +154,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 04 PREEMPT */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -172,8 +164,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 05 PREEMPT AND ABORT */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -183,8 +174,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 06 REGISTER AND IGNORE EXISTING KEY */ {ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -202,12 +192,14 @@ const struct ctl_cmd_entry ctl_cmd_table { /* 00 EXTENDED COPY (LID1) */ {ctl_extended_copy_lid1, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 16, { 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 01 EXTENDED COPY (LID4) */ {ctl_extended_copy_lid4, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 16, { 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, @@ -301,6 +293,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 1C COPY OPERATION ABORT */ {ctl_copy_operation_abort, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_NONE, CTL_LUN_PAT_NONE, 16, { 0x1c, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x07}}, @@ -312,6 +305,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 00 RECEIVE COPY STATUS (LID1) */ {ctl_receive_copy_status_lid1, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, @@ -326,8 +320,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 03 RECEIVE COPY OPERATING PARAMETERS */ {ctl_receive_copy_operating_parameters, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, @@ -337,6 +330,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 04 RECEIVE COPY FAILURE DETAILS (LID1) */ {ctl_receive_copy_failure_details, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, @@ -345,6 +339,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 05 RECEIVE COPY STATUS (LID4) */ {ctl_receive_copy_status_lid4, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, @@ -356,6 +351,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 07 RECEIVE ROD TOKEN INFORMATION */ {ctl_receive_rod_token_information, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, @@ -364,6 +360,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 08 REPORT ALL ROD TOKENS */ {ctl_report_all_rod_tokens, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, @@ -423,8 +420,6 @@ const struct ctl_cmd_entry ctl_cmd_table /* 10 READ CAPACITY(16) */ {ctl_read_capacity_16, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_DIRECT | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_READCAP, @@ -479,8 +474,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 0A REPORT TARGET PORT GROUPS */ {ctl_report_tagret_port_groups, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_FLAG_DATA_IN | @@ -493,8 +487,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 0C REPORT SUPPORTED_OPCODES */ {ctl_report_supported_opcodes, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_FLAG_DATA_IN | @@ -504,8 +497,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 0D REPORT SUPPORTED_TASK MANAGEMENT FUNCTIONS */ {ctl_report_supported_tmf, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_FLAG_DATA_IN | @@ -518,8 +510,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 0F REPORT TIMESTAMP */ {ctl_report_timestamp, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_FLAG_DATA_IN | @@ -550,8 +541,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_CMD_FLAG_ALLOW_ON_PR_RESV | @@ -560,7 +550,6 @@ const struct ctl_cmd_entry ctl_cmd_table /* 04 FORMAT UNIT */ {ctl_format, CTL_SERIDX_FORMAT, CTL_CMD_FLAG_OK_ON_DIRECT | - CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 6, {0xff, 0, 0, 0, 0x07}}, @@ -613,8 +602,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | CTL_FLAG_DATA_IN | @@ -629,8 +617,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 15 MODE SELECT(6) */ {ctl_mode_select, CTL_SERIDX_MD_SEL, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_NONE, 6, {0x11, 0, 0, 0xff, 0x07}}, @@ -638,8 +625,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 16 RESERVE(6) */ {ctl_scsi_reserve, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_OK_ON_BOTH | - CTL_CMD_FLAG_OK_ON_STOPPED | - CTL_CMD_FLAG_OK_ON_INOPERABLE | + CTL_CMD_FLAG_OK_ON_NO_MEDIA | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 5 11:38:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172669B2D9B; Mon, 5 Oct 2015 11:38:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE79127C; Mon, 5 Oct 2015 11:38:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BcqfZ093042; Mon, 5 Oct 2015 11:38:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Bcqnl093039; Mon, 5 Oct 2015 11:38:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051138.t95Bcqnl093039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288812 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:38:53 -0000 Author: mav Date: Mon Oct 5 11:38:51 2015 New Revision: 288812 URL: https://svnweb.freebsd.org/changeset/base/288812 Log: MFC r288358: Add CD/DVD Capabilities and Mechanical Status Page. This page is obsolete since MMC-4, but still used by some software. approved by: Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/scsi/scsi_cd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:31:24 2015 (r288811) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:38:51 2015 (r288812) @@ -354,6 +354,52 @@ const static struct ctl_logical_block_pr } }; +const static struct scsi_cddvd_capabilities_page cddvd_page_default = { + /*page_code*/SMS_CDDVD_CAPS_PAGE, + /*page_length*/sizeof(struct scsi_cddvd_capabilities_page) - 2, + /*caps1*/0x3f, + /*caps2*/0x00, + /*caps3*/0xf0, + /*caps4*/0x00, + /*caps5*/0x29, + /*caps6*/0x00, + /*obsolete*/{0, 0}, + /*nvol_levels*/{0, 0}, + /*buffer_size*/{8, 0}, + /*obsolete2*/{0, 0}, + /*reserved*/0, + /*digital*/0, + /*obsolete3*/0, + /*copy_management*/0, + /*reserved2*/0, + /*rotation_control*/0, + /*cur_write_speed*/0, + /*num_speed_descr*/0, +}; + +const static struct scsi_cddvd_capabilities_page cddvd_page_changeable = { + /*page_code*/SMS_CDDVD_CAPS_PAGE, + /*page_length*/sizeof(struct scsi_cddvd_capabilities_page) - 2, + /*caps1*/0, + /*caps2*/0, + /*caps3*/0, + /*caps4*/0, + /*caps5*/0, + /*caps6*/0, + /*obsolete*/{0, 0}, + /*nvol_levels*/{0, 0}, + /*buffer_size*/{0, 0}, + /*obsolete2*/{0, 0}, + /*reserved*/0, + /*digital*/0, + /*obsolete3*/0, + /*copy_management*/0, + /*reserved2*/0, + /*rotation_control*/0, + /*cur_write_speed*/0, + /*num_speed_descr*/0, +}; + SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); static int worker_threads = -1; TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads); @@ -4121,6 +4167,23 @@ ctl_init_page_index(struct ctl_lun *lun) }} break; } + case SMS_CDDVD_CAPS_PAGE:{ + memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_DEFAULT], + &cddvd_page_default, + sizeof(cddvd_page_default)); + memcpy(&lun->mode_pages.cddvd_page[ + CTL_PAGE_CHANGEABLE], &cddvd_page_changeable, + sizeof(cddvd_page_changeable)); + memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_SAVED], + &cddvd_page_default, + sizeof(cddvd_page_default)); + memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_CURRENT], + &lun->mode_pages.cddvd_page[CTL_PAGE_SAVED], + sizeof(cddvd_page_default)); + page_index->page_data = + (uint8_t *)lun->mode_pages.cddvd_page; + break; + } case SMS_VENDOR_SPECIFIC_PAGE:{ switch (page_index->subpage) { case DBGCNF_SUBPAGE_CODE: { Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:31:24 2015 (r288811) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:38:51 2015 (r288812) @@ -40,6 +40,10 @@ #ifndef _CTL_PRIVATE_H_ #define _CTL_PRIVATE_H_ +#include +#include +#include + /* * SCSI vendor and product names. */ @@ -286,6 +290,9 @@ static const struct ctl_page_index page_ {SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, 0x02, sizeof(struct ctl_logical_block_provisioning_page), NULL, CTL_PAGE_FLAG_DIRECT, NULL, NULL}, + {SMS_CDDVD_CAPS_PAGE, 0, + sizeof(struct scsi_cddvd_capabilities_page), NULL, + CTL_PAGE_FLAG_CDROM, NULL, NULL}, {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, DBGCNF_SUBPAGE_CODE, sizeof(struct copan_debugconf_subpage), NULL, CTL_PAGE_FLAG_ALL, ctl_debugconf_sp_sense_handler, ctl_debugconf_sp_select_handler}, @@ -303,6 +310,7 @@ struct ctl_mode_pages { struct scsi_control_ext_page control_ext_page[4]; struct scsi_info_exceptions_page ie_page[4]; struct ctl_logical_block_provisioning_page lbp_page[4]; + struct scsi_cddvd_capabilities_page cddvd_page[4]; struct copan_debugconf_subpage debugconf_subpage[4]; struct ctl_page_index index[CTL_NUM_MODE_PAGES]; }; Modified: stable/10/sys/cam/scsi/scsi_cd.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.h Mon Oct 5 11:31:24 2015 (r288811) +++ stable/10/sys/cam/scsi/scsi_cd.h Mon Oct 5 11:38:51 2015 (r288812) @@ -783,6 +783,37 @@ struct cd_audio_page #define RIGHT_PORT 1 }; +struct scsi_cddvd_capabilities_page_sd { + uint8_t reserved; + uint8_t rotation_control; + uint8_t write_speed_supported[2]; +}; + +struct scsi_cddvd_capabilities_page { + uint8_t page_code; +#define SMS_CDDVD_CAPS_PAGE 0x2a + uint8_t page_length; + uint8_t caps1; + uint8_t caps2; + uint8_t caps3; + uint8_t caps4; + uint8_t caps5; + uint8_t caps6; + uint8_t obsolete[2]; + uint8_t nvol_levels[2]; + uint8_t buffer_size[2]; + uint8_t obsolete2[2]; + uint8_t reserved; + uint8_t digital; + uint8_t obsolete3; + uint8_t copy_management; + uint8_t reserved2; + uint8_t rotation_control; + uint8_t cur_write_speed; + uint8_t num_speed_descr; + struct scsi_cddvd_capabilities_page_sd speed_descr[]; +}; + union cd_pages { struct cd_audio_page audio; From owner-svn-src-all@freebsd.org Mon Oct 5 11:39:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67A019B2E3D; Mon, 5 Oct 2015 11:39:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4B75FB; Mon, 5 Oct 2015 11:39:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Bdim6093134; Mon, 5 Oct 2015 11:39:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BdiJf093133; Mon, 5 Oct 2015 11:39:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051139.t95BdiJf093133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288813 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:39:44 -0000 Author: mav Date: Mon Oct 5 11:39:43 2015 New Revision: 288813 URL: https://svnweb.freebsd.org/changeset/base/288813 Log: MFC r288359: Report that we can read all flavours of DVD. Why not? Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:38:51 2015 (r288812) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:39:43 2015 (r288813) @@ -10273,6 +10273,10 @@ ctl_get_config(struct ctl_scsiio *ctsio) sizeof(struct scsi_get_config_feature) + 8 + sizeof(struct scsi_get_config_feature) + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4 + + sizeof(struct scsi_get_config_feature) + 4 + sizeof(struct scsi_get_config_feature) + 4; ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); ctsio->kern_sg_entries = 0; @@ -10286,8 +10290,16 @@ ctl_get_config(struct ctl_scsiio *ctsio) scsi_ulto2b(0x0010, hdr->current_profile); feature = (struct scsi_get_config_feature *)(hdr + 1); - if (starting > 0x001f) + if (starting > 0x003b) goto done; + if (starting > 0x003a) + goto f3b; + if (starting > 0x002b) + goto f3a; + if (starting > 0x002a) + goto f2b; + if (starting > 0x001f) + goto f2a; if (starting > 0x001e) goto f1f; if (starting > 0x001d) @@ -10384,6 +10396,48 @@ f1f: /* DVD Read */ feature = (struct scsi_get_config_feature *) &feature->feature_data[feature->add_length]; +f2a: /* DVD+RW */ + scsi_ulto2b(0x002A, feature->feature_code); + feature->flags = 0x04; + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x00; + feature->feature_data[1] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f2b: /* DVD+R */ + scsi_ulto2b(0x002B, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f3a: /* DVD+RW Dual Layer */ + scsi_ulto2b(0x003A, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x00; + feature->feature_data[1] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + +f3b: /* DVD+R Dual Layer */ + scsi_ulto2b(0x003B, feature->feature_code); + feature->flags = 0x00; + if ((lun->flags & CTL_LUN_NO_MEDIA) == 0) + feature->flags |= SGC_F_CURRENT; + feature->add_length = 4; + feature->feature_data[0] = 0x00; + feature = (struct scsi_get_config_feature *) + &feature->feature_data[feature->add_length]; + done: data_len = (uint8_t *)feature - (uint8_t *)hdr; if (rt == SGC_RT_SPECIFIC && data_len > 4) { From owner-svn-src-all@freebsd.org Mon Oct 5 11:41:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E05CA9B2FC9; Mon, 5 Oct 2015 11:41:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C441F988; Mon, 5 Oct 2015 11:41:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Bf6m3094413; Mon, 5 Oct 2015 11:41:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Bf6rF094412; Mon, 5 Oct 2015 11:41:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051141.t95Bf6rF094412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288814 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:41:07 -0000 Author: mav Date: Mon Oct 5 11:41:05 2015 New Revision: 288814 URL: https://svnweb.freebsd.org/changeset/base/288814 Log: MFC r288367: Fix arguments order. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:39:43 2015 (r288813) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:41:05 2015 (r288814) @@ -837,7 +837,7 @@ tpc_process_b2b(struct tpc_list *list) ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x0d, /*ascq*/ 0x01, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -854,7 +854,7 @@ tpc_process_b2b(struct tpc_list *list) ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x08, /*ascq*/ 0x04, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -885,7 +885,7 @@ tpc_process_b2b(struct tpc_list *list) ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x26, /*ascq*/ 0x0A, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -986,7 +986,7 @@ tpc_process_verify(struct tpc_list *list ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x0d, /*ascq*/ 0x01, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else @@ -1000,7 +1000,7 @@ tpc_process_verify(struct tpc_list *list ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x08, /*ascq*/ 0x04, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1050,7 +1050,7 @@ tpc_process_register_key(struct tpc_list ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x0d, /*ascq*/ 0x01, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else @@ -1064,7 +1064,7 @@ tpc_process_register_key(struct tpc_list ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x08, /*ascq*/ 0x04, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1398,7 +1398,7 @@ tpc_process(struct tpc_list *list) ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x26, /*ascq*/ 0x09, - SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_COMMAND, sizeof(csi), csi, SSD_ELEM_NONE); goto done; } From owner-svn-src-all@freebsd.org Mon Oct 5 11:41:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7418B99A2A3; Mon, 5 Oct 2015 11:41:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656C0B81; Mon, 5 Oct 2015 11:41:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BfrTL096394; Mon, 5 Oct 2015 11:41:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Bfr1u096372; Mon, 5 Oct 2015 11:41:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051141.t95Bfr1u096372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288815 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:41:53 -0000 Author: mav Date: Mon Oct 5 11:41:52 2015 New Revision: 288815 URL: https://svnweb.freebsd.org/changeset/base/288815 Log: MFC r288368: Don't report SYNC_NV bit set in SYNCHRONIZE CACHE as error. While this bit is obsolete in SBC-3, behavior controlled by it is allowed on device discretion. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:41:05 2015 (r288814) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:41:52 2015 (r288815) @@ -760,7 +760,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_NONE, CTL_LUN_PAT_WRITE, - 10, {0x02, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, + 10, {0x06, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 36 LOCK UNLOCK CACHE(10) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1119,7 +1119,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_DIRECT | CTL_FLAG_DATA_NONE, CTL_LUN_PAT_WRITE, - 16, {0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 92 LOCK UNLOCK CACHE(16) */ From owner-svn-src-all@freebsd.org Mon Oct 5 11:42:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F2EB99A347; Mon, 5 Oct 2015 11:42:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00657CF5; Mon, 5 Oct 2015 11:42:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BgkvW096506; Mon, 5 Oct 2015 11:42:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Bgjqs096501; Mon, 5 Oct 2015 11:42:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051142.t95Bgjqs096501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288816 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:42:47 -0000 Author: mav Date: Mon Oct 5 11:42:44 2015 New Revision: 288816 URL: https://svnweb.freebsd.org/changeset/base/288816 Log: MFC r288369: Really implement PREVENT ALLOW MEDIUM REMOVAL command. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:41:52 2015 (r288815) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:42:44 2015 (r288816) @@ -5131,30 +5131,43 @@ ctl_start_stop(struct ctl_scsiio *ctsio) lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; cdb = (struct scsi_start_stop_unit *)ctsio->cdb; - if ((lun->flags & CTL_LUN_PR_RESERVED) - && ((cdb->how & SSS_START)==0)) { - uint32_t residx; + if ((cdb->how & SSS_PC_MASK) == 0) { + if ((lun->flags & CTL_LUN_PR_RESERVED) && + (cdb->how & SSS_START) == 0) { + uint32_t residx; + + residx = ctl_get_initindex(&ctsio->io_hdr.nexus); + if (ctl_get_prkey(lun, residx) == 0 || + (lun->pr_res_idx != residx && lun->res_type < 4)) { - residx = ctl_get_initindex(&ctsio->io_hdr.nexus); - if (ctl_get_prkey(lun, residx) == 0 - || (lun->pr_res_idx!=residx && lun->res_type < 4)) { + ctl_set_reservation_conflict(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } - ctl_set_reservation_conflict(ctsio); + if ((cdb->how & SSS_LOEJ) && + (lun->flags & CTL_LUN_REMOVABLE) == 0) { + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 4, + /*bit_valid*/ 1, + /*bit*/ 1); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } - } - if ((cdb->how & SSS_LOEJ) && - (lun->flags & CTL_LUN_REMOVABLE) == 0) { - ctl_set_invalid_field(ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 4, - /*bit_valid*/ 1, - /*bit*/ 1); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + if ((cdb->how & SSS_START) == 0 && (cdb->how & SSS_LOEJ) && + lun->prevent_count > 0) { + /* "Medium removal prevented" */ + ctl_set_sense(ctsio, /*current_error*/ 1, + /*sense_key*/(lun->flags & CTL_LUN_NO_MEDIA) ? + SSD_KEY_NOT_READY : SSD_KEY_ILLEGAL_REQUEST, + /*asc*/ 0x53, /*ascq*/ 0x02, SSD_ELEM_NONE); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } } retval = lun->backend->config_write((union ctl_io *)ctsio); @@ -5165,11 +5178,14 @@ int ctl_prevent_allow(struct ctl_scsiio *ctsio) { struct ctl_lun *lun; + struct scsi_prevent *cdb; int retval; + uint32_t initidx; CTL_DEBUG_PRINT(("ctl_prevent_allow\n")); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_prevent *)ctsio->cdb; if ((lun->flags & CTL_LUN_REMOVABLE) == 0) { ctl_set_invalid_opcode(ctsio); @@ -5177,6 +5193,18 @@ ctl_prevent_allow(struct ctl_scsiio *cts return (CTL_RETVAL_COMPLETE); } + initidx = ctl_get_initindex(&ctsio->io_hdr.nexus); + mtx_lock(&lun->lun_lock); + if ((cdb->how & PR_PREVENT) && + ctl_is_set(lun->prevent, initidx) == 0) { + ctl_set_mask(lun->prevent, initidx); + lun->prevent_count++; + } else if ((cdb->how & PR_PREVENT) == 0 && + ctl_is_set(lun->prevent, initidx)) { + ctl_clear_mask(lun->prevent, initidx); + lun->prevent_count--; + } + mtx_unlock(&lun->lun_lock); retval = lun->backend->config_write((union ctl_io *)ctsio); return (retval); } @@ -11807,9 +11835,7 @@ ctl_do_lun_reset(struct ctl_lun *lun, un #if 0 uint32_t initidx; #endif -#ifdef CTL_WITH_CA int i; -#endif mtx_lock(&lun->lun_lock); /* @@ -11844,6 +11870,9 @@ ctl_do_lun_reset(struct ctl_lun *lun, un for (i = 0; i < CTL_MAX_INITIATORS; i++) ctl_clear_mask(lun->have_ca, i); #endif + lun->prevent_count = 0; + for (i = 0; i < CTL_MAX_INITIATORS; i++) + ctl_clear_mask(lun->prevent, i); mtx_unlock(&lun->lun_lock); return (0); @@ -11989,6 +12018,10 @@ ctl_i_t_nexus_reset(union ctl_io *io) #endif if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == initidx)) lun->flags &= ~CTL_LUN_RESERVED; + if (ctl_is_set(lun->prevent, initidx)) { + ctl_clear_mask(lun->prevent, initidx); + lun->prevent_count--; + } ctl_est_ua(lun, initidx, CTL_UA_I_T_NEXUS_LOSS); mtx_unlock(&lun->lun_lock); } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:41:52 2015 (r288815) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 5 11:42:44 2015 (r288816) @@ -2768,6 +2768,11 @@ ctl_be_block_config_write(union ctl_io * struct ctl_lun_req req; cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; + if ((cdb->how & SSS_PC_MASK) != 0) { + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } if (cdb->how & SSS_START) { if ((cdb->how & SSS_LOEJ) && be_lun->vn == NULL) { retval = ctl_be_block_open(be_lun, &req); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:41:52 2015 (r288815) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:42:44 2015 (r288816) @@ -880,6 +880,11 @@ ctl_backend_ramdisk_config_write(union c struct scsi_start_stop_unit *cdb; cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb; + if ((cdb->how & SSS_PC_MASK) != 0) { + ctl_set_success(&io->scsiio); + ctl_config_write_done(io); + break; + } if (cdb->how & SSS_START) { if (cdb->how & SSS_LOEJ) ctl_lun_has_media(cbe_lun); Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:41:52 2015 (r288815) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 5 11:42:44 2015 (r288816) @@ -658,7 +658,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_NO_MEDIA | CTL_FLAG_DATA_NONE | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, - CTL_LUN_PAT_NONE, 6, {0x01, 0, 0, 0x03, 0x07}}, + CTL_LUN_PAT_NONE, 6, {0x01, 0, 0x0f, 0xf7, 0x07}}, /* 1C RECEIVE DIAGNOSTIC RESULTS */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:41:52 2015 (r288815) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:42:44 2015 (r288816) @@ -397,6 +397,8 @@ struct ctl_lun { int pr_key_count; uint32_t pr_res_idx; uint8_t res_type; + int prevent_count; + uint32_t prevent[(CTL_MAX_INITIATORS+31)/32]; uint8_t *write_buffer; struct ctl_devid *lun_devid; TAILQ_HEAD(tpc_lists, tpc_list) tpc_lists; From owner-svn-src-all@freebsd.org Mon Oct 5 11:45:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2EBD99A55B; Mon, 5 Oct 2015 11:45:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3DE9EA3; Mon, 5 Oct 2015 11:45:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BjUhx096705; Mon, 5 Oct 2015 11:45:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BjTnb096696; Mon, 5 Oct 2015 11:45:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051145.t95BjTnb096696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288817 - in stable/10/sys/cam: . scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:45:31 -0000 Author: mav Date: Mon Oct 5 11:45:28 2015 New Revision: 288817 URL: https://svnweb.freebsd.org/changeset/base/288817 Log: MFC r288420: Make pass, sg and targ drivers respect HBA's maxio. Previous limitation of 64K (DFLTPHYS) is quite annoying. Modified: stable/10/sys/cam/cam_periph.c stable/10/sys/cam/cam_periph.h stable/10/sys/cam/cam_xpt.c stable/10/sys/cam/scsi/scsi_pass.c stable/10/sys/cam/scsi/scsi_sg.c stable/10/sys/cam/scsi/scsi_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/cam_periph.c Mon Oct 5 11:45:28 2015 (r288817) @@ -716,16 +716,19 @@ camperiphfree(struct cam_periph *periph) * buffers to map stuff in and out, we're limited to the buffer size. */ int -cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) +cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, + u_int maxmap) { int numbufs, i, j; int flags[CAM_PERIPH_MAXMAPS]; u_int8_t **data_ptrs[CAM_PERIPH_MAXMAPS]; u_int32_t lengths[CAM_PERIPH_MAXMAPS]; u_int32_t dirs[CAM_PERIPH_MAXMAPS]; - /* Some controllers may not be able to handle more data. */ - size_t maxmap = DFLTPHYS; + if (maxmap == 0) + maxmap = DFLTPHYS; /* traditional default */ + else if (maxmap > MAXPHYS) + maxmap = MAXPHYS; /* for safety */ switch(ccb->ccb_h.func_code) { case XPT_DEV_MATCH: if (ccb->cdm.match_buf_len == 0) { Modified: stable/10/sys/cam/cam_periph.h ============================================================================== --- stable/10/sys/cam/cam_periph.h Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/cam_periph.h Mon Oct 5 11:45:28 2015 (r288817) @@ -160,7 +160,8 @@ int cam_periph_hold(struct cam_periph * void cam_periph_unhold(struct cam_periph *periph); void cam_periph_invalidate(struct cam_periph *periph); int cam_periph_mapmem(union ccb *ccb, - struct cam_periph_map_info *mapinfo); + struct cam_periph_map_info *mapinfo, + u_int maxmap); void cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo); union ccb *cam_periph_getccb(struct cam_periph *periph, Modified: stable/10/sys/cam/cam_xpt.c ============================================================================== --- stable/10/sys/cam/cam_xpt.c Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/cam_xpt.c Mon Oct 5 11:45:28 2015 (r288817) @@ -540,7 +540,7 @@ xptdoioctl(struct cdev *dev, u_long cmd, * Map the pattern and match buffers into kernel * virtual address space. */ - error = cam_periph_mapmem(inccb, &mapinfo); + error = cam_periph_mapmem(inccb, &mapinfo, MAXPHYS); if (error) { inccb->ccb_h.path = old_path; Modified: stable/10/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_pass.c Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/scsi/scsi_pass.c Mon Oct 5 11:45:28 2015 (r288817) @@ -77,6 +77,7 @@ struct pass_softc { u_int8_t pd_type; union ccb saved_ccb; int open_count; + u_int maxio; struct devstat *device_stats; struct cdev *dev; struct cdev *alias_dev; @@ -366,6 +367,13 @@ passregister(struct cam_periph *periph, cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); + if (cpi.maxio == 0) + softc->maxio = DFLTPHYS; /* traditional default */ + else if (cpi.maxio > MAXPHYS) + softc->maxio = MAXPHYS; /* for safety */ + else + softc->maxio = cpi.maxio; /* real value */ + /* * We pass in 0 for a blocksize, since we don't * know what the blocksize of this device is, if @@ -659,7 +667,7 @@ passsendccb(struct cam_periph *periph, u * Dropping it here is reasonably safe. */ cam_periph_unlock(periph); - error = cam_periph_mapmem(ccb, &mapinfo); + error = cam_periph_mapmem(ccb, &mapinfo, softc->maxio); cam_periph_lock(periph); /* Modified: stable/10/sys/cam/scsi/scsi_sg.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sg.c Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/scsi/scsi_sg.c Mon Oct 5 11:45:28 2015 (r288817) @@ -99,6 +99,7 @@ struct sg_softc { sg_state state; sg_flags flags; int open_count; + u_int maxio; struct devstat *device_stats; TAILQ_HEAD(, sg_rdwr) rdwr_done; struct cdev *dev; @@ -325,6 +326,13 @@ sgregister(struct cam_periph *periph, vo cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); + if (cpi.maxio == 0) + softc->maxio = DFLTPHYS; /* traditional default */ + else if (cpi.maxio > MAXPHYS) + softc->maxio = MAXPHYS; /* for safety */ + else + softc->maxio = cpi.maxio; /* real value */ + /* * We pass in 0 for all blocksize, since we don't know what the * blocksize of the device is, if it even has a blocksize. @@ -894,7 +902,7 @@ sgsendccb(struct cam_periph *periph, uni * need for additional checks. */ cam_periph_unlock(periph); - error = cam_periph_mapmem(ccb, &mapinfo); + error = cam_periph_mapmem(ccb, &mapinfo, softc->maxio); cam_periph_lock(periph); if (error) return (error); Modified: stable/10/sys/cam/scsi/scsi_target.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_target.c Mon Oct 5 11:42:44 2015 (r288816) +++ stable/10/sys/cam/scsi/scsi_target.c Mon Oct 5 11:45:28 2015 (r288817) @@ -94,6 +94,7 @@ struct targ_softc { struct cam_periph *periph; struct cam_path *path; targ_state state; + u_int maxio; struct selinfo read_select; struct devstat device_stats; }; @@ -403,6 +404,12 @@ targenable(struct targ_softc *softc, str status = CAM_FUNC_NOTAVAIL; goto enable_fail; } + if (cpi.maxio == 0) + softc->maxio = DFLTPHYS; /* traditional default */ + else if (cpi.maxio > MAXPHYS) + softc->maxio = MAXPHYS; /* for safety */ + else + softc->maxio = cpi.maxio; /* real value */ /* Destroy any periph on our path if it is disabled */ periph = cam_periph_find(path, "targ"); @@ -725,7 +732,7 @@ targsendccb(struct targ_softc *softc, un if ((ccb_h->func_code == XPT_CONT_TARGET_IO) || (ccb_h->func_code == XPT_DEV_MATCH)) { - error = cam_periph_mapmem(ccb, mapinfo); + error = cam_periph_mapmem(ccb, mapinfo, softc->maxio); /* * cam_periph_mapmem returned an error, we can't continue. From owner-svn-src-all@freebsd.org Mon Oct 5 11:46:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36B3C99A6B7; Mon, 5 Oct 2015 11:46:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C09479; Mon, 5 Oct 2015 11:46:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BkOAx096800; Mon, 5 Oct 2015 11:46:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BkOf6096798; Mon, 5 Oct 2015 11:46:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051146.t95BkOf6096798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288818 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:46:25 -0000 Author: mav Date: Mon Oct 5 11:46:23 2015 New Revision: 288818 URL: https://svnweb.freebsd.org/changeset/base/288818 Log: MFC r288427: Use proper STAILQ_* macros where possible. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:45:28 2015 (r288817) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:46:23 2015 (r288818) @@ -1924,13 +1924,8 @@ ctl_shutdown(void) mtx_lock(&softc->ctl_lock); - /* - * Free up each LUN. - */ - for (lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; lun = next_lun){ - next_lun = STAILQ_NEXT(lun, links); + STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) ctl_free_lun(lun); - } mtx_unlock(&softc->ctl_lock); @@ -2782,9 +2777,9 @@ ctl_ioctl(struct cdev *dev, u_long cmd, * XXX KDM no locking here. If the LUN list changes, * things can blow up. */ - for (i = 0, lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; - i++, lun = STAILQ_NEXT(lun, links)) { - retval = copyout(&lun->stats, &stats->lun_stats[i], + i = 0; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + retval = copyout(&lun->stats, &stats->lun_stats[i++], sizeof(lun->stats)); if (retval != 0) break; @@ -4639,8 +4634,7 @@ ctl_enable_lun(struct ctl_be_lun *be_lun lun->flags &= ~CTL_LUN_DISABLED; mtx_unlock(&lun->lun_lock); - for (port = STAILQ_FIRST(&softc->port_list); port != NULL; port = nport) { - nport = STAILQ_NEXT(port, links); + STAILQ_FOREACH_SAFE(port, &softc->port_list, links, nport) { if ((port->status & CTL_PORT_STATUS_ONLINE) == 0 || port->lun_map != NULL || port->lun_enable == NULL) continue; @@ -13132,7 +13126,7 @@ ctl_process_done(union ctl_io *io) * Check to see if we have any errors to inject here. We only * inject errors for commands that don't already have errors set. */ - if ((STAILQ_FIRST(&lun->error_list) != NULL) && + if (!STAILQ_EMPTY(&lun->error_list) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) && ((io->io_hdr.flags & CTL_FLAG_STATUS_SENT) == 0)) ctl_inject_error(lun, io); Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:45:28 2015 (r288817) +++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c Mon Oct 5 11:46:23 2015 (r288818) @@ -180,14 +180,7 @@ ctl_backend_ramdisk_shutdown(void) #endif mtx_lock(&softc->lock); - for (lun = STAILQ_FIRST(&softc->lun_list); lun != NULL; lun = next_lun){ - /* - * Grab the next LUN. The current LUN may get removed by - * ctl_invalidate_lun(), which will call our LUN shutdown - * routine, if there is no outstanding I/O for this LUN. - */ - next_lun = STAILQ_NEXT(lun, links); - + STAILQ_FOREACH_SAFE(lun, &softc->lun_list, links, next_lun) { /* * Drop our lock here. Since ctl_invalidate_lun() can call * back into us, this could potentially lead to a recursive From owner-svn-src-all@freebsd.org Mon Oct 5 11:47:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DF9899A7A6; Mon, 5 Oct 2015 11:47:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E8CF2DE; Mon, 5 Oct 2015 11:47:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BlH6p096984; Mon, 5 Oct 2015 11:47:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BlG3o096982; Mon, 5 Oct 2015 11:47:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051147.t95BlG3o096982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288819 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:47:17 -0000 Author: mav Date: Mon Oct 5 11:47:16 2015 New Revision: 288819 URL: https://svnweb.freebsd.org/changeset/base/288819 Log: MFC r288448: Unify PR variable names to reduce confusion. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:46:23 2015 (r288818) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:47:16 2015 (r288819) @@ -783,9 +783,9 @@ alloc: msg->hdr.nexus.targ_lun = lun->lun; msg->hdr.nexus.targ_mapped_lun = lun->lun; msg->lun.flags = lun->flags; - msg->lun.pr_generation = lun->PRGeneration; + msg->lun.pr_generation = lun->pr_generation; msg->lun.pr_res_idx = lun->pr_res_idx; - msg->lun.pr_res_type = lun->res_type; + msg->lun.pr_res_type = lun->pr_res_type; msg->lun.pr_key_count = lun->pr_key_count; i = 0; if (lun->lun_devid) { @@ -1087,9 +1087,9 @@ ctl_isc_lun_sync(struct ctl_softc *softc /* If peer is primary and we are not -- use data */ if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && (lun->flags & CTL_LUN_PEER_SC_PRIMARY)) { - lun->PRGeneration = msg->lun.pr_generation; + lun->pr_generation = msg->lun.pr_generation; lun->pr_res_idx = msg->lun.pr_res_idx; - lun->res_type = msg->lun.pr_res_type; + lun->pr_res_type = msg->lun.pr_res_type; lun->pr_key_count = msg->lun.pr_key_count; for (k = 0; k < CTL_MAX_INITIATORS; k++) ctl_clr_prkey(lun, k); @@ -5132,7 +5132,7 @@ ctl_start_stop(struct ctl_scsiio *ctsio) residx = ctl_get_initindex(&ctsio->io_hdr.nexus); if (ctl_get_prkey(lun, residx) == 0 || - (lun->pr_res_idx != residx && lun->res_type < 4)) { + (lun->pr_res_idx != residx && lun->pr_res_type < 4)) { ctl_set_reservation_conflict(ctsio); ctl_done((union ctl_io *)ctsio); @@ -7542,7 +7542,7 @@ retry: goto retry; } - scsi_ulto4b(lun->PRGeneration, res_keys->header.generation); + scsi_ulto4b(lun->pr_generation, res_keys->header.generation); scsi_ulto4b(sizeof(struct scsi_per_res_key) * lun->pr_key_count, res_keys->header.length); @@ -7573,7 +7573,7 @@ retry: res = (struct scsi_per_res_in_rsrv *)ctsio->kern_data_ptr; - scsi_ulto4b(lun->PRGeneration, res->header.generation); + scsi_ulto4b(lun->pr_generation, res->header.generation); if (lun->flags & CTL_LUN_PR_RESERVED) { @@ -7616,7 +7616,7 @@ retry: scsi_u64to8b(ctl_get_prkey(lun, lun->pr_res_idx), res->data.reservation); } - res->data.scopetype = lun->res_type; + res->data.scopetype = lun->pr_res_type; break; } case SPRI_RC: //report capabilities @@ -7661,7 +7661,7 @@ retry: goto retry; } - scsi_ulto4b(lun->PRGeneration, res_status->header.generation); + scsi_ulto4b(lun->pr_generation, res_status->header.generation); res_desc = &res_status->desc[0]; for (i = 0; i < CTL_MAX_INITIATORS; i++) { @@ -7673,7 +7673,7 @@ retry: (lun->pr_res_idx == i || lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS)) { res_desc->flags = SPRI_FULL_R_HOLDER; - res_desc->scopetype = lun->res_type; + res_desc->scopetype = lun->pr_res_type; } scsi_ulto2b(i / CTL_MAX_INIT_PER_PORT, res_desc->rel_trgt_port_id); @@ -7762,11 +7762,11 @@ ctl_pro_preempt(struct ctl_softc *softc, ctl_est_ua(lun, i, CTL_UA_REG_PREEMPT); } lun->pr_key_count = 1; - lun->res_type = type; - if (lun->res_type != SPR_TYPE_WR_EX_AR - && lun->res_type != SPR_TYPE_EX_AC_AR) + lun->pr_res_type = type; + if (lun->pr_res_type != SPR_TYPE_WR_EX_AR && + lun->pr_res_type != SPR_TYPE_EX_AC_AR) lun->pr_res_idx = residx; - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); /* send msg to other side */ @@ -7836,7 +7836,7 @@ ctl_pro_preempt(struct ctl_softc *softc, ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); /* send msg to other side */ @@ -7902,19 +7902,19 @@ ctl_pro_preempt(struct ctl_softc *softc, ctl_clr_prkey(lun, i); lun->pr_key_count--; ctl_est_ua(lun, i, CTL_UA_REG_PREEMPT); - } else if (type != lun->res_type - && (lun->res_type == SPR_TYPE_WR_EX_RO - || lun->res_type ==SPR_TYPE_EX_AC_RO)){ + } else if (type != lun->pr_res_type && + (lun->pr_res_type == SPR_TYPE_WR_EX_RO || + lun->pr_res_type == SPR_TYPE_EX_AC_RO)) { ctl_est_ua(lun, i, CTL_UA_RES_RELEASE); } } - lun->res_type = type; - if (lun->res_type != SPR_TYPE_WR_EX_AR - && lun->res_type != SPR_TYPE_EX_AC_AR) + lun->pr_res_type = type; + if (lun->pr_res_type != SPR_TYPE_WR_EX_AR && + lun->pr_res_type != SPR_TYPE_EX_AC_AR) lun->pr_res_idx = residx; else lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS; - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); persis_io.hdr.nexus = ctsio->io_hdr.nexus; @@ -7951,7 +7951,7 @@ ctl_pro_preempt(struct ctl_softc *softc, ctl_done((union ctl_io *)ctsio); return (1); } - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); persis_io.hdr.nexus = ctsio->io_hdr.nexus; @@ -7995,9 +7995,9 @@ ctl_pro_preempt_other(struct ctl_lun *lu } lun->pr_key_count = 1; - lun->res_type = msg->pr.pr_info.res_type; - if (lun->res_type != SPR_TYPE_WR_EX_AR - && lun->res_type != SPR_TYPE_EX_AC_AR) + lun->pr_res_type = msg->pr.pr_info.res_type; + if (lun->pr_res_type != SPR_TYPE_WR_EX_AR && + lun->pr_res_type != SPR_TYPE_EX_AC_AR) lun->pr_res_idx = msg->pr.pr_info.residx; } else { for (i = 0; i < CTL_MAX_INITIATORS; i++) { @@ -8019,20 +8019,20 @@ ctl_pro_preempt_other(struct ctl_lun *lu ctl_clr_prkey(lun, i); lun->pr_key_count--; ctl_est_ua(lun, i, CTL_UA_REG_PREEMPT); - } else if (msg->pr.pr_info.res_type != lun->res_type - && (lun->res_type == SPR_TYPE_WR_EX_RO - || lun->res_type == SPR_TYPE_EX_AC_RO)) { + } else if (msg->pr.pr_info.res_type != lun->pr_res_type + && (lun->pr_res_type == SPR_TYPE_WR_EX_RO || + lun->pr_res_type == SPR_TYPE_EX_AC_RO)) { ctl_est_ua(lun, i, CTL_UA_RES_RELEASE); } } - lun->res_type = msg->pr.pr_info.res_type; - if (lun->res_type != SPR_TYPE_WR_EX_AR - && lun->res_type != SPR_TYPE_EX_AC_AR) + lun->pr_res_type = msg->pr.pr_info.res_type; + if (lun->pr_res_type != SPR_TYPE_WR_EX_AR && + lun->pr_res_type != SPR_TYPE_EX_AC_AR) lun->pr_res_idx = msg->pr.pr_info.residx; else lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS; } - lun->PRGeneration++; + lun->pr_generation++; } @@ -8214,9 +8214,9 @@ ctl_persistent_reserve_out(struct ctl_sc lun->flags &= ~CTL_LUN_PR_RESERVED; lun->pr_res_idx = CTL_PR_NO_RESERVATION; - if ((lun->res_type == SPR_TYPE_WR_EX_RO - || lun->res_type == SPR_TYPE_EX_AC_RO) - && lun->pr_key_count) { + if ((lun->pr_res_type == SPR_TYPE_WR_EX_RO || + lun->pr_res_type == SPR_TYPE_EX_AC_RO) && + lun->pr_key_count) { /* * If the reservation is a registrants * only type we need to generate a UA @@ -8232,15 +8232,15 @@ ctl_persistent_reserve_out(struct ctl_sc CTL_UA_RES_RELEASE); } } - lun->res_type = 0; + lun->pr_res_type = 0; } else if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS) { if (lun->pr_key_count==0) { lun->flags &= ~CTL_LUN_PR_RESERVED; - lun->res_type = 0; + lun->pr_res_type = 0; lun->pr_res_idx = CTL_PR_NO_RESERVATION; } } - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); persis_io.hdr.nexus = ctsio->io_hdr.nexus; @@ -8259,7 +8259,7 @@ ctl_persistent_reserve_out(struct ctl_sc if (ctl_get_prkey(lun, residx) == 0) lun->pr_key_count++; ctl_set_prkey(lun, residx, sa_res_key); - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); persis_io.hdr.nexus = ctsio->io_hdr.nexus; @@ -8288,7 +8288,7 @@ ctl_persistent_reserve_out(struct ctl_sc */ if ((lun->pr_res_idx != residx && lun->pr_res_idx != CTL_PR_ALL_REGISTRANTS) - || lun->res_type != type) { + || lun->pr_res_type != type) { mtx_unlock(&lun->lun_lock); free(ctsio->kern_data_ptr, M_CTL); ctl_set_reservation_conflict(ctsio); @@ -8308,7 +8308,7 @@ ctl_persistent_reserve_out(struct ctl_sc lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS; lun->flags |= CTL_LUN_PR_RESERVED; - lun->res_type = type; + lun->pr_res_type = type; mtx_unlock(&lun->lun_lock); @@ -8343,7 +8343,7 @@ ctl_persistent_reserve_out(struct ctl_sc goto done; } - if (lun->res_type != type) { + if (lun->pr_res_type != type) { mtx_unlock(&lun->lun_lock); free(ctsio->kern_data_ptr, M_CTL); ctl_set_illegal_pr_release(ctsio); @@ -8354,7 +8354,7 @@ ctl_persistent_reserve_out(struct ctl_sc /* okay to release */ lun->flags &= ~CTL_LUN_PR_RESERVED; lun->pr_res_idx = CTL_PR_NO_RESERVATION; - lun->res_type = 0; + lun->pr_res_type = 0; /* * if this isn't an exclusive access @@ -8384,7 +8384,7 @@ ctl_persistent_reserve_out(struct ctl_sc mtx_lock(&lun->lun_lock); lun->flags &= ~CTL_LUN_PR_RESERVED; - lun->res_type = 0; + lun->pr_res_type = 0; lun->pr_key_count = 0; lun->pr_res_idx = CTL_PR_NO_RESERVATION; @@ -8394,7 +8394,7 @@ ctl_persistent_reserve_out(struct ctl_sc ctl_clr_prkey(lun, i); ctl_est_ua(lun, i, CTL_UA_REG_PREEMPT); } - lun->PRGeneration++; + lun->pr_generation++; mtx_unlock(&lun->lun_lock); persis_io.hdr.nexus = ctsio->io_hdr.nexus; @@ -8461,7 +8461,7 @@ ctl_hndl_per_res_out_on_other_sc(union c lun->pr_key_count++; ctl_set_prkey(lun, msg->pr.pr_info.residx, scsi_8btou64(msg->pr.pr_info.sa_res_key)); - lun->PRGeneration++; + lun->pr_generation++; break; case CTL_PR_UNREG_KEY: @@ -8474,9 +8474,9 @@ ctl_hndl_per_res_out_on_other_sc(union c lun->flags &= ~CTL_LUN_PR_RESERVED; lun->pr_res_idx = CTL_PR_NO_RESERVATION; - if ((lun->res_type == SPR_TYPE_WR_EX_RO - || lun->res_type == SPR_TYPE_EX_AC_RO) - && lun->pr_key_count) { + if ((lun->pr_res_type == SPR_TYPE_WR_EX_RO || + lun->pr_res_type == SPR_TYPE_EX_AC_RO) && + lun->pr_key_count) { /* * If the reservation is a registrants * only type we need to generate a UA @@ -8492,20 +8492,20 @@ ctl_hndl_per_res_out_on_other_sc(union c ctl_est_ua(lun, i, CTL_UA_RES_RELEASE); } } - lun->res_type = 0; + lun->pr_res_type = 0; } else if (lun->pr_res_idx == CTL_PR_ALL_REGISTRANTS) { if (lun->pr_key_count==0) { lun->flags &= ~CTL_LUN_PR_RESERVED; - lun->res_type = 0; + lun->pr_res_type = 0; lun->pr_res_idx = CTL_PR_NO_RESERVATION; } } - lun->PRGeneration++; + lun->pr_generation++; break; case CTL_PR_RESERVE: lun->flags |= CTL_LUN_PR_RESERVED; - lun->res_type = msg->pr.pr_info.res_type; + lun->pr_res_type = msg->pr.pr_info.res_type; lun->pr_res_idx = msg->pr.pr_info.residx; break; @@ -8515,8 +8515,8 @@ ctl_hndl_per_res_out_on_other_sc(union c * if this isn't an exclusive access res generate UA for all * other registrants. */ - if (lun->res_type != SPR_TYPE_EX_AC - && lun->res_type != SPR_TYPE_WR_EX) { + if (lun->pr_res_type != SPR_TYPE_EX_AC && + lun->pr_res_type != SPR_TYPE_WR_EX) { for (i = softc->init_min; i < softc->init_max; i++) if (i == residx || ctl_get_prkey(lun, i) == 0) continue; @@ -8525,7 +8525,7 @@ ctl_hndl_per_res_out_on_other_sc(union c lun->flags &= ~CTL_LUN_PR_RESERVED; lun->pr_res_idx = CTL_PR_NO_RESERVATION; - lun->res_type = 0; + lun->pr_res_type = 0; break; case CTL_PR_PREEMPT: @@ -8533,7 +8533,7 @@ ctl_hndl_per_res_out_on_other_sc(union c break; case CTL_PR_CLEAR: lun->flags &= ~CTL_LUN_PR_RESERVED; - lun->res_type = 0; + lun->pr_res_type = 0; lun->pr_key_count = 0; lun->pr_res_idx = CTL_PR_NO_RESERVATION; @@ -8543,7 +8543,7 @@ ctl_hndl_per_res_out_on_other_sc(union c ctl_clr_prkey(lun, i); ctl_est_ua(lun, i, CTL_UA_REG_PREEMPT); } - lun->PRGeneration++; + lun->pr_generation++; break; } @@ -11288,9 +11288,9 @@ ctl_scsiio_lun_check(struct ctl_lun *lun (entry->flags & CTL_CMD_FLAG_ALLOW_ON_PR_RESV)) { /* No reservation or command is allowed. */; } else if ((entry->flags & CTL_CMD_FLAG_ALLOW_ON_PR_WRESV) && - (lun->res_type == SPR_TYPE_WR_EX || - lun->res_type == SPR_TYPE_WR_EX_RO || - lun->res_type == SPR_TYPE_WR_EX_AR)) { + (lun->pr_res_type == SPR_TYPE_WR_EX || + lun->pr_res_type == SPR_TYPE_WR_EX_RO || + lun->pr_res_type == SPR_TYPE_WR_EX_AR)) { /* The command is allowed for Write Exclusive resv. */; } else { /* @@ -11298,8 +11298,8 @@ ctl_scsiio_lun_check(struct ctl_lun *lun * reservation and this isn't the res holder then set a * conflict. */ - if (ctl_get_prkey(lun, residx) == 0 - || (residx != lun->pr_res_idx && lun->res_type < 4)) { + if (ctl_get_prkey(lun, residx) == 0 || + (residx != lun->pr_res_idx && lun->pr_res_type < 4)) { ctl_set_reservation_conflict(ctsio); retval = 1; goto bailout; Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:46:23 2015 (r288818) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 5 11:47:16 2015 (r288819) @@ -392,11 +392,11 @@ struct ctl_lun { struct ctl_log_pages log_pages; struct ctl_lun_io_stats stats; uint32_t res_idx; - unsigned int PRGeneration; + uint32_t pr_generation; uint64_t *pr_keys[CTL_MAX_PORTS]; int pr_key_count; uint32_t pr_res_idx; - uint8_t res_type; + uint8_t pr_res_type; int prevent_count; uint32_t prevent[(CTL_MAX_INITIATORS+31)/32]; uint8_t *write_buffer; From owner-svn-src-all@freebsd.org Mon Oct 5 11:48:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0044899A8CE; Mon, 5 Oct 2015 11:48:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E61C8698; Mon, 5 Oct 2015 11:48:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BmE5D097081; Mon, 5 Oct 2015 11:48:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BmEBJ097080; Mon, 5 Oct 2015 11:48:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051148.t95BmEBJ097080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288820 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:48:15 -0000 Author: mav Date: Mon Oct 5 11:48:14 2015 New Revision: 288820 URL: https://svnweb.freebsd.org/changeset/base/288820 Log: MFC r288449: Implement SPC-3 exceptions to SPC-2 RESERVE and RELEASE behavior. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:47:16 2015 (r288819) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 5 11:48:14 2015 (r288820) @@ -5103,6 +5103,13 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi ctl_set_reservation_conflict(ctsio); goto bailout; } + + /* SPC-3 exceptions to SPC-2 RESERVE and RELEASE behavior. */ + if (lun->flags & CTL_LUN_PR_RESERVED) { + ctl_set_success(ctsio); + goto bailout; + } + lun->flags |= CTL_LUN_RESERVED; lun->res_idx = residx; ctl_set_success(ctsio); @@ -7626,7 +7633,8 @@ retry: res_cap = (struct scsi_per_res_cap *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*res_cap), res_cap->length); - res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_5; + res_cap->flags1 = SPRI_CRH; + res_cap->flags2 = SPRI_TMV | SPRI_ALLOW_5; type_mask = SPRI_TM_WR_EX_AR | SPRI_TM_EX_AC_RO | SPRI_TM_WR_EX_RO | From owner-svn-src-all@freebsd.org Mon Oct 5 11:49:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F7E899A98B; Mon, 5 Oct 2015 11:49:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 112F78AD; Mon, 5 Oct 2015 11:49:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Bn2Cm097168; Mon, 5 Oct 2015 11:49:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Bn23q097167; Mon, 5 Oct 2015 11:49:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051149.t95Bn23q097167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288821 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:49:03 -0000 Author: mav Date: Mon Oct 5 11:49:02 2015 New Revision: 288821 URL: https://svnweb.freebsd.org/changeset/base/288821 Log: MFC r288450: Make zero WUT use WRITE SAME with recently allowed NDOB flag. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:48:14 2015 (r288820) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:49:02 2015 (r288821) @@ -1295,7 +1295,6 @@ complete: ctl_free_io(tio->io); free(tio, M_CTL); } - free(list->buf, M_CTL); if (list->abort) { ctl_set_task_aborted(list->ctsio); return (CTL_RETVAL_ERROR); @@ -1311,7 +1310,6 @@ complete: } dstblock = list->lun->be_lun->blocksize; - list->buf = malloc(dstblock, M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&run); prun = &run; list->tbdio = 1; @@ -1328,9 +1326,9 @@ complete: TAILQ_INSERT_TAIL(&list->allio, tiow, links); tiow->io = tpcl_alloc_io(); ctl_scsi_write_same(tiow->io, - /*data_ptr*/ list->buf, - /*data_len*/ dstblock, - /*byte2*/ 0, + /*data_ptr*/ NULL, + /*data_len*/ 0, + /*byte2*/ SWS_NDOB, /*lba*/ scsi_8btou64(list->range[r].lba), /*num_blocks*/ len, /*tag_type*/ CTL_TAG_SIMPLE, From owner-svn-src-all@freebsd.org Mon Oct 5 11:49:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 495FC99AA98; Mon, 5 Oct 2015 11:49:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B082B02; Mon, 5 Oct 2015 11:49:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Bnvbn097396; Mon, 5 Oct 2015 11:49:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BnvM8097395; Mon, 5 Oct 2015 11:49:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051149.t95BnvM8097395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288822 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:49:57 -0000 Author: mav Date: Mon Oct 5 11:49:56 2015 New Revision: 288822 URL: https://svnweb.freebsd.org/changeset/base/288822 Log: MFC r288458: More aggressively fill WUT read pipeline. On some tests I've measured 5% copy speedup from this. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:49:02 2015 (r288821) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 5 11:49:56 2015 (r288822) @@ -1128,7 +1128,7 @@ static int tpc_process_wut(struct tpc_list *list) { struct tpc_io *tio, *tior, *tiow; - struct runl run, *prun; + struct runl run; int drange, srange; off_t doffset, soffset; off_t srclba, dstlba, numbytes, donebytes, roundbytes; @@ -1208,8 +1208,7 @@ tpc_process_wut(struct tpc_list *list) // srclba, dstlba); donebytes = 0; TAILQ_INIT(&run); - prun = &run; - list->tbdio = 1; + list->tbdio = 0; TAILQ_INIT(&list->allio); while (donebytes < numbytes) { roundbytes = numbytes - donebytes; @@ -1262,8 +1261,8 @@ tpc_process_wut(struct tpc_list *list) tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); - TAILQ_INSERT_TAIL(prun, tior, rlinks); - prun = &tior->run; + TAILQ_INSERT_TAIL(&run, tior, rlinks); + list->tbdio++; donebytes += roundbytes; srclba += roundbytes / srcblock; dstlba += roundbytes / dstblock; From owner-svn-src-all@freebsd.org Mon Oct 5 11:51:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C549399AD5E; Mon, 5 Oct 2015 11:51:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D0CEF07; Mon, 5 Oct 2015 11:51:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95BpEec000369; Mon, 5 Oct 2015 11:51:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95BpD3h000366; Mon, 5 Oct 2015 11:51:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051151.t95BpD3h000366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 11:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288823 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 11:51:14 -0000 Author: mav Date: Mon Oct 5 11:51:13 2015 New Revision: 288823 URL: https://svnweb.freebsd.org/changeset/base/288823 Log: MFC r288486, r288488: Set default block size for CD to expected 2048 bytes. Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 11:49:56 2015 (r288822) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Mon Oct 5 11:51:13 2015 (r288823) @@ -364,7 +364,7 @@ testing. The default backend is block. .It Ic blocksize Ar size The blocksize visible to the initiator. -The default blocksize is 512. +The default blocksize is 512 for disks, and 2048 for CD/DVDs. .It Ic ctl-lun Ar lun_id Global numeric identifier to use for a given LUN inside CTL. By default CTL allocates those IDs dynamically, but explicit specification Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 11:49:56 2015 (r288822) +++ stable/10/usr.sbin/ctld/ctld.c Mon Oct 5 11:51:13 2015 (r288823) @@ -1644,7 +1644,10 @@ conf_verify_lun(struct lun *lun) } } if (lun->l_blocksize == 0) { - lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); + if (lun->l_device_type == 5) + lun_set_blocksize(lun, DEFAULT_CD_BLOCKSIZE); + else + lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); } else if (lun->l_blocksize < 0) { log_warnx("invalid blocksize for lun \"%s\"; " "must be larger than 0", lun->l_name); Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 11:49:56 2015 (r288822) +++ stable/10/usr.sbin/ctld/ctld.h Mon Oct 5 11:51:13 2015 (r288823) @@ -43,6 +43,7 @@ #define DEFAULT_CONFIG_PATH "/etc/ctl.conf" #define DEFAULT_PIDFILE "/var/run/ctld.pid" #define DEFAULT_BLOCKSIZE 512 +#define DEFAULT_CD_BLOCKSIZE 2048 #define MAX_LUNS 1024 #define MAX_NAME_LEN 223 From owner-svn-src-all@freebsd.org Mon Oct 5 13:15:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC9559B6F9D; Mon, 5 Oct 2015 13:15:22 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA58A63B; Mon, 5 Oct 2015 13:15:22 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95DFMQJ030009; Mon, 5 Oct 2015 13:15:22 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95DFM0t030008; Mon, 5 Oct 2015 13:15:22 GMT (envelope-from br@FreeBSD.org) Message-Id: <201510051315.t95DFM0t030008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 5 Oct 2015 13:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288824 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 13:15:22 -0000 Author: br Date: Mon Oct 5 13:15:21 2015 New Revision: 288824 URL: https://svnweb.freebsd.org/changeset/base/288824 Log: Attach interrupt controller device before other devices. Sponsored by: University of Cambridge Modified: head/sys/arm/ti/aintc.c Modified: head/sys/arm/ti/aintc.c ============================================================================== --- head/sys/arm/ti/aintc.c Mon Oct 5 11:51:13 2015 (r288823) +++ head/sys/arm/ti/aintc.c Mon Oct 5 13:15:21 2015 (r288824) @@ -156,7 +156,8 @@ static driver_t ti_aintc_driver = { static devclass_t ti_aintc_devclass; -DRIVER_MODULE(aintc, simplebus, ti_aintc_driver, ti_aintc_devclass, 0, 0); +EARLY_DRIVER_MODULE(aintc, simplebus, ti_aintc_driver, ti_aintc_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); int arm_get_next_irq(int last_irq) From owner-svn-src-all@freebsd.org Mon Oct 5 13:33:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 025229B1046; Mon, 5 Oct 2015 13:33:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73817E2; Mon, 5 Oct 2015 13:33:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95DX2xq037441; Mon, 5 Oct 2015 13:33:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95DX2Bu037440; Mon, 5 Oct 2015 13:33:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051333.t95DX2Bu037440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 13:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288825 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 13:33:03 -0000 Author: mav Date: Mon Oct 5 13:33:02 2015 New Revision: 288825 URL: https://svnweb.freebsd.org/changeset/base/288825 Log: MFC r288579: Restore original array_rd_sz semantics. Before r278702 prefetch was blocked for I/Os > 1MB, after -- >= 1MB. 1MB I/Os are used for bulk operations in CTL (XCOPY, VERIFY), and disabling prefetch for them reduced the performance. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Oct 5 13:15:21 2015 (r288824) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Oct 5 13:33:02 2015 (r288825) @@ -450,7 +450,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, } if ((flags & DMU_READ_NO_PREFETCH) == 0 && read && - length < zfetch_array_rd_sz) { + length <= zfetch_array_rd_sz) { dmu_zfetch(&dn->dn_zfetch, blkid, nblks); } rw_exit(&dn->dn_struct_rwlock); From owner-svn-src-all@freebsd.org Mon Oct 5 14:57:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 687049B122C; Mon, 5 Oct 2015 14:57:46 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59EB3641; Mon, 5 Oct 2015 14:57:46 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95EvkmK066416; Mon, 5 Oct 2015 14:57:46 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95EvkvN066415; Mon, 5 Oct 2015 14:57:46 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201510051457.t95EvkvN066415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 5 Oct 2015 14:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288826 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 14:57:46 -0000 Author: grehan Date: Mon Oct 5 14:57:45 2015 New Revision: 288826 URL: https://svnweb.freebsd.org/changeset/base/288826 Log: Clean up some harmless unimplemented-command warning messages. - Don't advertize trusted-computing capability in the Identify page. This prevents Windows from issuing a TRUSTED_RECEIVE_DMA command. - Windows will send down SMART and SECURITY_FREEZE_LOCK even though smart and security capabilities were not advertized. Send back a silent abort. Reviewed by: mav Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Mon Oct 5 13:33:02 2015 (r288825) +++ head/usr.sbin/bhyve/pci_ahci.c Mon Oct 5 14:57:45 2015 (r288826) @@ -926,7 +926,7 @@ handle_identify(struct ahci_port *p, int ata_string((uint8_t *)(buf+23), "001", 8); ata_string((uint8_t *)(buf+27), "BHYVE SATA DISK", 40); buf[47] = (0x8000 | 128); - buf[48] = 0x1; + buf[48] = 0; buf[49] = (1 << 8 | 1 << 9 | 1 << 11); buf[50] = (1 << 14); buf[53] = (1 << 1 | 1 << 2); @@ -1683,6 +1683,8 @@ ahci_handle_cmd(struct ahci_port *p, int case ATA_READ_LOG_DMA_EXT: ahci_handle_read_log(p, slot, cfis); break; + case ATA_SECURITY_FREEZE_LOCK: + case ATA_SMART_CMD: case ATA_NOP: ahci_write_fis_d2h(p, slot, cfis, (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); From owner-svn-src-all@freebsd.org Mon Oct 5 17:15:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E4569B5E43; Mon, 5 Oct 2015 17:15:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357F11A88; Mon, 5 Oct 2015 17:15:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95HF5j5016823; Mon, 5 Oct 2015 17:15:05 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95HF45t016821; Mon, 5 Oct 2015 17:15:04 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201510051715.t95HF45t016821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Mon, 5 Oct 2015 17:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288827 - in stable/10: sys/rpc/rpcsec_gss usr.sbin/gssd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 17:15:05 -0000 Author: jpaetzel Date: Mon Oct 5 17:15:04 2015 New Revision: 288827 URL: https://svnweb.freebsd.org/changeset/base/288827 Log: MFC 288272 Increase group limit for kerberized NFSv4 PR: 202659 Submitted by: matthew.l.dailey@dartmouth.edu Reviewed by: rmacklem dfr Sponsored by: iXsystems Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c stable/10/usr.sbin/gssd/gssd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 5 14:57:45 2015 (r288826) +++ stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 5 17:15:04 2015 (r288827) @@ -121,9 +121,6 @@ enum svc_rpc_gss_client_state { }; #define SVC_RPC_GSS_SEQWINDOW 128 -#ifndef RPCAUTH_UNIXGIDS -#define RPCAUTH_UNIXGIDS 16 -#endif struct svc_rpc_gss_clientid { unsigned long ci_hostid; @@ -150,7 +147,7 @@ struct svc_rpc_gss_client { int cl_rpcflavor; /* RPC pseudo sec flavor */ bool_t cl_done_callback; /* TRUE after call */ void *cl_cookie; /* user cookie from callback */ - gid_t cl_gid_storage[RPCAUTH_UNIXGIDS]; + gid_t cl_gid_storage[NGROUPS]; gss_OID cl_mech; /* mechanism */ gss_qop_t cl_qop; /* quality of protection */ uint32_t cl_seqlast; /* sequence window origin */ @@ -776,7 +773,7 @@ svc_rpc_gss_build_ucred(struct svc_rpc_g uc->gid = 65534; uc->gidlist = client->cl_gid_storage; - numgroups = RPCAUTH_UNIXGIDS; + numgroups = NGROUPS; maj_stat = gss_pname_to_unix_cred(&min_stat, name, client->cl_mech, &uc->uid, &uc->gid, &numgroups, &uc->gidlist[0]); if (GSS_ERROR(maj_stat)) Modified: stable/10/usr.sbin/gssd/gssd.c ============================================================================== --- stable/10/usr.sbin/gssd/gssd.c Mon Oct 5 14:57:45 2015 (r288826) +++ stable/10/usr.sbin/gssd/gssd.c Mon Oct 5 17:15:04 2015 (r288827) @@ -750,8 +750,8 @@ gssd_pname_to_uid_1_svc(pname_to_uid_arg buflen_hint = buflen; } if (pw) { - int len = NGRPS; - int groups[NGRPS]; + int len = NGROUPS; + int groups[NGROUPS]; result->gid = pw->pw_gid; getgrouplist(pw->pw_name, pw->pw_gid, groups, &len); From owner-svn-src-all@freebsd.org Mon Oct 5 17:45:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E3E599A5FC; Mon, 5 Oct 2015 17:45:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9BCD8F; Mon, 5 Oct 2015 17:45:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95HjE2u027723; Mon, 5 Oct 2015 17:45:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95HjE29027722; Mon, 5 Oct 2015 17:45:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510051745.t95HjE29027722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Oct 2015 17:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288829 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 17:45:14 -0000 Author: ian Date: Mon Oct 5 17:45:13 2015 New Revision: 288829 URL: https://svnweb.freebsd.org/changeset/base/288829 Log: The latest version of lex requires the latest m4 to build, add a dependency when running the build-tools stage. The requirement is due to the -P flag used when running m4 from usr.bin/lex Makefile to generate skel.c. With the old m4 that fails and the failure is ignored, resulting in an empty(-ish) skel.c, which leads to later build failures when the misconfigured new lex tool is run. This enables building -current (and 10-stable after MFC) on a stable-8 system again. MFC after: 3 days Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Oct 5 17:21:17 2015 (r288828) +++ head/Makefile.inc1 Mon Oct 5 17:45:13 2015 (r288829) @@ -1322,6 +1322,8 @@ _cat= bin/cat .if ${BOOTSTRAPPING} < 1000033 _lex= usr.bin/lex + +${_bt}-usr.bin/lex: ${_bt}-usr.bin/m4 .endif # r277259 crunchide: Correct 64-bit section header offset From owner-svn-src-all@freebsd.org Mon Oct 5 18:08:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F92F9B5A85; Mon, 5 Oct 2015 18:08:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1424815D; Mon, 5 Oct 2015 18:08:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95I8atL035059; Mon, 5 Oct 2015 18:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95I8a0n035052; Mon, 5 Oct 2015 18:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510051808.t95I8a0n035052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 5 Oct 2015 18:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288832 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 18:08:37 -0000 Author: bdrewery Date: Mon Oct 5 18:08:35 2015 New Revision: 288832 URL: https://svnweb.freebsd.org/changeset/base/288832 Log: Fix tracking of unknown syscalls for 'truss -c'. This is done by changing get_syscall() to either lookup the known syscall or add it into the list with the default handlers for printing. This also simplifies some code to not have to check if the syscall variable is set or NULL. Reviewed by: jhb Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3792 Modified: head/usr.bin/truss/main.c head/usr.bin/truss/setup.c head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/main.c ============================================================================== --- head/usr.bin/truss/main.c Mon Oct 5 17:54:54 2015 (r288831) +++ head/usr.bin/truss/main.c Mon Oct 5 18:08:35 2015 (r288832) @@ -94,6 +94,7 @@ main(int ac, char **av) trussinfo->strsize = 32; trussinfo->curthread = NULL; LIST_INIT(&trussinfo->proclist); + init_syscalls(); while ((c = getopt(ac, av, "p:o:facedDs:S")) != -1) { switch (c) { case 'p': /* specified pid */ Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Mon Oct 5 17:54:54 2015 (r288831) +++ head/usr.bin/truss/setup.c Mon Oct 5 18:08:35 2015 (r288832) @@ -341,17 +341,9 @@ enter_syscall(struct trussinfo *info, st fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d --\n", t->proc->abi->type, t->cs.number); - sc = get_syscall(t->cs.name); - if (sc) { - t->cs.nargs = sc->nargs; - assert(sc->nargs <= nitems(t->cs.s_args)); - } else { -#if DEBUG - fprintf(stderr, "unknown syscall %s -- setting " - "args to %d\n", t->cs.name, t->cs.nargs); -#endif - t->cs.nargs = narg; - } + sc = get_syscall(t->cs.name, narg); + t->cs.nargs = sc->nargs; + assert(sc->nargs <= nitems(t->cs.s_args)); t->cs.sc = sc; @@ -372,7 +364,7 @@ enter_syscall(struct trussinfo *info, st t->cs.args[sc->args[i].offset] : t->cs.args[i], i < (t->cs.nargs - 1) ? "," : ""); #endif - if (sc && !(sc->args[i].type & OUT)) { + if (!(sc->args[i].type & OUT)) { t->cs.s_args[i] = print_arg(&sc->args[i], t->cs.args, 0, info); } @@ -407,31 +399,26 @@ exit_syscall(struct trussinfo *info, str } sc = t->cs.sc; - if (sc == NULL) { - for (i = 0; i < t->cs.nargs; i++) - asprintf(&t->cs.s_args[i], "0x%lx", t->cs.args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in enter_syscall(). - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - - if (sc->args[i].type & OUT) { - /* - * If an error occurred, then don't bother - * getting the data; it may not be valid. - */ - if (errorp) { - asprintf(&temp, "0x%lx", - t->cs.args[sc->args[i].offset]); - } else { - temp = print_arg(&sc->args[i], - t->cs.args, retval, info); - } - t->cs.s_args[i] = temp; + /* + * Here, we only look for arguments that have OUT masked in -- + * otherwise, they were handled in enter_syscall(). + */ + for (i = 0; i < sc->nargs; i++) { + char *temp; + + if (sc->args[i].type & OUT) { + /* + * If an error occurred, then don't bother + * getting the data; it may not be valid. + */ + if (errorp) { + asprintf(&temp, "0x%lx", + t->cs.args[sc->args[i].offset]); + } else { + temp = print_arg(&sc->args[i], + t->cs.args, retval, info); } + t->cs.s_args[i] = temp; } } Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Mon Oct 5 17:54:54 2015 (r288831) +++ head/usr.bin/truss/syscall.h Mon Oct 5 18:08:35 2015 (r288832) @@ -55,6 +55,7 @@ struct syscall_args { }; struct syscall { + STAILQ_ENTRY(syscall) entries; const char *name; u_int ret_type; /* 0, 1, or 2 return values */ u_int nargs; /* actual number of meaningful arguments */ @@ -65,7 +66,7 @@ struct syscall { int nerror; /* Number of calls that returned with error */ }; -struct syscall *get_syscall(const char*); +struct syscall *get_syscall(const char *, int nargs); char *print_arg(struct syscall_args *, unsigned long*, long *, struct trussinfo *); /* @@ -108,6 +109,7 @@ struct linux_socketcall_args { char args_l_[PADL_(l_ulong)]; l_ulong args; char args_r_[PADR_(l_ulong)]; }; +void init_syscalls(void); void print_syscall(struct trussinfo *, const char *, int, char **); void print_syscall_ret(struct trussinfo *, const char *, int, char **, int, long *, struct syscall *); Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Mon Oct 5 17:54:54 2015 (r288831) +++ head/usr.bin/truss/syscalls.c Mon Oct 5 18:08:35 2015 (r288832) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); /* * This should probably be in its own file, sorted alphabetically. */ -static struct syscall syscalls[] = { +static struct syscall decoded_syscalls[] = { { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, { .name = "rfork", .ret_type = 1, .nargs = 1, @@ -370,6 +370,7 @@ static struct syscall syscalls[] = { .args = { { Ptr, 0 } } }, { .name = 0 }, }; +static STAILQ_HEAD(, syscall) syscalls; /* Xlat idea taken from strace */ struct xlat { @@ -659,24 +660,49 @@ xlookup_bits(struct xlat *xlat, int val) return (str); } +void +init_syscalls(void) +{ + struct syscall *sc; + + STAILQ_INIT(&syscalls); + for (sc = decoded_syscalls; sc->name != NULL; sc++) + STAILQ_INSERT_HEAD(&syscalls, sc, entries); +} /* * If/when the list gets big, it might be desirable to do it * as a hash table or binary search. */ struct syscall * -get_syscall(const char *name) +get_syscall(const char *name, int nargs) { struct syscall *sc; + int i; - sc = syscalls; if (name == NULL) return (NULL); - while (sc->name) { + STAILQ_FOREACH(sc, &syscalls, entries) if (strcmp(name, sc->name) == 0) return (sc); - sc++; + + /* It is unknown. Add it into the list. */ +#if DEBUG + fprintf(stderr, "unknown syscall %s -- setting args to %d\n", name, + nargs); +#endif + + sc = calloc(1, sizeof(struct syscall)); + sc->name = strdup(name); + sc->ret_type = 1; + sc->nargs = nargs; + for (i = 0; i < nargs; i++) { + sc->args[i].offset = i; + /* Treat all unknown arguments as LongHex. */ + sc->args[i].type = LongHex; } - return (NULL); + STAILQ_INSERT_HEAD(&syscalls, sc, entries); + + return (sc); } /* @@ -1632,8 +1658,6 @@ print_syscall_ret(struct trussinfo *trus struct timespec timediff; if (trussinfo->flags & COUNTONLY) { - if (!sc) - return; clock_gettime(CLOCK_REALTIME, &trussinfo->curthread->after); timespecsubt(&trussinfo->curthread->after, &trussinfo->curthread->before, &timediff); @@ -1650,7 +1674,7 @@ print_syscall_ret(struct trussinfo *trus fprintf(trussinfo->outfile, " ERR#%ld '%s'\n", retval[0], strerror(retval[0])); #ifndef __LP64__ - else if (sc != NULL && sc->ret_type == 2) { + else if (sc->ret_type == 2) { off_t off; #if _BYTE_ORDER == _LITTLE_ENDIAN @@ -1677,7 +1701,7 @@ print_summary(struct trussinfo *trussinf fprintf(trussinfo->outfile, "%-20s%15s%8s%8s\n", "syscall", "seconds", "calls", "errors"); ncall = nerror = 0; - for (sc = syscalls; sc->name != NULL; sc++) + STAILQ_FOREACH(sc, &syscalls, entries) if (sc->ncalls) { fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n", sc->name, (intmax_t)sc->time.tv_sec, From owner-svn-src-all@freebsd.org Mon Oct 5 18:09:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 644379B5B2B; Mon, 5 Oct 2015 18:09:44 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 556492E1; Mon, 5 Oct 2015 18:09:44 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95I9ioa035144; Mon, 5 Oct 2015 18:09:44 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95I9ipd035143; Mon, 5 Oct 2015 18:09:44 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201510051809.t95I9ipd035143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Mon, 5 Oct 2015 18:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288833 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 18:09:44 -0000 Author: jgh (doc,ports committer) Date: Mon Oct 5 18:09:43 2015 New Revision: 288833 URL: https://svnweb.freebsd.org/changeset/base/288833 Log: - address grammar PR: 203440 (based on) Submitted by: ceratv@rpi.edu Approved by: wblock@ (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3813 Modified: head/lib/libc/net/getaddrinfo.3 Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Mon Oct 5 18:08:35 2015 (r288832) +++ head/lib/libc/net/getaddrinfo.3 Mon Oct 5 18:09:43 2015 (r288833) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2015 +.Dd October 5, 2015 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -243,15 +243,14 @@ The list can be traversed by following t pointer in each .Li addrinfo structure until a null pointer is encountered. -The three members +Each returned +.Li addrinfo +structure contains three members that are suitable for a call to +.Xr socket 2 : .Fa ai_family , .Fa ai_socktype , and -.Fa ai_protocol -in each returned -.Li addrinfo -structure are suitable for a call to -.Xr socket 2 . +.Fa ai_protocol . For each .Li addrinfo structure in the list, the From owner-svn-src-all@freebsd.org Mon Oct 5 18:11:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E97F9B5E25; Mon, 5 Oct 2015 18:11:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F984932; Mon, 5 Oct 2015 18:11:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95IBUHx037718; Mon, 5 Oct 2015 18:11:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95IBUlK037717; Mon, 5 Oct 2015 18:11:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510051811.t95IBUlK037717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 5 Oct 2015 18:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288834 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 18:11:31 -0000 Author: bdrewery Date: Mon Oct 5 18:11:30 2015 New Revision: 288834 URL: https://svnweb.freebsd.org/changeset/base/288834 Log: Add decoding for modfind(2) Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Mon Oct 5 18:09:43 2015 (r288833) +++ head/usr.bin/truss/syscalls.c Mon Oct 5 18:11:30 2015 (r288834) @@ -253,6 +253,8 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 }, { Ptr, 1 } } }, { .name = "kldfirstmod", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "modfind", .ret_type = 1, .nargs = 1, + .args = { { Name | IN, 0 } } }, { .name = "nanosleep", .ret_type = 1, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "select", .ret_type = 1, .nargs = 5, From owner-svn-src-all@freebsd.org Mon Oct 5 20:11:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 955669B9CA0; Mon, 5 Oct 2015 20:11:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86C773D8; Mon, 5 Oct 2015 20:11:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KBsm5081128; Mon, 5 Oct 2015 20:11:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KBsSg081127; Mon, 5 Oct 2015 20:11:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052011.t95KBsSg081127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288837 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:11:54 -0000 Author: gjb Date: Mon Oct 5 20:11:53 2015 New Revision: 288837 URL: https://svnweb.freebsd.org/changeset/base/288837 Log: Document r284883, NTFS support in mkimg(1). Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:08:11 2015 (r288836) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:53 2015 (r288837) @@ -392,6 +392,11 @@ updated to be able to detect &man.zfs.8; and &man.geli.8; filesystems. + The &man.mkimg.1; utility has been + updated to include support for NTFS + filesystems in both MBR and + GPT partitioning schemes. + The &man.w.1; utility has been updated to display the full IPv6 remote address of the host from which a user is connected. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA819B9CF7; Mon, 5 Oct 2015 20:12:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D76127C9; Mon, 5 Oct 2015 20:12:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KC1p1081266; Mon, 5 Oct 2015 20:12:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KC1Qs081265; Mon, 5 Oct 2015 20:12:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KC1Qs081265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288840 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:02 -0000 Author: gjb Date: Mon Oct 5 20:12:00 2015 New Revision: 288840 URL: https://svnweb.freebsd.org/changeset/base/288840 Log: Document r285253, IPv6 support in quota(1). Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:58 2015 (r288839) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:00 2015 (r288840) @@ -400,6 +400,9 @@ filesystems in both MBR and GPT partitioning schemes. + The &man.quota.1; utility has been + updated to include support for IPv6. + The &man.w.1; utility has been updated to display the full IPv6 remote address of the host from which a user is connected. From owner-svn-src-all@freebsd.org Mon Oct 5 20:11:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D8729B9CAC; Mon, 5 Oct 2015 20:11:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0C5A3DF; Mon, 5 Oct 2015 20:11:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KBu3Z081174; Mon, 5 Oct 2015 20:11:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KBuV0081173; Mon, 5 Oct 2015 20:11:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052011.t95KBuV0081173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288838 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:11:57 -0000 Author: gjb Date: Mon Oct 5 20:11:56 2015 New Revision: 288838 URL: https://svnweb.freebsd.org/changeset/base/288838 Log: Document r285142, IPSEC enabled in GENERIC by default. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:53 2015 (r288837) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:56 2015 (r288838) @@ -872,6 +872,11 @@ Multi-queue support in the &man.em.4; driver is not officially supported by &intel;. + + The GENERIC kernel + configuration has been updated to include the + IPSEC option by default. From owner-svn-src-all@freebsd.org Mon Oct 5 20:11:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A65979B9CCE; Mon, 5 Oct 2015 20:11:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A88645; Mon, 5 Oct 2015 20:11:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KBxDL081219; Mon, 5 Oct 2015 20:11:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KBx8n081218; Mon, 5 Oct 2015 20:11:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052011.t95KBx8n081218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288839 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:11:59 -0000 Author: gjb Date: Mon Oct 5 20:11:58 2015 New Revision: 288839 URL: https://svnweb.freebsd.org/changeset/base/288839 Log: Document r285169, ntp-4.2.8p3. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:56 2015 (r288838) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:11:58 2015 (r288839) @@ -173,6 +173,9 @@ The MK_ARM_EABI &man.src.conf.5; option has been removed. + + The ntp suite + has been updated to version 4.2.8p3. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2FD9B9D1B; Mon, 5 Oct 2015 20:12:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A4D1895; Mon, 5 Oct 2015 20:12:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KC3mp081314; Mon, 5 Oct 2015 20:12:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KC3QU081313; Mon, 5 Oct 2015 20:12:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KC3QU081313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288841 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:04 -0000 Author: gjb Date: Mon Oct 5 20:12:03 2015 New Revision: 288841 URL: https://svnweb.freebsd.org/changeset/base/288841 Log: Document r285275, tcpdump(1) updated to version 4.7.4. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:00 2015 (r288840) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:03 2015 (r288841) @@ -520,6 +520,9 @@ confUSE_COMPRESSED_IPV6_ADDRESSES or the cf option UseCompressedIPv6Addresses. + The &man.tcpdump.1; utility has been + updated to version 4.7.4. + OpenSSL has been updated to version 1.0.1p. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F405A9B9DD6; Mon, 5 Oct 2015 20:12:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9223AC19; Mon, 5 Oct 2015 20:12:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCGUF081536; Mon, 5 Oct 2015 20:12:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCGTp081535; Mon, 5 Oct 2015 20:12:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCGTp081535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288846 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:17 -0000 Author: gjb Date: Mon Oct 5 20:12:15 2015 New Revision: 288846 URL: https://svnweb.freebsd.org/changeset/base/288846 Log: Document r285420, jail(8) -l flag and default shell execution when no commands are specified. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:12 2015 (r288845) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:15 2015 (r288846) @@ -403,6 +403,12 @@ The &man.quota.1; utility has been updated to include support for IPv6. + The &man.jail.8; utility has been + updated to include a new flag, -l, which + ensures a clean environment in the target jail when used. + Additionally, &man.jail.8; will run a shell within the target + jail when run no commands are specified. + The &man.w.1; utility has been updated to display the full IPv6 remote address of the host from which a user is connected. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15A559B9D64; Mon, 5 Oct 2015 20:12:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7F329DA; Mon, 5 Oct 2015 20:12:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KC8dc081400; Mon, 5 Oct 2015 20:12:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KC8J2081399; Mon, 5 Oct 2015 20:12:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KC8J2081399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288843 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:09 -0000 Author: gjb Date: Mon Oct 5 20:12:08 2015 New Revision: 288843 URL: https://svnweb.freebsd.org/changeset/base/288843 Log: Document r285316, FreeBSD/aarch64 SMP support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:05 2015 (r288842) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:08 2015 (r288843) @@ -1155,6 +1155,10 @@ The &man.uart.4; driver has been updated to support AMT devices on newer systems. + + Initial SMP support has been + added to the &os;/&arch.arm64; port. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D6A49B9D42; Mon, 5 Oct 2015 20:12:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF4392F; Mon, 5 Oct 2015 20:12:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KC6Af081357; Mon, 5 Oct 2015 20:12:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KC6sS081356; Mon, 5 Oct 2015 20:12:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KC6sS081356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288842 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:06 -0000 Author: gjb Date: Mon Oct 5 20:12:05 2015 New Revision: 288842 URL: https://svnweb.freebsd.org/changeset/base/288842 Log: Document r285277, execl(3) and execlp(3) update to use the gcc __sentinel attribute. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:03 2015 (r288841) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:05 2015 (r288842) @@ -709,6 +709,11 @@ The Blowfish &man.crypt.3; library has been updated to support $2y$ hashes. + + The &man.execl.3; and &man.execlp.3; + library functions have been updated to use the + __sentinel gcc + attribute. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B69C99B9D9A; Mon, 5 Oct 2015 20:12:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B61A8D; Mon, 5 Oct 2015 20:12:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCBn1081446; Mon, 5 Oct 2015 20:12:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCBIu081445; Mon, 5 Oct 2015 20:12:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCBIu081445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288844 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:11 -0000 Author: gjb Date: Mon Oct 5 20:12:10 2015 New Revision: 288844 URL: https://svnweb.freebsd.org/changeset/base/288844 Log: Document r285336, AES mode support in IPSEC. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:08 2015 (r288843) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:10 2015 (r288844) @@ -1519,6 +1519,12 @@ 6864) has been added. Support for this feature can be toggled with the net.inet.ip.rfc6864 &man.sysctl.8;, which is enabled by default. + + The IPSEC has been + updated to include support for AES modes on + both software-only and hardware-backed (&man.aesni.4;) + systems. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A6D9B9DA7; Mon, 5 Oct 2015 20:12:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA48B68; Mon, 5 Oct 2015 20:12:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCE63081490; Mon, 5 Oct 2015 20:12:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCDTQ081488; Mon, 5 Oct 2015 20:12:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCDTQ081488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288845 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:14 -0000 Author: gjb Date: Mon Oct 5 20:12:12 2015 New Revision: 288845 URL: https://svnweb.freebsd.org/changeset/base/288845 Log: Document r285387, NUMA affinity/policy configuration. Add Norse Corporation to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:10 2015 (r288844) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:12 2015 (r288845) @@ -891,6 +891,12 @@ sponsor="&netgate;">The GENERIC kernel configuration has been updated to include the IPSEC option by default. + + Initial NUMA + affinity and policy configuration has been added. See + &man.numactl.1;, and &man.numa.getaffinity.2;, for usage + details. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:12:10 2015 (r288844) +++ head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:12:12 2015 (r288845) @@ -41,6 +41,7 @@ + From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD8049B9E42; Mon, 5 Oct 2015 20:12:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2707DFC; Mon, 5 Oct 2015 20:12:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCNY6081668; Mon, 5 Oct 2015 20:12:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCNom081667; Mon, 5 Oct 2015 20:12:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCNom081667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288849 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:24 -0000 Author: gjb Date: Mon Oct 5 20:12:22 2015 New Revision: 288849 URL: https://svnweb.freebsd.org/changeset/base/288849 Log: Document r285662, pms(4) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:20 2015 (r288848) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:22 2015 (r288849) @@ -1042,6 +1042,11 @@ The &man.hptnr.4; driver has been updated to version 1.1.1. + + The &man.pms.4; driver has been added, + providing support for the PMC Sierra line of + SAS/SATA host bus + adapters. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 289159B9E6C; Mon, 5 Oct 2015 20:12:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17B73EA6; Mon, 5 Oct 2015 20:12:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCP9A081711; Mon, 5 Oct 2015 20:12:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCPDN081710; Mon, 5 Oct 2015 20:12:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCPDN081710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288850 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:26 -0000 Author: gjb Date: Mon Oct 5 20:12:25 2015 New Revision: 288850 URL: https://svnweb.freebsd.org/changeset/base/288850 Log: Document r285685, allow mounting linprocfs(5) and linsysfs(5) within a jail. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:22 2015 (r288849) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:25 2015 (r288850) @@ -412,6 +412,10 @@ The &man.w.1; utility has been updated to display the full IPv6 remote address of the host from which a user is connected. + + The &man.jail.8; framework has been + updated to allow mounting &man.linprocfs.5; and + &man.linsysfs.5; within a jail. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E2C49BAA27; Mon, 5 Oct 2015 20:12:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B6AD1044; Mon, 5 Oct 2015 20:12:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCVfi081801; Mon, 5 Oct 2015 20:12:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCVVx081800; Mon, 5 Oct 2015 20:12:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCVVx081800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288852 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:31 -0000 Author: gjb Date: Mon Oct 5 20:12:30 2015 New Revision: 288852 URL: https://svnweb.freebsd.org/changeset/base/288852 Log: Document r287168, ACPICA version 20150818. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:27 2015 (r288851) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:30 2015 (r288852) @@ -508,9 +508,6 @@ The &man.nc.1; utility has been updated to the OpenBSD 5.7 version. - The &man.acpi.4; subsystem has been - updated to version 20150515. - The &man.file.1; utility has been updated to version 5.23. @@ -546,6 +543,9 @@ &man.ssh.1; utility has been updated to re-implement hostname canonicalization before locating the host in known_hosts. + + The &man.acpi.4; subsystem has been + updated to version 20150818. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F11829BADB7; Mon, 5 Oct 2015 20:12:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B84761311; Mon, 5 Oct 2015 20:12:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCe9C081983; Mon, 5 Oct 2015 20:12:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCeJm081982; Mon, 5 Oct 2015 20:12:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCeJm081982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288856 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:41 -0000 Author: gjb Date: Mon Oct 5 20:12:40 2015 New Revision: 288856 URL: https://svnweb.freebsd.org/changeset/base/288856 Log: Fix a revision tag. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:37 2015 (r288855) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:40 2015 (r288856) @@ -548,7 +548,7 @@ updated to properly skip a sparse file entry in a &man.tar.1; file, which would previously produce errors. - The &man.acpi.4; subsystem has been + The &man.acpi.4; subsystem has been updated to version 20150818. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B8A89B9DF6; Mon, 5 Oct 2015 20:12:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF1CECB6; Mon, 5 Oct 2015 20:12:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCIl1081579; Mon, 5 Oct 2015 20:12:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCI9s081578; Mon, 5 Oct 2015 20:12:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCI9s081578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288847 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:19 -0000 Author: gjb Date: Mon Oct 5 20:12:18 2015 New Revision: 288847 URL: https://svnweb.freebsd.org/changeset/base/288847 Log: Document r285524, hw.model sysctl. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:15 2015 (r288846) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:18 2015 (r288847) @@ -951,6 +951,10 @@ been added, which when set to 1 during runtime will flush all net.inet.tcp.hostcache entries. + + A new &man.sysctl.8;, + hw.model, has been added, which displays + CPU model information. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 236569BA0A7; Mon, 5 Oct 2015 20:12:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025E6F89; Mon, 5 Oct 2015 20:12:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCSRG081758; Mon, 5 Oct 2015 20:12:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCS5P081756; Mon, 5 Oct 2015 20:12:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCS5P081756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288851 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:29 -0000 Author: gjb Date: Mon Oct 5 20:12:27 2015 New Revision: 288851 URL: https://svnweb.freebsd.org/changeset/base/288851 Log: Document r285772, patch(1) '-V none' addition. Add EMC/Isilon Storage Division to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:25 2015 (r288850) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:27 2015 (r288851) @@ -416,6 +416,12 @@ The &man.jail.8; framework has been updated to allow mounting &man.linprocfs.5; and &man.linsysfs.5; within a jail. + + The &man.patch.1; utility has been + updated to include a new option to the -V + flag, none, which disables backup file + creation when applying a patch. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:12:25 2015 (r288850) +++ head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:12:27 2015 (r288851) @@ -21,6 +21,8 @@ + + From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBB859BAD78; Mon, 5 Oct 2015 20:12:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A88921276; Mon, 5 Oct 2015 20:12:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCcKZ081935; Mon, 5 Oct 2015 20:12:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCc7F081934; Mon, 5 Oct 2015 20:12:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCc7F081934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288855 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:39 -0000 Author: gjb Date: Mon Oct 5 20:12:37 2015 New Revision: 288855 URL: https://svnweb.freebsd.org/changeset/base/288855 Log: Document r285972, libarchive(3) bugfix for sparse files in tar(1) archives. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:35 2015 (r288854) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:37 2015 (r288855) @@ -544,6 +544,10 @@ canonicalization before locating the host in known_hosts. + The &man.libarchive.3; library has been + updated to properly skip a sparse file entry in a &man.tar.1; + file, which would previously produce errors. + The &man.acpi.4; subsystem has been updated to version 20150818. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC559B9E10; Mon, 5 Oct 2015 20:12:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57141D5D; Mon, 5 Oct 2015 20:12:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCLCW081623; Mon, 5 Oct 2015 20:12:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCLAC081622; Mon, 5 Oct 2015 20:12:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCLAC081622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288848 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:21 -0000 Author: gjb Date: Mon Oct 5 20:12:20 2015 New Revision: 288848 URL: https://svnweb.freebsd.org/changeset/base/288848 Log: Document r285594, 'lenovofix' gpart(8) attribute. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:18 2015 (r288847) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:20 2015 (r288848) @@ -1390,6 +1390,13 @@ apple-boot, apple-hfs, and apple-ufs MBR partitioning schemes have been added to &man.gpart.8;. + + The &man.gpart.8; utility has been + updated to include a new attribute for GPT + partitions, lenovofix, which when set, + which works around BIOS compatibility + issues reported on several Lenovo ™ laptops. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D520D9BAE15; Mon, 5 Oct 2015 20:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D59014BC; Mon, 5 Oct 2015 20:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCj67082074; Mon, 5 Oct 2015 20:12:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCj9a082073; Mon, 5 Oct 2015 20:12:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCj9a082073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288858 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:45 -0000 Author: gjb Date: Mon Oct 5 20:12:44 2015 New Revision: 288858 URL: https://svnweb.freebsd.org/changeset/base/288858 Log: Document r286062, xen(4) blkif indirect segment I/O support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:42 2015 (r288857) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:44 2015 (r288858) @@ -1292,6 +1292,10 @@ The &man.hv.netvsc.4; driver has been updated to support checksum offloading and TSO. + + The &man.xen.4; driver has been updated + to include support for blkif indirect + segment I/O. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 692159BAD26; Mon, 5 Oct 2015 20:12:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4078011C3; Mon, 5 Oct 2015 20:12:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCaPs081890; Mon, 5 Oct 2015 20:12:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCa6j081889; Mon, 5 Oct 2015 20:12:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCa6j081889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288854 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:36 -0000 Author: gjb Date: Mon Oct 5 20:12:35 2015 New Revision: 288854 URL: https://svnweb.freebsd.org/changeset/base/288854 Log: Document r285883, isl(4) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:32 2015 (r288853) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:35 2015 (r288854) @@ -1018,6 +1018,10 @@ The &man.cyapa.4; driver has been added, supporting the Cypress APA I2C trackpad. + + The &man.isl.4; driver has been added, + supporting the Intersil I2C ISL29018 digital ambient light + sensor. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE929BAE83; Mon, 5 Oct 2015 20:12:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F23C31634; Mon, 5 Oct 2015 20:12:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCnjT082162; Mon, 5 Oct 2015 20:12:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCnwP082161; Mon, 5 Oct 2015 20:12:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCnwP082161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288860 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:50 -0000 Author: gjb Date: Mon Oct 5 20:12:49 2015 New Revision: 288860 URL: https://svnweb.freebsd.org/changeset/base/288860 Log: Document r286289, xargs(1) '-P 0' mode. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:46 2015 (r288859) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:49 2015 (r288860) @@ -427,6 +427,13 @@ &man.ar.1; utility now enables deterministic mode (-D) by default. This behavior can be disabled by specifying the -U flag. + + The &man.xargs.1; utility has been + updated to allow specifying 0 as an + argument to the -P (parallel mode) flag, + which allows creating as many concurrent processes as + possible. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 309369BADDF; Mon, 5 Oct 2015 20:12:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 219D313B2; Mon, 5 Oct 2015 20:12:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCgaa082030; Mon, 5 Oct 2015 20:12:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCgpP082029; Mon, 5 Oct 2015 20:12:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCgpP082029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288857 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:43 -0000 Author: gjb Date: Mon Oct 5 20:12:42 2015 New Revision: 288857 URL: https://svnweb.freebsd.org/changeset/base/288857 Log: Document r286010, ar(1) '-D' option enabled by default. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:40 2015 (r288856) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:42 2015 (r288857) @@ -422,6 +422,11 @@ updated to include a new option to the -V flag, none, which disables backup file creation when applying a patch. + + The + &man.ar.1; utility now enables deterministic mode + (-D) by default. This behavior can be + disabled by specifying the -U flag. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A3299BAF36; Mon, 5 Oct 2015 20:12:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11E5C1967; Mon, 5 Oct 2015 20:12:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCuPJ082294; Mon, 5 Oct 2015 20:12:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCuJd082293; Mon, 5 Oct 2015 20:12:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCuJd082293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288863 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:57 -0000 Author: gjb Date: Mon Oct 5 20:12:56 2015 New Revision: 288863 URL: https://svnweb.freebsd.org/changeset/base/288863 Log: Document r286503, r286505, r286506, r286510: apr-1.5.2 serf-1.3.8 svnlite-1.8.14 sqlite3-3.8.11.1 Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:53 2015 (r288862) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:56 2015 (r288863) @@ -562,6 +562,21 @@ The &man.acpi.4; subsystem has been updated to version 20150818. + + The apr + library used by &man.svnlite.1; has been updated to version + 1.5.2. + + The serf + library used by &man.svnlite.1; has been updated to version + 1.3.8. + + The &man.svnlite.1; utility has been + updated to version 1.8.14. + + The sqlite3 + library used by &man.svnlite.1; and &man.kerberos.8; has been + updated to version 3.8.11.1. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2084A9BAD0D; Mon, 5 Oct 2015 20:12:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31D31107; Mon, 5 Oct 2015 20:12:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCXub081846; Mon, 5 Oct 2015 20:12:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCXmV081845; Mon, 5 Oct 2015 20:12:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCXmV081845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288853 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:34 -0000 Author: gjb Date: Mon Oct 5 20:12:32 2015 New Revision: 288853 URL: https://svnweb.freebsd.org/changeset/base/288853 Log: Document r285876, cyapa(4) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:30 2015 (r288852) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:32 2015 (r288853) @@ -1015,6 +1015,9 @@ Support for the Freescale PCI Root Complex device has been added. + + The &man.cyapa.4; driver has been added, + supporting the Cypress APA I2C trackpad. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11A229BAE56; Mon, 5 Oct 2015 20:12:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D70101595; Mon, 5 Oct 2015 20:12:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KClch082119; Mon, 5 Oct 2015 20:12:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KClel082118; Mon, 5 Oct 2015 20:12:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KClel082118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288859 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:48 -0000 Author: gjb Date: Mon Oct 5 20:12:46 2015 New Revision: 288859 URL: https://svnweb.freebsd.org/changeset/base/288859 Log: Document r286231, pms(4) added to GENERIC. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:44 2015 (r288858) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:46 2015 (r288859) @@ -922,6 +922,10 @@ affinity and policy configuration has been added. See &man.numactl.1;, and &man.numa.getaffinity.2;, for usage details. + + The &man.pms.4; driver has been added + to the GENERIC kernel configuration for + supported architectures. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A4A9BAF05; Mon, 5 Oct 2015 20:12:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB1C418B8; Mon, 5 Oct 2015 20:12:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCsTJ082251; Mon, 5 Oct 2015 20:12:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCsmB082250; Mon, 5 Oct 2015 20:12:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCsmB082250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288862 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:54 -0000 Author: gjb Date: Mon Oct 5 20:12:53 2015 New Revision: 288862 URL: https://svnweb.freebsd.org/changeset/base/288862 Log: Document r286444, BIO_DELETE passthru support in GELI. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:51 2015 (r288861) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:53 2015 (r288862) @@ -1396,6 +1396,13 @@ &man.auto.master.5; map, -noauto, which handles &man.fstab.5; entries set to noauto. + + The GELI class has + been updated to support the BIO_DELETE + &man.g.bio.9; bio_cmd field, providing + TRIM/UNMAP support on + GELI-backed SSD storage + providers. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B385E9BAEBE; Mon, 5 Oct 2015 20:12:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 517E217EE; Mon, 5 Oct 2015 20:12:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCqm7082208; Mon, 5 Oct 2015 20:12:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCqMe082207; Mon, 5 Oct 2015 20:12:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCqMe082207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288861 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:12:52 -0000 Author: gjb Date: Mon Oct 5 20:12:51 2015 New Revision: 288861 URL: https://svnweb.freebsd.org/changeset/base/288861 Log: Document r286441, iwm(4) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:49 2015 (r288860) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:51 2015 (r288861) @@ -1161,6 +1161,10 @@ The &man.cdce.4; driver has been updated to include support for the RTL8153 chipset. + + The &man.iwm.4; driver has been imported + from OpenBSD, providing support for &intel; 3160/7260/7265 + wireless chipsets. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48CDE9B502D; Mon, 5 Oct 2015 20:13:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26F671B88; Mon, 5 Oct 2015 20:13:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KD4Hp082444; Mon, 5 Oct 2015 20:13:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KD3G4082443; Mon, 5 Oct 2015 20:13:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KD3G4082443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288866 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:04 -0000 Author: gjb Date: Mon Oct 5 20:13:03 2015 New Revision: 288866 URL: https://svnweb.freebsd.org/changeset/base/288866 Log: Document r286795, patch(1) automatic checkout feature removed. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:01 2015 (r288865) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:03 2015 (r288866) @@ -434,6 +434,9 @@ argument to the -P (parallel mode) flag, which allows creating as many concurrent processes as possible. + + The &man.patch.1; utility has been + updated to remove the automatic checkout feature. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 198609B50C7; Mon, 5 Oct 2015 20:13:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE6881CEF; Mon, 5 Oct 2015 20:13:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KD8Y8082531; Mon, 5 Oct 2015 20:13:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KD8Hb082530; Mon, 5 Oct 2015 20:13:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KD8Hb082530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288868 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:09 -0000 Author: gjb Date: Mon Oct 5 20:13:07 2015 New Revision: 288868 URL: https://svnweb.freebsd.org/changeset/base/288868 Log: Document r288090, jemalloc update to 4.0.2. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:05 2015 (r288867) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:07 2015 (r288868) @@ -449,9 +449,6 @@ &man.byacc.1; has been updated to version 20140101. - &man.jemalloc.3; has been updated to - version 3.5.0. - libc++ has been updated to version 3.4. @@ -580,6 +577,9 @@ The &man.acpi.4; subsystem has been updated to version 20150818. + + &man.jemalloc.3; has been updated to + version 4.0.2. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB9DD9B507C; Mon, 5 Oct 2015 20:13:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 757F41C3C; Mon, 5 Oct 2015 20:13:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KD6LE082488; Mon, 5 Oct 2015 20:13:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KD6Ic082487; Mon, 5 Oct 2015 20:13:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KD6Ic082487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288867 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:06 -0000 Author: gjb Date: Mon Oct 5 20:13:05 2015 New Revision: 288867 URL: https://svnweb.freebsd.org/changeset/base/288867 Log: Document r286829, ability to disable em(4) CRC stripping. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:03 2015 (r288866) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:05 2015 (r288867) @@ -1187,6 +1187,10 @@ The &man.iwm.4; driver has been imported from OpenBSD, providing support for &intel; 3160/7260/7265 wireless chipsets. + + The &man.em.4; driver has been updated + to allow disabling CRC stripping. From owner-svn-src-all@freebsd.org Mon Oct 5 20:12:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E32329BAF86; Mon, 5 Oct 2015 20:12:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77B681A20; Mon, 5 Oct 2015 20:12:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KCx54082343; Mon, 5 Oct 2015 20:12:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KCx1o082342; Mon, 5 Oct 2015 20:12:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052012.t95KCx1o082342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288864 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:00 -0000 Author: gjb Date: Mon Oct 5 20:12:58 2015 New Revision: 288864 URL: https://svnweb.freebsd.org/changeset/base/288864 Log: Document r286591, uart(4) PPS runtime-tunable. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:56 2015 (r288863) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:58 2015 (r288864) @@ -1000,6 +1000,10 @@ A new &man.sysctl.8;, hw.model, has been added, which displays CPU model information. + + The &man.uart.4; driver has been + updated to allow tuning packets per second captured during + runtime. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D6EA9BAFE4; Mon, 5 Oct 2015 20:13:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E17811AC8; Mon, 5 Oct 2015 20:13:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KD1k3082395; Mon, 5 Oct 2015 20:13:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KD1EC082393; Mon, 5 Oct 2015 20:13:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KD1EC082393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288865 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:02 -0000 Author: gjb Date: Mon Oct 5 20:13:01 2015 New Revision: 288865 URL: https://svnweb.freebsd.org/changeset/base/288865 Log: Document r286750, zoneinfo update to 2015f. While here, move a few misordered entries. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:12:58 2015 (r288864) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:01 2015 (r288865) @@ -526,9 +526,6 @@ bmake has been updated to version 20150606. - Timezone data files have been updated to - version 2015e. - sendmail has been updated to 8.15.2. Starting with &os; 11.0 and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by @@ -560,9 +557,6 @@ updated to properly skip a sparse file entry in a &man.tar.1; file, which would previously produce errors. - The &man.acpi.4; subsystem has been - updated to version 20150818. - The apr library used by &man.svnlite.1; has been updated to version 1.5.2. @@ -577,6 +571,12 @@ The sqlite3 library used by &man.svnlite.1; and &man.kerberos.8; has been updated to version 3.8.11.1. + + Timezone data files have been updated to + version 2015f. + + The &man.acpi.4; subsystem has been + updated to version 20150818. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4567B9B517B; Mon, 5 Oct 2015 20:13:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A8BA1F10; Mon, 5 Oct 2015 20:13:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDFB2082664; Mon, 5 Oct 2015 20:13:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDFQp082663; Mon, 5 Oct 2015 20:13:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDFQp082663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288871 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:16 -0000 Author: gjb Date: Mon Oct 5 20:13:15 2015 New Revision: 288871 URL: https://svnweb.freebsd.org/changeset/base/288871 Log: Document r287222, pf(4) support for 'scrub fragment crop|drop-ovl' removed. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:12 2015 (r288870) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:15 2015 (r288871) @@ -1196,6 +1196,13 @@ The &man.em.4; driver has been updated to allow disabling CRC stripping. + + The &man.pf.4; implementation has been + updated to remove support for the scrub fragment + crop|drop-ovl filtering rule. Systems with this + rule in &man.pf.conf.5; will implicitly be converted to the + scrub fragment reassemble filtering rule, + without necessary intervention. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6BB29B525D; Mon, 5 Oct 2015 20:13:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97C53199; Mon, 5 Oct 2015 20:13:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDNoe082799; Mon, 5 Oct 2015 20:13:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDNu2082797; Mon, 5 Oct 2015 20:13:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDNu2082797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288874 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:24 -0000 Author: gjb Date: Mon Oct 5 20:13:22 2015 New Revision: 288874 URL: https://svnweb.freebsd.org/changeset/base/288874 Log: Document r287371, support for HiSilicon HI6220 SoC. Add ABT Systems, Ltd. to sponsor.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:20 2015 (r288873) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:22 2015 (r288874) @@ -1410,6 +1410,10 @@ added, providing support for 1-Wire hardware through &man.gpio.4;. See &man.ow.4;, &man.owc.4;, and &man.ow.temp.4; for more information. + + Support for the HiSilicon HI6220 SoC has been + added. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:13:20 2015 (r288873) +++ head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:13:22 2015 (r288874) @@ -8,6 +8,7 @@ --> + From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FAF29B50F0; Mon, 5 Oct 2015 20:13:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51F421DA6; Mon, 5 Oct 2015 20:13:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDBLR082577; Mon, 5 Oct 2015 20:13:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDBGk082576; Mon, 5 Oct 2015 20:13:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDBGk082576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288869 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:11 -0000 Author: gjb Date: Mon Oct 5 20:13:10 2015 New Revision: 288869 URL: https://svnweb.freebsd.org/changeset/base/288869 Log: Document r287099, account for ashift when gathering buffers to be written to l2arc device Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:07 2015 (r288868) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:10 2015 (r288869) @@ -1460,6 +1460,12 @@ &man.sysctl.8; has been removed, and replaced with the kstat.zfs.misc.arcstats.arc_meta_used &man.sysctl.8;. + + The &man.zfs.8; l2arc + code has been updated to take ashift into + account when gathering buffers to be written to the + l2arc device. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE1359B5148; Mon, 5 Oct 2015 20:13:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56BB1E69; Mon, 5 Oct 2015 20:13:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDDYZ082620; Mon, 5 Oct 2015 20:13:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDDR4082619; Mon, 5 Oct 2015 20:13:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDDR4082619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288870 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:13 -0000 Author: gjb Date: Mon Oct 5 20:13:12 2015 New Revision: 288870 URL: https://svnweb.freebsd.org/changeset/base/288870 Log: Document r287117, ioat(4) driver addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:10 2015 (r288869) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:12 2015 (r288870) @@ -1106,6 +1106,11 @@ providing support for the PMC Sierra line of SAS/SATA host bus adapters. + + The &man.ioat.4; driver has been added, + providing support for the PSE (Platform + Storage Extension). From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066279B52E7; Mon, 5 Oct 2015 20:13:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8524B312; Mon, 5 Oct 2015 20:13:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDSN4082886; Mon, 5 Oct 2015 20:13:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDSZv082885; Mon, 5 Oct 2015 20:13:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDSZv082885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288876 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:29 -0000 Author: gjb Date: Mon Oct 5 20:13:27 2015 New Revision: 288876 URL: https://svnweb.freebsd.org/changeset/base/288876 Log: Document r287469, em(4) update to support I219 chipset. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:25 2015 (r288875) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:27 2015 (r288876) @@ -1207,6 +1207,10 @@ rule in &man.pf.conf.5; will implicitly be converted to the scrub fragment reassemble filtering rule, without necessary intervention. + + The &man.em.4; driver has been updated + to support the Skylake I219 chipset. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4473B9B528A; Mon, 5 Oct 2015 20:13:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DDB825C; Mon, 5 Oct 2015 20:13:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDPV3082842; Mon, 5 Oct 2015 20:13:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDPKp082841; Mon, 5 Oct 2015 20:13:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDPKp082841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288875 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:26 -0000 Author: gjb Date: Mon Oct 5 20:13:25 2015 New Revision: 288875 URL: https://svnweb.freebsd.org/changeset/base/288875 Log: Document r288143, file(1) updated to 5.25. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:22 2015 (r288874) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:25 2015 (r288875) @@ -520,9 +520,6 @@ The &man.nc.1; utility has been updated to the OpenBSD 5.7 version. - The &man.file.1; utility has been - updated to version 5.23. - bmake has been updated to version 20150606. @@ -580,6 +577,9 @@ &man.jemalloc.3; has been updated to version 4.0.2. + + The &man.file.1; utility has been + updated to version 5.25. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 975AC9B5300; Mon, 5 Oct 2015 20:13:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDA15F9; Mon, 5 Oct 2015 20:13:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDV6l082932; Mon, 5 Oct 2015 20:13:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDUDD082930; Mon, 5 Oct 2015 20:13:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDUDD082930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288877 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:31 -0000 Author: gjb Date: Mon Oct 5 20:13:30 2015 New Revision: 288877 URL: https://svnweb.freebsd.org/changeset/base/288877 Log: Document r287473, sesutil(8) addition. Add Gandi.net to sponsor.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:27 2015 (r288876) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:30 2015 (r288877) @@ -437,6 +437,10 @@ The &man.patch.1; utility has been updated to remove the automatic checkout feature. + + A + new utility, &man.sesutil.8;, has been added, which is used + to manage &man.ses.4; devices. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:13:27 2015 (r288876) +++ head/release/doc/share/xml/sponsor.ent Mon Oct 5 20:13:30 2015 (r288877) @@ -27,6 +27,7 @@ + From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FFF89B51C2; Mon, 5 Oct 2015 20:13:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ABAF1FB8; Mon, 5 Oct 2015 20:13:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDIuA082709; Mon, 5 Oct 2015 20:13:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDIG4082708; Mon, 5 Oct 2015 20:13:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDIG4082708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288872 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:18 -0000 Author: gjb Date: Mon Oct 5 20:13:17 2015 New Revision: 288872 URL: https://svnweb.freebsd.org/changeset/base/288872 Log: Document r287225, 1-Wire implementation. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:15 2015 (r288871) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:17 2015 (r288872) @@ -1401,6 +1401,11 @@ sponsor="&ff;">Initial ACPI support has been added for &os;/&arch.arm64;. + + Support for 1-Wire devices has been + added, providing support for 1-Wire hardware through + &man.gpio.4;. See &man.ow.4;, &man.owc.4;, and + &man.ow.temp.4; for more information. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C6019B520F; Mon, 5 Oct 2015 20:13:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAA24CF; Mon, 5 Oct 2015 20:13:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDKV9082752; Mon, 5 Oct 2015 20:13:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDKcg082751; Mon, 5 Oct 2015 20:13:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDKcg082751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288873 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:21 -0000 Author: gjb Date: Mon Oct 5 20:13:20 2015 New Revision: 288873 URL: https://svnweb.freebsd.org/changeset/base/288873 Log: Document r287306, CUBIEBOARD2 kernel configuration renamed to A20. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:17 2015 (r288872) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:20 2015 (r288873) @@ -951,6 +951,10 @@ The &man.pms.4; driver has been added to the GENERIC kernel configuration for supported architectures. + + The + CUBIEBOARD2 kernel configuration has been + renamed to A20. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C08C9B534E; Mon, 5 Oct 2015 20:13:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA96808; Mon, 5 Oct 2015 20:13:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDZLS083021; Mon, 5 Oct 2015 20:13:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDZEI083020; Mon, 5 Oct 2015 20:13:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDZEI083020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288879 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:36 -0000 Author: gjb Date: Mon Oct 5 20:13:35 2015 New Revision: 288879 URL: https://svnweb.freebsd.org/changeset/base/288879 Log: Document r287576, service(8) updated to respect /etc/rc.conf.d/. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:32 2015 (r288878) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:35 2015 (r288879) @@ -664,6 +664,12 @@ iovctl, has been added, which allows automatically starting the &man.iovctl.8; utility at boot. + + The &man.service.8; utility has been + updated to honor entries within /etc/rc.conf.d/. + From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E4969B548C; Mon, 5 Oct 2015 20:13:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F23F6B71; Mon, 5 Oct 2015 20:13:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDl9i083246; Mon, 5 Oct 2015 20:13:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDlaJ083245; Mon, 5 Oct 2015 20:13:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDlaJ083245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288884 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:48 -0000 Author: gjb Date: Mon Oct 5 20:13:47 2015 New Revision: 288884 URL: https://svnweb.freebsd.org/changeset/base/288884 Log: Document r287917, unbound 1.5.4. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:44 2015 (r288883) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:47 2015 (r288884) @@ -525,9 +525,6 @@ &man.hostapd.8; utilities have been updated to version 2.4. - The &man.unbound.8; utility has been - updated to version 1.5.3. - The &man.resolvconf.8; utility has been updated to version 3.7.0. @@ -590,6 +587,9 @@ The &man.acpi.4; subsystem has been updated to version 20150818. + The &man.unbound.8; utility has been + updated to version 1.5.4. + &man.jemalloc.3; has been updated to version 4.0.2. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E803C9B5323; Mon, 5 Oct 2015 20:13:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B07C56C6; Mon, 5 Oct 2015 20:13:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDXI5082975; Mon, 5 Oct 2015 20:13:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDXJV082974; Mon, 5 Oct 2015 20:13:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDXJV082974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288878 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:34 -0000 Author: gjb Date: Mon Oct 5 20:13:32 2015 New Revision: 288878 URL: https://svnweb.freebsd.org/changeset/base/288878 Log: Document r287522, pciconf(8) prefer pciids from ports database, if present. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:30 2015 (r288877) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:32 2015 (r288878) @@ -441,6 +441,12 @@ A new utility, &man.sesutil.8;, has been added, which is used to manage &man.ses.4; devices. + + The &man.pciconf.8; utility has been + updated to use the PCI ID database from the misc/pciids package, if present, + falling back to the PCI ID database in the &os; base + system. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A4779B53CF; Mon, 5 Oct 2015 20:13:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA3A6967; Mon, 5 Oct 2015 20:13:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDeRF083113; Mon, 5 Oct 2015 20:13:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDe6f083112; Mon, 5 Oct 2015 20:13:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDe6f083112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288881 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:41 -0000 Author: gjb Date: Mon Oct 5 20:13:39 2015 New Revision: 288881 URL: https://svnweb.freebsd.org/changeset/base/288881 Log: Document r287798, IPv6 On-Link redirect handling fix. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:37 2015 (r288880) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:39 2015 (r288881) @@ -1686,6 +1686,10 @@ updated to include support for AES modes on both software-only and hardware-backed (&man.aesni.4;) systems. + + The + network stack has been updated to fix handling of + IPv6 On-Link redirects. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED8F9B5398; Mon, 5 Oct 2015 20:13:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84AC98C1; Mon, 5 Oct 2015 20:13:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDces083068; Mon, 5 Oct 2015 20:13:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDcVm083067; Mon, 5 Oct 2015 20:13:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDcVm083067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288880 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:38 -0000 Author: gjb Date: Mon Oct 5 20:13:37 2015 New Revision: 288880 URL: https://svnweb.freebsd.org/changeset/base/288880 Log: Document r287621, CTL HA reimplementation. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:35 2015 (r288879) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:37 2015 (r288880) @@ -1131,6 +1131,10 @@ sponsor="&emcisilon;">The &man.ioat.4; driver has been added, providing support for the PSE (Platform Storage Extension). + + The + CTL High Availability implementation has + been rewritten. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794649B5401; Mon, 5 Oct 2015 20:13:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A0A7A0F; Mon, 5 Oct 2015 20:13:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDgmi083157; Mon, 5 Oct 2015 20:13:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDgL9083156; Mon, 5 Oct 2015 20:13:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDgL9083156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288882 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:43 -0000 Author: gjb Date: Mon Oct 5 20:13:42 2015 New Revision: 288882 URL: https://svnweb.freebsd.org/changeset/base/288882 Log: Document r287842, ifconfig(8) exit on error if ioctl(2) fails. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:39 2015 (r288881) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:42 2015 (r288882) @@ -447,6 +447,11 @@ role="package">misc/pciids package, if present, falling back to the PCI ID database in the &os; base system. + + The &man.ifconfig.8; utility has been + updated to always exit with an error code if an important + &man.ioctl.2; fails. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4CC59B5443; Mon, 5 Oct 2015 20:13:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 857AFABF; Mon, 5 Oct 2015 20:13:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDjMc083200; Mon, 5 Oct 2015 20:13:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDjZ4083199; Mon, 5 Oct 2015 20:13:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDjZ4083199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288883 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:46 -0000 Author: gjb Date: Mon Oct 5 20:13:44 2015 New Revision: 288883 URL: https://svnweb.freebsd.org/changeset/base/288883 Log: Document r287886, fix kqueue write events for files > 2GB Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:42 2015 (r288882) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:44 2015 (r288883) @@ -855,6 +855,11 @@ Support for &man.dtrace.1; has been added for the Book-E ™. + + The &man.kqueue.2; system call has been + updated to handle write events to files larger than 2 + gigabytes. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B764E9B54BF; Mon, 5 Oct 2015 20:13:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68290C1E; Mon, 5 Oct 2015 20:13:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDo0V083289; Mon, 5 Oct 2015 20:13:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDovJ083288; Mon, 5 Oct 2015 20:13:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDovJ083288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288885 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:50 -0000 Author: gjb Date: Mon Oct 5 20:13:49 2015 New Revision: 288885 URL: https://svnweb.freebsd.org/changeset/base/288885 Log: Document r288176, kernel symbols now installed to /usr/lib/debug/. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:47 2015 (r288884) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:49 2015 (r288885) @@ -981,6 +981,13 @@ The CUBIEBOARD2 kernel configuration has been renamed to A20. + + Kernel + debugging symbols are now installed to /usr/lib/debug/boot/kernel/. + To retain the previous behavior, add + KERN_DEBUGDIR="" to + &man.src.conf.5;. From owner-svn-src-all@freebsd.org Mon Oct 5 20:13:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDBA19B54E6; Mon, 5 Oct 2015 20:13:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C30E4CD6; Mon, 5 Oct 2015 20:13:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KDqhD083334; Mon, 5 Oct 2015 20:13:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KDqqB083333; Mon, 5 Oct 2015 20:13:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052013.t95KDqqB083333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288886 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:13:53 -0000 Author: gjb Date: Mon Oct 5 20:13:51 2015 New Revision: 288886 URL: https://svnweb.freebsd.org/changeset/base/288886 Log: Document r288303, nc(1) updated to OpenBSD 5.8 version. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:49 2015 (r288885) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:51 2015 (r288886) @@ -529,9 +529,6 @@ &man.resolvconf.8; utility has been updated to version 3.7.0. - The &man.nc.1; utility has been updated - to the OpenBSD 5.7 version. - bmake has been updated to version 20150606. @@ -595,6 +592,9 @@ The &man.file.1; utility has been updated to version 5.25. + + The &man.nc.1; utility has been updated + to the OpenBSD 5.8 version. From owner-svn-src-all@freebsd.org Mon Oct 5 20:14:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2F129B56DD; Mon, 5 Oct 2015 20:14:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBC2E1601; Mon, 5 Oct 2015 20:14:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KENIu083405; Mon, 5 Oct 2015 20:14:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KENjJ083404; Mon, 5 Oct 2015 20:14:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052014.t95KENjJ083404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288887 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:14:24 -0000 Author: gjb Date: Mon Oct 5 20:14:22 2015 New Revision: 288887 URL: https://svnweb.freebsd.org/changeset/base/288887 Log: Document r288310, ctl(4) updated to support CD-ROMs and other removable devices. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:13:51 2015 (r288886) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:22 2015 (r288887) @@ -1152,6 +1152,9 @@ The CTL High Availability implementation has been rewritten. + + The &man.ctl.4; driver has been updated + to support CD-ROM and removable devices. From owner-svn-src-all@freebsd.org Mon Oct 5 20:14:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DC2A9B56F8; Mon, 5 Oct 2015 20:14:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09A5017AB; Mon, 5 Oct 2015 20:14:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KEPb7083448; Mon, 5 Oct 2015 20:14:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KEPSM083447; Mon, 5 Oct 2015 20:14:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052014.t95KEPSM083447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288888 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:14:26 -0000 Author: gjb Date: Mon Oct 5 20:14:25 2015 New Revision: 288888 URL: https://svnweb.freebsd.org/changeset/base/288888 Log: Wrap a long line to make igor(1) happy. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:22 2015 (r288887) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:25 2015 (r288888) @@ -1202,8 +1202,8 @@ The &man.alc.4; driver has been updated to support AR816x and AR817x ethernet controllers. - The &man.pf.4; packet filter default hash - has been changed from Jenkins to + The &man.pf.4; packet filter default + hash has been changed from Jenkins to Murmur3, providing a 3-percent performance increase in packets-per-second. From owner-svn-src-all@freebsd.org Mon Oct 5 20:14:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14B7B9B57BF; Mon, 5 Oct 2015 20:14:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6B4889; Mon, 5 Oct 2015 20:14:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KEtZC083514; Mon, 5 Oct 2015 20:14:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KEtZi083513; Mon, 5 Oct 2015 20:14:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052014.t95KEtZi083513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288889 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:14:56 -0000 Author: gjb Date: Mon Oct 5 20:14:55 2015 New Revision: 288889 URL: https://svnweb.freebsd.org/changeset/base/288889 Log: Document r287122, NTFS support in mkimg(1). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:25 2015 (r288888) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:55 2015 (r288889) @@ -166,7 +166,10 @@ Userland Application Changes -   + The &man.mkimg.1; utility has been + updated to include support for NTFS + filesystems in both MBR and + GPT partitioning schemes. From owner-svn-src-all@freebsd.org Mon Oct 5 20:14:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59D219B57D4; Mon, 5 Oct 2015 20:14:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B44117; Mon, 5 Oct 2015 20:14:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KEvhW083558; Mon, 5 Oct 2015 20:14:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KEvqU083557; Mon, 5 Oct 2015 20:14:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052014.t95KEvqU083557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288890 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:14:58 -0000 Author: gjb Date: Mon Oct 5 20:14:57 2015 New Revision: 288890 URL: https://svnweb.freebsd.org/changeset/base/288890 Log: Document r286064, jail(8) -l flag and default shell execution when no commands are specified. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:55 2015 (r288889) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:57 2015 (r288890) @@ -166,6 +166,12 @@ Userland Application Changes + The &man.jail.8; utility has been + updated to include a new flag, -l, which + ensures a clean environment in the target jail when used. + Additionally, &man.jail.8; will run a shell within the target + jail when run no commands are specified. + The &man.mkimg.1; utility has been updated to include support for NTFS filesystems in both MBR and From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 927419B580B; Mon, 5 Oct 2015 20:15:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 733721C3; Mon, 5 Oct 2015 20:15:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KF08S083614; Mon, 5 Oct 2015 20:15:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KF0Zn083613; Mon, 5 Oct 2015 20:15:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KF0Zn083613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288891 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:00 -0000 Author: gjb Date: Mon Oct 5 20:14:59 2015 New Revision: 288891 URL: https://svnweb.freebsd.org/changeset/base/288891 Log: Document r286082, libarchive(3) bugfix for sparse files in tar(1) archives. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:57 2015 (r288890) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:59 2015 (r288891) @@ -181,7 +181,9 @@ Contributed Software -   + The &man.libarchive.3; library has been + updated to properly skip a sparse file entry in a &man.tar.1; + file, which would previously produce errors. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32E209B588A; Mon, 5 Oct 2015 20:15:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0329F337; Mon, 5 Oct 2015 20:15:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KF4Cp083703; Mon, 5 Oct 2015 20:15:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KF4qe083702; Mon, 5 Oct 2015 20:15:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KF4qe083702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288893 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:05 -0000 Author: gjb Date: Mon Oct 5 20:15:04 2015 New Revision: 288893 URL: https://svnweb.freebsd.org/changeset/base/288893 Log: Document r287802, xen(4) blkif indirect segment I/O support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:01 2015 (r288892) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:04 2015 (r288893) @@ -292,7 +292,9 @@ Virtualization Support -   + The &man.xen.4; driver has been updated + to include support for blkif indirect + segment I/O. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16A139B5858; Mon, 5 Oct 2015 20:15:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB16E273; Mon, 5 Oct 2015 20:15:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KF2NJ083657; Mon, 5 Oct 2015 20:15:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KF2U5083656; Mon, 5 Oct 2015 20:15:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KF2U5083656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288892 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:03 -0000 Author: gjb Date: Mon Oct 5 20:15:01 2015 New Revision: 288892 URL: https://svnweb.freebsd.org/changeset/base/288892 Log: Document r288202, ar(1) '-D' option enabled by default. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:14:59 2015 (r288891) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:01 2015 (r288892) @@ -176,6 +176,11 @@ updated to include support for NTFS filesystems in both MBR and GPT partitioning schemes. + + The + &man.ar.1; utility now enables deterministic mode + (-D) by default. This behavior can be + disabled by specifying the -U flag. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A5D89B5964; Mon, 5 Oct 2015 20:15:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6213F823; Mon, 5 Oct 2015 20:15:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KFCil083836; Mon, 5 Oct 2015 20:15:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KFClv083835; Mon, 5 Oct 2015 20:15:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KFClv083835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288896 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:12 -0000 Author: gjb Date: Mon Oct 5 20:15:11 2015 New Revision: 288896 URL: https://svnweb.freebsd.org/changeset/base/288896 Log: Document r287746, pciconf(8) prefer pciids from ports database, if present. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:08 2015 (r288895) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:11 2015 (r288896) @@ -181,6 +181,12 @@ &man.ar.1; utility now enables deterministic mode (-D) by default. This behavior can be disabled by specifying the -U flag. + + The &man.pciconf.8; utility has been + updated to use the PCI ID database from the misc/pciids package, if present, + falling back to the PCI ID database in the &os; base + system. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 840E89B58C2; Mon, 5 Oct 2015 20:15:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1275E3; Mon, 5 Oct 2015 20:15:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KF7Xl083746; Mon, 5 Oct 2015 20:15:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KF7ek083745; Mon, 5 Oct 2015 20:15:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KF7ek083745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288894 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:07 -0000 Author: gjb Date: Mon Oct 5 20:15:06 2015 New Revision: 288894 URL: https://svnweb.freebsd.org/changeset/base/288894 Log: Document r287037, uart(4) PPS runtime-tunable. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:04 2015 (r288893) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:06 2015 (r288894) @@ -246,7 +246,9 @@ System Tuning and Controls -   + The &man.uart.4; driver has been + updated to allow tuning packets per second captured during + runtime. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B21479B59BC; Mon, 5 Oct 2015 20:15:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1FB8D0; Mon, 5 Oct 2015 20:15:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KFEbV083879; Mon, 5 Oct 2015 20:15:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KFEU2083878; Mon, 5 Oct 2015 20:15:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KFEU2083878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288897 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:14 -0000 Author: gjb Date: Mon Oct 5 20:15:13 2015 New Revision: 288897 URL: https://svnweb.freebsd.org/changeset/base/288897 Log: Document r288732, CTL HA reimplementation. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:11 2015 (r288896) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:13 2015 (r288897) @@ -273,7 +273,9 @@ Storage Drivers -   + The + CTL High Availability implementation has + been rewritten. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 639259B58FF; Mon, 5 Oct 2015 20:15:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F4B16EA; Mon, 5 Oct 2015 20:15:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KF9EF083790; Mon, 5 Oct 2015 20:15:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KF9wp083788; Mon, 5 Oct 2015 20:15:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KF9wp083788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288895 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:10 -0000 Author: gjb Date: Mon Oct 5 20:15:08 2015 New Revision: 288895 URL: https://svnweb.freebsd.org/changeset/base/288895 Log: Document r287665, account for ashift when gathering buffers to be written to l2arc device. Add ClusterHQ to sponsor.ent. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:06 2015 (r288894) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:08 2015 (r288895) @@ -327,7 +327,11 @@ ZFS -   + The &man.zfs.8; l2arc + code has been updated to take ashift into + account when gathering buffers to be written to the + l2arc device. Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Mon Oct 5 20:15:06 2015 (r288894) +++ stable/10/release/doc/share/xml/sponsor.ent Mon Oct 5 20:15:08 2015 (r288895) @@ -13,6 +13,8 @@ + + From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B459B59F8; Mon, 5 Oct 2015 20:15:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E79DB989; Mon, 5 Oct 2015 20:15:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KFGZT083923; Mon, 5 Oct 2015 20:15:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KFG2A083922; Mon, 5 Oct 2015 20:15:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KFG2A083922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288898 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:17 -0000 Author: gjb Date: Mon Oct 5 20:15:16 2015 New Revision: 288898 URL: https://svnweb.freebsd.org/changeset/base/288898 Log: Document r288167, fix kqueue write events for files > 2GB Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:13 2015 (r288897) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:16 2015 (r288898) @@ -240,7 +240,10 @@ Kernel Bug Fixes -   + The &man.kqueue.2; system call has been + updated to handle write events to files larger than 2 + gigabytes. From owner-svn-src-all@freebsd.org Mon Oct 5 20:15:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 472AC9B5A17; Mon, 5 Oct 2015 20:15:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6FBA17; Mon, 5 Oct 2015 20:15:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95KFIIt083968; Mon, 5 Oct 2015 20:15:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95KFInN083967; Mon, 5 Oct 2015 20:15:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510052015.t95KFInN083967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 5 Oct 2015 20:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288899 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 20:15:19 -0000 Author: gjb Date: Mon Oct 5 20:15:18 2015 New Revision: 288899 URL: https://svnweb.freebsd.org/changeset/base/288899 Log: Document r288810, ctl(4) updated to support CD-ROMs and other removable devices. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:16 2015 (r288898) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Oct 5 20:15:18 2015 (r288899) @@ -279,6 +279,9 @@ The CTL High Availability implementation has been rewritten. + + The &man.ctl.4; driver has been updated + to support CD-ROM and removable devices. From owner-svn-src-all@freebsd.org Mon Oct 5 21:18:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 756799B628A; Mon, 5 Oct 2015 21:18:42 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66E25EE; Mon, 5 Oct 2015 21:18:42 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95LIge3005870; Mon, 5 Oct 2015 21:18:42 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95LIgHq005869; Mon, 5 Oct 2015 21:18:42 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510052118.t95LIgHq005869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 5 Oct 2015 21:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r288900 - svnadmin/tools/svnssh X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 21:18:42 -0000 Author: peter Date: Mon Oct 5 21:18:41 2015 New Revision: 288900 URL: https://svnweb.freebsd.org/changeset/base/288900 Log: Fix the 120 minute runtime limit. Modified: svnadmin/tools/svnssh/svnssh.c Modified: svnadmin/tools/svnssh/svnssh.c ============================================================================== --- svnadmin/tools/svnssh/svnssh.c Mon Oct 5 20:15:18 2015 (r288899) +++ svnadmin/tools/svnssh/svnssh.c Mon Oct 5 21:18:41 2015 (r288900) @@ -205,7 +205,7 @@ main(int argc, char *argv[]) rl.rlim_cur = 60 * 60; /* 60 minutes (soft) */ rl.rlim_max = 70 * 60; /* 70 minutes (hard) */ setrlimit(RLIMIT_CPU, &rl); - alarm(120); /* Limit total run time */ + alarm(120 * 60); /* Limit total run time to 120 minutes */ if (karma == 0) syslog(LOG_INFO, "svn server: %s, karma %d", username, karma); closelog(); From owner-svn-src-all@freebsd.org Mon Oct 5 21:29:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59FD29B6C11; Mon, 5 Oct 2015 21:29:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDAAA51; Mon, 5 Oct 2015 21:29:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95LTIkF009554; Mon, 5 Oct 2015 21:29:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95LTIBl009553; Mon, 5 Oct 2015 21:29:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201510052129.t95LTIBl009553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 5 Oct 2015 21:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288901 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 21:29:18 -0000 Author: imp Date: Mon Oct 5 21:29:17 2015 New Revision: 288901 URL: https://svnweb.freebsd.org/changeset/base/288901 Log: Mark swap_pager_putpages static at its definition. It was already static at its declaration. Remove needless swapdev_strategy forward declaration. MFC After: 3 days Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Oct 5 21:18:41 2015 (r288900) +++ head/sys/vm/swap_pager.c Mon Oct 5 21:29:17 2015 (r288901) @@ -313,8 +313,6 @@ swap_release_by_cred(vm_ooffset_t decr, racct_sub_cred(cred, RACCT_SWAP, decr); } -static void swapdev_strategy(struct buf *, struct swdevt *sw); - #define SWM_FREE 0x02 /* free, period */ #define SWM_POP 0x04 /* pop out */ @@ -1308,7 +1306,7 @@ swap_pager_getpages_async(vm_object_t ob * those whos rtvals[] entry is not set to VM_PAGER_PEND on return. * We need to unbusy the rest on I/O completion. */ -void +static void swap_pager_putpages(vm_object_t object, vm_page_t *m, int count, int flags, int *rtvals) { From owner-svn-src-all@freebsd.org Mon Oct 5 21:36:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B47739B92B2; Mon, 5 Oct 2015 21:36:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9969A174; Mon, 5 Oct 2015 21:36:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Las9j013245; Mon, 5 Oct 2015 21:36:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Las90013244; Mon, 5 Oct 2015 21:36:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510052136.t95Las90013244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 5 Oct 2015 21:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288902 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 21:36:54 -0000 Author: jhb Date: Mon Oct 5 21:36:53 2015 New Revision: 288902 URL: https://svnweb.freebsd.org/changeset/base/288902 Log: Include additional info in ptrace(2) KTR traces: - The new PC value and signal passed to PT_CONTINUE, PT_DETACH, PT_SYSCALL, and PT_TO_SC[EX]. - The system call code returned via PT_LWPINFO. MFC after: 1 week Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Oct 5 21:29:17 2015 (r288901) +++ head/sys/kern/sys_process.c Mon Oct 5 21:36:53 2015 (r288902) @@ -928,25 +928,29 @@ kern_ptrace(struct thread *td, int req, switch (req) { case PT_TO_SCE: p->p_stops |= S_PT_SCE; - CTR2(KTR_PTRACE, - "PT_TO_SCE: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_TO_SCE: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_TO_SCX: p->p_stops |= S_PT_SCX; - CTR2(KTR_PTRACE, - "PT_TO_SCX: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_TO_SCX: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_SYSCALL: p->p_stops |= S_PT_SCE | S_PT_SCX; - CTR2(KTR_PTRACE, - "PT_SYSCALL: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_SYSCALL: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_CONTINUE: - CTR1(KTR_PTRACE, - "PT_CONTINUE: pid %d", p->p_pid); + CTR3(KTR_PTRACE, + "PT_CONTINUE: pid %d, PC = %#lx, sig = %d", + p->p_pid, (u_long)(uintfptr_t)addr, data); break; } break; @@ -969,11 +973,12 @@ kern_ptrace(struct thread *td, int req, proc_reparent(p, pp); if (pp == initproc) p->p_sigparent = SIGCHLD; - CTR2(KTR_PTRACE, - "PT_DETACH: pid %d reparented to pid %d", - p->p_pid, pp->p_pid); + CTR3(KTR_PTRACE, + "PT_DETACH: pid %d reparented to pid %d, sig %d", + p->p_pid, pp->p_pid, data); } else - CTR1(KTR_PTRACE, "PT_DETACH: pid %d", p->p_pid); + CTR2(KTR_PTRACE, "PT_DETACH: pid %d, sig %d", + p->p_pid, data); p->p_oppid = 0; p->p_stops = 0; @@ -1226,10 +1231,10 @@ kern_ptrace(struct thread *td, int req, if (wrap32) ptrace_lwpinfo_to32(pl, pl32); #endif - CTR5(KTR_PTRACE, - "PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d", + CTR6(KTR_PTRACE, + "PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d syscall %d", td2->td_tid, p->p_pid, pl->pl_event, pl->pl_flags, - pl->pl_child_pid); + pl->pl_child_pid, pl->pl_syscall_code); break; case PT_GETNUMLWPS: From owner-svn-src-all@freebsd.org Mon Oct 5 21:39:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15F4C9B93F3; Mon, 5 Oct 2015 21:39:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04A1C33D; Mon, 5 Oct 2015 21:39:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95Ld7qp013373; Mon, 5 Oct 2015 21:39:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95Ld7Ic013372; Mon, 5 Oct 2015 21:39:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510052139.t95Ld7Ic013372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 5 Oct 2015 21:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288903 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 21:39:08 -0000 Author: bdrewery Date: Mon Oct 5 21:39:07 2015 New Revision: 288903 URL: https://svnweb.freebsd.org/changeset/base/288903 Log: Fix crash if a process sends itself a SIGTRAP. Just forward it as expected. MFC after: 2 weeks [needs rewrite] Relnotes: yes Modified: head/usr.bin/truss/setup.c Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Mon Oct 5 21:36:53 2015 (r288902) +++ head/usr.bin/truss/setup.c Mon Oct 5 21:39:07 2015 (r288903) @@ -564,15 +564,12 @@ eventloop(struct trussinfo *info) } find_thread(info, si.si_pid, pl.pl_lwpid); - if (si.si_status == SIGTRAP) { + if (si.si_status == SIGTRAP && + (pl.pl_flags & (PL_FLAG_SCE|PL_FLAG_SCX)) != 0) { if (pl.pl_flags & PL_FLAG_SCE) enter_syscall(info, &pl); else if (pl.pl_flags & PL_FLAG_SCX) exit_syscall(info, &pl); - else - errx(1, - "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX", - pl.pl_flags); pending_signal = 0; } else if (pl.pl_flags & PL_FLAG_CHILD) { if ((info->flags & COUNTONLY) == 0) From owner-svn-src-all@freebsd.org Mon Oct 5 21:41:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 808019B97AA; Mon, 5 Oct 2015 21:41:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6579291C; Mon, 5 Oct 2015 21:41:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95LfuID016592; Mon, 5 Oct 2015 21:41:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95LftgR016590; Mon, 5 Oct 2015 21:41:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201510052141.t95LftgR016590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 5 Oct 2015 21:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288904 - in head: bin usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 21:41:56 -0000 Author: imp Date: Mon Oct 5 21:41:55 2015 New Revision: 288904 URL: https://svnweb.freebsd.org/changeset/base/288904 Log: Start using the fact that SUBDIR.yes is added to SUBDIR and move from the pattern of: .if ${MK_FOO} != "no" SUBDIR+= bar .endif to SUBDIR.${MK_FOO}+= bar since we know that MK_FOO is always either yes or no and the latter form is easier to follow and much shorter. Various exception to this pattern dealt with on an ah-hoc basis. Discussed on arch@ a while ago. Modified: head/bin/Makefile head/usr.bin/Makefile Modified: head/bin/Makefile ============================================================================== --- head/bin/Makefile Mon Oct 5 21:39:07 2015 (r288903) +++ head/bin/Makefile Mon Oct 5 21:41:55 2015 (r288904) @@ -40,21 +40,10 @@ SUBDIR= cat \ test \ uuidgen -.if ${MK_RCMDS} != "no" -SUBDIR+= rcp -.endif - -.if ${MK_SENDMAIL} != "no" -SUBDIR+= rmail -.endif - -.if ${MK_TCSH} != "no" -SUBDIR+= csh -.endif - -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_RCMDS}+= rcp +SUBDIR.${MK_SENDMAIL}+= rmail +SUBDIR.${MK_TCSH}+= csh +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Oct 5 21:39:07 2015 (r288903) +++ head/usr.bin/Makefile Mon Oct 5 21:41:55 2015 (r288904) @@ -190,230 +190,109 @@ SUBDIR= alias \ # NB: keep these sorted by MK_* knobs -.if ${MK_AT} != "no" -SUBDIR+= at -.endif - -.if ${MK_ATM} != "no" -SUBDIR+= atm -.endif - -.if ${MK_BLUETOOTH} != "no" -SUBDIR+= bluetooth -.endif - -.if ${MK_BSD_CPIO} != "no" -SUBDIR+= cpio -.endif - -.if ${MK_CALENDAR} != "no" -SUBDIR+= calendar -.endif - -.if ${MK_CLANG} != "no" -SUBDIR+= clang -.endif - -.if ${MK_EE} != "no" -SUBDIR+= ee -.endif - -.if ${MK_FILE} != "no" -SUBDIR+= file -.endif - -.if ${MK_FINGER} != "no" -SUBDIR+= finger -.endif - -.if ${MK_FTP} != "no" -SUBDIR+= ftp -.endif - -.if ${MK_GAMES} != "no" -SUBDIR+= caesar -SUBDIR+= factor -SUBDIR+= fortune -SUBDIR+= grdc -SUBDIR+= morse -SUBDIR+= number -SUBDIR+= pom -SUBDIR+= primes -SUBDIR+= random -.endif - -.if ${MK_GPL_DTC} != "yes" -SUBDIR+= dtc -.endif - -.if ${MK_GROFF} != "no" -SUBDIR+= vgrind -.endif - -.if ${MK_HESIOD} != "no" -SUBDIR+= hesinfo -.endif - -.if ${MK_ICONV} != "no" -SUBDIR+= iconv -SUBDIR+= mkcsmapper -SUBDIR+= mkesdb -.endif - -.if ${MK_ISCSI} != "no" -SUBDIR+= iscsictl -.endif - -.if ${MK_KDUMP} != "no" -SUBDIR+= kdump -SUBDIR+= truss -.endif - -.if ${MK_KERBEROS_SUPPORT} != "no" -SUBDIR+= compile_et -.endif - -.if ${MK_LDNS_UTILS} != "no" -SUBDIR+= drill -SUBDIR+= host -.endif - -.if ${MK_LOCATE} != "no" -SUBDIR+= locate -.endif - +SUBDIR.${MK_AT}+= at +SUBDIR.${MK_ATM}+= atm +SUBDIR.${MK_BLUETOOTH}+= bluetooth +SUBDIR.${MK_BSD_CPIO}+= cpio +SUBDIR.${MK_CALENDAR}+= calendar +SUBDIR.${MK_CLANG}+= clang +SUBDIR.${MK_EE}+= ee +SUBDIR.${MK_FILE}+= file +SUBDIR.${MK_FINGER}+= finger +SUBDIR.${MK_FTP}+= ftp +SUBDIR.${MK_GAMES}+= caesar +SUBDIR.${MK_GAMES}+= factor +SUBDIR.${MK_GAMES}+= fortune +SUBDIR.${MK_GAMES}+= grdc +SUBDIR.${MK_GAMES}+= morse +SUBDIR.${MK_GAMES}+= number +SUBDIR.${MK_GAMES}+= pom +SUBDIR.${MK_GAMES}+= primes +SUBDIR.${MK_GAMES}+= random +SUBDIR.${MK_GPL_DTC}+= dtc +SUBDIR.${MK_GROFF}+= vgrind +SUBDIR.${MK_HESIOD}+= hesinfo +SUBDIR.${MK_ICONV}+= iconv +SUBDIR.${MK_ICONV}+= mkcsmapper +SUBDIR.${MK_ICONV}+= mkesdb +SUBDIR.${MK_ISCSI}+= iscsictl +SUBDIR.${MK_KDUMP}+= kdump +SUBDIR.${MK_KDUMP}+= truss +SUBDIR.${MK_KERBEROS_SUPPORT}+= compile_et +SUBDIR.${MK_LDNS_UTILS}+= drill +SUBDIR.${MK_LDNS_UTILS}+= host +SUBDIR.${MK_LOCATE}+= locate # XXX msgs? -.if ${MK_MAIL} != "no" -SUBDIR+= biff -SUBDIR+= from -SUBDIR+= mail -SUBDIR+= msgs -.endif - -.if ${MK_MAKE} != "no" -SUBDIR+= bmake -.endif - -.if ${MK_MAN_UTILS} != "no" -SUBDIR+= catman -.if ${MK_MANDOCDB} == "no" -SUBDIR+= makewhatis -.endif -SUBDIR+= man -.endif - -.if ${MK_NETCAT} != "no" -SUBDIR+= nc -.endif - -.if ${MK_NIS} != "no" -SUBDIR+= ypcat -SUBDIR+= ypmatch -SUBDIR+= ypwhich -.endif - -.if ${MK_OPENSSH} != "no" -SUBDIR+= ssh-copy-id -.endif - -.if ${MK_OPENSSL} != "no" -SUBDIR+= bc -SUBDIR+= chkey -SUBDIR+= dc -SUBDIR+= newkey -.endif - -.if ${MK_QUOTAS} != "no" -SUBDIR+= quota -.endif - -.if ${MK_RCMDS} != "no" -SUBDIR+= rlogin -SUBDIR+= rsh -SUBDIR+= ruptime -SUBDIR+= rwho -.endif - -.if ${MK_SENDMAIL} != "no" -SUBDIR+= vacation -.endif - -.if ${MK_TALK} != "no" -SUBDIR+= talk -.endif - -.if ${MK_TELNET} != "no" -SUBDIR+= telnet -.endif - -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - -.if ${MK_TEXTPROC} != "no" -SUBDIR+= checknr -SUBDIR+= colcrt -SUBDIR+= ul -.endif - -.if ${MK_TFTP} != "no" -SUBDIR+= tftp -.endif - -.if ${MK_TOOLCHAIN} != "no" -SUBDIR+= addr2line -SUBDIR+= ar -SUBDIR+= c89 -SUBDIR+= c99 -SUBDIR+= ctags -SUBDIR+= cxxfilt -SUBDIR+= elfcopy -SUBDIR+= file2c +SUBDIR.${MK_MAIL}+= biff +SUBDIR.${MK_MAIL}+= from +SUBDIR.${MK_MAIL}+= mail +SUBDIR.${MK_MAIL}+= msgs +SUBDIR.${MK_MAKE}+= bmake +SUBDIR.${MK_MAN_UTILS}+= catman +.if ${MK_MANDOCDB} == "no" # AND +SUBDIR.${MK_MAN_UTILS}+= makewhatis +.endif +SUBDIR.${MK_MAN_UTILS}+= man +SUBDIR.${MK_NETCAT}+= nc +SUBDIR.${MK_NIS}+= ypcat +SUBDIR.${MK_NIS}+= ypmatch +SUBDIR.${MK_NIS}+= ypwhich +SUBDIR.${MK_OPENSSH}+= ssh-copy-id +SUBDIR.${MK_OPENSSL}+= bc +SUBDIR.${MK_OPENSSL}+= chkey +SUBDIR.${MK_OPENSSL}+= dc +SUBDIR.${MK_OPENSSL}+= newkey +SUBDIR.${MK_QUOTAS}+= quota +SUBDIR.${MK_RCMDS}+= rlogin +SUBDIR.${MK_RCMDS}+= rsh +SUBDIR.${MK_RCMDS}+= ruptime +SUBDIR.${MK_RCMDS}+= rwho +SUBDIR.${MK_SENDMAIL}+= vacation +SUBDIR.${MK_TALK}+= talk +SUBDIR.${MK_TELNET}+= telnet +SUBDIR.${MK_TESTS}+= tests +SUBDIR.${MK_TEXTPROC}+= checknr +SUBDIR.${MK_TEXTPROC}+= colcrt +SUBDIR.${MK_TEXTPROC}+= ul +SUBDIR.${MK_TFTP}+= tftp +SUBDIR.${MK_TOOLCHAIN}+= addr2line +SUBDIR.${MK_TOOLCHAIN}+= ar +SUBDIR.${MK_TOOLCHAIN}+= c89 +SUBDIR.${MK_TOOLCHAIN}+= c99 +SUBDIR.${MK_TOOLCHAIN}+= ctags +SUBDIR.${MK_TOOLCHAIN}+= cxxfilt +SUBDIR.${MK_TOOLCHAIN}+= elfcopy +SUBDIR.${MK_TOOLCHAIN}+= file2c .if ${MACHINE_ARCH} != "aarch64" # ARM64TODO gprof does not build -SUBDIR+= gprof +SUBDIR.${MK_TOOLCHAIN}+= gprof .endif -SUBDIR+= indent -SUBDIR+= lex -SUBDIR+= mkstr -SUBDIR+= nm -SUBDIR+= readelf -SUBDIR+= rpcgen -SUBDIR+= unifdef -SUBDIR+= size -SUBDIR+= strings +SUBDIR.${MK_TOOLCHAIN}+= indent +SUBDIR.${MK_TOOLCHAIN}+= lex +SUBDIR.${MK_TOOLCHAIN}+= mkstr +SUBDIR.${MK_TOOLCHAIN}+= nm +SUBDIR.${MK_TOOLCHAIN}+= readelf +SUBDIR.${MK_TOOLCHAIN}+= rpcgen +SUBDIR.${MK_TOOLCHAIN}+= unifdef +SUBDIR.${MK_TOOLCHAIN}+= size +SUBDIR.${MK_TOOLCHAIN}+= strings .if ${MACHINE_ARCH} != "aarch64" # ARM64TODO xlint does not build -SUBDIR+= xlint -.endif -SUBDIR+= xstr -SUBDIR+= yacc -.endif - -.if ${MK_VI} != "no" -SUBDIR+= vi -.endif - -.if ${MK_VT} != "no" -SUBDIR+= vtfontcvt -.endif - -.if ${MK_USB} != "no" -SUBDIR+= usbhidaction -SUBDIR+= usbhidctl -.endif - -.if ${MK_UTMPX} != "no" -SUBDIR+= last -SUBDIR+= users -SUBDIR+= who -.endif - -.if ${MK_SVN} == "yes" || ${MK_SVNLITE} == "yes" -SUBDIR+= svn +SUBDIR.${MK_TOOLCHAIN}+= xlint .endif +SUBDIR.${MK_TOOLCHAIN}+= xstr +SUBDIR.${MK_TOOLCHAIN}+= yacc +SUBDIR.${MK_VI}+= vi +SUBDIR.${MK_VT}+= vtfontcvt +SUBDIR.${MK_USB}+= usbhidaction +SUBDIR.${MK_USB}+= usbhidctl +SUBDIR.${MK_UTMPX}+= last +SUBDIR.${MK_UTMPX}+= users +SUBDIR.${MK_UTMPX}+= who +SUBDIR.${MK_SVN}+= svn +SUBDIR.${MK_SVNLITE}+= svn .include -SUBDIR:= ${SUBDIR:O} +SUBDIR:= ${SUBDIR:O:u} SUBDIR_PARALLEL= From owner-svn-src-all@freebsd.org Tue Oct 6 00:23:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 575DF9B1F81; Tue, 6 Oct 2015 00:23:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48AFBC67; Tue, 6 Oct 2015 00:23:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t960NpV9092997; Tue, 6 Oct 2015 00:23:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t960Np71092996; Tue, 6 Oct 2015 00:23:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510060023.t960Np71092996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 00:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288905 - head/bin/ls/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 00:23:51 -0000 Author: ngie Date: Tue Oct 6 00:23:50 2015 New Revision: 288905 URL: https://svnweb.freebsd.org/changeset/base/288905 Log: Add some more syncs to quiesce the filesystem after creating the files to see if this fixes deterministic Jenkin failures Modified: head/bin/ls/tests/ls_tests.sh Directory Properties: head/ (props changed) Modified: head/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Mon Oct 5 21:41:55 2015 (r288904) +++ head/bin/ls/tests/ls_tests.sh Tue Oct 6 00:23:50 2015 (r288905) @@ -72,6 +72,8 @@ create_test_inputs() atf_check -e empty -s exit:0 touch 0b00001101 atf_check -e empty -s exit:0 touch 0b00001110 atf_check -e empty -s exit:0 touch 0b00001111 + + atf_check -e empty -s exit:0 sync } KB=1024 @@ -98,6 +100,8 @@ create_test_inputs2() count=1 oseek=$(( $filesize / $MB )) conv=sparse files="${files} ${filesize}.file" done + + atf_check -e empty -s exit:0 sync } atf_test_case A_flag From owner-svn-src-all@freebsd.org Tue Oct 6 00:55:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 312D59B6E6F; Tue, 6 Oct 2015 00:55:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 226E0EDD; Tue, 6 Oct 2015 00:55:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t960tW9e068304; Tue, 6 Oct 2015 00:55:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t960tW2V068302; Tue, 6 Oct 2015 00:55:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510060055.t960tW2V068302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 00:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288906 - head/bin/ls/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 00:55:32 -0000 Author: ngie Date: Tue Oct 6 00:55:31 2015 New Revision: 288906 URL: https://svnweb.freebsd.org/changeset/base/288906 Log: Explicitly set BLOCKSIZE to 512 in the environment Modified: head/bin/ls/tests/ls_tests.sh Modified: head/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Tue Oct 6 00:23:50 2015 (r288905) +++ head/bin/ls/tests/ls_tests.sh Tue Oct 6 00:55:31 2015 (r288906) @@ -928,6 +928,7 @@ atf_test_case 1_flag atf_init_test_cases() { + export BLOCKSIZE=512 atf_add_test_case A_flag atf_add_test_case A_flag_implied_when_root From owner-svn-src-all@freebsd.org Tue Oct 6 01:00:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D8EF9B9249; Tue, 6 Oct 2015 01:00:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F260B10F6; Tue, 6 Oct 2015 01:00:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9610ChQ077197; Tue, 6 Oct 2015 01:00:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9610CXc077196; Tue, 6 Oct 2015 01:00:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510060100.t9610CXc077196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 01:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288907 - head/bin/ls/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 01:00:13 -0000 Author: ngie Date: Tue Oct 6 01:00:12 2015 New Revision: 288907 URL: https://svnweb.freebsd.org/changeset/base/288907 Log: Call sync consistently using atf_check Remove superfluous sync's Modified: head/bin/ls/tests/ls_tests.sh Modified: head/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Tue Oct 6 00:55:31 2015 (r288906) +++ head/bin/ls/tests/ls_tests.sh Tue Oct 6 01:00:12 2015 (r288907) @@ -814,14 +814,16 @@ t_flag_body() atf_check -e empty -o empty -s exit:0 touch a.file atf_check -e empty -o empty -s exit:0 touch b.file - sync + + atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'a\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' atf_check -e empty -o match:'b\.file.*a\.file' -s exit:0 ls -Ct atf_check -e empty -o empty -s exit:0 rm a.file atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' - sync + + atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Ct @@ -838,17 +840,15 @@ u_flag_body() create_test_dir atf_check -e empty -o empty -s exit:0 touch a.file - sync atf_check -e empty -o empty -s exit:0 touch b.file - sync + atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' - sync atf_check -e empty -o match:'i am a' -s exit:0 cat a.file - sync + atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu From owner-svn-src-all@freebsd.org Tue Oct 6 01:05:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00E3D9B95E0; Tue, 6 Oct 2015 01:05:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA2101637; Tue, 6 Oct 2015 01:05:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96158XC089721; Tue, 6 Oct 2015 01:05:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96158Sd089708; Tue, 6 Oct 2015 01:05:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510060105.t96158Sd089708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 01:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288908 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 01:05:09 -0000 Author: gjb Date: Tue Oct 6 01:05:07 2015 New Revision: 288908 URL: https://svnweb.freebsd.org/changeset/base/288908 Log: Use UBOOT_FILES in the dd(1) input file, as intended. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BANANAPI.conf head/release/arm/CUBIEBOARD.conf head/release/arm/CUBIEBOARD2.conf Modified: head/release/arm/BANANAPI.conf ============================================================================== --- head/release/arm/BANANAPI.conf Tue Oct 6 01:00:12 2015 (r288907) +++ head/release/arm/BANANAPI.conf Tue Oct 6 01:05:07 2015 (r288908) @@ -19,10 +19,10 @@ export BOARDNAME="BANANAPI" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi" - UBOOT_FILES="u-boot.img" + UBOOT_FILES="u-boot-sunxi-with-spl.bin" FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/u-boot-sunxi-with-spl.bin \ + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} Modified: head/release/arm/CUBIEBOARD.conf ============================================================================== --- head/release/arm/CUBIEBOARD.conf Tue Oct 6 01:00:12 2015 (r288907) +++ head/release/arm/CUBIEBOARD.conf Tue Oct 6 01:05:07 2015 (r288908) @@ -18,10 +18,10 @@ NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-cubieboard" - UBOOT_FILES="u-boot.img" + UBOOT_FILES="u-boot-sunxi-with-spl.bin" FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/u-boot-sunxi-with-spl.bin \ + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} Modified: head/release/arm/CUBIEBOARD2.conf ============================================================================== --- head/release/arm/CUBIEBOARD2.conf Tue Oct 6 01:00:12 2015 (r288907) +++ head/release/arm/CUBIEBOARD2.conf Tue Oct 6 01:05:07 2015 (r288908) @@ -19,10 +19,10 @@ export BOARDNAME="CUBIEBOARD2" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-cubieboard2" - UBOOT_FILES="u-boot.img" + UBOOT_FILES="u-boot-sunxi-with-spl.bin" FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/u-boot-sunxi-with-spl.bin \ + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} From owner-svn-src-all@freebsd.org Tue Oct 6 01:24:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AA549B6580; Tue, 6 Oct 2015 01:24:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B637669; Tue, 6 Oct 2015 01:24:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t961Ok6n040651; Tue, 6 Oct 2015 01:24:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t961Ok1p040622; Tue, 6 Oct 2015 01:24:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201510060124.t961Ok1p040622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 6 Oct 2015 01:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288909 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 01:24:47 -0000 Author: jhibbits Date: Tue Oct 6 01:24:46 2015 New Revision: 288909 URL: https://svnweb.freebsd.org/changeset/base/288909 Log: Save the link register in savectx(). Pointed out by: jhb Modified: head/sys/powerpc/powerpc/swtch32.S head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/powerpc/swtch32.S ============================================================================== --- head/sys/powerpc/powerpc/swtch32.S Tue Oct 6 01:05:07 2015 (r288908) +++ head/sys/powerpc/powerpc/swtch32.S Tue Oct 6 01:24:46 2015 (r288909) @@ -187,6 +187,8 @@ ENTRY(savectx) stmw %r12,PCB_CONTEXT(%r3) /* Save the non-volatile GP regs */ mfcr %r4 /* Save the condition register */ stw %r4,PCB_CR(%r3) + mflr %r4 /* Save the link register */ + stw %r4,PCB_LR(%r3) blr /* Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Tue Oct 6 01:05:07 2015 (r288908) +++ head/sys/powerpc/powerpc/swtch64.S Tue Oct 6 01:24:46 2015 (r288909) @@ -255,6 +255,8 @@ ENTRY(savectx) mfcr %r4 /* Save the condition register */ std %r4,PCB_CR(%r3) std %r2,PCB_TOC(%r3) /* Save the TOC pointer */ + mflr %r4 /* Save the link register */ + std %r4,PCB_LR(%r3) blr /* From owner-svn-src-all@freebsd.org Tue Oct 6 03:41:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8E059B9DAA; Tue, 6 Oct 2015 03:41:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA097375; Tue, 6 Oct 2015 03:41:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t963fCl6061379; Tue, 6 Oct 2015 03:41:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t963fChJ061378; Tue, 6 Oct 2015 03:41:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510060341.t963fChJ061378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 6 Oct 2015 03:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288910 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 03:41:12 -0000 Author: cy Date: Tue Oct 6 03:41:11 2015 New Revision: 288910 URL: https://svnweb.freebsd.org/changeset/base/288910 Log: On some interfaces, ipfilter drops UDP packets with zero checkum. This commit fixes that. PR: 166372 Submitted by: mk@neon1.net Reviewed by: Darren Reed MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 6 01:24:46 2015 (r288909) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 6 03:41:11 2015 (r288910) @@ -1104,6 +1104,22 @@ ipf_checkv4sum(fin) return -1; } if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + /* Depending on the driver, UDP may have zero checksum */ + if (fin->fin_p == IPPROTO_UDP && (fin->fin_flx & + (FI_FRAG|FI_SHORT|FI_BAD)) == 0) { + udphdr_t *udp = fin->fin_dp; + if (udp->uh_sum == 0) { + /* + * we're good no matter what the hardware + * checksum flags and csum_data say (handling + * of csum_data for zero UDP checksum is not + * consistent across all drivers) + */ + fin->fin_cksum = 1; + return 0; + } + } + if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) sum = m->m_pkthdr.csum_data; else From owner-svn-src-all@freebsd.org Tue Oct 6 04:18:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D617D9CFEB5; Tue, 6 Oct 2015 04:18:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7502888; Tue, 6 Oct 2015 04:18:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t964InNf071171; Tue, 6 Oct 2015 04:18:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t964Innu071170; Tue, 6 Oct 2015 04:18:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201510060418.t964Innu071170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 6 Oct 2015 04:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288911 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 04:18:49 -0000 Author: imp Date: Tue Oct 6 04:18:48 2015 New Revision: 288911 URL: https://svnweb.freebsd.org/changeset/base/288911 Log: Previous versions of bsd.own.mk included bsd.compiler.mk only when _WITHOUT_SRCCONF wasn't defined. Restore this behavior because bsd.ports.mk depends on this in subtle ways. The compat include of bsd.compiler.mk should be removed in 12 anyway. PR: 203540 Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Oct 6 03:41:11 2015 (r288910) +++ head/share/mk/bsd.own.mk Tue Oct 6 04:18:48 2015 (r288911) @@ -246,7 +246,10 @@ XZ_CMD?= xz # overriden by Makefiles, but the user may choose to set this in src.conf(5). TESTSBASE?= /usr/tests -# Compat for the moment +# Compat for the moment -- old bsd.own.mk only included this when _WITHOUT_SRCCONF +# wasn't defined. bsd.ports.mk and friends depend on this behavior. Remove in 12. +.if !defined(_WITHOUT_SRCCONF) .include +.endif # !_WITHOUT_SRCCONF .endif # !target(____) From owner-svn-src-all@freebsd.org Tue Oct 6 05:49:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42A349B92E5; Tue, 6 Oct 2015 05:49:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3408B1BD0; Tue, 6 Oct 2015 05:49:01 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t965n1aS002326; Tue, 6 Oct 2015 05:49:01 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t965n1A2002325; Tue, 6 Oct 2015 05:49:01 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201510060549.t965n1A2002325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 6 Oct 2015 05:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288912 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 05:49:01 -0000 Author: alc Date: Tue Oct 6 05:49:00 2015 New Revision: 288912 URL: https://svnweb.freebsd.org/changeset/base/288912 Log: Exploit r288122 to address a cosmetic issue. Pages belonging to either the kernel or kmem object can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() in kmem_unback() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid giving this false impression by passing PQ_NONE. Submitted by: kmacy Differential Revision: https://reviews.freebsd.org/D1674 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Tue Oct 6 04:18:48 2015 (r288911) +++ head/sys/vm/vm_kern.c Tue Oct 6 05:49:00 2015 (r288912) @@ -386,7 +386,7 @@ kmem_unback(vm_object_t object, vm_offse VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += PAGE_SIZE) { m = vm_page_lookup(object, OFF_TO_IDX(offset + i)); - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); } VM_OBJECT_WUNLOCK(object); From owner-svn-src-all@freebsd.org Tue Oct 6 07:28:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAFF29B92F7; Tue, 6 Oct 2015 07:28:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC12D251; Tue, 6 Oct 2015 07:28:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t967StdM038108; Tue, 6 Oct 2015 07:28:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t967St0A038106; Tue, 6 Oct 2015 07:28:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510060728.t967St0A038106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 07:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288913 - in head: lib/libxo usr.bin/xo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 07:28:55 -0000 Author: ngie Date: Tue Oct 6 07:28:54 2015 New Revision: 288913 URL: https://svnweb.freebsd.org/changeset/base/288913 Log: Use LIBXOSRC instead of LIBXO when defining the path to contrib/libxo The latter is already defined in bsd.libnames.mk, so avoid the conflict in case someone copy-pastes make variables While here, switch path to the top of the source tree with SRCTOP Modified: head/lib/libxo/Makefile head/usr.bin/xo/Makefile Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Tue Oct 6 05:49:00 2015 (r288912) +++ head/lib/libxo/Makefile Tue Oct 6 07:28:54 2015 (r288913) @@ -1,8 +1,8 @@ # $FreeBSD$ -LIBXO= ${.CURDIR:H:H}/contrib/libxo +LIBXOSRC= ${SRCTOP}/contrib/libxo -.PATH: ${LIBXO}/libxo +.PATH: ${LIBXOSRC}/libxo LIB= xo SHLIB_MAJOR=0 @@ -11,7 +11,7 @@ SHLIBDIR?= /lib SRCS= libxo.c xo_encoder.c xo_syslog.c -CFLAGS+=-I${LIBXO}/libxo +CFLAGS+=-I${LIBXOSRC}/libxo CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" INCS= xo.h xo_encoder.h Modified: head/usr.bin/xo/Makefile ============================================================================== --- head/usr.bin/xo/Makefile Tue Oct 6 05:49:00 2015 (r288912) +++ head/usr.bin/xo/Makefile Tue Oct 6 07:28:54 2015 (r288913) @@ -1,14 +1,14 @@ # $FreeBSD$ -LIBXO= ${.CURDIR:H:H}/contrib/libxo +LIBXOSRC= ${SRCTOP}/contrib/libxo -.PATH: ${LIBXO}/xo +.PATH: ${LIBXOSRC}/xo PROG= xo MAN= xo.1 # XXX For xoversion.h -CFLAGS+=-I${LIBXO}/libxo +CFLAGS+=-I${LIBXOSRC}/libxo LIBADD= xo util From owner-svn-src-all@freebsd.org Tue Oct 6 07:46:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B86979B62CD; Tue, 6 Oct 2015 07:46:20 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9C53F30; Tue, 6 Oct 2015 07:46:20 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t967kKM0046200; Tue, 6 Oct 2015 07:46:20 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t967kK9m046199; Tue, 6 Oct 2015 07:46:20 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201510060746.t967kK9m046199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 6 Oct 2015 07:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288914 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 07:46:20 -0000 Author: hiren Date: Tue Oct 6 07:46:19 2015 New Revision: 288914 URL: https://svnweb.freebsd.org/changeset/base/288914 Log: Add a comment specifying how we implement rfc3042. Differential Revision: D3746 MFC after: 1 week Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Oct 6 07:28:54 2015 (r288913) +++ head/sys/netinet/tcp_input.c Tue Oct 6 07:46:19 2015 (r288914) @@ -2536,6 +2536,16 @@ tcp_do_segment(struct mbuf *m, struct tc tp->snd_nxt = onxt; goto drop; } else if (V_tcp_do_rfc3042) { + /* + * Process first and second duplicate + * ACKs. Each indicates a segment + * leaving the network, creating room + * for more. Make sure we can send a + * packet on reception of each duplicate + * ACK by increasing snd_cwnd by one + * segment. Restore the original + * snd_cwnd after packet transmission. + */ cc_ack_received(tp, th, CC_DUPACK); u_long oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; From owner-svn-src-all@freebsd.org Tue Oct 6 08:43:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E15FA9B68F5; Tue, 6 Oct 2015 08:43:49 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2AEE254; Tue, 6 Oct 2015 08:43:49 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t968hnbi071469; Tue, 6 Oct 2015 08:43:49 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t968hnlk071468; Tue, 6 Oct 2015 08:43:49 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201510060843.t968hnlk071468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 6 Oct 2015 08:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288915 - head/usr.sbin/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 08:43:50 -0000 Author: hrs Date: Tue Oct 6 08:43:48 2015 New Revision: 288915 URL: https://svnweb.freebsd.org/changeset/base/288915 Log: Reallocate a maxlen-long buffer only when the current maxlen is shorter than the required length. Note that it rarely happens because maxlen is almost always 128 which covers struct sockaddr_storage. Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Oct 6 07:46:19 2015 (r288914) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Oct 6 08:43:48 2015 (r288915) @@ -1051,17 +1051,19 @@ netbufcmp(struct netbuf *n1, struct netb static bool_t netbuf_copybuf(struct netbuf *dst, const struct netbuf *src) { + assert(src->len <= src->maxlen); - if (dst->len != src->len || dst->buf == NULL) { + if (dst->maxlen < src->len || dst->buf == NULL) { if (dst->buf != NULL) free(dst->buf); - if ((dst->buf = malloc(src->len)) == NULL) + if ((dst->buf = calloc(1, src->maxlen)) == NULL) return (FALSE); - - dst->maxlen = dst->len = src->len; + dst->maxlen = src->maxlen; } + dst->len = src->len; memcpy(dst->buf, src->buf, src->len); + return (TRUE); } From owner-svn-src-all@freebsd.org Tue Oct 6 09:43:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 290AA9D0E60; Tue, 6 Oct 2015 09:43:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0A212B; Tue, 6 Oct 2015 09:43:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t969hnng097031; Tue, 6 Oct 2015 09:43:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t969hn2Z097030; Tue, 6 Oct 2015 09:43:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510060943.t969hn2Z097030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 6 Oct 2015 09:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288916 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 09:43:50 -0000 Author: glebius Date: Tue Oct 6 09:43:49 2015 New Revision: 288916 URL: https://svnweb.freebsd.org/changeset/base/288916 Log: Remove debugging variable from r143761. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Oct 6 08:43:48 2015 (r288915) +++ head/sys/kern/uipc_mbuf.c Tue Oct 6 09:43:49 2015 (r288916) @@ -1034,8 +1034,6 @@ bad: * the amount of empty space before the data in the new mbuf to be specified * (in the event that the caller expects to prepend later). */ -int MSFail; - struct mbuf * m_copyup(struct mbuf *n, int len, int dstoff) { @@ -1072,7 +1070,6 @@ m_copyup(struct mbuf *n, int len, int ds return (m); bad: m_freem(n); - MSFail++; return (NULL); } From owner-svn-src-all@freebsd.org Tue Oct 6 11:29:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12969D0AC8; Tue, 6 Oct 2015 11:29:49 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADF80EF8; Tue, 6 Oct 2015 11:29:49 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96BTn3Q038993; Tue, 6 Oct 2015 11:29:49 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96BTjJ7038973; Tue, 6 Oct 2015 11:29:45 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510061129.t96BTjJ7038973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 6 Oct 2015 11:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288917 - in head/sys: amd64/amd64 amd64/include dev/xen/blkfront i386/i386 i386/include xen xen/interface xen/interface/arch-arm/hvm xen/interface/arch-x86 xen/interface/arch-x86/hvm x... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 11:29:49 -0000 Author: royger Date: Tue Oct 6 11:29:44 2015 New Revision: 288917 URL: https://svnweb.freebsd.org/changeset/base/288917 Log: Update Xen headers from 4.2 to 4.6 Pull the latest headers for Xen which allow us to add support for ARM and use new features in FreeBSD. This is a verbatim copy of the xen/include/public so every headers which don't exits anymore in the Xen repositories have been dropped. Note the interface version hasn't been bumped, it will be done in a follow-up. Although, it requires fix in the code to get it compiled: - sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so drop it. - {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on xen/interface/event_channel.h, so include it. - {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include machine/intr_machdep.h. This is also fixing build compilation with the new headers. - dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas been dropped. So directly use struct blkif_request_segment Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if __XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file where xen/xen-os.h is not correctly included. Submitted by: Julien Grall Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3805 Sponsored by: Citrix Systems R&D Added: head/sys/xen/interface/arch-x86/pmu.h (contents, props changed) head/sys/xen/interface/errno.h (contents, props changed) head/sys/xen/interface/gcov.h (contents, props changed) head/sys/xen/interface/hvm/hvm_xs_strings.h (contents, props changed) head/sys/xen/interface/hvm/pvdrivers.h (contents, props changed) head/sys/xen/interface/pmu.h (contents, props changed) head/sys/xen/interface/vm_event.h (contents, props changed) Deleted: head/sys/xen/interface/acm.h head/sys/xen/interface/acm_ops.h head/sys/xen/interface/arch-powerpc.h head/sys/xen/interface/elfstructs.h head/sys/xen/interface/foreign/ head/sys/xen/interface/libelf.h head/sys/xen/interface/mem_event.h Modified: head/sys/amd64/amd64/support.S head/sys/amd64/include/intr_machdep.h head/sys/dev/xen/blkfront/blkfront.c head/sys/i386/i386/support.s head/sys/i386/include/intr_machdep.h head/sys/xen/interface/arch-arm.h head/sys/xen/interface/arch-arm/hvm/save.h head/sys/xen/interface/arch-x86/cpuid.h head/sys/xen/interface/arch-x86/hvm/save.h head/sys/xen/interface/arch-x86/xen-mca.h head/sys/xen/interface/arch-x86/xen-x86_32.h head/sys/xen/interface/arch-x86/xen-x86_64.h head/sys/xen/interface/arch-x86/xen.h head/sys/xen/interface/callback.h head/sys/xen/interface/dom0_ops.h head/sys/xen/interface/domctl.h head/sys/xen/interface/elfnote.h head/sys/xen/interface/event_channel.h head/sys/xen/interface/features.h head/sys/xen/interface/grant_table.h head/sys/xen/interface/hvm/e820.h head/sys/xen/interface/hvm/hvm_info_table.h head/sys/xen/interface/hvm/hvm_op.h head/sys/xen/interface/hvm/ioreq.h head/sys/xen/interface/hvm/params.h head/sys/xen/interface/hvm/save.h head/sys/xen/interface/io/blkif.h head/sys/xen/interface/io/console.h head/sys/xen/interface/io/fbif.h head/sys/xen/interface/io/kbdif.h head/sys/xen/interface/io/libxenvchan.h head/sys/xen/interface/io/netif.h head/sys/xen/interface/io/pciif.h head/sys/xen/interface/io/protocols.h head/sys/xen/interface/io/ring.h head/sys/xen/interface/io/tpmif.h head/sys/xen/interface/io/usbif.h head/sys/xen/interface/io/vscsiif.h head/sys/xen/interface/io/xenbus.h head/sys/xen/interface/io/xs_wire.h head/sys/xen/interface/kexec.h head/sys/xen/interface/memory.h head/sys/xen/interface/nmi.h head/sys/xen/interface/physdev.h head/sys/xen/interface/platform.h head/sys/xen/interface/sched.h head/sys/xen/interface/sysctl.h head/sys/xen/interface/tmem.h head/sys/xen/interface/trace.h head/sys/xen/interface/vcpu.h head/sys/xen/interface/version.h head/sys/xen/interface/xen-compat.h head/sys/xen/interface/xen.h head/sys/xen/interface/xenoprof.h head/sys/xen/interface/xsm/flask_op.h head/sys/xen/xen_intr.h Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/amd64/amd64/support.S Tue Oct 6 11:29:44 2015 (r288917) @@ -33,7 +33,6 @@ #include "opt_ddb.h" #include -#include #include #include "assym.s" Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/amd64/include/intr_machdep.h Tue Oct 6 11:29:44 2015 (r288917) @@ -53,6 +53,7 @@ #define FIRST_MSI_INT 256 #ifdef XENHVM #include +#include #define NUM_EVTCHN_INTS NR_EVENT_CHANNELS #define FIRST_EVTCHN_INT \ (FIRST_MSI_INT + NUM_MSI_INTS) Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/dev/xen/blkfront/blkfront.c Tue Oct 6 11:29:44 2015 (r288917) @@ -162,7 +162,7 @@ xbd_free_command(struct xbd_command *cm) static void xbd_mksegarray(bus_dma_segment_t *segs, int nsegs, grant_ref_t * gref_head, int otherend_id, int readonly, - grant_ref_t * sg_ref, blkif_request_segment_t * sg) + grant_ref_t * sg_ref, struct blkif_request_segment *sg) { struct blkif_request_segment *last_block_sg = sg + nsegs; vm_paddr_t buffer_ma; Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/i386/i386/support.s Tue Oct 6 11:29:44 2015 (r288917) @@ -33,7 +33,6 @@ #include #include -#include #include #include Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/i386/include/intr_machdep.h Tue Oct 6 11:29:44 2015 (r288917) @@ -53,6 +53,7 @@ #define FIRST_MSI_INT 256 #ifdef XENHVM #include +#include #define NUM_EVTCHN_INTS NR_EVENT_CHANNELS #define FIRST_EVTCHN_INT \ (FIRST_MSI_INT + NUM_MSI_INTS) Modified: head/sys/xen/interface/arch-arm.h ============================================================================== --- head/sys/xen/interface/arch-arm.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-arm.h Tue Oct 6 11:29:44 2015 (r288917) @@ -27,93 +27,253 @@ #ifndef __XEN_PUBLIC_ARCH_ARM_H__ #define __XEN_PUBLIC_ARCH_ARM_H__ -/* hypercall calling convention - * ---------------------------- +/* + * `incontents 50 arm_abi Hypercall Calling Convention * * A hypercall is issued using the ARM HVC instruction. * * A hypercall can take up to 5 arguments. These are passed in - * registers, the first argument in r0, the second argument in r1, the - * third in r2, the forth in r3 and the fifth in r4. + * registers, the first argument in x0/r0 (for arm64/arm32 guests + * respectively irrespective of whether the underlying hypervisor is + * 32- or 64-bit), the second argument in x1/r1, the third in x2/r2, + * the forth in x3/r3 and the fifth in x4/r4. * - * The hypercall number is passed in r12. + * The hypercall number is passed in r12 (arm) or x16 (arm64). In both + * cases the relevant ARM procedure calling convention specifies this + * is an inter-procedure-call scratch register (e.g. for use in linker + * stubs). This use does not conflict with use during a hypercall. * * The HVC ISS must contain a Xen specific TAG: XEN_HYPERCALL_TAG. * - * The return value is in r0. + * The return value is in x0/r0. + * + * The hypercall will clobber x16/r12 and the argument registers used + * by that hypercall (except r0 which is the return value) i.e. in + * addition to x16/r12 a 2 argument hypercall will clobber x1/r1 and a + * 4 argument hypercall will clobber x1/r1, x2/r2 and x3/r3. + * + * Parameter structs passed to hypercalls are laid out according to + * the Procedure Call Standard for the ARM Architecture (AAPCS, AKA + * EABI) and Procedure Call Standard for the ARM 64-bit Architecture + * (AAPCS64). Where there is a conflict the 64-bit standard should be + * used regardless of guest type. Structures which are passed as + * hypercall arguments are always little endian. + * + * All memory which is shared with other entities in the system + * (including the hypervisor and other guests) must reside in memory + * which is mapped as Normal Inner-cacheable. This applies to: + * - hypercall arguments passed via a pointer to guest memory. + * - memory shared via the grant table mechanism (including PV I/O + * rings etc). + * - memory shared with the hypervisor (struct shared_info, struct + * vcpu_info, the grant table, etc). + * + * Any Inner cache allocation strategy (Write-Back, Write-Through etc) + * is acceptable. There is no restriction on the Outer-cacheability. + */ + +/* + * `incontents 55 arm_hcall Supported Hypercalls + * + * Xen on ARM makes extensive use of hardware facilities and therefore + * only a subset of the potential hypercalls are required. + * + * Since ARM uses second stage paging any machine/physical addresses + * passed to hypercalls are Guest Physical Addresses (Intermediate + * Physical Addresses) unless otherwise noted. + * + * The following hypercalls (and sub operations) are supported on the + * ARM platform. Other hypercalls should be considered + * unavailable/unsupported. + * + * HYPERVISOR_memory_op + * All generic sub-operations + * + * HYPERVISOR_domctl + * All generic sub-operations, with the exception of: + * * XEN_DOMCTL_irq_permission (not yet implemented) + * + * HYPERVISOR_sched_op + * All generic sub-operations, with the exception of: + * * SCHEDOP_block -- prefer wfi hardware instruction + * + * HYPERVISOR_console_io + * All generic sub-operations + * + * HYPERVISOR_xen_version + * All generic sub-operations + * + * HYPERVISOR_event_channel_op + * All generic sub-operations + * + * HYPERVISOR_physdev_op + * No sub-operations are currenty supported + * + * HYPERVISOR_sysctl + * All generic sub-operations, with the exception of: + * * XEN_SYSCTL_page_offline_op + * * XEN_SYSCTL_get_pmstat + * * XEN_SYSCTL_pm_op + * + * HYPERVISOR_hvm_op + * Exactly these sub-operations are supported: + * * HVMOP_set_param + * * HVMOP_get_param + * + * HYPERVISOR_grant_table_op + * All generic sub-operations + * + * HYPERVISOR_vcpu_op + * Exactly these sub-operations are supported: + * * VCPUOP_register_vcpu_info + * * VCPUOP_register_runstate_memory_area * - * The hypercall will clobber r12 and the argument registers used by - * that hypercall (except r0 which is the return value) i.e. a 2 - * argument hypercall will clobber r1 and a 4 argument hypercall will - * clobber r1, r2 and r3. * + * Other notes on the ARM ABI: + * + * - struct start_info is not exported to ARM guests. + * + * - struct shared_info is mapped by ARM guests using the + * HYPERVISOR_memory_op sub-op XENMEM_add_to_physmap, passing + * XENMAPSPACE_shared_info as space parameter. + * + * - All the per-cpu struct vcpu_info are mapped by ARM guests using the + * HYPERVISOR_vcpu_op sub-op VCPUOP_register_vcpu_info, including cpu0 + * struct vcpu_info. + * + * - The grant table is mapped using the HYPERVISOR_memory_op sub-op + * XENMEM_add_to_physmap, passing XENMAPSPACE_grant_table as space + * parameter. The memory range specified under the Xen compatible + * hypervisor node on device tree can be used as target gpfn for the + * mapping. + * + * - Xenstore is initialized by using the two hvm_params + * HVM_PARAM_STORE_PFN and HVM_PARAM_STORE_EVTCHN. They can be read + * with the HYPERVISOR_hvm_op sub-op HVMOP_get_param. + * + * - The paravirtualized console is initialized by using the two + * hvm_params HVM_PARAM_CONSOLE_PFN and HVM_PARAM_CONSOLE_EVTCHN. They + * can be read with the HYPERVISOR_hvm_op sub-op HVMOP_get_param. + * + * - Event channel notifications are delivered using the percpu GIC + * interrupt specified under the Xen compatible hypervisor node on + * device tree. + * + * - The device tree Xen compatible node is fully described under Linux + * at Documentation/devicetree/bindings/arm/xen.txt. */ #define XEN_HYPERCALL_TAG 0XEA1 +#define int64_aligned_t int64_t __attribute__((aligned(8))) +#define uint64_aligned_t uint64_t __attribute__((aligned(8))) #ifndef __ASSEMBLY__ -#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \ - typedef struct { type *p; } __guest_handle_ ## name +#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \ + typedef union { type *p; unsigned long q; } \ + __guest_handle_ ## name; \ + typedef union { type *p; uint64_aligned_t q; } \ + __guest_handle_64_ ## name; +/* + * XEN_GUEST_HANDLE represents a guest pointer, when passed as a field + * in a struct in memory. On ARM is always 8 bytes sizes and 8 bytes + * aligned. + * XEN_GUEST_HANDLE_PARAM represents a guest pointer, when passed as an + * hypercall argument. It is 4 bytes on aarch32 and 8 bytes on aarch64. + */ #define __DEFINE_XEN_GUEST_HANDLE(name, type) \ ___DEFINE_XEN_GUEST_HANDLE(name, type); \ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type) #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) -#define __XEN_GUEST_HANDLE(name) __guest_handle_ ## name +#define __XEN_GUEST_HANDLE(name) __guest_handle_64_ ## name #define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name) -#define set_xen_guest_handle_raw(hnd, val) do { (hnd).p = val; } while (0) +#define XEN_GUEST_HANDLE_PARAM(name) __guest_handle_ ## name +#define set_xen_guest_handle_raw(hnd, val) \ + do { \ + typeof(&(hnd)) _sxghr_tmp = &(hnd); \ + _sxghr_tmp->q = 0; \ + _sxghr_tmp->p = val; \ + } while ( 0 ) #ifdef __XEN_TOOLS__ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) #endif #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val) -struct cpu_user_regs -{ - uint32_t r0; - uint32_t r1; - uint32_t r2; - uint32_t r3; - uint32_t r4; - uint32_t r5; - uint32_t r6; - uint32_t r7; - uint32_t r8; - uint32_t r9; - uint32_t r10; - union { - uint32_t r11; - uint32_t fp; - }; - uint32_t r12; +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +/* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */ +# define __DECL_REG(n64, n32) union { \ + uint64_t n64; \ + uint32_t n32; \ + } +#else +/* Non-gcc sources must always use the proper 64-bit name (e.g., x0). */ +#define __DECL_REG(n64, n32) uint64_t n64 +#endif - uint32_t sp; /* r13 - SP: Valid for Hyp. frames only, o/w banked (see below) */ +struct vcpu_guest_core_regs +{ + /* Aarch64 Aarch32 */ + __DECL_REG(x0, r0_usr); + __DECL_REG(x1, r1_usr); + __DECL_REG(x2, r2_usr); + __DECL_REG(x3, r3_usr); + __DECL_REG(x4, r4_usr); + __DECL_REG(x5, r5_usr); + __DECL_REG(x6, r6_usr); + __DECL_REG(x7, r7_usr); + __DECL_REG(x8, r8_usr); + __DECL_REG(x9, r9_usr); + __DECL_REG(x10, r10_usr); + __DECL_REG(x11, r11_usr); + __DECL_REG(x12, r12_usr); + + __DECL_REG(x13, sp_usr); + __DECL_REG(x14, lr_usr); + + __DECL_REG(x15, __unused_sp_hyp); + + __DECL_REG(x16, lr_irq); + __DECL_REG(x17, sp_irq); + + __DECL_REG(x18, lr_svc); + __DECL_REG(x19, sp_svc); + + __DECL_REG(x20, lr_abt); + __DECL_REG(x21, sp_abt); + + __DECL_REG(x22, lr_und); + __DECL_REG(x23, sp_und); + + __DECL_REG(x24, r8_fiq); + __DECL_REG(x25, r9_fiq); + __DECL_REG(x26, r10_fiq); + __DECL_REG(x27, r11_fiq); + __DECL_REG(x28, r12_fiq); + + __DECL_REG(x29, sp_fiq); + __DECL_REG(x30, lr_fiq); + + /* Return address and mode */ + __DECL_REG(pc64, pc32); /* ELR_EL2 */ + uint32_t cpsr; /* SPSR_EL2 */ - /* r14 - LR: is the same physical register as LR_usr */ union { - uint32_t lr; /* r14 - LR: Valid for Hyp. Same physical register as lr_usr. */ - uint32_t lr_usr; + uint32_t spsr_el1; /* AArch64 */ + uint32_t spsr_svc; /* AArch32 */ }; - uint32_t pc; /* Return IP */ - uint32_t cpsr; /* Return mode */ - uint32_t pad0; /* Doubleword-align the kernel half of the frame */ - - /* Outer guest frame only from here on... */ - - uint32_t r8_fiq, r9_fiq, r10_fiq, r11_fiq, r12_fiq; + /* AArch32 guests only */ + uint32_t spsr_fiq, spsr_irq, spsr_und, spsr_abt; - uint32_t sp_usr; /* LR_usr is the same register as LR, see above */ - - uint32_t sp_svc, sp_abt, sp_und, sp_irq, sp_fiq; - uint32_t lr_svc, lr_abt, lr_und, lr_irq, lr_fiq; - - uint32_t spsr_svc, spsr_abt, spsr_und, spsr_irq, spsr_fiq; - - uint32_t pad1; /* Doubleword-align the user half of the frame */ + /* AArch64 guests only */ + uint64_t sp_el0; + uint64_t sp_el1, elr_el1; }; -typedef struct cpu_user_regs cpu_user_regs_t; -DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t); +typedef struct vcpu_guest_core_regs vcpu_guest_core_regs_t; +DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t); + +#undef __DECL_REG typedef uint64_t xen_pfn_t; #define PRI_xen_pfn PRIx64 @@ -122,30 +282,77 @@ typedef uint64_t xen_pfn_t; /* Only one. All other VCPUS must use VCPUOP_register_vcpu_info */ #define XEN_LEGACY_MAX_VCPUS 1 -typedef uint32_t xen_ulong_t; +typedef uint64_t xen_ulong_t; +#define PRI_xen_ulong PRIx64 +#if defined(__XEN__) || defined(__XEN_TOOLS__) struct vcpu_guest_context { - struct cpu_user_regs user_regs; /* User-level CPU registers */ +#define _VGCF_online 0 +#define VGCF_online (1<<_VGCF_online) + uint32_t flags; /* VGCF_* */ + + struct vcpu_guest_core_regs user_regs; /* Core CPU registers */ uint32_t sctlr; - uint32_t ttbr0, ttbr1, ttbcr; + uint64_t ttbcr, ttbr0, ttbr1; }; typedef struct vcpu_guest_context vcpu_guest_context_t; DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); -struct arch_vcpu_info { }; +/* + * struct xen_arch_domainconfig's ABI is covered by + * XEN_DOMCTL_INTERFACE_VERSION. + */ +#define XEN_DOMCTL_CONFIG_GIC_NATIVE 0 +#define XEN_DOMCTL_CONFIG_GIC_V2 1 +#define XEN_DOMCTL_CONFIG_GIC_V3 2 +struct xen_arch_domainconfig { + /* IN/OUT */ + uint8_t gic_version; + /* IN */ + uint32_t nr_spis; + /* + * OUT + * Based on the property clock-frequency in the DT timer node. + * The property may be present when the bootloader/firmware doesn't + * set correctly CNTFRQ which hold the timer frequency. + * + * As it's not possible to trap this register, we have to replicate + * the value in the guest DT. + * + * = 0 => property not present + * > 0 => Value of the property + * + */ + uint32_t clock_frequency; +}; +#endif /* __XEN__ || __XEN_TOOLS__ */ + +struct arch_vcpu_info { +}; typedef struct arch_vcpu_info arch_vcpu_info_t; -struct arch_shared_info { }; +struct arch_shared_info { +}; typedef struct arch_shared_info arch_shared_info_t; typedef uint64_t xen_callback_t; -#endif /* ifndef __ASSEMBLY __ */ +#endif + +#if defined(__XEN__) || defined(__XEN_TOOLS__) + +/* PSR bits (CPSR, SPSR) */ -/* PSR bits (CPSR, SPSR)*/ +#define PSR_THUMB (1<<5) /* Thumb Mode enable */ +#define PSR_FIQ_MASK (1<<6) /* Fast Interrupt mask */ +#define PSR_IRQ_MASK (1<<7) /* Interrupt mask */ +#define PSR_ABT_MASK (1<<8) /* Asynchronous Abort mask */ +#define PSR_BIG_ENDIAN (1<<9) /* arm32: Big Endian Mode */ +#define PSR_DBG_MASK (1<<9) /* arm64: Debug Exception mask */ +#define PSR_IT_MASK (0x0600fc00) /* Thumb If-Then Mask */ +#define PSR_JAZELLE (1<<24) /* Jazelle Mode */ -/* 0-4: Mode */ -#define PSR_MODE_MASK 0x1f +/* 32 bit modes */ #define PSR_MODE_USR 0x10 #define PSR_MODE_FIQ 0x11 #define PSR_MODE_IRQ 0x12 @@ -156,19 +363,102 @@ typedef uint64_t xen_callback_t; #define PSR_MODE_UND 0x1b #define PSR_MODE_SYS 0x1f -#define PSR_THUMB (1<<5) /* Thumb Mode enable */ -#define PSR_FIQ_MASK (1<<6) /* Fast Interrupt mask */ -#define PSR_IRQ_MASK (1<<7) /* Interrupt mask */ -#define PSR_ABT_MASK (1<<8) /* Asynchronous Abort mask */ -#define PSR_BIG_ENDIAN (1<<9) /* Big Endian Mode */ -#define PSR_JAZELLE (1<<24) /* Jazelle Mode */ +/* 64 bit modes */ +#define PSR_MODE_BIT 0x10 /* Set iff AArch32 */ +#define PSR_MODE_EL3h 0x0d +#define PSR_MODE_EL3t 0x0c +#define PSR_MODE_EL2h 0x09 +#define PSR_MODE_EL2t 0x08 +#define PSR_MODE_EL1h 0x05 +#define PSR_MODE_EL1t 0x04 +#define PSR_MODE_EL0t 0x00 + +#define PSR_GUEST32_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC) +#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h) + +#define SCTLR_GUEST_INIT 0x00c50078 + +/* + * Virtual machine platform (memory layout, interrupts) + * + * These are defined for consistency between the tools and the + * hypervisor. Guests must not rely on these hardcoded values but + * should instead use the FDT. + */ + +/* Physical Address Space */ + +/* + * vGIC mappings: Only one set of mapping is used by the guest. + * Therefore they can overlap. + */ + +/* vGIC v2 mappings */ +#define GUEST_GICD_BASE 0x03001000ULL +#define GUEST_GICD_SIZE 0x00001000ULL +#define GUEST_GICC_BASE 0x03002000ULL +#define GUEST_GICC_SIZE 0x00000100ULL + +/* vGIC v3 mappings */ +#define GUEST_GICV3_GICD_BASE 0x03001000ULL +#define GUEST_GICV3_GICD_SIZE 0x00010000ULL + +#define GUEST_GICV3_RDIST_STRIDE 0x20000ULL +#define GUEST_GICV3_RDIST_REGIONS 1 + +#define GUEST_GICV3_GICR0_BASE 0x03020000ULL /* vCPU0 - vCPU127 */ +#define GUEST_GICV3_GICR0_SIZE 0x01000000ULL + +/* + * 16MB == 4096 pages reserved for guest to use as a region to map its + * grant table in. + */ +#define GUEST_GNTTAB_BASE 0x38000000ULL +#define GUEST_GNTTAB_SIZE 0x01000000ULL + +#define GUEST_MAGIC_BASE 0x39000000ULL +#define GUEST_MAGIC_SIZE 0x01000000ULL + +#define GUEST_RAM_BANKS 2 + +#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ +#define GUEST_RAM0_SIZE 0xc0000000ULL + +#define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */ +#define GUEST_RAM1_SIZE 0xfe00000000ULL + +#define GUEST_RAM_BASE GUEST_RAM0_BASE /* Lowest RAM address */ +/* Largest amount of actual RAM, not including holes */ +#define GUEST_RAM_MAX (GUEST_RAM0_SIZE + GUEST_RAM1_SIZE) +/* Suitable for e.g. const uint64_t ramfoo[] = GUEST_RAM_BANK_FOOS; */ +#define GUEST_RAM_BANK_BASES { GUEST_RAM0_BASE, GUEST_RAM1_BASE } +#define GUEST_RAM_BANK_SIZES { GUEST_RAM0_SIZE, GUEST_RAM1_SIZE } + +/* Interrupts */ +#define GUEST_TIMER_VIRT_PPI 27 +#define GUEST_TIMER_PHYS_S_PPI 29 +#define GUEST_TIMER_PHYS_NS_PPI 30 +#define GUEST_EVTCHN_PPI 31 + +/* PSCI functions */ +#define PSCI_cpu_suspend 0 +#define PSCI_cpu_off 1 +#define PSCI_cpu_on 2 +#define PSCI_migrate 3 + +#endif + +#ifndef __ASSEMBLY__ +/* Stub definition of PMU structure */ +typedef struct xen_pmu_arch { uint8_t dummy; } xen_pmu_arch_t; +#endif #endif /* __XEN_PUBLIC_ARCH_ARM_H__ */ /* * Local variables: * mode: C - * c-set-style: "BSD" + * c-file-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil Modified: head/sys/xen/interface/arch-arm/hvm/save.h ============================================================================== --- head/sys/xen/interface/arch-arm/hvm/save.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-arm/hvm/save.h Tue Oct 6 11:29:44 2015 (r288917) @@ -31,7 +31,7 @@ /* * Local variables: * mode: C - * c-set-style: "BSD" + * c-file-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil Modified: head/sys/xen/interface/arch-x86/cpuid.h ============================================================================== --- head/sys/xen/interface/arch-x86/cpuid.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/cpuid.h Tue Oct 6 11:29:44 2015 (r288917) @@ -30,12 +30,20 @@ #ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__ #define __XEN_PUBLIC_ARCH_X86_CPUID_H__ -/* Xen identification leaves start at 0x40000000. */ +/* + * For compatibility with other hypervisor interfaces, the Xen cpuid leaves + * can be found at the first otherwise unused 0x100 aligned boundary starting + * from 0x40000000. + * + * e.g If viridian extensions are enabled for an HVM domain, the Xen cpuid + * leaves will start at 0x40000100 + */ + #define XEN_CPUID_FIRST_LEAF 0x40000000 #define XEN_CPUID_LEAF(i) (XEN_CPUID_FIRST_LEAF + (i)) /* - * Leaf 1 (0x40000000) + * Leaf 1 (0x40000x00) * EAX: Largest Xen-information leaf. All leaves up to an including @EAX * are supported by the Xen host. * EBX-EDX: "XenVMMXenVMM" signature, allowing positive identification @@ -46,14 +54,14 @@ #define XEN_CPUID_SIGNATURE_EDX 0x4d4d566e /* "nVMM" */ /* - * Leaf 2 (0x40000001) + * Leaf 2 (0x40000x01) * EAX[31:16]: Xen major version. * EAX[15: 0]: Xen minor version. * EBX-EDX: Reserved (currently all zeroes). */ /* - * Leaf 3 (0x40000002) + * Leaf 3 (0x40000x02) * EAX: Number of hypercall transfer pages. This register is always guaranteed * to specify one hypercall page. * EBX: Base address of Xen-specific MSRs. @@ -65,4 +73,18 @@ #define _XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD 0 #define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0) +/* + * Leaf 5 (0x40000x04) + * HVM-specific features + * EAX: Features + * EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) + */ +#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */ +#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */ +/* Memory mapped from other domains has valid IOMMU entries */ +#define XEN_HVM_CPUID_IOMMU_MAPPINGS (1u << 2) +#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */ + +#define XEN_CPUID_MAX_NUM_LEAVES 4 + #endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */ Modified: head/sys/xen/interface/arch-x86/hvm/save.h ============================================================================== --- head/sys/xen/interface/arch-x86/hvm/save.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/hvm/save.h Tue Oct 6 11:29:44 2015 (r288917) @@ -269,15 +269,18 @@ struct hvm_hw_cpu_compat { }; static inline int _hvm_hw_fix_cpu(void *h) { - struct hvm_hw_cpu *new=h; - struct hvm_hw_cpu_compat *old=h; + + union hvm_hw_cpu_union { + struct hvm_hw_cpu nat; + struct hvm_hw_cpu_compat cmp; + } *ucpu = (union hvm_hw_cpu_union *)h; /* If we copy from the end backwards, we should * be able to do the modification in-place */ - new->error_code=old->error_code; - new->pending_event=old->pending_event; - new->tsc=old->tsc; - new->msr_tsc_aux=0; + ucpu->nat.error_code = ucpu->cmp.error_code; + ucpu->nat.pending_event = ucpu->cmp.pending_event; + ucpu->nat.tsc = ucpu->cmp.tsc; + ucpu->nat.msr_tsc_aux = 0; return 0; } @@ -541,7 +544,7 @@ DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct h */ struct hvm_hw_cpu_xsave { - uint64_t xfeature_mask; + uint64_t xfeature_mask; /* Ignored */ uint64_t xcr0; /* Updated by XSETBV */ uint64_t xcr0_accum; /* Updated by XSETBV */ struct { @@ -565,6 +568,8 @@ struct hvm_hw_cpu_xsave { struct hvm_viridian_domain_context { uint64_t hypercall_gpa; uint64_t guest_os_id; + uint64_t time_ref_count; + uint64_t reference_tsc; }; DECLARE_HVM_SAVE_TYPE(VIRIDIAN_DOMAIN, 15, struct hvm_viridian_domain_context); @@ -577,13 +582,49 @@ DECLARE_HVM_SAVE_TYPE(VIRIDIAN_VCPU, 17, struct hvm_vmce_vcpu { uint64_t caps; + uint64_t mci_ctl2_bank0; + uint64_t mci_ctl2_bank1; }; DECLARE_HVM_SAVE_TYPE(VMCE_VCPU, 18, struct hvm_vmce_vcpu); +struct hvm_tsc_adjust { + uint64_t tsc_adjust; +}; + +DECLARE_HVM_SAVE_TYPE(TSC_ADJUST, 19, struct hvm_tsc_adjust); + + +struct hvm_msr { + uint32_t count; + struct hvm_one_msr { + uint32_t index; + uint32_t _rsvd; + uint64_t val; +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + } msr[]; +#elif defined(__GNUC__) + } msr[0]; +#else + } msr[1 /* variable size */]; +#endif +}; + +#define CPU_MSR_CODE 20 + /* * Largest type-code in use */ -#define HVM_SAVE_CODE_MAX 18 +#define HVM_SAVE_CODE_MAX 20 #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ Added: head/sys/xen/interface/arch-x86/pmu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/xen/interface/arch-x86/pmu.h Tue Oct 6 11:29:44 2015 (r288917) @@ -0,0 +1,167 @@ +/* + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. + */ + +#ifndef __XEN_PUBLIC_ARCH_X86_PMU_H__ +#define __XEN_PUBLIC_ARCH_X86_PMU_H__ + +/* x86-specific PMU definitions */ + +/* AMD PMU registers and structures */ +struct xen_pmu_amd_ctxt { + /* + * Offsets to counter and control MSRs (relative to xen_pmu_arch.c.amd). + * For PV(H) guests these fields are RO. + */ + uint32_t counters; + uint32_t ctrls; + + /* Counter MSRs */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + uint64_t regs[]; +#elif defined(__GNUC__) + uint64_t regs[0]; +#endif +}; +typedef struct xen_pmu_amd_ctxt xen_pmu_amd_ctxt_t; +DEFINE_XEN_GUEST_HANDLE(xen_pmu_amd_ctxt_t); + +/* Intel PMU registers and structures */ +struct xen_pmu_cntr_pair { + uint64_t counter; + uint64_t control; +}; +typedef struct xen_pmu_cntr_pair xen_pmu_cntr_pair_t; +DEFINE_XEN_GUEST_HANDLE(xen_pmu_cntr_pair_t); + +struct xen_pmu_intel_ctxt { + /* + * Offsets to fixed and architectural counter MSRs (relative to + * xen_pmu_arch.c.intel). + * For PV(H) guests these fields are RO. + */ + uint32_t fixed_counters; + uint32_t arch_counters; + + /* PMU registers */ + uint64_t global_ctrl; + uint64_t global_ovf_ctrl; + uint64_t global_status; + uint64_t fixed_ctrl; + uint64_t ds_area; + uint64_t pebs_enable; + uint64_t debugctl; + + /* Fixed and architectural counter MSRs */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + uint64_t regs[]; +#elif defined(__GNUC__) + uint64_t regs[0]; +#endif +}; +typedef struct xen_pmu_intel_ctxt xen_pmu_intel_ctxt_t; +DEFINE_XEN_GUEST_HANDLE(xen_pmu_intel_ctxt_t); + +/* Sampled domain's registers */ +struct xen_pmu_regs { + uint64_t ip; + uint64_t sp; + uint64_t flags; + uint16_t cs; + uint16_t ss; + uint8_t cpl; + uint8_t pad[3]; +}; +typedef struct xen_pmu_regs xen_pmu_regs_t; +DEFINE_XEN_GUEST_HANDLE(xen_pmu_regs_t); + +/* PMU flags */ +#define PMU_CACHED (1<<0) /* PMU MSRs are cached in the context */ +#define PMU_SAMPLE_USER (1<<1) /* Sample is from user or kernel mode */ +#define PMU_SAMPLE_REAL (1<<2) /* Sample is from realmode */ +#define PMU_SAMPLE_PV (1<<3) /* Sample from a PV guest */ + +/* + * Architecture-specific information describing state of the processor at + * the time of PMU interrupt. + * Fields of this structure marked as RW for guest should only be written by + * the guest when PMU_CACHED bit in pmu_flags is set (which is done by the + * hypervisor during PMU interrupt). Hypervisor will read updated data in + * XENPMU_flush hypercall and clear PMU_CACHED bit. + */ +struct xen_pmu_arch { + union { + /* + * Processor's registers at the time of interrupt. + * WO for hypervisor, RO for guests. + */ + struct xen_pmu_regs regs; + /* Padding for adding new registers to xen_pmu_regs in the future */ +#define XENPMU_REGS_PAD_SZ 64 + uint8_t pad[XENPMU_REGS_PAD_SZ]; + } r; + + /* WO for hypervisor, RO for guest */ + uint64_t pmu_flags; + + /* + * APIC LVTPC register. + * RW for both hypervisor and guest. + * Only APIC_LVT_MASKED bit is loaded by the hypervisor into hardware + * during XENPMU_flush or XENPMU_lvtpc_set. + */ + union { + uint32_t lapic_lvtpc; + uint64_t pad; + } l; + + /* + * Vendor-specific PMU registers. + * RW for both hypervisor and guest (see exceptions above). + * Guest's updates to this field are verified and then loaded by the + * hypervisor into hardware during XENPMU_flush + */ + union { + struct xen_pmu_amd_ctxt amd; + struct xen_pmu_intel_ctxt intel; + + /* + * Padding for contexts (fixed parts only, does not include MSR banks + * that are specified by offsets) + */ +#define XENPMU_CTXT_PAD_SZ 128 + uint8_t pad[XENPMU_CTXT_PAD_SZ]; + } c; +}; +typedef struct xen_pmu_arch xen_pmu_arch_t; +DEFINE_XEN_GUEST_HANDLE(xen_pmu_arch_t); + +#endif /* __XEN_PUBLIC_ARCH_X86_PMU_H__ */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ + Modified: head/sys/xen/interface/arch-x86/xen-mca.h ============================================================================== --- head/sys/xen/interface/arch-x86/xen-mca.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/xen-mca.h Tue Oct 6 11:29:44 2015 (r288917) @@ -414,7 +414,7 @@ struct xen_mc_mceinject { struct xen_mc_inject_v2 { uint32_t flags; - struct xenctl_cpumap cpumap; + struct xenctl_bitmap cpumap; }; #endif Modified: head/sys/xen/interface/arch-x86/xen-x86_32.h ============================================================================== --- head/sys/xen/interface/arch-x86/xen-x86_32.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/xen-x86_32.h Tue Oct 6 11:29:44 2015 (r288917) @@ -104,6 +104,7 @@ do { if ( sizeof(hnd) == 8 ) *(uint64_t *)&(hnd) = 0; \ (hnd).p = val; \ } while ( 0 ) +#define int64_aligned_t int64_t __attribute__((aligned(8))) #define uint64_aligned_t uint64_t __attribute__((aligned(8))) #define __XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name #define XEN_GUEST_HANDLE_64(name) __XEN_GUEST_HANDLE_64(name) @@ -163,7 +164,7 @@ typedef struct xen_callback xen_callback /* * Local variables: * mode: C - * c-set-style: "BSD" + * c-file-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil Modified: head/sys/xen/interface/arch-x86/xen-x86_64.h ============================================================================== --- head/sys/xen/interface/arch-x86/xen-x86_64.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/xen-x86_64.h Tue Oct 6 11:29:44 2015 (r288917) @@ -194,7 +194,7 @@ typedef unsigned long xen_callback_t; /* * Local variables: * mode: C - * c-set-style: "BSD" + * c-file-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil Modified: head/sys/xen/interface/arch-x86/xen.h ============================================================================== --- head/sys/xen/interface/arch-x86/xen.h Tue Oct 6 09:43:49 2015 (r288916) +++ head/sys/xen/interface/arch-x86/xen.h Tue Oct 6 11:29:44 2015 (r288917) @@ -38,12 +38,21 @@ typedef type * __guest_handle_ ## name #endif +/* + * XEN_GUEST_HANDLE represents a guest pointer, when passed as a field + * in a struct in memory. + * XEN_GUEST_HANDLE_PARAM represent a guest pointer, when passed as an + * hypercall argument. + * XEN_GUEST_HANDLE_PARAM and XEN_GUEST_HANDLE are the same on X86 but + * they might not be on other architectures. + */ #define __DEFINE_XEN_GUEST_HANDLE(name, type) \ ___DEFINE_XEN_GUEST_HANDLE(name, type); \ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type) #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define __XEN_GUEST_HANDLE(name) __guest_handle_ ## name #define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name) +#define XEN_GUEST_HANDLE_PARAM(name) XEN_GUEST_HANDLE(name) #define set_xen_guest_handle_raw(hnd, val) do { (hnd).p = val; } while (0) #ifdef __XEN_TOOLS__ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) @@ -61,8 +70,12 @@ typedef unsigned long xen_pfn_t; #define PRI_xen_pfn "lx" #endif +#define XEN_HAVE_PV_GUEST_ENTRY 1 + +#define XEN_HAVE_PV_UPCALL_MASK 1 + /* - * SEGMENT DESCRIPTOR TABLES + * `incontents 200 segdesc Segment Descriptor Tables */ /* * ` enum neg_errnoval @@ -74,17 +87,31 @@ typedef unsigned long xen_pfn_t; * start of the GDT because some stupid OSes export hard-coded selector values * in their ABI. These hard-coded values are always near the start of the GDT, * so Xen places itself out of the way, at the far end of the GDT. + * + * NB The LDT is set using the MMUEXT_SET_LDT op of HYPERVISOR_mmuext_op */ #define FIRST_RESERVED_GDT_PAGE 14 #define FIRST_RESERVED_GDT_BYTE (FIRST_RESERVED_GDT_PAGE * 4096) #define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8) + +/* + * ` enum neg_errnoval + * ` HYPERVISOR_update_descriptor(u64 pa, u64 desc); + * ` + * ` @pa The machine physical address of the descriptor to + * ` update. Must be either a descriptor page or writable. + * ` @desc The descriptor value to update, in the same format as a + * ` native descriptor table entry. + */ + /* Maximum number of virtual CPUs in legacy multi-processor guests. */ #define XEN_LEGACY_MAX_VCPUS 32 #ifndef __ASSEMBLY__ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 6 13:10:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F64C9B6030; Tue, 6 Oct 2015 13:10:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03E35830; Tue, 6 Oct 2015 13:10:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96DAMRX073970; Tue, 6 Oct 2015 13:10:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96DAMZE073968; Tue, 6 Oct 2015 13:10:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510061310.t96DAMZE073968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 6 Oct 2015 13:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288918 - stable/10/sys/netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 13:10:23 -0000 Author: mav Date: Tue Oct 6 13:10:21 2015 New Revision: 288918 URL: https://svnweb.freebsd.org/changeset/base/288918 Log: MFC r287654: Add support for PPP-Max-Payload PPPoE tag (RFC4638). Submitted by: Dmitry Luhtionov Modified: stable/10/sys/netgraph/ng_pppoe.c stable/10/sys/netgraph/ng_pppoe.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netgraph/ng_pppoe.c ============================================================================== --- stable/10/sys/netgraph/ng_pppoe.c Tue Oct 6 11:29:44 2015 (r288917) +++ stable/10/sys/netgraph/ng_pppoe.c Tue Oct 6 13:10:21 2015 (r288918) @@ -168,6 +168,13 @@ static const struct ng_cmdlist ng_pppoe_ &ng_parse_enaddr_type, NULL }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SETMAXP, + "setmaxp", + &ng_parse_uint16_type, + NULL + }, { 0 } }; @@ -262,6 +269,7 @@ struct PPPoE { struct ether_header eh; LIST_HEAD(, sess_con) listeners; struct sess_hash_entry sesshash[SESSHASHSIZE]; + struct maxptag max_payload; /* PPP-Max-Payload (RFC4638) */ }; typedef struct PPPoE *priv_p; @@ -1004,6 +1012,13 @@ ng_pppoe_rcvmsg(node_p node, item_p item bcopy(msg->data, &privp->eh.ether_shost, ETHER_ADDR_LEN); break; + case NGM_PPPOE_SETMAXP: + if (msg->header.arglen != sizeof(uint16_t)) + LEAVE(EINVAL); + privp->max_payload.hdr.tag_type = PTT_MAX_PAYL; + privp->max_payload.hdr.tag_len = htons(sizeof(uint16_t)); + privp->max_payload.data = htons(*((uint16_t *)msg->data)); + break; default: LEAVE(EINVAL); } @@ -1071,6 +1086,8 @@ pppoe_start(sessp sp) init_tags(sp); insert_tag(sp, &uniqtag.hdr); insert_tag(sp, &neg->service.hdr); + if (privp->max_payload.data != 0) + insert_tag(sp, &privp->max_payload.hdr); make_packet(sp); /* * Send packet and prepare to retransmit it after timeout. @@ -1124,6 +1141,28 @@ send_sessionid(sessp sp) return (error); } +static int +send_maxp(sessp sp, const struct pppoe_tag *tag) +{ + int error; + struct ng_mesg *msg; + struct ngpppoe_maxp *maxp; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_SETMAXP, + sizeof(struct ngpppoe_maxp), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + maxp = (struct ngpppoe_maxp *)msg->data; + strncpy(maxp->hook, NG_HOOK_NAME(sp->hook), NG_HOOKSIZ); + maxp->data = ntohs(((const struct maxptag *)tag)->data); + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + /* * Receive data from session hook and do something with it. */ @@ -1464,6 +1503,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item insert_tag(sp, tag); /* return it */ send_acname(sp, tag); } + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && + (privp->max_payload.data != 0)) + insert_tag(sp, tag); /* return it */ insert_tag(sp, &neg->service.hdr); /* Service */ scan_tags(sp, ph); make_packet(sp); @@ -1602,6 +1644,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item m_freem(neg->m); free(sp->neg, M_NETGRAPH_PPPOE); sp->neg = NULL; + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && + (privp->max_payload.data != 0)) + send_maxp(sp, tag); pppoe_send_event(sp, NGM_PPPOE_SUCCESS); break; case PADT_CODE: Modified: stable/10/sys/netgraph/ng_pppoe.h ============================================================================== --- stable/10/sys/netgraph/ng_pppoe.h Tue Oct 6 11:29:44 2015 (r288917) +++ stable/10/sys/netgraph/ng_pppoe.h Tue Oct 6 13:10:21 2015 (r288918) @@ -51,6 +51,7 @@ #define NG_PPPOE_NODE_TYPE "pppoe" #define NGM_PPPOE_COOKIE 1089893072 +#define NGM_PPPOE_SETMAXP_COOKIE 1441624322 #define PPPOE_SERVICE_NAME_SIZE 64 /* for now */ @@ -83,6 +84,7 @@ enum cmd { NGM_PPPOE_SETMODE = 12, /* set to standard or compat modes */ NGM_PPPOE_GETMODE = 13, /* see current mode */ NGM_PPPOE_SETENADDR = 14, /* set Ethernet address */ + NGM_PPPOE_SETMAXP = 15 /* Set PPP-Max-Payload value */ }; /*********************** @@ -147,6 +149,13 @@ struct ngpppoe_sts { { NULL } \ } +/* + * This structure is used to send PPP-Max-Payload value from server to client. + */ +struct ngpppoe_maxp { + char hook[NG_HOOKSIZ]; /* hook associated with event session */ + uint16_t data; +}; /******************************************************************** * Constants and definitions specific to pppoe @@ -229,6 +238,10 @@ struct datatag { u_int8_t data[PPPOE_SERVICE_NAME_SIZE]; }; +struct maxptag { + struct pppoe_tag hdr; + uint16_t data; +}; /* * Define the order in which we will place tags in packets From owner-svn-src-all@freebsd.org Tue Oct 6 13:11:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F2569B6295; Tue, 6 Oct 2015 13:11:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4340DA8C; Tue, 6 Oct 2015 13:11:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96DBSIk077151; Tue, 6 Oct 2015 13:11:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96DBREI077149; Tue, 6 Oct 2015 13:11:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510061311.t96DBREI077149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 6 Oct 2015 13:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288919 - stable/9/sys/netgraph X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 13:11:28 -0000 Author: mav Date: Tue Oct 6 13:11:26 2015 New Revision: 288919 URL: https://svnweb.freebsd.org/changeset/base/288919 Log: MFC r287654: Add support for PPP-Max-Payload PPPoE tag (RFC4638). Submitted by: Dmitry Luhtionov Modified: stable/9/sys/netgraph/ng_pppoe.c stable/9/sys/netgraph/ng_pppoe.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_pppoe.c ============================================================================== --- stable/9/sys/netgraph/ng_pppoe.c Tue Oct 6 13:10:21 2015 (r288918) +++ stable/9/sys/netgraph/ng_pppoe.c Tue Oct 6 13:11:26 2015 (r288919) @@ -168,6 +168,13 @@ static const struct ng_cmdlist ng_pppoe_ &ng_parse_enaddr_type, NULL }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SETMAXP, + "setmaxp", + &ng_parse_uint16_type, + NULL + }, { 0 } }; @@ -262,6 +269,7 @@ struct PPPoE { struct ether_header eh; LIST_HEAD(, sess_con) listeners; struct sess_hash_entry sesshash[SESSHASHSIZE]; + struct maxptag max_payload; /* PPP-Max-Payload (RFC4638) */ }; typedef struct PPPoE *priv_p; @@ -1004,6 +1012,13 @@ ng_pppoe_rcvmsg(node_p node, item_p item bcopy(msg->data, &privp->eh.ether_shost, ETHER_ADDR_LEN); break; + case NGM_PPPOE_SETMAXP: + if (msg->header.arglen != sizeof(uint16_t)) + LEAVE(EINVAL); + privp->max_payload.hdr.tag_type = PTT_MAX_PAYL; + privp->max_payload.hdr.tag_len = htons(sizeof(uint16_t)); + privp->max_payload.data = htons(*((uint16_t *)msg->data)); + break; default: LEAVE(EINVAL); } @@ -1071,6 +1086,8 @@ pppoe_start(sessp sp) init_tags(sp); insert_tag(sp, &uniqtag.hdr); insert_tag(sp, &neg->service.hdr); + if (privp->max_payload.data != 0) + insert_tag(sp, &privp->max_payload.hdr); make_packet(sp); /* * Send packet and prepare to retransmit it after timeout. @@ -1124,6 +1141,28 @@ send_sessionid(sessp sp) return (error); } +static int +send_maxp(sessp sp, const struct pppoe_tag *tag) +{ + int error; + struct ng_mesg *msg; + struct ngpppoe_maxp *maxp; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_SETMAXP, + sizeof(struct ngpppoe_maxp), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + maxp = (struct ngpppoe_maxp *)msg->data; + strncpy(maxp->hook, NG_HOOK_NAME(sp->hook), NG_HOOKSIZ); + maxp->data = ntohs(((const struct maxptag *)tag)->data); + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + /* * Receive data from session hook and do something with it. */ @@ -1464,6 +1503,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item insert_tag(sp, tag); /* return it */ send_acname(sp, tag); } + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && + (privp->max_payload.data != 0)) + insert_tag(sp, tag); /* return it */ insert_tag(sp, &neg->service.hdr); /* Service */ scan_tags(sp, ph); make_packet(sp); @@ -1602,6 +1644,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item m_freem(neg->m); free(sp->neg, M_NETGRAPH_PPPOE); sp->neg = NULL; + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && + (privp->max_payload.data != 0)) + send_maxp(sp, tag); pppoe_send_event(sp, NGM_PPPOE_SUCCESS); break; case PADT_CODE: Modified: stable/9/sys/netgraph/ng_pppoe.h ============================================================================== --- stable/9/sys/netgraph/ng_pppoe.h Tue Oct 6 13:10:21 2015 (r288918) +++ stable/9/sys/netgraph/ng_pppoe.h Tue Oct 6 13:11:26 2015 (r288919) @@ -51,6 +51,7 @@ #define NG_PPPOE_NODE_TYPE "pppoe" #define NGM_PPPOE_COOKIE 1089893072 +#define NGM_PPPOE_SETMAXP_COOKIE 1441624322 #define PPPOE_SERVICE_NAME_SIZE 64 /* for now */ @@ -83,6 +84,7 @@ enum cmd { NGM_PPPOE_SETMODE = 12, /* set to standard or compat modes */ NGM_PPPOE_GETMODE = 13, /* see current mode */ NGM_PPPOE_SETENADDR = 14, /* set Ethernet address */ + NGM_PPPOE_SETMAXP = 15 /* Set PPP-Max-Payload value */ }; /*********************** @@ -147,6 +149,13 @@ struct ngpppoe_sts { { NULL } \ } +/* + * This structure is used to send PPP-Max-Payload value from server to client. + */ +struct ngpppoe_maxp { + char hook[NG_HOOKSIZ]; /* hook associated with event session */ + uint16_t data; +}; /******************************************************************** * Constants and definitions specific to pppoe @@ -227,6 +236,10 @@ struct datatag { u_int8_t data[PPPOE_SERVICE_NAME_SIZE]; }; +struct maxptag { + struct pppoe_tag hdr; + uint16_t data; +}; /* * Define the order in which we will place tags in packets From owner-svn-src-all@freebsd.org Tue Oct 6 13:49:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BBAC9D0F40; Tue, 6 Oct 2015 13:49:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7816CF47; Tue, 6 Oct 2015 13:49:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96DnTSM088169; Tue, 6 Oct 2015 13:49:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96DnT53088168; Tue, 6 Oct 2015 13:49:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510061349.t96DnT53088168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 6 Oct 2015 13:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288920 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 13:49:29 -0000 Author: mav Date: Tue Oct 6 13:49:28 2015 New Revision: 288920 URL: https://svnweb.freebsd.org/changeset/base/288920 Log: MFC r287821: Document NGM_PPPOE_SETMAXP. Submitted by: Dmitry Luhtionov Modified: stable/10/share/man/man4/ng_pppoe.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ng_pppoe.4 ============================================================================== --- stable/10/share/man/man4/ng_pppoe.4 Tue Oct 6 13:11:26 2015 (r288919) +++ stable/10/share/man/man4/ng_pppoe.4 Tue Oct 6 13:49:28 2015 (r288920) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd November 13, 2012 +.Dd September 15, 2015 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -187,7 +187,7 @@ above messages, and reports the Access C The four commands above use a common data structure: .Bd -literal -offset 4n struct ngpppoe_sts { - char hook[NG_HOOKSIZ]; /* hook associated with event session */ + char hook[NG_HOOKSIZ]; }; .Ed .Bl -tag -width 3n @@ -244,6 +244,20 @@ hook, or when user wants to override thi .Tn ASCII form of this message is .Qq Li setenaddr . +.It Dv NGM_PPPOE_SETMAXP Pq Ic setmaxp +Set the node PPP-Max-Payload value as described in RFC 4638. +This message applies only to a client configuration. +.Tn ASCII +form of this message is +.Qq Li setmaxp . +.Pp +Data structure returned to client is: +.Bd -literal -offset 4n +struct ngpppoe_maxp { + char hook[NG_HOOKSIZ]; + uint16_t data; +}; +.Ed .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-all@freebsd.org Tue Oct 6 13:50:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99F3E99A04C; Tue, 6 Oct 2015 13:50:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC29141; Tue, 6 Oct 2015 13:50:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96DoWiE088936; Tue, 6 Oct 2015 13:50:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96DoWrI088935; Tue, 6 Oct 2015 13:50:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510061350.t96DoWrI088935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 6 Oct 2015 13:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288921 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 13:50:32 -0000 Author: mav Date: Tue Oct 6 13:50:31 2015 New Revision: 288921 URL: https://svnweb.freebsd.org/changeset/base/288921 Log: MFC r287821: Document NGM_PPPOE_SETMAXP. Submitted by: Dmitry Luhtionov Modified: stable/9/share/man/man4/ng_pppoe.4 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ng_pppoe.4 ============================================================================== --- stable/9/share/man/man4/ng_pppoe.4 Tue Oct 6 13:49:28 2015 (r288920) +++ stable/9/share/man/man4/ng_pppoe.4 Tue Oct 6 13:50:31 2015 (r288921) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd December 27, 2007 +.Dd September 15, 2015 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -187,7 +187,7 @@ above messages, and reports the Access C The four commands above use a common data structure: .Bd -literal -offset 4n struct ngpppoe_sts { - char hook[NG_HOOKSIZ]; /* hook associated with event session */ + char hook[NG_HOOKSIZ]; }; .Ed .Bl -tag -width 3n @@ -244,6 +244,20 @@ hook, or when user wants to override thi .Tn ASCII form of this message is .Qq Li setenaddr . +.It Dv NGM_PPPOE_SETMAXP Pq Ic setmaxp +Set the node PPP-Max-Payload value as described in RFC 4638. +This message applies only to a client configuration. +.Tn ASCII +form of this message is +.Qq Li setmaxp . +.Pp +Data structure returned to client is: +.Bd -literal -offset 4n +struct ngpppoe_maxp { + char hook[NG_HOOKSIZ]; + uint16_t data; +}; +.Ed .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-all@freebsd.org Tue Oct 6 14:27:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 769669B6C52; Tue, 6 Oct 2015 14:27:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67561C27; Tue, 6 Oct 2015 14:27:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96ER8XB002622; Tue, 6 Oct 2015 14:27:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96ER74c002620; Tue, 6 Oct 2015 14:27:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510061427.t96ER74c002620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 6 Oct 2015 14:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288922 - stable/9/sys/netgraph X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 14:27:08 -0000 Author: mav Date: Tue Oct 6 14:27:07 2015 New Revision: 288922 URL: https://svnweb.freebsd.org/changeset/base/288922 Log: MFC r253564 (by glebius): Add constant for PPP-Max-PayLoad tag. Submitted by: Dmitry Luhtionov Modified: stable/9/sys/netgraph/ng_pppoe.c stable/9/sys/netgraph/ng_pppoe.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_pppoe.c ============================================================================== --- stable/9/sys/netgraph/ng_pppoe.c Tue Oct 6 13:50:31 2015 (r288921) +++ stable/9/sys/netgraph/ng_pppoe.c Tue Oct 6 14:27:07 2015 (r288922) @@ -1932,6 +1932,7 @@ scan_tags(sessp sp, const struct pppoe_h case PTT_SRV_ERR: case PTT_SYS_ERR: case PTT_GEN_ERR: + case PTT_MAX_PAYL: break; } pt = (const struct pppoe_tag*)ptn; Modified: stable/9/sys/netgraph/ng_pppoe.h ============================================================================== --- stable/9/sys/netgraph/ng_pppoe.h Tue Oct 6 13:50:31 2015 (r288921) +++ stable/9/sys/netgraph/ng_pppoe.h Tue Oct 6 14:27:07 2015 (r288922) @@ -181,6 +181,7 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0104) #define PTT_VENDOR (0x0105) #define PTT_RELAY_SID (0x0110) +#define PTT_MAX_PAYL (0x0120) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0201) #define PTT_SYS_ERR (0x0202) #define PTT_GEN_ERR (0x0203) @@ -197,6 +198,7 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0401) #define PTT_VENDOR (0x0501) #define PTT_RELAY_SID (0x1001) +#define PTT_MAX_PAYL (0x2001) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0102) #define PTT_SYS_ERR (0x0202) #define PTT_GEN_ERR (0x0302) From owner-svn-src-all@freebsd.org Tue Oct 6 15:30:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81ACB9D09F6; Tue, 6 Oct 2015 15:30:49 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E7A1F88; Tue, 6 Oct 2015 15:30:49 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96FUnIw025198; Tue, 6 Oct 2015 15:30:49 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96FUnjQ025193; Tue, 6 Oct 2015 15:30:49 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201510061530.t96FUnjQ025193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 6 Oct 2015 15:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288925 - stable/9/usr.sbin/ndiscvt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 15:30:49 -0000 Author: amdmi3 (ports committer) Date: Tue Oct 6 15:30:48 2015 New Revision: 288925 URL: https://svnweb.freebsd.org/changeset/base/288925 Log: MFC r288120: Fix crash on parsing some inf files Modified: stable/9/usr.sbin/ndiscvt/inf.c stable/9/usr.sbin/ndiscvt/inf.h Directory Properties: stable/9/usr.sbin/ndiscvt/ (props changed) Modified: stable/9/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/9/usr.sbin/ndiscvt/inf.c Tue Oct 6 15:30:41 2015 (r288924) +++ stable/9/usr.sbin/ndiscvt/inf.c Tue Oct 6 15:30:48 2015 (r288925) @@ -887,6 +887,12 @@ regkey_add (const char *r) void push_word (const char *w) { + + if (idx == W_MAX) { + fprintf(stderr, "too many words; try bumping W_MAX in inf.h\n"); + exit(1); + } + if (w && strlen(w)) words[idx++] = w; else Modified: stable/9/usr.sbin/ndiscvt/inf.h ============================================================================== --- stable/9/usr.sbin/ndiscvt/inf.h Tue Oct 6 15:30:41 2015 (r288924) +++ stable/9/usr.sbin/ndiscvt/inf.h Tue Oct 6 15:30:48 2015 (r288925) @@ -4,7 +4,7 @@ * $FreeBSD$ */ -#define W_MAX 16 +#define W_MAX 32 struct section { const char * name; From owner-svn-src-all@freebsd.org Tue Oct 6 15:30:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B4439D0998; Tue, 6 Oct 2015 15:30:43 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 084CA1F3C; Tue, 6 Oct 2015 15:30:43 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96FUgKY024490; Tue, 6 Oct 2015 15:30:42 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96FUgQL024488; Tue, 6 Oct 2015 15:30:42 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201510061530.t96FUgQL024488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 6 Oct 2015 15:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288924 - stable/10/usr.sbin/ndiscvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 15:30:43 -0000 Author: amdmi3 (ports committer) Date: Tue Oct 6 15:30:41 2015 New Revision: 288924 URL: https://svnweb.freebsd.org/changeset/base/288924 Log: MFC r288120: Fix crash on parsing some inf files Modified: stable/10/usr.sbin/ndiscvt/inf.c stable/10/usr.sbin/ndiscvt/inf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ndiscvt/inf.c ============================================================================== --- stable/10/usr.sbin/ndiscvt/inf.c Tue Oct 6 14:56:37 2015 (r288923) +++ stable/10/usr.sbin/ndiscvt/inf.c Tue Oct 6 15:30:41 2015 (r288924) @@ -887,6 +887,12 @@ regkey_add (const char *r) void push_word (const char *w) { + + if (idx == W_MAX) { + fprintf(stderr, "too many words; try bumping W_MAX in inf.h\n"); + exit(1); + } + if (w && strlen(w)) words[idx++] = w; else Modified: stable/10/usr.sbin/ndiscvt/inf.h ============================================================================== --- stable/10/usr.sbin/ndiscvt/inf.h Tue Oct 6 14:56:37 2015 (r288923) +++ stable/10/usr.sbin/ndiscvt/inf.h Tue Oct 6 15:30:41 2015 (r288924) @@ -4,7 +4,7 @@ * $FreeBSD$ */ -#define W_MAX 16 +#define W_MAX 32 struct section { const char * name; From owner-svn-src-all@freebsd.org Tue Oct 6 16:58:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94C549D09FF; Tue, 6 Oct 2015 16:58:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83A04954; Tue, 6 Oct 2015 16:58:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96GwoMp056710; Tue, 6 Oct 2015 16:58:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96GwmGj056703; Tue, 6 Oct 2015 16:58:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510061658.t96GwmGj056703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 16:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 16:58:50 -0000 Author: ngie Date: Tue Oct 6 16:58:47 2015 New Revision: 288929 URL: https://svnweb.freebsd.org/changeset/base/288929 Log: Integrate the tests from libxo into the FreeBSD test suite The functional_test.sh harness for each test subdir was inspired by the version in bin/sh/tests/functional_test.sh Some gymnastics were required to deal with implicit rules for .c / .o -> .out as the suffix transformation rules were incorrectly trying to create the test outputs from some of the source files Sponsored by: EMC / Isilon Storage Division Added: head/lib/libxo/tests/ head/lib/libxo/tests/Makefile (contents, props changed) head/lib/libxo/tests/functional_test.sh - copied, changed from r288904, head/bin/sh/tests/functional_test.sh head/usr.bin/xo/tests/ head/usr.bin/xo/tests/Makefile (contents, props changed) head/usr.bin/xo/tests/functional_test.sh - copied, changed from r288904, head/bin/sh/tests/functional_test.sh Modified: head/etc/mtree/BSD.tests.dist head/lib/libxo/Makefile head/usr.bin/xo/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Oct 6 16:35:50 2015 (r288928) +++ head/etc/mtree/BSD.tests.dist Tue Oct 6 16:58:47 2015 (r288929) @@ -310,6 +310,8 @@ .. libutil .. + libxo + .. msun .. .. @@ -568,6 +570,8 @@ .. xargs .. + xo + .. yacc yacc .. Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Tue Oct 6 16:35:50 2015 (r288928) +++ head/lib/libxo/Makefile Tue Oct 6 16:58:47 2015 (r288929) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIBXOSRC= ${SRCTOP}/contrib/libxo .PATH: ${LIBXOSRC}/libxo @@ -102,4 +104,8 @@ MLINKS= xo_attr.3 xo_attr_h.3 \ xo_syslog.3 xo_set_logmask.3 \ xo_syslog.3 xo_vsyslog.3 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/lib/libxo/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libxo/tests/Makefile Tue Oct 6 16:58:47 2015 (r288929) @@ -0,0 +1,253 @@ +# $FreeBSD$ + +.include + +LIBXOSRC= ${SRCTOP}/contrib/libxo + +# Override the default suffix transformation rules for .c/.o -> .out +.SUFFIXES: +.SUFFIXES: .c .err .o .out .sh + +.PATH: +.PATH.c: ${LIBXOSRC}/libxo ${LIBXOSRC}/tests/core +.PATH.err: ${LIBXOSRC}/tests/core/saved +.PATH.out: ${LIBXOSRC}/tests/core/saved + +.c.out .o.out: + +TESTSDIR= ${TESTSBASE}/lib/libxo + +ATF_TESTS_SH+= functional_test + +BINDIR= ${TESTSDIR} + +FILES+= test_01.E.err +FILES+= test_01.E.out +FILES+= test_01.H.err +FILES+= test_01.H.out +FILES+= test_01.HIPx.err +FILES+= test_01.HIPx.out +FILES+= test_01.HP.err +FILES+= test_01.HP.out +FILES+= test_01.J.err +FILES+= test_01.J.out +FILES+= test_01.JP.err +FILES+= test_01.JP.out +FILES+= test_01.T.err +FILES+= test_01.T.out +FILES+= test_01.X.err +FILES+= test_01.X.out +FILES+= test_01.XP.err +FILES+= test_01.XP.out +FILES+= test_01.err +FILES+= test_01.out +FILES+= test_02.E.err +FILES+= test_02.E.out +FILES+= test_02.H.err +FILES+= test_02.H.out +FILES+= test_02.HIPx.err +FILES+= test_02.HIPx.out +FILES+= test_02.HP.err +FILES+= test_02.HP.out +FILES+= test_02.J.err +FILES+= test_02.J.out +FILES+= test_02.JP.err +FILES+= test_02.JP.out +FILES+= test_02.T.err +FILES+= test_02.T.out +FILES+= test_02.X.err +FILES+= test_02.X.out +FILES+= test_02.XP.err +FILES+= test_02.XP.out +FILES+= test_02.err +FILES+= test_02.out +FILES+= test_03.E.err +FILES+= test_03.E.out +FILES+= test_03.H.err +FILES+= test_03.H.out +FILES+= test_03.HIPx.err +FILES+= test_03.HIPx.out +FILES+= test_03.HP.err +FILES+= test_03.HP.out +FILES+= test_03.J.err +FILES+= test_03.J.out +FILES+= test_03.JP.err +FILES+= test_03.JP.out +FILES+= test_03.T.err +FILES+= test_03.T.out +FILES+= test_03.X.err +FILES+= test_03.X.out +FILES+= test_03.XP.err +FILES+= test_03.XP.out +FILES+= test_03.err +FILES+= test_03.out +FILES+= test_04.E.err +FILES+= test_04.E.out +FILES+= test_04.H.err +FILES+= test_04.H.out +FILES+= test_04.HIPx.err +FILES+= test_04.HIPx.out +FILES+= test_04.HP.err +FILES+= test_04.HP.out +FILES+= test_04.J.err +FILES+= test_04.J.out +FILES+= test_04.JP.err +FILES+= test_04.JP.out +FILES+= test_04.T.err +FILES+= test_04.T.out +FILES+= test_04.X.err +FILES+= test_04.X.out +FILES+= test_04.XP.err +FILES+= test_04.XP.out +FILES+= test_05.E.err +FILES+= test_05.E.out +FILES+= test_05.H.err +FILES+= test_05.H.out +FILES+= test_05.HIPx.err +FILES+= test_05.HIPx.out +FILES+= test_05.HP.err +FILES+= test_05.HP.out +FILES+= test_05.J.err +FILES+= test_05.J.out +FILES+= test_05.JP.err +FILES+= test_05.JP.out +FILES+= test_05.T.err +FILES+= test_05.T.out +FILES+= test_05.X.err +FILES+= test_05.X.out +FILES+= test_05.XP.err +FILES+= test_05.XP.out +FILES+= test_06.E.err +FILES+= test_06.E.out +FILES+= test_06.H.err +FILES+= test_06.H.out +FILES+= test_06.HIPx.err +FILES+= test_06.HIPx.out +FILES+= test_06.HP.err +FILES+= test_06.HP.out +FILES+= test_06.J.err +FILES+= test_06.J.out +FILES+= test_06.JP.err +FILES+= test_06.JP.out +FILES+= test_06.T.err +FILES+= test_06.T.out +FILES+= test_06.X.err +FILES+= test_06.X.out +FILES+= test_06.XP.err +FILES+= test_06.XP.out +FILES+= test_07.E.err +FILES+= test_07.E.out +FILES+= test_07.H.err +FILES+= test_07.H.out +FILES+= test_07.HIPx.err +FILES+= test_07.HIPx.out +FILES+= test_07.HP.err +FILES+= test_07.HP.out +FILES+= test_07.J.err +FILES+= test_07.J.out +FILES+= test_07.JP.err +FILES+= test_07.JP.out +FILES+= test_07.T.err +FILES+= test_07.T.out +FILES+= test_07.X.err +FILES+= test_07.X.out +FILES+= test_07.XP.err +FILES+= test_07.XP.out +FILES+= test_08.E.err +FILES+= test_08.E.out +FILES+= test_08.H.err +FILES+= test_08.H.out +FILES+= test_08.HIPx.err +FILES+= test_08.HIPx.out +FILES+= test_08.HP.err +FILES+= test_08.HP.out +FILES+= test_08.J.err +FILES+= test_08.J.out +FILES+= test_08.JP.err +FILES+= test_08.JP.out +FILES+= test_08.T.err +FILES+= test_08.T.out +FILES+= test_08.X.err +FILES+= test_08.X.out +FILES+= test_08.XP.err +FILES+= test_08.XP.out +FILES+= test_09.E.err +FILES+= test_09.E.out +FILES+= test_09.H.err +FILES+= test_09.H.out +FILES+= test_09.HIPx.err +FILES+= test_09.HIPx.out +FILES+= test_09.HP.err +FILES+= test_09.HP.out +FILES+= test_09.J.err +FILES+= test_09.J.out +FILES+= test_09.JP.err +FILES+= test_09.JP.out +FILES+= test_09.T.err +FILES+= test_09.T.out +FILES+= test_09.X.err +FILES+= test_09.X.out +FILES+= test_09.XP.err +FILES+= test_09.XP.out +FILES+= test_10.E.err +FILES+= test_10.E.out +FILES+= test_10.H.err +FILES+= test_10.H.out +FILES+= test_10.HIPx.err +FILES+= test_10.HIPx.out +FILES+= test_10.HP.err +FILES+= test_10.HP.out +FILES+= test_10.J.err +FILES+= test_10.J.out +FILES+= test_10.JP.err +FILES+= test_10.JP.out +FILES+= test_10.T.err +FILES+= test_10.T.out +FILES+= test_10.X.err +FILES+= test_10.X.out +FILES+= test_10.XP.err +FILES+= test_10.XP.out +FILES+= test_10.err +FILES+= test_10.out +FILES+= test_11.E.err +FILES+= test_11.E.out +FILES+= test_11.H.err +FILES+= test_11.H.out +FILES+= test_11.HIPx.err +FILES+= test_11.HIPx.out +FILES+= test_11.HP.err +FILES+= test_11.HP.out +FILES+= test_11.J.err +FILES+= test_11.J.out +FILES+= test_11.JP.err +FILES+= test_11.JP.out +FILES+= test_11.T.err +FILES+= test_11.T.out +FILES+= test_11.X.err +FILES+= test_11.X.out +FILES+= test_11.XP.err +FILES+= test_11.XP.out + +# XXX: the `E` format testcases don't appear to match the expected format. +#FILES:= ${FILES:N*.E.*} + +PROGS+= test_01 +PROGS+= test_02 +PROGS+= test_03 +PROGS+= test_04 +PROGS+= test_05 +PROGS+= test_06 +PROGS+= test_07 +PROGS+= test_08 +PROGS+= test_09 +PROGS+= test_10 +PROGS+= test_11 + +CFLAGS+= -I${LIBXOSRC}/libxo + +DPADD= ${LIBXO} ${LIBUTIL} +LDADD= -lxo -lutil + +SUBDIR+= encoder + +.include Copied and modified: head/lib/libxo/tests/functional_test.sh (from r288904, head/bin/sh/tests/functional_test.sh) ============================================================================== --- head/bin/sh/tests/functional_test.sh Mon Oct 5 21:41:55 2015 (r288904, copy source) +++ head/lib/libxo/tests/functional_test.sh Tue Oct 6 16:58:47 2015 (r288929) @@ -1,5 +1,5 @@ # -# Copyright 2014 EMC Corp. +# Copyright 2015 EMC Corp. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,42 +31,46 @@ SRCDIR=$(atf_get_srcdir) check() { local tc=${1}; shift + local xo_fmt=${1}; shift - export SH=$(atf_config_get bin.sh.test_shell /bin/sh) + local err_file="${SRCDIR}/${tc}${xo_fmt:+.${xo_fmt}}.err" + [ -s "${err_file}" ] && err_flag="-e file:${err_file}" + local out_file="${SRCDIR}/${tc}${xo_fmt:+.${xo_fmt}}.out" + [ -s "${out_file}" ] && out_flag="-o file:${out_file}" + + if [ "$xo_fmt" = "E" ]; then + LIBXO_OPTIONS="warn,encoder=test" + else + LIBXO_OPTIONS=":W${xo_fmt}" + fi + + atf_check -s exit:0 -e file:${err_file} -o file:${out_file} \ + env LC_ALL=en_US.UTF-8 \ + LIBXO_OPTIONS="${LIBXO_OPTIONS}" TZ="EST" "${SRCDIR}/${tc}" \ - local err_file="${SRCDIR}/${tc}.stderr" - [ -f "${err_file}" ] && err_flag="-e file:${err_file}" - local out_file="${SRCDIR}/${tc}.stdout" - [ -f "${out_file}" ] && out_flag="-o file:${out_file}" - - atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "${SRCDIR}/${tc}" } add_testcase() { local tc=${1} - local tc_escaped word + local tc_escaped - case "${tc%.*}" in - *-*) - local IFS="-" - for word in ${tc%.*}; do - tc_escaped="${tc_escaped:+${tc_escaped}_}${word}" - done - ;; - *) - tc_escaped=${tc%.*} - ;; - esac + oldIFS=$IFS + IFS='.' + set -- $tc + tc_script=${1} + [ $# -eq 3 ] && xo_fmt=${2} # Don't set xo_fmt to `out' + IFS=$oldIFS + tc_escaped="${tc_script}${xo_fmt:+__${xo_fmt}}" atf_test_case ${tc_escaped} - eval "${tc_escaped}_body() { check ${tc}; }" + eval "${tc_escaped}_body() { check ${tc_script} ${xo_fmt}; }" atf_add_test_case ${tc_escaped} } atf_init_test_cases() { - for path in $(find -Es "${SRCDIR}" -regex '.*\.[0-9]+$'); do + for path in $(find -Es "${SRCDIR}" -name '*.out'); do add_testcase ${path##*/} done } Modified: head/usr.bin/xo/Makefile ============================================================================== --- head/usr.bin/xo/Makefile Tue Oct 6 16:35:50 2015 (r288928) +++ head/usr.bin/xo/Makefile Tue Oct 6 16:58:47 2015 (r288929) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIBXOSRC= ${SRCTOP}/contrib/libxo .PATH: ${LIBXOSRC}/xo @@ -12,4 +14,8 @@ CFLAGS+=-I${LIBXOSRC}/libxo LIBADD= xo util +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/xo/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/xo/tests/Makefile Tue Oct 6 16:58:47 2015 (r288929) @@ -0,0 +1,40 @@ +# $FreeBSD$ + +.include + +LIBXOSRC= ${SRCTOP}/contrib/libxo + +.PATH: ${LIBXOSRC}/tests/xo ${LIBXOSRC}/tests/xo/saved + +.c.out .o.out: + +TESTSDIR= ${TESTSBASE}/usr.bin/xo + +BINDIR= ${TESTSDIR} + +ATF_TESTS_SH+= functional_test + +FILES+= xo_01.H.err +FILES+= xo_01.H.out +FILES+= xo_01.HIPx.err +FILES+= xo_01.HIPx.out +FILES+= xo_01.HP.err +FILES+= xo_01.HP.out +FILES+= xo_01.J.err +FILES+= xo_01.J.out +FILES+= xo_01.JP.err +FILES+= xo_01.JP.out +FILES+= xo_01.T.err +FILES+= xo_01.T.out +FILES+= xo_01.X.err +FILES+= xo_01.X.out +FILES+= xo_01.XP.err +FILES+= xo_01.XP.out + +SCRIPTS+= xo_01 + +LIBADD+= xo + +.include + +.SUFFIXES: .sh Copied and modified: head/usr.bin/xo/tests/functional_test.sh (from r288904, head/bin/sh/tests/functional_test.sh) ============================================================================== --- head/bin/sh/tests/functional_test.sh Mon Oct 5 21:41:55 2015 (r288904, copy source) +++ head/usr.bin/xo/tests/functional_test.sh Tue Oct 6 16:58:47 2015 (r288929) @@ -1,5 +1,5 @@ # -# Copyright 2014 EMC Corp. +# Copyright 2015 EMC Corp. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,42 +31,42 @@ SRCDIR=$(atf_get_srcdir) check() { local tc=${1}; shift + local xo_fmt=${1}; shift - export SH=$(atf_config_get bin.sh.test_shell /bin/sh) + XO=$(atf_config_get usr.bin.xo.test_xo /usr/bin/xo) - local err_file="${SRCDIR}/${tc}.stderr" - [ -f "${err_file}" ] && err_flag="-e file:${err_file}" - local out_file="${SRCDIR}/${tc}.stdout" - [ -f "${out_file}" ] && out_flag="-o file:${out_file}" - - atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "${SRCDIR}/${tc}" + local err_file="${SRCDIR}/${tc}${xo_fmt:+.${xo_fmt}}.err" + [ -s "${err_file}" ] && err_flag="-e file:${err_file}" + local out_file="${SRCDIR}/${tc}${xo_fmt:+.${xo_fmt}}.out" + [ -s "${out_file}" ] && out_flag="-o file:${out_file}" + + atf_check -s exit:0 -e file:${err_file} -o file:${out_file} \ + env LC_ALL=en_US.UTF-8 \ + LIBXO_OPTIONS=":W${xo_fmt}" TZ="EST" "${SRCDIR}/${tc}" \ + ${XO} } add_testcase() { local tc=${1} - local tc_escaped word + local tc_escaped - case "${tc%.*}" in - *-*) - local IFS="-" - for word in ${tc%.*}; do - tc_escaped="${tc_escaped:+${tc_escaped}_}${word}" - done - ;; - *) - tc_escaped=${tc%.*} - ;; - esac + oldIFS=$IFS + IFS='.' + set -- $tc + tc_script=${1} + [ $# -eq 3 ] && xo_fmt=${2} # Don't set xo_fmt to `out' + IFS=$oldIFS + tc_escaped="${tc_script}${xo_fmt:+__${xo_fmt}}" atf_test_case ${tc_escaped} - eval "${tc_escaped}_body() { check ${tc}; }" + eval "${tc_escaped}_body() { check ${tc_script} ${xo_fmt}; }" atf_add_test_case ${tc_escaped} } atf_init_test_cases() { - for path in $(find -Es "${SRCDIR}" -regex '.*\.[0-9]+$'); do + for path in $(find -Es "${SRCDIR}" -name '*.out'); do add_testcase ${path##*/} done } From owner-svn-src-all@freebsd.org Tue Oct 6 17:18:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 682A99B6C15; Tue, 6 Oct 2015 17:18:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 596E0C35; Tue, 6 Oct 2015 17:18:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96HIGG3064062; Tue, 6 Oct 2015 17:18:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96HIG8E064061; Tue, 6 Oct 2015 17:18:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510061718.t96HIG8E064061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 17:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288933 - head/lib/libxo/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:18:16 -0000 Author: ngie Date: Tue Oct 6 17:18:15 2015 New Revision: 288933 URL: https://svnweb.freebsd.org/changeset/base/288933 Log: Remove a comment from an earlier iteration of trying to figure out how the test encoder testcases worked Modified: head/lib/libxo/tests/Makefile Modified: head/lib/libxo/tests/Makefile ============================================================================== --- head/lib/libxo/tests/Makefile Tue Oct 6 17:15:07 2015 (r288932) +++ head/lib/libxo/tests/Makefile Tue Oct 6 17:18:15 2015 (r288933) @@ -228,9 +228,6 @@ FILES+= test_11.X.out FILES+= test_11.XP.err FILES+= test_11.XP.out -# XXX: the `E` format testcases don't appear to match the expected format. -#FILES:= ${FILES:N*.E.*} - PROGS+= test_01 PROGS+= test_02 PROGS+= test_03 From owner-svn-src-all@freebsd.org Tue Oct 6 17:22:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A30E9D00D3; Tue, 6 Oct 2015 17:22:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 477461EC; Tue, 6 Oct 2015 17:22:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96HMtGF067594; Tue, 6 Oct 2015 17:22:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96HMtlQ067593; Tue, 6 Oct 2015 17:22:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510061722.t96HMtlQ067593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 6 Oct 2015 17:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288934 - head/lib/libxo/tests/encoder X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:22:55 -0000 Author: ngie Date: Tue Oct 6 17:22:54 2015 New Revision: 288934 URL: https://svnweb.freebsd.org/changeset/base/288934 Log: Add directory for test encoder missed by accident in r288929 Sponsored by: EMC / Isilon Storage Division Added: head/lib/libxo/tests/encoder/ head/lib/libxo/tests/encoder/Makefile (contents, props changed) Added: head/lib/libxo/tests/encoder/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libxo/tests/encoder/Makefile Tue Oct 6 17:22:54 2015 (r288934) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +LIBXOSRC= ${SRCTOP}/contrib/libxo + +.PATH: ${LIBXOSRC}/encoder/test + +SHLIB_NAME= libenc_test.so + +LIBDIR= ${TESTSBASE}/lib/libxo + +SYMLINKS+= ${LIBDIR}/${SHLIB_NAME} /usr/lib/libxo/encoder/test.enc + +SRCS= enc_test.c + +CFLAGS+= -I${LIBXOSRC}/libxo + +DPADD+= ${LIBXO} +LDADD+= -lxo + +.include From owner-svn-src-all@freebsd.org Tue Oct 6 17:45:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2C0F9D0EDC; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E4D6189; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96HjcJG068748; Tue, 6 Oct 2015 17:45:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Hgbfd067301; Tue, 6 Oct 2015 17:42:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510061742.t96Hgbfd067301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 17:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288938 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:45:40 -0000 Author: gjb Date: Tue Oct 6 17:42:37 2015 New Revision: 288938 URL: https://svnweb.freebsd.org/changeset/base/288938 Log: Document r288710, sesutil(8) addition. Add Gandi.net to sponsor.ent. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:42:31 2015 (r288937) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:42:37 2015 (r288938) @@ -187,6 +187,10 @@ role="package">misc/pciids package, if present, falling back to the PCI ID database in the &os; base system. + + A + new utility, &man.sesutil.8;, has been added, which is used + to manage &man.ses.4; devices. Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Tue Oct 6 17:42:31 2015 (r288937) +++ stable/10/release/doc/share/xml/sponsor.ent Tue Oct 6 17:42:37 2015 (r288938) @@ -21,6 +21,7 @@ + From owner-svn-src-all@freebsd.org Tue Oct 6 17:45:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A5559D0ED6; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43900187; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96HjcJC068748; Tue, 6 Oct 2015 17:45:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96HgViH067208; Tue, 6 Oct 2015 17:42:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510061742.t96HgViH067208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 17:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288936 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:45:40 -0000 Author: gjb Date: Tue Oct 6 17:42:30 2015 New Revision: 288936 URL: https://svnweb.freebsd.org/changeset/base/288936 Log: Document r288654, lagg(4) fec removal. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:27:22 2015 (r288935) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:42:30 2015 (r288936) @@ -1251,6 +1251,10 @@ The &man.em.4; driver has been updated to support the Skylake I219 chipset. + + The &man.lagg.4; driver has been updated + to remove support for the fec + protocol. From owner-svn-src-all@freebsd.org Tue Oct 6 17:45:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 894D09D0ED7; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55507188; Tue, 6 Oct 2015 17:45:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96HjcJE068748; Tue, 6 Oct 2015 17:45:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96HgWKJ067249; Tue, 6 Oct 2015 17:42:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510061742.t96HgWKJ067249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 17:42:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288937 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:45:40 -0000 Author: gjb Date: Tue Oct 6 17:42:31 2015 New Revision: 288937 URL: https://svnweb.freebsd.org/changeset/base/288937 Log: Document r288669, stack protector "strong" level. Help from: pfg Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:42:30 2015 (r288936) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 17:42:31 2015 (r288937) @@ -796,6 +796,13 @@ evaluated when building the emulators/linux-c6 and related ports. + + The stack protector has been upgraded to + the "strong" level, elevating the protection against buffer + overflows. While this significantly improves the security of + the system, extensive testing was done to ensure there are no + measurable side effects in performance or + functionality. From owner-svn-src-all@freebsd.org Tue Oct 6 17:53:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C3A49B6695; Tue, 6 Oct 2015 17:53:37 +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 799E6121; Tue, 6 Oct 2015 17:53:36 +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 t96HrZOq072197; Tue, 6 Oct 2015 17:53:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96HrXwt072175; Tue, 6 Oct 2015 17:53:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510061753.t96HrXwt072175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 6 Oct 2015 17:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288943 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/asan/scripts contrib/compiler-rt/lib/asan/tests contr... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 17:53:37 -0000 Author: dim Date: Tue Oct 6 17:53:29 2015 New Revision: 288943 URL: https://svnweb.freebsd.org/changeset/base/288943 Log: Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0 release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm and clang can be found here: Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help. Exp-run: antoine Relnotes: yes Added: head/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c head/contrib/compiler-rt/lib/builtins/atomic_flag_clear_explicit.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_flag_clear_explicit.c head/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set.c head/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c head/contrib/compiler-rt/lib/builtins/atomic_signal_fence.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_signal_fence.c head/contrib/compiler-rt/lib/builtins/atomic_thread_fence.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/atomic_thread_fence.c head/contrib/compiler-rt/lib/builtins/extendhfsf2.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/extendhfsf2.c head/contrib/compiler-rt/lib/builtins/i386/chkstk.S - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/i386/chkstk.S head/contrib/compiler-rt/lib/builtins/truncdfhf2.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/truncdfhf2.c head/contrib/compiler-rt/lib/builtins/truncsfhf2.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/truncsfhf2.c head/contrib/compiler-rt/lib/builtins/x86_64/chkstk.S - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/x86_64/chkstk.S head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/profile/InstrProfilingUtil.c head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/profile/InstrProfilingUtil.h head/contrib/compiler-rt/lib/safestack/ - copied from r288928, projects/clang370-import/contrib/compiler-rt/lib/safestack/ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_process_libcdep.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_process_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc head/contrib/compiler-rt/lib/ubsan/ubsan_init_standalone.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/ubsan/ubsan_init_standalone.cc head/contrib/compiler-rt/lib/ubsan/ubsan_platform.h - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/ubsan/ubsan_platform.h head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_win.cc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_win.cc head/contrib/libc++/include/__undef___deallocate - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/__undef___deallocate head/contrib/libc++/include/experimental/algorithm - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/experimental/algorithm head/contrib/libc++/include/experimental/chrono - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/experimental/chrono head/contrib/libc++/include/experimental/ratio - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/experimental/ratio head/contrib/libc++/include/experimental/system_error - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/experimental/system_error head/contrib/libc++/include/experimental/tuple - copied unchanged from r288928, projects/clang370-import/contrib/libc++/include/experimental/tuple head/contrib/libc++/src/config_elast.h - copied unchanged from r288928, projects/clang370-import/contrib/libc++/src/config_elast.h head/contrib/libc++/src/support/ - copied from r288928, projects/clang370-import/contrib/libc++/src/support/ head/contrib/llvm/include/llvm/ADT/EpochTracker.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/ADT/EpochTracker.h head/contrib/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/LoopAccessAnalysis.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/LoopAccessAnalysis.h head/contrib/llvm/include/llvm/Analysis/MemoryLocation.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/MemoryLocation.h head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h head/contrib/llvm/include/llvm/Analysis/VectorUtils.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Analysis/VectorUtils.h head/contrib/llvm/include/llvm/AsmParser/SlotMapping.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/AsmParser/SlotMapping.h head/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h head/contrib/llvm/include/llvm/CodeGen/DIEValue.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/DIEValue.def head/contrib/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h head/contrib/llvm/include/llvm/CodeGen/FaultMaps.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/FaultMaps.h head/contrib/llvm/include/llvm/CodeGen/MIRParser/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/MIRParser/ head/contrib/llvm/include/llvm/CodeGen/MIRYamlMapping.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/MIRYamlMapping.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionInitializer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/MachineFunctionInitializer.h head/contrib/llvm/include/llvm/CodeGen/WinEHFuncInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/CodeGen/WinEHFuncInfo.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/DebugInfo/DWARF/ head/contrib/llvm/include/llvm/DebugInfo/PDB/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/DebugInfo/PDB/ head/contrib/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/ head/contrib/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h head/contrib/llvm/include/llvm/IR/DebugInfoFlags.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/DebugInfoFlags.def head/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h head/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td head/contrib/llvm/include/llvm/IR/IntrinsicsBPF.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/IntrinsicsBPF.td head/contrib/llvm/include/llvm/IR/IntrinsicsSystemZ.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/IntrinsicsSystemZ.td head/contrib/llvm/include/llvm/IR/IntrinsicsWebAssembly.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/IntrinsicsWebAssembly.td head/contrib/llvm/include/llvm/IR/ModuleSlotTracker.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/ModuleSlotTracker.h head/contrib/llvm/include/llvm/IR/Value.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/IR/Value.def head/contrib/llvm/include/llvm/LibDriver/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/LibDriver/ head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h head/contrib/llvm/include/llvm/MC/MCSymbolCOFF.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/MC/MCSymbolCOFF.h head/contrib/llvm/include/llvm/MC/MCSymbolELF.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/MC/MCSymbolELF.h head/contrib/llvm/include/llvm/MC/MCSymbolMachO.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/MC/MCSymbolMachO.h head/contrib/llvm/include/llvm/Object/ArchiveWriter.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Object/ArchiveWriter.h head/contrib/llvm/include/llvm/Object/StackMapParser.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Object/StackMapParser.h head/contrib/llvm/include/llvm/Object/SymbolSize.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Object/SymbolSize.h head/contrib/llvm/include/llvm/Passes/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/Passes/ head/contrib/llvm/include/llvm/Support/COM.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Support/COM.h head/contrib/llvm/include/llvm/Support/Dwarf.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Support/Dwarf.def head/contrib/llvm/include/llvm/Support/MipsABIFlags.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Support/MipsABIFlags.h head/contrib/llvm/include/llvm/Support/StringSaver.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Support/StringSaver.h head/contrib/llvm/include/llvm/Support/TargetParser.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Support/TargetParser.h head/contrib/llvm/include/llvm/Target/TargetRecip.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Target/TargetRecip.h head/contrib/llvm/include/llvm/Transforms/IPO/LowerBitSets.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Transforms/IPO/LowerBitSets.h head/contrib/llvm/include/llvm/Transforms/InstCombine/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/Transforms/InstCombine/ head/contrib/llvm/include/llvm/Transforms/Scalar/ - copied from r288928, projects/clang370-import/contrib/llvm/include/llvm/Transforms/Scalar/ head/contrib/llvm/include/llvm/Transforms/Utils/LoopVersioning.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/include/llvm/Transforms/Utils/LoopVersioning.h head/contrib/llvm/lib/Analysis/DivergenceAnalysis.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/DivergenceAnalysis.cpp head/contrib/llvm/lib/Analysis/IteratedDominanceFrontier.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/IteratedDominanceFrontier.cpp head/contrib/llvm/lib/Analysis/LoopAccessAnalysis.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/LoopAccessAnalysis.cpp head/contrib/llvm/lib/Analysis/MemDerefPrinter.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/MemDerefPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryLocation.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/MemoryLocation.cpp head/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp head/contrib/llvm/lib/Analysis/VectorUtils.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Analysis/VectorUtils.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.h head/contrib/llvm/lib/CodeGen/CoreCLRGC.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/CoreCLRGC.cpp head/contrib/llvm/lib/CodeGen/FaultMaps.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/FaultMaps.cpp head/contrib/llvm/lib/CodeGen/GCRootLowering.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/GCRootLowering.cpp head/contrib/llvm/lib/CodeGen/ImplicitNullChecks.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/ImplicitNullChecks.cpp head/contrib/llvm/lib/CodeGen/InterleavedAccessPass.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/InterleavedAccessPass.cpp head/contrib/llvm/lib/CodeGen/MIRParser/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/MIRParser/ head/contrib/llvm/lib/CodeGen/MIRPrinter.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/MIRPrinter.cpp head/contrib/llvm/lib/CodeGen/MIRPrinter.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/MIRPrinter.h head/contrib/llvm/lib/CodeGen/MIRPrintingPass.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/MIRPrintingPass.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGCLowering.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/ShadowStackGCLowering.cpp head/contrib/llvm/lib/CodeGen/ShrinkWrap.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/ShrinkWrap.cpp head/contrib/llvm/lib/CodeGen/WinEHPrepare.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/CodeGen/WinEHPrepare.cpp head/contrib/llvm/lib/DebugInfo/DWARF/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/DebugInfo/DWARF/ head/contrib/llvm/lib/DebugInfo/PDB/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/DebugInfo/PDB/ head/contrib/llvm/lib/ExecutionEngine/Orc/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/ExecutionEngine/Orc/ head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h head/contrib/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp head/contrib/llvm/lib/IR/DebugInfoMetadata.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/IR/DebugInfoMetadata.cpp head/contrib/llvm/lib/IR/MetadataImpl.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/IR/MetadataImpl.h head/contrib/llvm/lib/IR/Operator.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/IR/Operator.cpp head/contrib/llvm/lib/LibDriver/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/LibDriver/ head/contrib/llvm/lib/MC/MCInstrDesc.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/MC/MCInstrDesc.cpp head/contrib/llvm/lib/MC/MCSchedule.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/MC/MCSchedule.cpp head/contrib/llvm/lib/MC/MCSymbolELF.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/MC/MCSymbolELF.cpp head/contrib/llvm/lib/Object/ArchiveWriter.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Object/ArchiveWriter.cpp head/contrib/llvm/lib/Object/SymbolSize.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Object/SymbolSize.cpp head/contrib/llvm/lib/Passes/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/Passes/ head/contrib/llvm/lib/Support/COM.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Support/COM.cpp head/contrib/llvm/lib/Support/StringSaver.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Support/StringSaver.cpp head/contrib/llvm/lib/Support/TargetParser.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Support/TargetParser.cpp head/contrib/llvm/lib/Support/Unix/COM.inc - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Support/Unix/COM.inc head/contrib/llvm/lib/Support/Windows/COM.inc - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Support/Windows/COM.inc head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h head/contrib/llvm/lib/Target/AMDGPU/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/Target/AMDGPU/ head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.h head/contrib/llvm/lib/Target/BPF/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/Target/BPF/ head/contrib/llvm/lib/Target/Hexagon/BitTracker.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/BitTracker.cpp head/contrib/llvm/lib/Target/Hexagon/BitTracker.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/BitTracker.h head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.h head/contrib/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoVector.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoVector.td head/contrib/llvm/lib/Target/Hexagon/HexagonIsetDx.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonIsetDx.td head/contrib/llvm/lib/Target/Hexagon/HexagonTargetStreamer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/HexagonTargetStreamer.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonFixupKinds.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonFixupKinds.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrFormats.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerKernelArgs.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/NVPTX/NVPTXLowerKernelArgs.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrHTM.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCInstrHTM.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td head/contrib/llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp head/contrib/llvm/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCVSXCopy.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCVSXCopy.cpp head/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp head/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrVector.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/SystemZ/SystemZInstrVector.td head/contrib/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h head/contrib/llvm/lib/Target/TargetRecip.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/TargetRecip.cpp head/contrib/llvm/lib/Target/WebAssembly/ - copied from r288928, projects/clang370-import/contrib/llvm/lib/Target/WebAssembly/ head/contrib/llvm/lib/Target/X86/X86ExpandPseudo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/X86/X86ExpandPseudo.cpp head/contrib/llvm/lib/Target/X86/X86InstrMPX.td - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/X86/X86InstrMPX.td head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h head/contrib/llvm/lib/Target/X86/X86WinEHState.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/X86/X86WinEHState.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.h head/contrib/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp head/contrib/llvm/lib/Transforms/IPO/LowerBitSets.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/IPO/LowerBitSets.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineInternal.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/InstCombine/InstCombineInternal.h head/contrib/llvm/lib/Transforms/Instrumentation/SafeStack.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Instrumentation/SafeStack.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ARCInstKind.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/ObjCARC/ARCInstKind.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ARCInstKind.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/ObjCARC/ARCInstKind.h head/contrib/llvm/lib/Transforms/ObjCARC/BlotMapVector.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/ObjCARC/BlotMapVector.h head/contrib/llvm/lib/Transforms/ObjCARC/PtrState.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/ObjCARC/PtrState.cpp head/contrib/llvm/lib/Transforms/ObjCARC/PtrState.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/ObjCARC/PtrState.h head/contrib/llvm/lib/Transforms/Scalar/BDCE.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/BDCE.cpp head/contrib/llvm/lib/Transforms/Scalar/Float2Int.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/Float2Int.cpp head/contrib/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDistribute.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/LoopDistribute.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInterchange.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/LoopInterchange.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp head/contrib/llvm/lib/Transforms/Scalar/NaryReassociate.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/NaryReassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp head/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp head/contrib/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp head/contrib/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp head/contrib/llvm/lib/Transforms/Utils/LoopVersioning.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/lib/Transforms/Utils/LoopVersioning.cpp head/contrib/llvm/patches/patch-01-clang-vendor-suffix.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-01-clang-vendor-suffix.diff head/contrib/llvm/patches/patch-02-add-CC-aliases.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-02-add-CC-aliases.diff head/contrib/llvm/patches/patch-03-enable-armv6-clrex.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-03-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-04-clang-add-mips-triples.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-04-clang-add-mips-triples.diff head/contrib/llvm/patches/patch-05-clang-r244063-missing-atomic-libcall.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-05-clang-r244063-missing-atomic-libcall.diff head/contrib/llvm/patches/patch-06-llvm-r248439-fdiv-hoisting.diff - copied unchanged from r288928, projects/clang370-import/contrib/llvm/patches/patch-06-llvm-r248439-fdiv-hoisting.diff head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAMDGPU.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAMDGPU.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsSystemZ.def - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsSystemZ.def head/contrib/llvm/tools/clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHContainerOperations.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/include/clang/Frontend/PCHContainerOperations.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteBuffer.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteBuffer.h head/contrib/llvm/tools/clang/lib/Basic/DiagnosticOptions.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Basic/DiagnosticOptions.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp head/contrib/llvm/tools/clang/lib/Driver/MinGWToolChain.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Driver/MinGWToolChain.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHContainerOperations.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Frontend/PCHContainerOperations.cpp head/contrib/llvm/tools/clang/lib/Headers/avx512cdintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/avx512cdintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h head/contrib/llvm/tools/clang/lib/Headers/cuda/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/cuda/ head/contrib/llvm/tools/clang/lib/Headers/cuda_builtin_vars.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/cuda_builtin_vars.h head/contrib/llvm/tools/clang/lib/Headers/fxsrintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/fxsrintrin.h head/contrib/llvm/tools/clang/lib/Headers/htmintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/htmintrin.h head/contrib/llvm/tools/clang/lib/Headers/htmxlintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/htmxlintrin.h head/contrib/llvm/tools/clang/lib/Headers/inttypes.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/inttypes.h head/contrib/llvm/tools/clang/lib/Headers/s390intrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/s390intrin.h head/contrib/llvm/tools/clang/lib/Headers/vecintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/vecintrin.h head/contrib/llvm/tools/clang/lib/Headers/xtestintrin.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/clang/lib/Headers/xtestintrin.h head/contrib/llvm/tools/lldb/include/lldb/API/SBAttachInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/API/SBAttachInfo.h head/contrib/llvm/tools/lldb/include/lldb/API/SBLanguageRuntime.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/API/SBLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/API/SBLaunchInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/API/SBLaunchInfo.h head/contrib/llvm/tools/lldb/include/lldb/API/SBVariablesOptions.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/API/SBVariablesOptions.h head/contrib/llvm/tools/lldb/include/lldb/API/SystemInitializerFull.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/API/SystemInitializerFull.h head/contrib/llvm/tools/lldb/include/lldb/Core/CxaDemangle.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Core/CxaDemangle.h head/contrib/llvm/tools/lldb/include/lldb/Core/FastDemangle.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Core/FastDemangle.h head/contrib/llvm/tools/lldb/include/lldb/Core/FormatEntity.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Core/FormatEntity.h head/contrib/llvm/tools/lldb/include/lldb/Core/Logging.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Core/Logging.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseSet.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseSet.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/VectorType.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/DataFormatters/VectorType.h head/contrib/llvm/tools/lldb/include/lldb/Host/LockFile.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/LockFile.h head/contrib/llvm/tools/lldb/include/lldb/Host/LockFileBase.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/LockFileBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/MainLoop.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/MainLoop.h head/contrib/llvm/tools/lldb/include/lldb/Host/MainLoopBase.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/MainLoopBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h head/contrib/llvm/tools/lldb/include/lldb/Host/Time.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/Time.h head/contrib/llvm/tools/lldb/include/lldb/Host/XML.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/XML.h head/contrib/llvm/tools/lldb/include/lldb/Host/common/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/common/ head/contrib/llvm/tools/lldb/include/lldb/Host/posix/Fcntl.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/Fcntl.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/LockFilePosix.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/LockFilePosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/MainLoopPosix.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/MainLoopPosix.h head/contrib/llvm/tools/lldb/include/lldb/Initialization/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Initialization/ head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueLanguage.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueLanguage.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h head/contrib/llvm/tools/lldb/include/lldb/Utility/ConvertEnum.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Utility/ConvertEnum.h head/contrib/llvm/tools/lldb/include/lldb/Utility/JSON.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Utility/JSON.h head/contrib/llvm/tools/lldb/include/lldb/Utility/LLDBAssert.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Utility/LLDBAssert.h head/contrib/llvm/tools/lldb/include/lldb/Utility/NameMatches.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Utility/NameMatches.h head/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractor.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/include/lldb/Utility/StringExtractor.h head/contrib/llvm/tools/lldb/source/API/SBAttachInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/API/SBAttachInfo.cpp head/contrib/llvm/tools/lldb/source/API/SBLanguageRuntime.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/API/SBLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/API/SBLaunchInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/API/SBLaunchInfo.cpp head/contrib/llvm/tools/lldb/source/API/SBVariablesOptions.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/API/SBVariablesOptions.cpp head/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.h head/contrib/llvm/tools/lldb/source/Core/CxaDemangle.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Core/CxaDemangle.cpp head/contrib/llvm/tools/lldb/source/Core/FormatEntity.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Core/FormatEntity.cpp head/contrib/llvm/tools/lldb/source/Core/Logging.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Core/Logging.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CoreMedia.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/DataFormatters/CoreMedia.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/VectorType.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/DataFormatters/VectorType.cpp head/contrib/llvm/tools/lldb/source/Host/common/FileSystem.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/FileSystem.cpp head/contrib/llvm/tools/lldb/source/Host/common/LockFileBase.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/LockFileBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContext.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContextRegisterInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/NativeRegisterContextRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeWatchpointList.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/NativeWatchpointList.cpp head/contrib/llvm/tools/lldb/source/Host/common/StringConvert.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/StringConvert.cpp head/contrib/llvm/tools/lldb/source/Host/common/XML.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/common/XML.cpp head/contrib/llvm/tools/lldb/source/Host/posix/LockFilePosix.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/posix/LockFilePosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/MainLoopPosix.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Host/posix/MainLoopPosix.cpp head/contrib/llvm/tools/lldb/source/Initialization/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Initialization/ head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormatEntity.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormatEntity.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueLanguage.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Interpreter/OptionValueLanguage.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Windows-DYLD/ head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/ head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/ head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/CrashReason.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/MipsLinuxSignals.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_mips.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_mips.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunctionUsingABI.cpp head/contrib/llvm/tools/lldb/source/Utility/ConvertEnum.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/ConvertEnum.cpp head/contrib/llvm/tools/lldb/source/Utility/JSON.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/JSON.cpp head/contrib/llvm/tools/lldb/source/Utility/LLDBAssert.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/LLDBAssert.cpp head/contrib/llvm/tools/lldb/source/Utility/ModuleCache.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/ModuleCache.cpp head/contrib/llvm/tools/lldb/source/Utility/ModuleCache.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/ModuleCache.h head/contrib/llvm/tools/lldb/source/Utility/NameMatches.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/source/Utility/NameMatches.cpp head/contrib/llvm/tools/lldb/tools/argdumper/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/argdumper/ head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValPrintValues.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbShow.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSymbol.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIExtensions.txt - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-mi/MIExtensions.txt head/contrib/llvm/tools/lldb/tools/lldb-server/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/lldb/tools/lldb-server/ head/contrib/llvm/tools/lli/OrcLazyJIT.cpp - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lli/OrcLazyJIT.cpp head/contrib/llvm/tools/lli/OrcLazyJIT.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/lli/OrcLazyJIT.h head/contrib/llvm/tools/llvm-cxxdump/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/llvm-cxxdump/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/llvm-dwarfdump/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/llvm-lto/ head/contrib/llvm/tools/llvm-pdbdump/ - copied from r288928, projects/clang370-import/contrib/llvm/tools/llvm-pdbdump/ head/contrib/llvm/tools/llvm-readobj/StackMapPrinter.h - copied unchanged from r288928, projects/clang370-import/contrib/llvm/tools/llvm-readobj/StackMapPrinter.h head/lib/clang/liblldbInitialization/ - copied from r288928, projects/clang370-import/lib/clang/liblldbInitialization/ head/lib/clang/liblldbPluginABISysV_arm/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginABISysV_arm/ head/lib/clang/liblldbPluginABISysV_arm64/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginABISysV_arm64/ head/lib/clang/liblldbPluginABISysV_i386/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginABISysV_i386/ head/lib/clang/liblldbPluginABISysV_mips/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginABISysV_mips/ head/lib/clang/liblldbPluginABISysV_mips64/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginABISysV_mips64/ head/lib/clang/liblldbPluginInstructionMIPS/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginInstructionMIPS/ head/lib/clang/liblldbPluginInstructionMIPS64/ - copied from r288928, projects/clang370-import/lib/clang/liblldbPluginInstructionMIPS64/ head/lib/clang/libllvmdebuginfodwarf/ - copied from r288928, projects/clang370-import/lib/clang/libllvmdebuginfodwarf/ head/lib/clang/libllvmdebuginfopdb/ - copied from r288928, projects/clang370-import/lib/clang/libllvmdebuginfopdb/ head/lib/clang/libllvmlibdriver/ - copied from r288928, projects/clang370-import/lib/clang/libllvmlibdriver/ head/lib/clang/libllvmlto/ - copied from r288928, projects/clang370-import/lib/clang/libllvmlto/ head/lib/clang/libllvmmirparser/ - copied from r288928, projects/clang370-import/lib/clang/libllvmmirparser/ head/lib/clang/libllvmorcjit/ - copied from r288928, projects/clang370-import/lib/clang/libllvmorcjit/ head/lib/clang/libllvmpasses/ - copied from r288928, projects/clang370-import/lib/clang/libllvmpasses/ head/lib/libclang_rt/asan-preinit/ - copied from r288928, projects/clang370-import/lib/libclang_rt/asan-preinit/ head/lib/libclang_rt/safestack/ - copied from r288928, projects/clang370-import/lib/libclang_rt/safestack/ head/lib/libclang_rt/ubsan_standalone/ - copied from r288928, projects/clang370-import/lib/libclang_rt/ubsan_standalone/ head/lib/libclang_rt/ubsan_standalone_cxx/ - copied from r288928, projects/clang370-import/lib/libclang_rt/ubsan_standalone_cxx/ head/usr.bin/clang/llvm-cxxdump/ - copied from r288928, projects/clang370-import/usr.bin/clang/llvm-cxxdump/ head/usr.bin/clang/llvm-dwarfdump/ - copied from r288928, projects/clang370-import/usr.bin/clang/llvm-dwarfdump/ head/usr.bin/clang/llvm-lto/ - copied from r288928, projects/clang370-import/usr.bin/clang/llvm-lto/ head/usr.bin/clang/llvm-pdbdump/ - copied from r288928, projects/clang370-import/usr.bin/clang/llvm-pdbdump/ Directory Properties: head/contrib/llvm/tools/llvm-dwarfdump/ (props changed) head/contrib/llvm/tools/llvm-lto/ (props changed) Replaced: head/contrib/compiler-rt/lib/builtins/fixtfdi.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixtfdi.c head/contrib/compiler-rt/lib/builtins/fixtfsi.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixtfsi.c head/contrib/compiler-rt/lib/builtins/fixtfti.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixtfti.c head/contrib/compiler-rt/lib/builtins/fixunstfdi.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixunstfdi.c head/contrib/compiler-rt/lib/builtins/fixunstfsi.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixunstfsi.c head/contrib/compiler-rt/lib/builtins/fixunstfti.c - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fixunstfti.c head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc - copied unchanged from r288928, projects/clang370-import/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc Deleted: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc head/contrib/libc++/include/__tuple_03 head/contrib/llvm/include/llvm/Analysis/ConstantsScanner.h head/contrib/llvm/include/llvm/Analysis/FunctionTargetTransformInfo.h head/contrib/llvm/include/llvm/Analysis/JumpInstrTableInfo.h head/contrib/llvm/include/llvm/CodeGen/ForwardControlFlowIntegrity.h head/contrib/llvm/include/llvm/CodeGen/JumpInstrTables.h head/contrib/llvm/include/llvm/CodeGen/StackMapLivenessAnalysis.h head/contrib/llvm/include/llvm/DebugInfo/DWARFAbbreviationDeclaration.h head/contrib/llvm/include/llvm/DebugInfo/DWARFAcceleratorTable.h head/contrib/llvm/include/llvm/DebugInfo/DWARFCompileUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARFContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAbbrev.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugArangeSet.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAranges.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugFrame.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugInfoEntry.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLine.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLoc.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugRangeList.h head/contrib/llvm/include/llvm/DebugInfo/DWARFFormValue.h head/contrib/llvm/include/llvm/DebugInfo/DWARFRelocMap.h head/contrib/llvm/include/llvm/DebugInfo/DWARFSection.h head/contrib/llvm/include/llvm/DebugInfo/DWARFTypeUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARFUnit.h head/contrib/llvm/include/llvm/IR/IntrinsicsR600.td head/contrib/llvm/include/llvm/MC/MCELF.h head/contrib/llvm/include/llvm/MC/MCELFSymbolFlags.h head/contrib/llvm/include/llvm/MC/MCMachOSymbolFlags.h head/contrib/llvm/include/llvm/PassManager.h head/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Transforms/Utils/VectorUtils.h head/contrib/llvm/lib/Analysis/FunctionTargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/JumpInstrTableInfo.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocList.h head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.h head/contrib/llvm/lib/CodeGen/ForwardControlFlowIntegrity.cpp head/contrib/llvm/lib/CodeGen/JumpInstrTables.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h head/contrib/llvm/lib/DebugInfo/DIContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp head/contrib/llvm/lib/DebugInfo/DWARFAcceleratorTable.cpp head/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp head/contrib/llvm/lib/DebugInfo/DWARFContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugFrame.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.cpp head/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp head/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp head/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.cpp head/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.h head/contrib/llvm/lib/DebugInfo/module.modulemap head/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp head/contrib/llvm/lib/IR/AsmWriter.h head/contrib/llvm/lib/IR/LeaksContext.h head/contrib/llvm/lib/IR/UseListOrder.cpp head/contrib/llvm/lib/MC/MCELF.cpp head/contrib/llvm/lib/Support/IsInf.cpp head/contrib/llvm/lib/Support/IsNAN.cpp head/contrib/llvm/lib/Target/ARM/ARMFPUName.def head/contrib/llvm/lib/Target/ARM/ARMFPUName.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMArchName.def head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMArchName.h head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.h head/contrib/llvm/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVarargsCallingConvention.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h head/contrib/llvm/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430SelectionDAGInfo.h head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h head/contrib/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsOs16.h head/contrib/llvm/lib/Target/Mips/MipsSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSelectionDAGInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerStructArgs.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXutil.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXutil.h head/contrib/llvm/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSelectionDAGInfo.h head/contrib/llvm/lib/Target/R600/ head/contrib/llvm/lib/Target/Sparc/SparcSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcSelectionDAGInfo.h head/contrib/llvm/lib/Target/TargetLibraryInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCUtil.cpp head/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp head/contrib/llvm/patches/patch-01-freebsd-kprintf.diff head/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff head/contrib/llvm/patches/patch-03-add-CC-aliases.diff head/contrib/llvm/patches/patch-04-add-llvm-gvn-option.diff head/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff head/contrib/llvm/patches/patch-07-llvm-r227752-boot2-shrink.diff head/contrib/llvm/patches/patch-08-llvm-r230348-arm-fix-bad-ha.diff head/contrib/llvm/patches/patch-09-clang-r227115-constantarraytype.diff head/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsR600.def head/contrib/llvm/tools/lldb/include/lldb/Target/NativeRegisterContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/NativeRegisterContextRegisterInfo.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-log.h head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpoint.h head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpointList.h head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.h head/contrib/llvm/tools/lldb/source/Host/common/NativeThreadProtocol.h head/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXStopInfo.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_mips64.h head/contrib/llvm/tools/lldb/source/Target/NativeRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Target/NativeRegisterContextRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.h head/contrib/llvm/tools/lldb/source/lldb-log.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Driver.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Driver.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinLinux.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinLinux.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinWindows.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinWindows.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilTermios.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilTermios.h head/contrib/llvm/tools/lldb/tools/lldb-platform/ head/contrib/llvm/tools/llvm-cov/CoverageSummary.cpp head/contrib/llvm/tools/llvm-cov/CoverageSummary.h head/contrib/llvm/tools/opt/PassRegistry.def head/contrib/llvm/tools/opt/Passes.cpp head/contrib/llvm/tools/opt/Passes.h head/lib/clang/libllvmdebuginfo/ head/lib/libclang_rt/san/ head/lib/libclang_rt/ubsan/ head/lib/libclang_rt/ubsan_cxx/ Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/include/sanitizer/coverage_interface.h head/contrib/compiler-rt/include/sanitizer/dfsan_interface.h head/contrib/compiler-rt/include/sanitizer/lsan_interface.h head/contrib/compiler-rt/include/sanitizer/msan_interface.h head/contrib/compiler-rt/lib/asan/asan_allocator.cc head/contrib/compiler-rt/lib/asan/asan_allocator.h head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc head/contrib/compiler-rt/lib/asan/asan_flags.cc head/contrib/compiler-rt/lib/asan/asan_globals.cc head/contrib/compiler-rt/lib/asan/asan_interceptors.cc head/contrib/compiler-rt/lib/asan/asan_interceptors.h head/contrib/compiler-rt/lib/asan/asan_interface_internal.h head/contrib/compiler-rt/lib/asan/asan_internal.h head/contrib/compiler-rt/lib/asan/asan_linux.cc head/contrib/compiler-rt/lib/asan/asan_mac.cc head/contrib/compiler-rt/lib/asan/asan_mapping.h head/contrib/compiler-rt/lib/asan/asan_poisoning.cc head/contrib/compiler-rt/lib/asan/asan_poisoning.h head/contrib/compiler-rt/lib/asan/asan_posix.cc head/contrib/compiler-rt/lib/asan/asan_report.cc head/contrib/compiler-rt/lib/asan/asan_report.h head/contrib/compiler-rt/lib/asan/asan_rtl.cc head/contrib/compiler-rt/lib/asan/asan_stats.cc head/contrib/compiler-rt/lib/asan/asan_stats.h head/contrib/compiler-rt/lib/asan/asan_suppressions.cc head/contrib/compiler-rt/lib/asan/asan_suppressions.h head/contrib/compiler-rt/lib/asan/asan_thread.h head/contrib/compiler-rt/lib/asan/asan_win.cc head/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc head/contrib/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc head/contrib/compiler-rt/lib/asan/scripts/asan_symbolize.py head/contrib/compiler-rt/lib/asan/tests/asan_asm_test.cc head/contrib/compiler-rt/lib/asan/tests/asan_str_test.cc head/contrib/compiler-rt/lib/asan/tests/asan_test.cc head/contrib/compiler-rt/lib/builtins/clear_cache.c head/contrib/compiler-rt/lib/builtins/enable_execute_stack.c head/contrib/compiler-rt/lib/builtins/fixdfdi.c head/contrib/compiler-rt/lib/builtins/fixsfdi.c head/contrib/compiler-rt/lib/builtins/fixunsdfdi.c head/contrib/compiler-rt/lib/builtins/fixunsdfti.c head/contrib/compiler-rt/lib/builtins/fixunssfdi.c head/contrib/compiler-rt/lib/builtins/fp_extend.h head/contrib/compiler-rt/lib/builtins/fp_extend_impl.inc head/contrib/compiler-rt/lib/builtins/fp_trunc.h head/contrib/compiler-rt/lib/builtins/fp_trunc_impl.inc head/contrib/compiler-rt/lib/builtins/int_endianness.h head/contrib/compiler-rt/lib/builtins/int_lib.h head/contrib/compiler-rt/lib/dfsan/dfsan.cc head/contrib/compiler-rt/lib/dfsan/dfsan_custom.cc head/contrib/compiler-rt/lib/dfsan/done_abilist.txt head/contrib/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh head/contrib/compiler-rt/lib/interception/interception.h head/contrib/compiler-rt/lib/interception/interception_win.cc head/contrib/compiler-rt/lib/lsan/lsan_common.cc head/contrib/compiler-rt/lib/lsan/lsan_common.h head/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc head/contrib/compiler-rt/lib/lsan/lsan_thread.h head/contrib/compiler-rt/lib/msan/msan.cc head/contrib/compiler-rt/lib/msan/msan.h head/contrib/compiler-rt/lib/msan/msan.syms.extra head/contrib/compiler-rt/lib/msan/msan_allocator.cc head/contrib/compiler-rt/lib/msan/msan_interceptors.cc head/contrib/compiler-rt/lib/msan/msan_interface_internal.h head/contrib/compiler-rt/lib/msan/msan_linux.cc head/contrib/compiler-rt/lib/msan/msan_new_delete.cc head/contrib/compiler-rt/lib/msan/msan_origin.h head/contrib/compiler-rt/lib/msan/msan_poisoning.cc head/contrib/compiler-rt/lib/msan/msan_report.cc head/contrib/compiler-rt/lib/msan/msan_thread.cc head/contrib/compiler-rt/lib/msan/tests/msan_test.cc head/contrib/compiler-rt/lib/profile/GCDAProfiling.c head/contrib/compiler-rt/lib/profile/InstrProfiling.h head/contrib/compiler-rt/lib/profile/InstrProfilingFile.c head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_msvc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector1.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_printf.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh head/contrib/compiler-rt/lib/sanitizer_common/scripts/cpplint.py head/contrib/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py head/contrib/compiler-rt/lib/sanitizer_common/scripts/litlint.py head/contrib/compiler-rt/lib/sanitizer_common/scripts/sancov.py head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc head/contrib/compiler-rt/lib/tsan/dd/dd_rtl.h head/contrib/compiler-rt/lib/tsan/go/buildgo.sh head/contrib/compiler-rt/lib/tsan/rtl/tsan.syms.extra head/contrib/compiler-rt/lib/tsan/rtl/tsan_defs.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_fd.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_fd.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_symbolize.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_symbolize.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_sync.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_sync.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h head/contrib/compiler-rt/lib/ubsan/ubsan_diag.cc head/contrib/compiler-rt/lib/ubsan/ubsan_diag.h head/contrib/compiler-rt/lib/ubsan/ubsan_flags.cc head/contrib/compiler-rt/lib/ubsan/ubsan_flags.h head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.h head/contrib/compiler-rt/lib/ubsan/ubsan_init.cc head/contrib/compiler-rt/lib/ubsan/ubsan_init.h head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash.cc head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash.h head/contrib/compiler-rt/lib/ubsan/ubsan_value.cc head/contrib/compiler-rt/lib/ubsan/ubsan_value.h head/contrib/libc++/CREDITS.TXT head/contrib/libc++/LICENSE.TXT head/contrib/libc++/include/__config head/contrib/libc++/include/__debug head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__refstring head/contrib/libc++/include/__split_buffer head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/array head/contrib/libc++/include/atomic head/contrib/libc++/include/cctype head/contrib/libc++/include/cinttypes head/contrib/libc++/include/clocale head/contrib/libc++/include/cmath head/contrib/libc++/include/cstdio head/contrib/libc++/include/cstdlib head/contrib/libc++/include/cstring head/contrib/libc++/include/ctime head/contrib/libc++/include/cwchar head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/experimental/__config head/contrib/libc++/include/experimental/dynarray head/contrib/libc++/include/experimental/string_view head/contrib/libc++/include/experimental/type_traits head/contrib/libc++/include/experimental/utility head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/iosfwd head/contrib/libc++/include/iostream head/contrib/libc++/include/iterator head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/module.modulemap head/contrib/libc++/include/mutex head/contrib/libc++/include/new head/contrib/libc++/include/ostream head/contrib/libc++/include/queue head/contrib/libc++/include/random head/contrib/libc++/include/ratio head/contrib/libc++/include/regex head/contrib/libc++/include/scoped_allocator head/contrib/libc++/include/set head/contrib/libc++/include/shared_mutex head/contrib/libc++/include/stack head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/unordered_map head/contrib/libc++/include/unordered_set head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/chrono.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/ios.cpp head/contrib/libc++/src/iostream.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/shared_mutex.cpp head/contrib/libc++/src/string.cpp head/contrib/libc++/src/system_error.cpp head/contrib/libc++/src/thread.cpp head/contrib/libcxxrt/exception.cc head/contrib/llvm/FREEBSD-Xlist head/contrib/llvm/LICENSE.TXT head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Linker.h head/contrib/llvm/include/llvm-c/Object.h head/contrib/llvm/include/llvm-c/Support.h head/contrib/llvm/include/llvm-c/TargetMachine.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/APSInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/BitVector.h head/contrib/llvm/include/llvm/ADT/DeltaAlgorithm.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h head/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h head/contrib/llvm/include/llvm/ADT/FoldingSet.h head/contrib/llvm/include/llvm/ADT/Hashing.h head/contrib/llvm/include/llvm/ADT/ImmutableList.h head/contrib/llvm/include/llvm/ADT/ImmutableMap.h head/contrib/llvm/include/llvm/ADT/ImmutableSet.h head/contrib/llvm/include/llvm/ADT/IndexedMap.h head/contrib/llvm/include/llvm/ADT/IntervalMap.h head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h head/contrib/llvm/include/llvm/ADT/MapVector.h head/contrib/llvm/include/llvm/ADT/None.h head/contrib/llvm/include/llvm/ADT/Optional.h head/contrib/llvm/include/llvm/ADT/PointerUnion.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/ScopedHashTable.h head/contrib/llvm/include/llvm/ADT/SmallBitVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/SparseBitVector.h head/contrib/llvm/include/llvm/ADT/SparseMultiSet.h head/contrib/llvm/include/llvm/ADT/SparseSet.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/StringRef.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/Twine.h head/contrib/llvm/include/llvm/ADT/edit_distance.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/ADT/iterator.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/AssumptionCache.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CFG.h head/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h head/contrib/llvm/include/llvm/Analysis/CallGraph.h head/contrib/llvm/include/llvm/Analysis/ConstantFolding.h head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/IntervalIterator.h head/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h head/contrib/llvm/include/llvm/Analysis/LibCallAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/LibCallSemantics.h head/contrib/llvm/include/llvm/Analysis/Loads.h head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/PHITransAddr.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h head/contrib/llvm/include/llvm/Analysis/RegionIterator.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Analysis/SparsePropagation.h head/contrib/llvm/include/llvm/Analysis/TargetFolder.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/AsmParser/Parser.h head/contrib/llvm/include/llvm/Bitcode/BitCodes.h head/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h head/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h head/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h head/contrib/llvm/include/llvm/CodeGen/DIE.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/GCMetadata.h head/contrib/llvm/include/llvm/CodeGen/GCMetadataPrinter.h head/contrib/llvm/include/llvm/CodeGen/GCStrategy.h head/contrib/llvm/include/llvm/CodeGen/GCs.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h head/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h head/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h head/contrib/llvm/include/llvm/CodeGen/LiveRegMatrix.h head/contrib/llvm/include/llvm/CodeGen/LiveStackAnalysis.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h head/contrib/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h head/contrib/llvm/include/llvm/CodeGen/MachineDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunction.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachinePassRegistry.h head/contrib/llvm/include/llvm/CodeGen/MachinePostDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineSSAUpdater.h head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h head/contrib/llvm/include/llvm/CodeGen/MachineValueType.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h head/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h head/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/StackMaps.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.td head/contrib/llvm/include/llvm/CodeGen/VirtRegMap.h head/contrib/llvm/include/llvm/DebugInfo/DIContext.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h head/contrib/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h head/contrib/llvm/include/llvm/IR/Argument.h head/contrib/llvm/include/llvm/IR/Attributes.h head/contrib/llvm/include/llvm/IR/BasicBlock.h head/contrib/llvm/include/llvm/IR/CFG.h head/contrib/llvm/include/llvm/IR/CallSite.h head/contrib/llvm/include/llvm/IR/Comdat.h head/contrib/llvm/include/llvm/IR/Constant.h head/contrib/llvm/include/llvm/IR/ConstantFolder.h head/contrib/llvm/include/llvm/IR/ConstantRange.h head/contrib/llvm/include/llvm/IR/Constants.h head/contrib/llvm/include/llvm/IR/DIBuilder.h head/contrib/llvm/include/llvm/IR/DataLayout.h head/contrib/llvm/include/llvm/IR/DebugInfo.h head/contrib/llvm/include/llvm/IR/DebugLoc.h head/contrib/llvm/include/llvm/IR/DerivedTypes.h head/contrib/llvm/include/llvm/IR/DiagnosticInfo.h head/contrib/llvm/include/llvm/IR/DiagnosticPrinter.h head/contrib/llvm/include/llvm/IR/Dominators.h head/contrib/llvm/include/llvm/IR/Function.h head/contrib/llvm/include/llvm/IR/GVMaterializer.h head/contrib/llvm/include/llvm/IR/GetElementPtrTypeIterator.h head/contrib/llvm/include/llvm/IR/GlobalAlias.h head/contrib/llvm/include/llvm/IR/GlobalObject.h head/contrib/llvm/include/llvm/IR/GlobalValue.h head/contrib/llvm/include/llvm/IR/GlobalVariable.h head/contrib/llvm/include/llvm/IR/IRBuilder.h head/contrib/llvm/include/llvm/IR/IRPrintingPasses.h head/contrib/llvm/include/llvm/IR/InlineAsm.h head/contrib/llvm/include/llvm/IR/InstIterator.h head/contrib/llvm/include/llvm/IR/InstVisitor.h head/contrib/llvm/include/llvm/IR/InstrTypes.h head/contrib/llvm/include/llvm/IR/Instruction.h head/contrib/llvm/include/llvm/IR/Instructions.h head/contrib/llvm/include/llvm/IR/IntrinsicInst.h head/contrib/llvm/include/llvm/IR/Intrinsics.h head/contrib/llvm/include/llvm/IR/Intrinsics.td head/contrib/llvm/include/llvm/IR/IntrinsicsARM.td head/contrib/llvm/include/llvm/IR/IntrinsicsHexagon.td head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td head/contrib/llvm/include/llvm/IR/LLVMContext.h head/contrib/llvm/include/llvm/IR/LegacyPassManager.h head/contrib/llvm/include/llvm/IR/LegacyPassNameParser.h head/contrib/llvm/include/llvm/IR/MDBuilder.h head/contrib/llvm/include/llvm/IR/Mangler.h head/contrib/llvm/include/llvm/IR/Metadata.def head/contrib/llvm/include/llvm/IR/Metadata.h head/contrib/llvm/include/llvm/IR/Module.h head/contrib/llvm/include/llvm/IR/NoFolder.h head/contrib/llvm/include/llvm/IR/OperandTraits.h head/contrib/llvm/include/llvm/IR/Operator.h head/contrib/llvm/include/llvm/IR/PassManager.h head/contrib/llvm/include/llvm/IR/PassManagerInternal.h head/contrib/llvm/include/llvm/IR/PatternMatch.h head/contrib/llvm/include/llvm/IR/PredIteratorCache.h head/contrib/llvm/include/llvm/IR/Statepoint.h head/contrib/llvm/include/llvm/IR/Type.h head/contrib/llvm/include/llvm/IR/TypeBuilder.h head/contrib/llvm/include/llvm/IR/Use.h head/contrib/llvm/include/llvm/IR/UseListOrder.h head/contrib/llvm/include/llvm/IR/User.h head/contrib/llvm/include/llvm/IR/Value.h head/contrib/llvm/include/llvm/IR/ValueHandle.h head/contrib/llvm/include/llvm/IR/ValueMap.h head/contrib/llvm/include/llvm/IR/Verifier.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/LTO/LTOCodeGenerator.h head/contrib/llvm/include/llvm/LTO/LTOModule.h head/contrib/llvm/include/llvm/LineEditor/LineEditor.h head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker/Linker.h head/contrib/llvm/include/llvm/MC/ConstantPools.h head/contrib/llvm/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h head/contrib/llvm/include/llvm/MC/MCAsmLayout.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCCodeEmitter.h head/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCELFStreamer.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCFixup.h head/contrib/llvm/include/llvm/MC/MCFixupKindInfo.h head/contrib/llvm/include/llvm/MC/MCInst.h head/contrib/llvm/include/llvm/MC/MCInstBuilder.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h head/contrib/llvm/include/llvm/MC/MCInstrDesc.h head/contrib/llvm/include/llvm/MC/MCInstrInfo.h head/contrib/llvm/include/llvm/MC/MCInstrItineraries.h head/contrib/llvm/include/llvm/MC/MCLabel.h head/contrib/llvm/include/llvm/MC/MCLinkerOptimizationHint.h head/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCObjectWriter.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h head/contrib/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h head/contrib/llvm/include/llvm/MC/MCRelocationInfo.h head/contrib/llvm/include/llvm/MC/MCSchedule.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionCOFF.h head/contrib/llvm/include/llvm/MC/MCSectionELF.h head/contrib/llvm/include/llvm/MC/MCSectionMachO.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h head/contrib/llvm/include/llvm/MC/MCSymbol.h head/contrib/llvm/include/llvm/MC/MCSymbolizer.h head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h head/contrib/llvm/include/llvm/MC/MCTargetOptions.h head/contrib/llvm/include/llvm/MC/MCValue.h head/contrib/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCWinCOFFStreamer.h head/contrib/llvm/include/llvm/MC/MCWinEH.h head/contrib/llvm/include/llvm/MC/SectionKind.h head/contrib/llvm/include/llvm/MC/SubtargetFeature.h head/contrib/llvm/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/Binary.h head/contrib/llvm/include/llvm/Object/COFF.h head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Object/ELFObjectFile.h head/contrib/llvm/include/llvm/Object/ELFTypes.h head/contrib/llvm/include/llvm/Object/ELFYAML.h head/contrib/llvm/include/llvm/Object/Error.h head/contrib/llvm/include/llvm/Object/IRObjectFile.h head/contrib/llvm/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Object/MachOUniversal.h head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/Object/RelocVisitor.h head/contrib/llvm/include/llvm/Object/SymbolicFile.h head/contrib/llvm/include/llvm/Option/Arg.h head/contrib/llvm/include/llvm/Option/ArgList.h head/contrib/llvm/include/llvm/Option/OptSpecifier.h head/contrib/llvm/include/llvm/Option/OptTable.h head/contrib/llvm/include/llvm/Option/Option.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/PassInfo.h head/contrib/llvm/include/llvm/ProfileData/CoverageMapping.h head/contrib/llvm/include/llvm/ProfileData/CoverageMappingReader.h head/contrib/llvm/include/llvm/ProfileData/InstrProf.h head/contrib/llvm/include/llvm/ProfileData/InstrProfReader.h head/contrib/llvm/include/llvm/ProfileData/InstrProfWriter.h head/contrib/llvm/include/llvm/ProfileData/SampleProf.h head/contrib/llvm/include/llvm/Support/ARMBuildAttributes.h head/contrib/llvm/include/llvm/Support/AlignOf.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/BranchProbability.h head/contrib/llvm/include/llvm/Support/COFF.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/Compression.h head/contrib/llvm/include/llvm/Support/ConvertUTF.h head/contrib/llvm/include/llvm/Support/CrashRecoveryContext.h head/contrib/llvm/include/llvm/Support/DataExtractor.h head/contrib/llvm/include/llvm/Support/DataStream.h head/contrib/llvm/include/llvm/Support/Debug.h head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/ELFRelocs/Hexagon.def head/contrib/llvm/include/llvm/Support/ELFRelocs/Mips.def head/contrib/llvm/include/llvm/Support/ELFRelocs/Sparc.def head/contrib/llvm/include/llvm/Support/Endian.h head/contrib/llvm/include/llvm/Support/EndianStream.h head/contrib/llvm/include/llvm/Support/ErrorOr.h head/contrib/llvm/include/llvm/Support/FileOutputBuffer.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/FileUtilities.h head/contrib/llvm/include/llvm/Support/Format.h head/contrib/llvm/include/llvm/Support/FormattedStream.h head/contrib/llvm/include/llvm/Support/GCOV.h head/contrib/llvm/include/llvm/Support/GenericDomTree.h head/contrib/llvm/include/llvm/Support/GenericDomTreeConstruction.h head/contrib/llvm/include/llvm/Support/GraphWriter.h head/contrib/llvm/include/llvm/Support/LockFileManager.h head/contrib/llvm/include/llvm/Support/MathExtras.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/Mutex.h head/contrib/llvm/include/llvm/Support/MutexGuard.h head/contrib/llvm/include/llvm/Support/OnDiskHashTable.h head/contrib/llvm/include/llvm/Support/Options.h head/contrib/llvm/include/llvm/Support/PrettyStackTrace.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/RWMutex.h head/contrib/llvm/include/llvm/Support/RandomNumberGenerator.h head/contrib/llvm/include/llvm/Support/Regex.h head/contrib/llvm/include/llvm/Support/Registry.h head/contrib/llvm/include/llvm/Support/ScaledNumber.h head/contrib/llvm/include/llvm/Support/Signals.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/SpecialCaseList.h head/contrib/llvm/include/llvm/Support/StreamingMemoryObject.h head/contrib/llvm/include/llvm/Support/StringPool.h head/contrib/llvm/include/llvm/Support/SwapByteOrder.h head/contrib/llvm/include/llvm/Support/SystemUtils.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/Timer.h head/contrib/llvm/include/llvm/Support/ToolOutputFile.h head/contrib/llvm/include/llvm/Support/UnicodeCharRanges.h head/contrib/llvm/include/llvm/Support/UniqueLock.h head/contrib/llvm/include/llvm/Support/Watchdog.h head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/YAMLTraits.h head/contrib/llvm/include/llvm/Support/circular_raw_ostream.h head/contrib/llvm/include/llvm/Support/raw_os_ostream.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/Support/type_traits.h head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/TableGen/SetTheory.h head/contrib/llvm/include/llvm/TableGen/TableGenBackend.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetCallingConv.h head/contrib/llvm/include/llvm/Target/TargetFrameLowering.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetIntrinsicInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOpcodes.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h head/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/SymbolRewriter.h head/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h head/contrib/llvm/include/llvm/module.modulemap head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisCounter.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasDebugger.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/AssumptionCache.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/CFG.cpp head/contrib/llvm/lib/Analysis/CFGPrinter.cpp head/contrib/llvm/lib/Analysis/CFLAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/CodeMetrics.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/CostModel.cpp head/contrib/llvm/lib/Analysis/Delinearization.cpp head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp head/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/IPA/InlineCost.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/LibCallAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/LibCallSemantics.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp head/contrib/llvm/lib/Analysis/NoAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/RegionPass.cpp head/contrib/llvm/lib/Analysis/RegionPrinter.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp head/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLLexer.h head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/AsmParser/Parser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AllocationOrder.h head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h head/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp head/contrib/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.h head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp head/contrib/llvm/lib/CodeGen/ErlangGC.cpp head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/CodeGen/GCMetadata.cpp head/contrib/llvm/lib/CodeGen/GCMetadataPrinter.cpp head/contrib/llvm/lib/CodeGen/GCStrategy.cpp head/contrib/llvm/lib/CodeGen/GlobalMerge.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.h head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LatencyPriorityQueue.cpp head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.h head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LivePhysRegs.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineCombiner.cpp head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/MachineDominators.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineLoopInfo.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/OcamlGC.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.h head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/StackColoring.cpp head/contrib/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp head/contrib/llvm/lib/CodeGen/StackMaps.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp head/contrib/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c head/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/IR/AsmWriter.cpp head/contrib/llvm/lib/IR/AttributeImpl.h head/contrib/llvm/lib/IR/Attributes.cpp head/contrib/llvm/lib/IR/AutoUpgrade.cpp head/contrib/llvm/lib/IR/BasicBlock.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/IR/ConstantFold.h head/contrib/llvm/lib/IR/ConstantRange.cpp head/contrib/llvm/lib/IR/Constants.cpp head/contrib/llvm/lib/IR/ConstantsContext.h head/contrib/llvm/lib/IR/Core.cpp head/contrib/llvm/lib/IR/DIBuilder.cpp head/contrib/llvm/lib/IR/DataLayout.cpp head/contrib/llvm/lib/IR/DebugInfo.cpp head/contrib/llvm/lib/IR/DebugLoc.cpp head/contrib/llvm/lib/IR/DiagnosticInfo.cpp head/contrib/llvm/lib/IR/DiagnosticPrinter.cpp head/contrib/llvm/lib/IR/Dominators.cpp head/contrib/llvm/lib/IR/Function.cpp head/contrib/llvm/lib/IR/GCOV.cpp head/contrib/llvm/lib/IR/Globals.cpp head/contrib/llvm/lib/IR/IRBuilder.cpp head/contrib/llvm/lib/IR/IRPrintingPasses.cpp head/contrib/llvm/lib/IR/InlineAsm.cpp head/contrib/llvm/lib/IR/Instruction.cpp head/contrib/llvm/lib/IR/Instructions.cpp head/contrib/llvm/lib/IR/LLVMContext.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.h head/contrib/llvm/lib/IR/LegacyPassManager.cpp head/contrib/llvm/lib/IR/MDBuilder.cpp head/contrib/llvm/lib/IR/Mangler.cpp head/contrib/llvm/lib/IR/Metadata.cpp head/contrib/llvm/lib/IR/MetadataTracking.cpp head/contrib/llvm/lib/IR/Module.cpp head/contrib/llvm/lib/IR/Pass.cpp head/contrib/llvm/lib/IR/Statepoint.cpp head/contrib/llvm/lib/IR/Type.cpp head/contrib/llvm/lib/IR/TypeFinder.cpp head/contrib/llvm/lib/IR/User.cpp head/contrib/llvm/lib/IR/Value.cpp head/contrib/llvm/lib/IR/ValueSymbolTable.cpp head/contrib/llvm/lib/IR/ValueTypes.cpp head/contrib/llvm/lib/IR/Verifier.cpp head/contrib/llvm/lib/IRReader/IRReader.cpp head/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp head/contrib/llvm/lib/LTO/LTOModule.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/MC/ConstantPools.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmBackend.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp head/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp head/contrib/llvm/lib/MC/MCAsmInfoELF.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCCodeGenInfo.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELFObjectTargetWriter.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCInst.cpp head/contrib/llvm/lib/MC/MCInstPrinter.cpp head/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCMachObjectTargetWriter.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCObjectWriter.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCSection.cpp head/contrib/llvm/lib/MC/MCSectionCOFF.cpp head/contrib/llvm/lib/MC/MCSectionELF.cpp head/contrib/llvm/lib/MC/MCSectionMachO.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSubtargetInfo.cpp head/contrib/llvm/lib/MC/MCSymbol.cpp head/contrib/llvm/lib/MC/MCValue.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/MCWinEH.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/SubtargetFeature.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Object/Archive.cpp head/contrib/llvm/lib/Object/Binary.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/ELFYAML.cpp head/contrib/llvm/lib/Object/Error.cpp head/contrib/llvm/lib/Object/IRObjectFile.cpp head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/MachOUniversal.cpp head/contrib/llvm/lib/Object/Object.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Object/RecordStreamer.cpp head/contrib/llvm/lib/Object/RecordStreamer.h head/contrib/llvm/lib/Object/SymbolicFile.cpp head/contrib/llvm/lib/Option/Arg.cpp head/contrib/llvm/lib/Option/ArgList.cpp head/contrib/llvm/lib/Option/OptTable.cpp head/contrib/llvm/lib/Option/Option.cpp head/contrib/llvm/lib/ProfileData/CoverageMapping.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingReader.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingWriter.cpp head/contrib/llvm/lib/ProfileData/InstrProf.cpp head/contrib/llvm/lib/ProfileData/InstrProfReader.cpp head/contrib/llvm/lib/ProfileData/InstrProfWriter.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/APSInt.cpp head/contrib/llvm/lib/Support/Allocator.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/Compression.cpp head/contrib/llvm/lib/Support/ConvertUTFWrapper.cpp head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp head/contrib/llvm/lib/Support/DataStream.cpp head/contrib/llvm/lib/Support/Debug.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/DynamicLibrary.cpp head/contrib/llvm/lib/Support/FileOutputBuffer.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/FormattedStream.cpp head/contrib/llvm/lib/Support/GraphWriter.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/Locale.cpp head/contrib/llvm/lib/Support/LockFileManager.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Process.cpp head/contrib/llvm/lib/Support/Program.cpp head/contrib/llvm/lib/Support/RandomNumberGenerator.cpp head/contrib/llvm/lib/Support/Regex.cpp head/contrib/llvm/lib/Support/ScaledNumber.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SmallVector.cpp head/contrib/llvm/lib/Support/SourceMgr.cpp head/contrib/llvm/lib/Support/SpecialCaseList.cpp head/contrib/llvm/lib/Support/StreamingMemoryObject.cpp head/contrib/llvm/lib/Support/StringExtras.cpp head/contrib/llvm/lib/Support/StringMap.cpp head/contrib/llvm/lib/Support/SystemUtils.cpp head/contrib/llvm/lib/Support/TargetRegistry.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Twine.cpp head/contrib/llvm/lib/Support/Unix/Host.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Unix/Program.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Valgrind.cpp head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Memory.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/Program.inc head/contrib/llvm/lib/Support/Windows/Signals.inc head/contrib/llvm/lib/Support/Windows/TimeValue.inc head/contrib/llvm/lib/Support/Windows/WindowsSupport.h head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/YAMLTraits.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Support/regcomp.c head/contrib/llvm/lib/TableGen/Error.cpp head/contrib/llvm/lib/TableGen/Main.cpp head/contrib/llvm/lib/TableGen/Record.cpp head/contrib/llvm/lib/TableGen/SetTheory.cpp head/contrib/llvm/lib/TableGen/TGLexer.h head/contrib/llvm/lib/TableGen/TGParser.cpp head/contrib/llvm/lib/TableGen/TGParser.h head/contrib/llvm/lib/TableGen/TableGenBackend.cpp head/contrib/llvm/lib/Target/AArch64/AArch64.h head/contrib/llvm/lib/Target/AArch64/AArch64.td head/contrib/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp head/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.h head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.td head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FastISel.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp head/contrib/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA57.td head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp head/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h head/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.h head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp head/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h head/contrib/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp head/contrib/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp head/contrib/llvm/lib/Target/Hexagon/Hexagon.h head/contrib/llvm/lib/Target/Hexagon/Hexagon.td head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h head/contrib/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsDerived.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV3.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOperands.td head/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h head/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.cpp head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.h head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h head/contrib/llvm/lib/Target/Mips/Mips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h head/contrib/llvm/lib/Target/Mips/MipsCCState.h head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h head/contrib/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp head/contrib/llvm/lib/Target/Mips/MipsOptionRecord.h head/contrib/llvm/lib/Target/Mips/MipsOs16.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsSchedule.td head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.h head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h head/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp head/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.td head/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.h head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXVector.td head/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp head/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td head/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP7.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP8.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp head/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h head/contrib/llvm/lib/Target/Sparc/Sparc.td head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td head/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp head/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp head/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp head/contrib/llvm/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp head/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h head/contrib/llvm/lib/Target/SystemZ/SystemZ.h head/contrib/llvm/lib/Target/SystemZ/SystemZ.td head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.h head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.td head/contrib/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.h head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZOperands.td head/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td head/contrib/llvm/lib/Target/SystemZ/SystemZPatterns.td head/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetMachineC.cpp head/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h head/contrib/llvm/lib/Target/X86/AsmParser/X86Operand.h head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.h head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrExtension.td head/contrib/llvm/lib/Target/X86/X86InstrFMA.td head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrSGX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrXOP.td head/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h head/contrib/llvm/lib/Target/X86/X86PadShortFunction.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86SchedHaswell.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.h head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.h head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp head/contrib/llvm/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp head/contrib/llvm/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h head/contrib/llvm/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp head/contrib/llvm/lib/Target/XCore/XCore.h head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h head/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.cpp head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.h head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.h head/contrib/llvm/lib/Target/XCore/XCoreTargetStreamer.h head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPO.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DCE.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoadCombine.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp head/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalarizer.cpp head/contrib/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/ASanStackFrameLayout.cpp head/contrib/llvm/lib/Transforms/Utils/AddDiscriminators.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/CtorUtils.cpp head/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/SymbolRewriter.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp head/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp head/contrib/llvm/patches/README.TXT head/contrib/llvm/tools/bugpoint/BugDriver.cpp head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.h head/contrib/llvm/tools/bugpoint/bugpoint.cpp head/contrib/llvm/tools/clang/FREEBSD-Xlist head/contrib/llvm/tools/clang/LICENSE.TXT head/contrib/llvm/tools/clang/include/clang-c/BuildSystem.h head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h head/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/ASTUnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/AttrIterator.h head/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h head/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h head/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h head/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h head/contrib/llvm/tools/clang/include/clang/AST/DataRecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/LambdaCapture.h head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/OpenMPClause.h head/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h head/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h head/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Parser.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Registry.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h head/contrib/llvm/tools/clang/include/clang/Basic/ABI.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommentKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Linkage.h head/contrib/llvm/tools/clang/include/clang/Basic/Module.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/PlistSupport.h head/contrib/llvm/tools/clang/include/clang/Basic/SanitizerBlacklist.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/Multilib.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Driver/Types.h head/contrib/llvm/tools/clang/include/clang/Format/Format.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CommandLineSourceLoc.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOutputOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Index/USRGeneration.h head/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroArgs.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PPConditionalDirectiveRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/DeltaTree.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteRope.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/TokenRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h head/contrib/llvm/tools/clang/include/clang/Sema/Template.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h head/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h head/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h head/contrib/llvm/tools/clang/include/clang/module.modulemap head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMTActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h head/contrib/llvm/tools/clang/lib/AST/ASTConsumer.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp head/contrib/llvm/tools/clang/lib/AST/CXXABI.h head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclGroup.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtIterator.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Diagnostics.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Parser.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/VariantValue.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp head/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyCommon.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyTIL.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/Basic/Module.cpp head/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/SanitizerBlacklist.cpp head/contrib/llvm/tools/clang/lib/Basic/Sanitizers.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/Basic/VirtualFileSystem.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp head/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.cpp head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.h head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/CrossWindowsToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/Multilib.cpp head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Edit/EditedSource.cpp head/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h head/contrib/llvm/tools/clang/lib/Format/Format.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.h head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.h head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp head/contrib/llvm/tools/clang/lib/Headers/Intrin.h head/contrib/llvm/tools/clang/lib/Headers/__stddef_max_align_t.h head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h head/contrib/llvm/tools/clang/lib/Headers/adxintrin.h head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/ammintrin.h head/contrib/llvm/tools/clang/lib/Headers/arm_acle.h head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512erintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h head/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h head/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h head/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h head/contrib/llvm/tools/clang/lib/Headers/immintrin.h head/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h head/contrib/llvm/tools/clang/lib/Headers/mmintrin.h head/contrib/llvm/tools/clang/lib/Headers/module.modulemap head/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h head/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h head/contrib/llvm/tools/clang/lib/Headers/shaintrin.h head/contrib/llvm/tools/clang/lib/Headers/smmintrin.h head/contrib/llvm/tools/clang/lib/Headers/stdatomic.h head/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h head/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/xopintrin.h head/contrib/llvm/tools/clang/lib/Index/SimpleFormatContext.h head/contrib/llvm/tools/clang/lib/Index/USRGeneration.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp head/contrib/llvm/tools/clang/lib/Lex/PPConditionalDirectiveRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp head/contrib/llvm/tools/clang/lib/Sema/Scope.cpp head/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp head/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h head/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp head/contrib/llvm/tools/clang/lib/Tooling/FileMatchTrie.cpp head/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp head/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lldb/FREEBSD-Xlist head/contrib/llvm/tools/lldb/include/lldb/API/LLDB.h head/contrib/llvm/tools/lldb/include/lldb/API/SBAddress.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBlock.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpoint.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpointLocation.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBroadcaster.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandReturnObject.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommunication.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCompileUnit.h head/contrib/llvm/tools/lldb/include/lldb/API/SBData.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDeclaration.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDefines.h head/contrib/llvm/tools/lldb/include/lldb/API/SBError.h head/contrib/llvm/tools/lldb/include/lldb/API/SBEvent.h head/contrib/llvm/tools/lldb/include/lldb/API/SBExecutionContext.h head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpecList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFrame.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFunction.h head/contrib/llvm/tools/lldb/include/lldb/API/SBHostOS.h head/contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h head/contrib/llvm/tools/lldb/include/lldb/API/SBInstructionList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBLineEntry.h head/contrib/llvm/tools/lldb/include/lldb/API/SBListener.h head/contrib/llvm/tools/lldb/include/lldb/API/SBModule.h head/contrib/llvm/tools/lldb/include/lldb/API/SBModuleSpec.h head/contrib/llvm/tools/lldb/include/lldb/API/SBPlatform.h head/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h head/contrib/llvm/tools/lldb/include/lldb/API/SBQueue.h head/contrib/llvm/tools/lldb/include/lldb/API/SBQueueItem.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSection.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSourceManager.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStream.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStringList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSymbol.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSymbolContext.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSymbolContextList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadCollection.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadPlan.h head/contrib/llvm/tools/lldb/include/lldb/API/SBType.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeCategory.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeEnumMember.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeFilter.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeFormat.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeNameSpecifier.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeSummary.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeSynthetic.h head/contrib/llvm/tools/lldb/include/lldb/API/SBUnixSignals.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValue.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValueList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBWatchpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointOptions.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSite.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/StoppointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Watchpoint.h head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h head/contrib/llvm/tools/lldb/include/lldb/Core/ArchSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/Broadcaster.h head/contrib/llvm/tools/lldb/include/lldb/Core/ClangForward.h head/contrib/llvm/tools/lldb/include/lldb/Core/Communication.h head/contrib/llvm/tools/lldb/include/lldb/Core/Connection.h head/contrib/llvm/tools/lldb/include/lldb/Core/ConnectionMachPort.h head/contrib/llvm/tools/lldb/include/lldb/Core/ConnectionSharedMemory.h head/contrib/llvm/tools/lldb/include/lldb/Core/ConstString.h head/contrib/llvm/tools/lldb/include/lldb/Core/DataEncoder.h head/contrib/llvm/tools/lldb/include/lldb/Core/DataExtractor.h head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h head/contrib/llvm/tools/lldb/include/lldb/Core/Disassembler.h head/contrib/llvm/tools/lldb/include/lldb/Core/IOHandler.h head/contrib/llvm/tools/lldb/include/lldb/Core/Log.h head/contrib/llvm/tools/lldb/include/lldb/Core/Mangled.h head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleList.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/PluginManager.h head/contrib/llvm/tools/lldb/include/lldb/Core/RangeMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/RegularExpression.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamAsynchronousIO.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamFile.h head/contrib/llvm/tools/lldb/include/lldb/Core/StringList.h head/contrib/llvm/tools/lldb/include/lldb/Core/StructuredData.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObject.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectChild.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectDynamicValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeFormat.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSummary.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSynthetic.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeValidator.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ASTResultSynthesizer.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ASTStructExtractor.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangASTSource.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangExpressionDeclMap.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangExpressionParser.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangFunction.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangModulesDeclVendor.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangPersistentVariables.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRForTarget.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRMemoryMap.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRToDWARF.h head/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h head/contrib/llvm/tools/lldb/include/lldb/Host/File.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSystem.h head/contrib/llvm/tools/lldb/include/lldb/Host/Host.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfo.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfoBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/PipeBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/Socket.h head/contrib/llvm/tools/lldb/include/lldb/Host/SocketAddress.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostProcessPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostThreadPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/PipePosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ProcessLauncherPosix.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Args.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObject.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupPlatform.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValue.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArch.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueArray.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueBoolean.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueChar.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueDictionary.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueEnumeration.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFormat.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValuePathMappings.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueProperties.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueRegex.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueSInt64.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueString.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUInt64.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUUID.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValues.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/PythonDataObjects.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTType.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompileUnit.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/FuncUnwinders.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Function.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Symbol.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolVendor.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Symtab.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Type.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindPlan.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Variable.h head/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h head/contrib/llvm/tools/lldb/include/lldb/Target/CPPLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/FileAction.h head/contrib/llvm/tools/lldb/include/lldb/Target/LanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Memory.h head/contrib/llvm/tools/lldb/include/lldb/Target/ObjCLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h head/contrib/llvm/tools/lldb/include/lldb/Target/Process.h head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessLaunchInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadHistory.h head/contrib/llvm/tools/lldb/include/lldb/Target/StopInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/Target.h head/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallFunction.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h head/contrib/llvm/tools/lldb/include/lldb/Target/UnixSignals.h head/contrib/llvm/tools/lldb/include/lldb/Utility/AnsiTerminal.h head/contrib/llvm/tools/lldb/include/lldb/Utility/ProcessStructReader.h head/contrib/llvm/tools/lldb/include/lldb/Utility/PseudoTerminal.h head/contrib/llvm/tools/lldb/include/lldb/Utility/SharingPtr.h head/contrib/llvm/tools/lldb/include/lldb/lldb-defines.h head/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-interfaces.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-types.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private.h head/contrib/llvm/tools/lldb/source/API/SBAddress.cpp head/contrib/llvm/tools/lldb/source/API/SBBlock.cpp head/contrib/llvm/tools/lldb/source/API/SBCommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp head/contrib/llvm/tools/lldb/source/API/SBEvent.cpp head/contrib/llvm/tools/lldb/source/API/SBExpressionOptions.cpp head/contrib/llvm/tools/lldb/source/API/SBFileSpec.cpp head/contrib/llvm/tools/lldb/source/API/SBFrame.cpp head/contrib/llvm/tools/lldb/source/API/SBFunction.cpp head/contrib/llvm/tools/lldb/source/API/SBInstruction.cpp head/contrib/llvm/tools/lldb/source/API/SBInstructionList.cpp head/contrib/llvm/tools/lldb/source/API/SBListener.cpp head/contrib/llvm/tools/lldb/source/API/SBModule.cpp head/contrib/llvm/tools/lldb/source/API/SBPlatform.cpp head/contrib/llvm/tools/lldb/source/API/SBProcess.cpp head/contrib/llvm/tools/lldb/source/API/SBQueue.cpp head/contrib/llvm/tools/lldb/source/API/SBQueueItem.cpp head/contrib/llvm/tools/lldb/source/API/SBSourceManager.cpp head/contrib/llvm/tools/lldb/source/API/SBStream.cpp head/contrib/llvm/tools/lldb/source/API/SBSymbol.cpp head/contrib/llvm/tools/lldb/source/API/SBTarget.cpp head/contrib/llvm/tools/lldb/source/API/SBThread.cpp head/contrib/llvm/tools/lldb/source/API/SBThreadPlan.cpp head/contrib/llvm/tools/lldb/source/API/SBType.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeCategory.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeFilter.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeFormat.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeNameSpecifier.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeSummary.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeSynthetic.cpp head/contrib/llvm/tools/lldb/source/API/SBUnixSignals.cpp head/contrib/llvm/tools/lldb/source/API/SBValue.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationCollection.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverAddress.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSite.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/StoppointLocation.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandCompletions.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectApropos.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectArgs.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectGUI.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLog.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMultiword.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectQuit.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectRegister.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSettings.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSyntax.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectVersion.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.cpp head/contrib/llvm/tools/lldb/source/Core/Address.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolver.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolverName.cpp head/contrib/llvm/tools/lldb/source/Core/ArchSpec.cpp head/contrib/llvm/tools/lldb/source/Core/Broadcaster.cpp head/contrib/llvm/tools/lldb/source/Core/Communication.cpp head/contrib/llvm/tools/lldb/source/Core/ConnectionMachPort.cpp head/contrib/llvm/tools/lldb/source/Core/ConnectionSharedMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ConstString.cpp head/contrib/llvm/tools/lldb/source/Core/DataBufferHeap.cpp head/contrib/llvm/tools/lldb/source/Core/DataBufferMemoryMap.cpp head/contrib/llvm/tools/lldb/source/Core/DataEncoder.cpp head/contrib/llvm/tools/lldb/source/Core/DataExtractor.cpp head/contrib/llvm/tools/lldb/source/Core/Debugger.cpp head/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp head/contrib/llvm/tools/lldb/source/Core/DynamicLoader.cpp head/contrib/llvm/tools/lldb/source/Core/Error.cpp head/contrib/llvm/tools/lldb/source/Core/FastDemangle.cpp head/contrib/llvm/tools/lldb/source/Core/FileLineResolver.cpp head/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp head/contrib/llvm/tools/lldb/source/Core/Language.cpp head/contrib/llvm/tools/lldb/source/Core/Listener.cpp head/contrib/llvm/tools/lldb/source/Core/Log.cpp head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp head/contrib/llvm/tools/lldb/source/Core/Module.cpp head/contrib/llvm/tools/lldb/source/Core/ModuleList.cpp head/contrib/llvm/tools/lldb/source/Core/PluginManager.cpp head/contrib/llvm/tools/lldb/source/Core/RegisterValue.cpp head/contrib/llvm/tools/lldb/source/Core/RegularExpression.cpp head/contrib/llvm/tools/lldb/source/Core/Scalar.cpp head/contrib/llvm/tools/lldb/source/Core/SearchFilter.cpp head/contrib/llvm/tools/lldb/source/Core/Section.cpp head/contrib/llvm/tools/lldb/source/Core/SourceManager.cpp head/contrib/llvm/tools/lldb/source/Core/StreamAsynchronousIO.cpp head/contrib/llvm/tools/lldb/source/Core/StreamFile.cpp head/contrib/llvm/tools/lldb/source/Core/StringList.cpp head/contrib/llvm/tools/lldb/source/Core/StructuredData.cpp head/contrib/llvm/tools/lldb/source/Core/UUID.cpp head/contrib/llvm/tools/lldb/source/Core/UserSettingsController.cpp head/contrib/llvm/tools/lldb/source/Core/Value.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObject.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectChild.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResult.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectDynamicValue.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CF.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CXXFormatterFunctions.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/Cocoa.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/DataVisualization.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatCache.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxx.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxInitializerList.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxList.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxVector.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibStdcpp.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSArray.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSDictionary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSIndexPath.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSSet.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategory.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategoryMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSummary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSynthetic.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/ValueObjectPrinter.cpp head/contrib/llvm/tools/lldb/source/Expression/ASTResultSynthesizer.cpp head/contrib/llvm/tools/lldb/source/Expression/ASTStructExtractor.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangModulesDeclVendor.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangUserExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/DWARFExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/ExpressionSourceCode.cpp head/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp head/contrib/llvm/tools/lldb/source/Expression/IRForTarget.cpp head/contrib/llvm/tools/lldb/source/Expression/IRInterpreter.cpp head/contrib/llvm/tools/lldb/source/Expression/IRMemoryMap.cpp head/contrib/llvm/tools/lldb/source/Expression/Materializer.cpp head/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp head/contrib/llvm/tools/lldb/source/Host/common/File.cpp head/contrib/llvm/tools/lldb/source/Host/common/FileSpec.cpp head/contrib/llvm/tools/lldb/source/Host/common/Host.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostInfoBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpointList.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeThreadProtocol.cpp head/contrib/llvm/tools/lldb/source/Host/common/Socket.cpp head/contrib/llvm/tools/lldb/source/Host/common/SocketAddress.cpp head/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Host/common/Symbols.cpp head/contrib/llvm/tools/lldb/source/Host/common/Terminal.cpp head/contrib/llvm/tools/lldb/source/Host/common/ThreadLauncher.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/Host.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/ThisThread.cpp head/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/FileSystem.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostInfoPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostProcessPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Args.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandHistory.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectRegexCommand.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupBoolean.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupFile.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupFormat.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupOutputFile.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupPlatform.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupString.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupUInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupUUID.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupVariable.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValue.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArch.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArray.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueBoolean.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueChar.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueEnumeration.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpec.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormat.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValuePathMappings.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueRegex.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueSInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueString.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUUID.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Options.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Property.cpp head/contrib/llvm/tools/lldb/source/Interpreter/PythonDataObjects.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreterNone.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreterPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessMessage.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/FreeBSDSignals.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp head/contrib/llvm/tools/lldb/source/Symbol/Block.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTImporter.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompileUnit.cpp head/contrib/llvm/tools/lldb/source/Symbol/DWARFCallFrameInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/FuncUnwinders.cpp head/contrib/llvm/tools/lldb/source/Symbol/Function.cpp head/contrib/llvm/tools/lldb/source/Symbol/LineTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/ObjectFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symbol.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolVendor.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symtab.cpp head/contrib/llvm/tools/lldb/source/Symbol/Type.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp head/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp head/contrib/llvm/tools/lldb/source/Target/ABI.cpp head/contrib/llvm/tools/lldb/source/Target/ExecutionContext.cpp head/contrib/llvm/tools/lldb/source/Target/FileAction.cpp head/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Memory.cpp head/contrib/llvm/tools/lldb/source/Target/ObjCLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Platform.cpp head/contrib/llvm/tools/lldb/source/Target/Process.cpp head/contrib/llvm/tools/lldb/source/Target/ProcessLaunchInfo.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrame.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp head/contrib/llvm/tools/lldb/source/Target/StopInfo.cpp head/contrib/llvm/tools/lldb/source/Target/Target.cpp head/contrib/llvm/tools/lldb/source/Target/TargetList.cpp head/contrib/llvm/tools/lldb/source/Target/Thread.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlan.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallFunction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanPython.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanRunToAddress.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOut.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepThrough.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepUntil.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanTracer.cpp head/contrib/llvm/tools/lldb/source/Target/UnixSignals.cpp head/contrib/llvm/tools/lldb/source/Utility/PseudoTerminal.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.h head/contrib/llvm/tools/lldb/source/Utility/UriParser.cpp head/contrib/llvm/tools/lldb/source/Utility/UriParser.h head/contrib/llvm/tools/lldb/source/lldb.cpp head/contrib/llvm/tools/lldb/tools/compact-unwind/compact-unwind-dumper.c head/contrib/llvm/tools/lldb/tools/driver/Driver.cpp head/contrib/llvm/tools/lldb/tools/driver/Driver.h head/contrib/llvm/tools/lldb/tools/driver/Platform.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnConfig.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDataTypes.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIReadMe.txt head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonHelper.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemLinux.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemLinux.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemWindows.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemWindows.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.h head/contrib/llvm/tools/lli/RemoteMemoryManager.cpp head/contrib/llvm/tools/lli/RemoteMemoryManager.h head/contrib/llvm/tools/lli/RemoteTargetExternal.h head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-ar/llvm-ar.cpp head/contrib/llvm/tools/llvm-as/llvm-as.cpp head/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp head/contrib/llvm/tools/llvm-cov/CodeCoverage.cpp head/contrib/llvm/tools/llvm-cov/CoverageReport.cpp head/contrib/llvm/tools/llvm-cov/CoverageReport.h head/contrib/llvm/tools/llvm-cov/CoverageSummaryInfo.cpp head/contrib/llvm/tools/llvm-cov/CoverageSummaryInfo.h head/contrib/llvm/tools/llvm-cov/RenderingSupport.h head/contrib/llvm/tools/llvm-cov/SourceCoverageView.cpp head/contrib/llvm/tools/llvm-cov/SourceCoverageView.h head/contrib/llvm/tools/llvm-cov/gcov.cpp head/contrib/llvm/tools/llvm-cov/llvm-cov.cpp head/contrib/llvm/tools/llvm-dis/llvm-dis.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvm-objdump/COFFDump.cpp head/contrib/llvm/tools/llvm-objdump/ELFDump.cpp head/contrib/llvm/tools/llvm-objdump/MachODump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.h head/contrib/llvm/tools/llvm-profdata/llvm-profdata.cpp head/contrib/llvm/tools/llvm-readobj/ARMEHABIPrinter.h head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp head/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp head/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp head/contrib/llvm/tools/llvm-readobj/MachODumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.h head/contrib/llvm/tools/llvm-readobj/StreamWriter.h head/contrib/llvm/tools/llvm-readobj/Win64EHDumper.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.h head/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp head/contrib/llvm/tools/llvm-stress/llvm-stress.cpp head/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp head/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.h head/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp head/contrib/llvm/tools/macho-dump/macho-dump.cpp head/contrib/llvm/tools/opt/BreakpointPrinter.cpp head/contrib/llvm/tools/opt/NewPMDriver.cpp head/contrib/llvm/tools/opt/NewPMDriver.h head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.h head/contrib/llvm/utils/TableGen/CTagsEmitter.cpp head/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h head/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerShared.h head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangdriver/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclangstaticanalyzercheckers/Makefile head/lib/clang/libclangstaticanalyzercore/Makefile head/lib/clang/liblldb/Makefile head/lib/clang/liblldbAPI/Makefile head/lib/clang/liblldbCommands/Makefile head/lib/clang/liblldbCore/Makefile head/lib/clang/liblldbDataFormatters/Makefile head/lib/clang/liblldbHostCommon/Makefile head/lib/clang/liblldbHostPOSIX/Makefile head/lib/clang/liblldbInterpreter/Makefile head/lib/clang/liblldbPluginProcessElfCore/Makefile head/lib/clang/liblldbPluginProcessFreeBSD/Makefile head/lib/clang/liblldbPluginProcessGDBRemote/Makefile head/lib/clang/liblldbPluginProcessPOSIX/Makefile head/lib/clang/liblldbPluginProcessUtility/Makefile head/lib/clang/liblldbTarget/Makefile head/lib/clang/liblldbUtility/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmbitwriter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvmexecutionengine/Makefile head/lib/clang/libllvminstrumentation/Makefile head/lib/clang/libllvmipo/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmcdisassembler/Makefile head/lib/clang/libllvmmcjit/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmobjcarcopts/Makefile head/lib/clang/libllvmobject/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmprofiledata/Makefile head/lib/clang/libllvmruntimedyld/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmsparccodegen/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmtablegen/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmvectorize/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/libc++/Makefile head/lib/libclang_rt/Makefile head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/asan/Makefile head/lib/libclang_rt/asan_cxx/Makefile head/lib/libclang_rt/profile/Makefile head/lib/libcompiler_rt/Makefile head/lib/libcxxrt/Version.map head/share/mk/bsd.sys.mk head/sys/conf/kern.mk head/sys/sys/param.h head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile head/usr.bin/clang/bugpoint/Makefile head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/clang.prog.mk head/usr.bin/clang/clang/Makefile head/usr.bin/clang/llc/Makefile head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lldb/Makefile head/usr.bin/clang/lli/Makefile head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-cov/Makefile head/usr.bin/clang/llvm-cov/llvm-cov.1 head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/Makefile head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-extract/Makefile head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/Makefile head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/Makefile head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-profdata/llvm-profdata.1 head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/llvm-symbolizer/Makefile head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 head/usr.bin/clang/opt/Makefile head/usr.bin/clang/opt/opt.1 head/usr.bin/clang/tblgen/tblgen.1 Directory Properties: head/ (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/contrib/apr/ (props changed) head/contrib/binutils/ (props changed) head/contrib/bmake/ (props changed) head/contrib/compiler-rt/ (props changed) head/contrib/dtc/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/ar/ (props changed) head/contrib/elftoolchain/brandelf/ (props changed) head/contrib/elftoolchain/elfdump/ (props changed) head/contrib/expat/ (props changed) head/contrib/file/ (props changed) head/contrib/gcc/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/ipfilter/ml_ipl.c (props changed) head/contrib/ipfilter/mlfk_ipl.c (props changed) head/contrib/ipfilter/mlh_rule.c (props changed) head/contrib/ipfilter/mli_ipl.c (props changed) head/contrib/ipfilter/mln_ipl.c (props changed) head/contrib/ipfilter/mls_ipl.c (props changed) head/contrib/libarchive/ (props changed) head/contrib/libarchive/libarchive/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/projects/libunwind/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/mdocml/ (props changed) head/contrib/ncurses/ (props changed) head/contrib/netcat/ (props changed) head/contrib/ntp/ (props changed) head/contrib/openpam/ (props changed) head/contrib/pf/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/serf/ (props changed) head/contrib/sqlite3/ (props changed) head/contrib/subversion/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/top/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/unbound/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/gnu/lib/ (props changed) head/gnu/usr.bin/binutils/ (props changed) head/gnu/usr.bin/cc/cc_tools/ (props changed) head/gnu/usr.bin/gdb/ (props changed) head/include/ (props changed) head/lib/libc/ (props changed) head/lib/libc/stdtime/ (props changed) head/lib/libutil/ (props changed) head/lib/libvmmapi/ (props changed) head/lib/libz/ (props changed) head/sbin/ (props changed) head/sbin/dumpon/ (props changed) head/sbin/ipfw/ (props changed) head/share/ (props changed) head/share/man/man4/ (props changed) head/share/zoneinfo/ (props changed) head/sys/ (props changed) head/sys/amd64/include/vmm.h (props changed) head/sys/amd64/include/vmm_dev.h (props changed) head/sys/amd64/include/xen/ (props changed) head/sys/amd64/vmm/ (props changed) head/sys/boot/ (props changed) head/sys/boot/powerpc/kboot/ (props changed) head/sys/boot/powerpc/ofw/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/conf/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (props changed) head/sys/dev/hyperv/ (props changed) head/sys/modules/hyperv/ (props changed) head/targets/ (props changed) head/usr.bin/calendar/ (props changed) head/usr.bin/mkimg/ (props changed) head/usr.bin/procstat/ (props changed) head/usr.sbin/bhyve/ (props changed) head/usr.sbin/bhyvectl/ (props changed) head/usr.sbin/bhyveload/ (props changed) head/usr.sbin/jail/ (props changed) head/usr.sbin/ndiscvt/ (props changed) head/usr.sbin/rtadvctl/ (props changed) head/usr.sbin/rtadvd/ (props changed) head/usr.sbin/rtsold/ (props changed) head/usr.sbin/zic/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Oct 6 17:49:52 2015 (r288942) +++ head/ObsoleteFiles.inc Tue Oct 6 17:53:29 2015 (r288943) @@ -38,6 +38,69 @@ # xargs -n1 | sort | uniq -d; # done +# 20151006: new libc++ import +OLD_FILES+=usr/include/c++/__tuple_03 +# 20151006: new clang import which bumps version from 3.6.1 to 3.7.0. +OLD_FILES+=usr/lib/clang/3.6.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/3.6.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/altivec.h +OLD_FILES+=usr/lib/clang/3.6.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/3.6.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/3.6.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/3.6.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/3.6.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/3.6.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/3.6.1/include/xopintrin.h +OLD_DIRS+=usr/lib/clang/3.6.1/include +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.6.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.6.1/lib +OLD_DIRS+=usr/lib/clang/3.6.1 # 20150928: unused sgsmsg utility is removed OLD_FILES+=usr/bin/sgsmsg # 20150926: remove links to removed/unimplemented mbuf(9) macros Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 6 17:49:52 2015 (r288942) +++ head/UPDATING Tue Oct 6 17:53:29 2015 (r288943) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151006: + Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. + Please see the 20141231 entry below for information about prerequisites + and upgrading, if you are not already using clang 3.5.0 or higher. + 20150924: Kernel debug files have been moved to /usr/lib/debug/boot/kernel/, and renamed from .symbols to .debug. This reduces the size requirements Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Tue Oct 6 17:49:52 2015 (r288942) +++ head/contrib/compiler-rt/LICENSE.TXT Tue Oct 6 17:53:29 2015 (r288943) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: head/contrib/compiler-rt/include/sanitizer/coverage_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/coverage_interface.h Tue Oct 6 17:49:52 2015 (r288942) +++ head/contrib/compiler-rt/include/sanitizer/coverage_interface.h Tue Oct 6 17:53:29 2015 (r288943) @@ -39,6 +39,23 @@ extern "C" { // Some of the entries in *data will be zero. uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + // The coverage instrumentation may optionally provide imprecise counters. + // Rather than exposing the counter values to the user we instead map + // the counters to a bitset. + // Every counter is associated with 8 bits in the bitset. + // We define 8 value ranges: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+ + // The i-th bit is set to 1 if the counter value is in the i-th range. + // This counter-based coverage implementation is *not* thread-safe. + + // Returns the number of registered coverage counters. + uintptr_t __sanitizer_get_number_of_counters(); + // Updates the counter 'bitset', clears the counters and returns the number of + // new bits in 'bitset'. + // If 'bitset' is nullptr, only clears the counters. + // Otherwise 'bitset' should be at least + // __sanitizer_get_number_of_counters bytes long and 8-aligned. + uintptr_t + __sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset); #ifdef __cplusplus } // extern "C" #endif Modified: head/contrib/compiler-rt/include/sanitizer/dfsan_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/dfsan_interface.h Tue Oct 6 17:49:52 2015 (r288942) +++ head/contrib/compiler-rt/include/sanitizer/dfsan_interface.h Tue Oct 6 17:53:29 2015 (r288943) @@ -91,6 +91,16 @@ void dfsan_set_write_callback(dfsan_writ /// From owner-svn-src-all@freebsd.org Tue Oct 6 19:06:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AEF29D0D60; Tue, 6 Oct 2015 19:06:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCD7AB89; Tue, 6 Oct 2015 19:06:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96J6YpK096590; Tue, 6 Oct 2015 19:06:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96J6Yqr096589; Tue, 6 Oct 2015 19:06:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510061906.t96J6Yqr096589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 19:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:06:36 -0000 Author: gjb Date: Tue Oct 6 19:06:34 2015 New Revision: 288947 URL: https://svnweb.freebsd.org/changeset/base/288947 Log: Document r288943, clang, llvm, etc. updated to upstream 3.7.0. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 18:51:41 2015 (r288946) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 19:06:34 2015 (r288947) @@ -457,26 +457,15 @@ Contributed Software - &man.lldb.1; has been updated to - upstream snapshot version r196259. - &man.byacc.1; has been updated to version 20140101. - libc++ has - been updated to version 3.4. - OpenSSH has been updated to 6.5p1. mdocml has been updated to version 1.12.3. - LLVM and - Clang have been updated to - version 3.4. - The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; @@ -595,6 +584,10 @@ The &man.nc.1; utility has been updated to the OpenBSD 5.8 version. + + LLVM and + Clang have been updated to + version 3.7.0. From owner-svn-src-all@freebsd.org Tue Oct 6 19:07:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C19C9D0DFB; Tue, 6 Oct 2015 19:07:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5EB4CEB; Tue, 6 Oct 2015 19:07:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96J7Aii096678; Tue, 6 Oct 2015 19:07:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96J7AOh096677; Tue, 6 Oct 2015 19:07:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510061907.t96J7AOh096677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2015 19:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288948 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:07:12 -0000 Author: gjb Date: Tue Oct 6 19:07:10 2015 New Revision: 288948 URL: https://svnweb.freebsd.org/changeset/base/288948 Log: Update the last check revision marker. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 19:06:34 2015 (r288947) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Oct 6 19:07:10 2015 (r288948) @@ -22,7 +22,7 @@ $FreeBSD$ - + 2015 From owner-svn-src-all@freebsd.org Tue Oct 6 19:29:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F30AB9D0DA9; Tue, 6 Oct 2015 19:29:06 +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 C0A45C62; Tue, 6 Oct 2015 19:29:06 +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 t96JT6Ag003674; Tue, 6 Oct 2015 19:29:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96JT5jT003668; Tue, 6 Oct 2015 19:29:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510061929.t96JT5jT003668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 19:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288949 - in head: sys/kern sys/sys tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:29:07 -0000 Author: jhb Date: Tue Oct 6 19:29:05 2015 New Revision: 288949 URL: https://svnweb.freebsd.org/changeset/base/288949 Log: Fix various edge cases related to system call tracing. - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3822 Modified: head/sys/kern/kern_fork.c head/sys/kern/subr_syscall.c head/sys/sys/proc.h head/tests/sys/kern/Makefile head/tests/sys/kern/ptrace_test.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Tue Oct 6 19:07:10 2015 (r288948) +++ head/sys/kern/kern_fork.c Tue Oct 6 19:29:05 2015 (r288949) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1031,8 +1032,8 @@ fork_return(struct thread *td, struct tr { struct proc *p, *dbg; + p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - p = td->td_proc; sx_xlock(&proctree_lock); PROC_LOCK(p); if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) == @@ -1049,9 +1050,9 @@ fork_return(struct thread *td, struct tr p->p_pid, p->p_oppid); proc_reparent(p, dbg); sx_xunlock(&proctree_lock); - td->td_dbgflags |= TDB_CHILD; + td->td_dbgflags |= TDB_CHILD | TDB_SCX; ptracestop(td, SIGSTOP); - td->td_dbgflags &= ~TDB_CHILD; + td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { /* * ... otherwise clear the request. @@ -1061,6 +1062,18 @@ fork_return(struct thread *td, struct tr cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); + } else if (p->p_flag & P_TRACED) { + /* + * This is the start of a new thread in a traced + * process. Report a system call exit event. + */ + PROC_LOCK(p); + td->td_dbgflags |= TDB_SCX; + _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); + if ((p->p_stops & S_PT_SCX) != 0) + ptracestop(td, SIGTRAP); + td->td_dbgflags &= ~TDB_SCX; + PROC_UNLOCK(p); } userret(td, frame); Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Tue Oct 6 19:07:10 2015 (r288948) +++ head/sys/kern/subr_syscall.c Tue Oct 6 19:29:05 2015 (r288949) @@ -83,11 +83,12 @@ syscallenter(struct thread *td, struct s if (error == 0) { STOPEVENT(p, S_SCE, sa->narg); - if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) { + if (p->p_flag & P_TRACED) { PROC_LOCK(p); td->td_dbg_sc_code = sa->code; td->td_dbg_sc_narg = sa->narg; - ptracestop((td), SIGTRAP); + if (p->p_stops & S_PT_SCE) + ptracestop((td), SIGTRAP); PROC_UNLOCK(p); } if (td->td_dbgflags & TDB_USERWR) { Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Oct 6 19:07:10 2015 (r288948) +++ head/sys/sys/proc.h Tue Oct 6 19:29:05 2015 (r288949) @@ -283,8 +283,6 @@ struct thread { int td_no_sleeping; /* (k) Sleeping disabled count. */ int td_dom_rr_idx; /* (k) RR Numa domain selection. */ void *td_su; /* (k) FFS SU private */ - u_int td_dbg_sc_code; /* (c) Syscall code to debugger. */ - u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ #define td_endzero td_sigmask /* Copied during fork1() or create_thread(). */ @@ -296,6 +294,8 @@ struct thread { u_char td_pri_class; /* (t) Scheduling class. */ u_char td_user_pri; /* (t) User pri from estcpu and nice. */ u_char td_base_user_pri; /* (t) Base user pri */ + u_int td_dbg_sc_code; /* (c) Syscall code to debugger. */ + u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ #define td_endcopy td_pcb /* Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Tue Oct 6 19:07:10 2015 (r288948) +++ head/tests/sys/kern/Makefile Tue Oct 6 19:29:05 2015 (r288949) @@ -7,6 +7,7 @@ ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" +LDADD.ptrace_test+= -lpthread LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Tue Oct 6 19:07:10 2015 (r288948) +++ head/tests/sys/kern/ptrace_test.c Tue Oct 6 19:29:05 2015 (r288949) @@ -29,10 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include #include #include #include @@ -409,12 +411,15 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft * debugger is attached to it. */ static __dead2 void -follow_fork_parent(void) +follow_fork_parent(bool use_vfork) { pid_t fpid, wpid; int status; - CHILD_REQUIRE((fpid = fork()) != -1); + if (use_vfork) + CHILD_REQUIRE((fpid = vfork()) != -1); + else + CHILD_REQUIRE((fpid = fork()) != -1); if (fpid == 0) /* Child */ @@ -434,7 +439,7 @@ follow_fork_parent(void) * child process. */ static pid_t -handle_fork_events(pid_t parent) +handle_fork_events(pid_t parent, struct ptrace_lwpinfo *ppl) { struct ptrace_lwpinfo pl; bool fork_reported[2]; @@ -469,6 +474,8 @@ handle_fork_events(pid_t parent) child = wpid; else ATF_REQUIRE(child == wpid); + if (ppl != NULL) + ppl[1] = pl; fork_reported[1] = true; } else { ATF_REQUIRE(wpid == parent); @@ -478,6 +485,8 @@ handle_fork_events(pid_t parent) child = pl.pl_child_pid; else ATF_REQUIRE(child == pl.pl_child_pid); + if (ppl != NULL) + ppl[0] = pl; fork_reported[0] = true; } } @@ -499,7 +508,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -516,7 +525,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -555,7 +564,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -572,7 +581,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -606,7 +615,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -623,7 +632,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1); @@ -688,7 +697,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -715,7 +724,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -756,7 +765,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -783,7 +792,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -819,7 +828,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -846,7 +855,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1); @@ -952,6 +961,223 @@ ATF_TC_BODY(ptrace__getppid, tc) ATF_REQUIRE(WEXITSTATUS(status) == 1); } +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * child process created via fork() reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_fork); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) +{ + struct ptrace_lwpinfo pl[2]; + pid_t children[2], fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + follow_fork_parent(false); + } + + /* Parent process. */ + children[0] = fpid; + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(children[0], &status, 0); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + + /* Wait for both halves of the fork event to get reported. */ + children[1] = handle_fork_events(children[0], pl); + ATF_REQUIRE(children[1] > 0); + + ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl[0].pl_syscall_code == SYS_fork); + ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); + ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); + + /* + * The child can't exit until the grandchild reports status, so the + * grandchild should report its exit first to the debugger. + */ + wpid = wait(&status); + ATF_REQUIRE(wpid == children[1]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + + wpid = wait(&status); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * child process created via vfork() reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_vfork); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) +{ + struct ptrace_lwpinfo pl[2]; + pid_t children[2], fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + follow_fork_parent(true); + } + + /* Parent process. */ + children[0] = fpid; + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(children[0], &status, 0); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + + /* Wait for both halves of the fork event to get reported. */ + children[1] = handle_fork_events(children[0], pl); + ATF_REQUIRE(children[1] > 0); + + ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl[0].pl_syscall_code == SYS_vfork); + ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); + ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); + + /* + * The child can't exit until the grandchild reports status, so the + * grandchild should report its exit first to the debugger. + */ + wpid = wait(&status); + ATF_REQUIRE(wpid == children[1]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + + wpid = wait(&status); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void * +simple_thread(void *arg __unused) +{ + + pthread_exit(NULL); +} + +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * thread reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_thread); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t main; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + pthread_t thread; + + trace_me(); + + CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread, + NULL) == 0); + CHILD_REQUIRE(pthread_join(thread, NULL) == 0); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + main = pl.pl_lwpid; + + /* + * Continue the child ignoring the SIGSTOP and tracing all + * system call exits. + */ + ATF_REQUIRE(ptrace(PT_TO_SCX, fpid, (caddr_t)1, 0) != -1); + + /* + * Wait for the new thread to arrive. pthread_create() might + * invoke any number of system calls. For now we just wait + * for the new thread to arrive and make sure it reports a + * valid system call code. If ptrace grows thread event + * reporting then this test can be made more precise. + */ + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl.pl_syscall_code != 0); + if (pl.pl_lwpid != main) + /* New thread seen. */ + break; + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } + + /* Wait for the child to exit. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + if (WIFEXITED(status)) + break; + + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } + + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -968,6 +1194,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__follow_fork_parent_detached_unrelated_debugger); ATF_TP_ADD_TC(tp, ptrace__getppid); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_fork); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_vfork); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_thread); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Tue Oct 6 19:31:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B7519D0F4F; Tue, 6 Oct 2015 19:31:09 +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 E8312F99; Tue, 6 Oct 2015 19:31: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 t96JV80I004467; Tue, 6 Oct 2015 19:31:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96JV85R004466; Tue, 6 Oct 2015 19:31:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510061931.t96JV85R004466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 19:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288950 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:31:09 -0000 Author: jhb Date: Tue Oct 6 19:31:07 2015 New Revision: 288950 URL: https://svnweb.freebsd.org/changeset/base/288950 Log: Group the decoded system calls by ABI and sort the calls within each ABI. Reviewed by: bdrewery Glanced at by: kib Differential Revision: https://reviews.freebsd.org/D3823 Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Tue Oct 6 19:29:05 2015 (r288949) +++ head/usr.bin/truss/syscalls.c Tue Oct 6 19:31:07 2015 (r288950) @@ -90,191 +90,208 @@ __FBSDID("$FreeBSD$"); * This should probably be in its own file, sorted alphabetically. */ static struct syscall decoded_syscalls[] = { - { .name = "fcntl", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, - { .name = "rfork", .ret_type = 1, .nargs = 1, - .args = { { Rforkflags, 0 } } }, - { .name = "linux_readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, - { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, - { .name = "getpgid", .ret_type = 1, .nargs = 1, - .args = { { Int, 0 } } }, - { .name = "getsid", .ret_type = 1, .nargs = 1, - .args = { { Int, 0 } } }, - { .name = "readlink", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } }, - { .name = "readlinkat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, + /* Native ABI */ + { .name = "__getcwd", .ret_type = 1, .nargs = 2, + .args = { { Name | OUT, 0 }, { Int, 1 } } }, + { .name = "_umtx_op", .ret_type = 1, .nargs = 5, + .args = { { Ptr, 0 }, { Umtxop, 1 }, { LongHex, 2 }, { Ptr, 3 }, + { Ptr, 4 } } }, + { .name = "accept", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, + { .name = "access", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, + { .name = "bind", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, + { .name = "bindat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, - { .name = "lseek", .ret_type = 2, .nargs = 3, - .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN }, - { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, - { .name = "linux_lseek", .ret_type = 2, .nargs = 3, - .args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } }, - { .name = "mmap", .ret_type = 1, .nargs = 6, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, - { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } }, - { .name = "linux_mkdir", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Int, 1 } } }, - { .name = "mprotect", .ret_type = 1, .nargs = 3, - .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } }, - { .name = "open", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, - { .name = "openat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name | IN, 1 }, { Open, 2 }, - { Octal, 3 } } }, - { .name = "mkdir", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Octal, 1 } } }, - { .name = "mkdirat", .ret_type = 1, .nargs = 3, - .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, - { .name = "linux_open", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } }, - { .name = "close", .ret_type = 1, .nargs = 1, - .args = { { Int, 0 } } }, - { .name = "link", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Name, 1 } } }, - { .name = "linkat", .ret_type = 1, .nargs = 5, - .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, - { Atflags, 4 } } }, - { .name = "unlink", .ret_type = 1, .nargs = 1, - .args = { { Name, 0 } } }, - { .name = "unlinkat", .ret_type = 1, .nargs = 3, - .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } }, + { .name = "break", .ret_type = 1, .nargs = 1, + .args = { { Ptr, 0 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, - { .name = "chroot", .ret_type = 1, .nargs = 1, - .args = { { Name, 0 } } }, - { .name = "mkfifo", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Octal, 1 } } }, - { .name = "mkfifoat", .ret_type = 1, .nargs = 3, - .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, - { .name = "mknod", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Octal, 1 }, { Int, 2 } } }, - { .name = "mknodat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, + { .name = "chflags", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Hex, 1 } } }, { .name = "chmod", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, + { .name = "chown", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "chroot", .ret_type = 1, .nargs = 1, + .args = { { Name, 0 } } }, + { .name = "clock_gettime", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Timespec | OUT, 1 } } }, + { .name = "close", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "connect", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, + { .name = "connectat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, + { Int, 3 } } }, + { .name = "eaccess", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, + { .name = "execve", .ret_type = 1, .nargs = 3, + .args = { { Name | IN, 0 }, { ExecArgs | IN, 1 }, + { ExecEnv | IN, 2 } } }, + { .name = "exit", .ret_type = 0, .nargs = 1, + .args = { { Hex, 0 } } }, + { .name = "faccessat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, + { Atflags, 3 } } }, { .name = "fchmod", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Octal, 1 } } }, - { .name = "lchmod", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "fchmodat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Atflags, 3 } } }, - { .name = "chown", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, { .name = "fchown", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Int, 1 }, { Int, 2 } } }, - { .name = "lchown", .ret_type = 1, .nargs = 3, - .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, { .name = "fchownat", .ret_type = 1, .nargs = 5, .args = { { Atfd, 0 }, { Name, 1 }, { Int, 2 }, { Int, 3 }, { Atflags, 4 } } }, - { .name = "linux_stat64", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, - { .name = "mount", .ret_type = 1, .nargs = 4, - .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } }, - { .name = "umount", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Int, 2 } } }, + { .name = "fcntl", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat | OUT, 1 } } }, { .name = "fstatat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Stat | OUT, 2 }, { Atflags, 3 } } }, - { .name = "stat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, - { .name = "statfs", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { StatFs | OUT, 1 } } }, { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, - { .name = "lstat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, - { .name = "linux_newstat", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, - { .name = "linux_access", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Accessmode, 1 } } }, - { .name = "linux_newfstat", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Ptr | OUT, 1 } } }, - { .name = "write", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 } } }, - { .name = "ioctl", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Ioctl, 1 }, { Hex, 2 } } }, - { .name = "break", .ret_type = 1, .nargs = 1, - .args = { { Ptr, 0 } } }, - { .name = "exit", .ret_type = 0, .nargs = 1, - .args = { { Hex, 0 } } }, - { .name = "access", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, - { .name = "eaccess", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, - { .name = "faccessat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, - { Atflags, 3 } } }, - { .name = "sigaction", .ret_type = 1, .nargs = 3, - .args = { { Signal, 0 }, { Sigaction | IN, 1 }, - { Sigaction | OUT, 2 } } }, - { .name = "accept", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, - { .name = "bind", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, - { .name = "bindat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, - { Int, 3 } } }, - { .name = "connect", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, - { .name = "connectat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, - { Int, 3 } } }, + { .name = "ftruncate", .ret_type = 1, .nargs = 2, + .args = { { Int | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, + { .name = "futimens", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, + { .name = "futimes", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, + { .name = "futimesat", .ret_type = 1, .nargs = 3, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, + { .name = "getitimer", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, { .name = "getpeername", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, + { .name = "getpgid", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "getrlimit", .ret_type = 1, .nargs = 2, + .args = { { Resource, 0 }, { Rlimit | OUT, 1 } } }, + { .name = "getrusage", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Rusage | OUT, 1 } } }, + { .name = "getsid", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, { .name = "getsockname", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, - { .name = "recvfrom", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, - { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, - { .name = "sendto", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, - { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } }, - { .name = "execve", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { ExecArgs | IN, 1 }, - { ExecEnv | IN, 2 } } }, - { .name = "linux_execve", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { ExecArgs | IN, 1 }, - { ExecEnv | IN, 2 } } }, - { .name = "kldload", .ret_type = 1, .nargs = 1, + { .name = "gettimeofday", .ret_type = 1, .nargs = 2, + .args = { { Timeval | OUT, 0 }, { Ptr, 1 } } }, + { .name = "ioctl", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Ioctl, 1 }, { Hex, 2 } } }, + { .name = "kevent", .ret_type = 1, .nargs = 6, + .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, + { Int, 4 }, { Timespec, 5 } } }, + { .name = "kill", .ret_type = 1, .nargs = 2, + .args = { { Int | IN, 0 }, { Signal | IN, 1 } } }, + { .name = "kldfind", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, - { .name = "kldunload", .ret_type = 1, .nargs = 1, + { .name = "kldfirstmod", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, - { .name = "kldfind", .ret_type = 1, .nargs = 1, + { .name = "kldload", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, { .name = "kldnext", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, { .name = "kldstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr, 1 } } }, - { .name = "kldfirstmod", .ret_type = 1, .nargs = 1, + { .name = "kldunload", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "kse_release", .ret_type = 0, .nargs = 1, + .args = { { Timespec, 0 } } }, + { .name = "lchflags", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Hex, 1 } } }, + { .name = "lchmod", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Octal, 1 } } }, + { .name = "lchown", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "link", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Name, 1 } } }, + { .name = "linkat", .ret_type = 1, .nargs = 5, + .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, + { Atflags, 4 } } }, + { .name = "lseek", .ret_type = 2, .nargs = 3, + .args = { { Int, 0 }, { QuadHex, 1 + QUAD_ALIGN }, + { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, + { .name = "lstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, + { .name = "lutimes", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, + { .name = "mkdir", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Octal, 1 } } }, + { .name = "mkdirat", .ret_type = 1, .nargs = 3, + .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, + { .name = "mkfifo", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Octal, 1 } } }, + { .name = "mkfifoat", .ret_type = 1, .nargs = 3, + .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, + { .name = "mknod", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Octal, 1 }, { Int, 2 } } }, + { .name = "mknodat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, + { .name = "mmap", .ret_type = 1, .nargs = 6, + .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, + { Int, 4 }, { QuadHex, 5 + QUAD_ALIGN } } }, { .name = "modfind", .ret_type = 1, .nargs = 1, .args = { { Name | IN, 0 } } }, + { .name = "mount", .ret_type = 1, .nargs = 4, + .args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } }, + { .name = "mprotect", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } }, + { .name = "munmap", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { Int, 1 } } }, { .name = "nanosleep", .ret_type = 1, .nargs = 1, .args = { { Timespec, 0 } } }, + { .name = "open", .ret_type = 1, .nargs = 3, + .args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, + { .name = "openat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { Open, 2 }, + { Octal, 3 } } }, + { .name = "pathconf", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Pathconf, 1 } } }, + { .name = "pipe", .ret_type = 1, .nargs = 1, + .args = { { PipeFds | OUT, 0 } } }, + { .name = "pipe2", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { Open, 1 } } }, + { .name = "poll", .ret_type = 1, .nargs = 3, + .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "posix_openpt", .ret_type = 1, .nargs = 1, + .args = { { Open, 0 } } }, + { .name = "procctl", .ret_type = 1, .nargs = 4, + .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, + { Procctl, 1 + QUAD_ALIGN + QUAD_SLOTS }, + { Ptr, 2 + QUAD_ALIGN + QUAD_SLOTS } } }, + { .name = "read", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } }, + { .name = "readlink", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } }, + { .name = "readlinkat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, + { Int, 3 } } }, + { .name = "recvfrom", .ret_type = 1, .nargs = 6, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, + { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, + { .name = "rename", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Name, 1 } } }, + { .name = "renameat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 } } }, + { .name = "rfork", .ret_type = 1, .nargs = 1, + .args = { { Rforkflags, 0 } } }, { .name = "select", .ret_type = 1, .nargs = 5, .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, - { .name = "poll", .ret_type = 1, .nargs = 3, - .args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } }, - { .name = "gettimeofday", .ret_type = 1, .nargs = 2, - .args = { { Timeval | OUT, 0 }, { Ptr, 1 } } }, - { .name = "clock_gettime", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Timespec | OUT, 1 } } }, - { .name = "getitimer", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, + { .name = "sendto", .ret_type = 1, .nargs = 6, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, + { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } }, { .name = "setitimer", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } }, - { .name = "kse_release", .ret_type = 0, .nargs = 1, - .args = { { Timespec, 0 } } }, - { .name = "kevent", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, - { Int, 4 }, { Timespec, 5 } } }, + { .name = "setrlimit", .ret_type = 1, .nargs = 2, + .args = { { Resource, 0 }, { Rlimit | IN, 1 } } }, + { .name = "shutdown", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Shutdown, 1 } } }, + { .name = "sigaction", .ret_type = 1, .nargs = 3, + .args = { { Signal, 0 }, { Sigaction | IN, 1 }, + { Sigaction | OUT, 2 } } }, { .name = "sigpending", .ret_type = 1, .nargs = 1, .args = { { Sigset | OUT, 0 } } }, { .name = "sigprocmask", .ret_type = 1, .nargs = 3, @@ -291,63 +308,40 @@ static struct syscall decoded_syscalls[] .args = { { Sigset | IN, 0 }, { Ptr, 1 } } }, { .name = "sigwaitinfo", .ret_type = 1, .nargs = 2, .args = { { Sigset | IN, 0 }, { Ptr, 1 } } }, - { .name = "unmount", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Int, 1 } } }, { .name = "socket", .ret_type = 1, .nargs = 3, .args = { { Sockdomain, 0 }, { Socktype, 1 }, { Int, 2 } } }, - { .name = "getrusage", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Rusage | OUT, 1 } } }, - { .name = "__getcwd", .ret_type = 1, .nargs = 2, - .args = { { Name | OUT, 0 }, { Int, 1 } } }, - { .name = "shutdown", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Shutdown, 1 } } }, - { .name = "getrlimit", .ret_type = 1, .nargs = 2, - .args = { { Resource, 0 }, { Rlimit | OUT, 1 } } }, - { .name = "setrlimit", .ret_type = 1, .nargs = 2, - .args = { { Resource, 0 }, { Rlimit | IN, 1 } } }, - { .name = "utimes", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, - { .name = "lutimes", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, - { .name = "futimes", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, - { .name = "futimesat", .ret_type = 1, .nargs = 3, - .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, - { .name = "futimens", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, - { .name = "utimensat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timespec2 | IN, 2 }, - { Atflags, 3 } } }, - { .name = "chflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, - { .name = "lchflags", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Hex, 1 } } }, - { .name = "pathconf", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { Pathconf, 1 } } }, - { .name = "pipe", .ret_type = 1, .nargs = 1, - .args = { { PipeFds | OUT, 0 } } }, - { .name = "pipe2", .ret_type = 1, .nargs = 2, - .args = { { Ptr, 0 }, { Open, 1 } } }, - { .name = "truncate", .ret_type = 1, .nargs = 2, - .args = { { Name | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, - { .name = "ftruncate", .ret_type = 1, .nargs = 2, - .args = { { Int | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, - { .name = "kill", .ret_type = 1, .nargs = 2, - .args = { { Int | IN, 0 }, { Signal | IN, 1 } } }, - { .name = "munmap", .ret_type = 1, .nargs = 2, - .args = { { Ptr, 0 }, { Int, 1 } } }, - { .name = "read", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } }, - { .name = "rename", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Name, 1 } } }, - { .name = "renameat", .ret_type = 1, .nargs = 4, - .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 } } }, + { .name = "stat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, + { .name = "statfs", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { StatFs | OUT, 1 } } }, { .name = "symlink", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Name, 1 } } }, { .name = "symlinkat", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Atfd, 1 }, { Name, 2 } } }, - { .name = "posix_openpt", .ret_type = 1, .nargs = 1, - .args = { { Open, 0 } } }, + { .name = "sysarch", .ret_type = 1, .nargs = 2, + .args = { { Sysarch, 0 }, { Ptr, 1 } } }, + { .name = "thr_kill", .ret_type = 1, .nargs = 2, + .args = { { Long, 0 }, { Signal, 1 } } }, + { .name = "thr_self", .ret_type = 1, .nargs = 1, + .args = { { Ptr, 0 } } }, + { .name = "truncate", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { QuadHex | IN, 1 + QUAD_ALIGN } } }, +#if 0 + /* Does not exist */ + { .name = "umount", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Int, 2 } } }, +#endif + { .name = "unlink", .ret_type = 1, .nargs = 1, + .args = { { Name, 0 } } }, + { .name = "unlinkat", .ret_type = 1, .nargs = 3, + .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } }, + { .name = "unmount", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Int, 1 } } }, + { .name = "utimensat", .ret_type = 1, .nargs = 4, + .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timespec2 | IN, 2 }, + { Atflags, 3 } } }, + { .name = "utimes", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, { .name = "wait4", .ret_type = 1, .nargs = 4, .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, { Rusage | OUT, 3 } } }, @@ -357,19 +351,32 @@ static struct syscall decoded_syscalls[] { Waitoptions, 2 + QUAD_ALIGN + QUAD_SLOTS }, { Rusage | OUT, 3 + QUAD_ALIGN + QUAD_SLOTS }, { Ptr, 4 + QUAD_ALIGN + QUAD_SLOTS } } }, - { .name = "procctl", .ret_type = 1, .nargs = 4, - .args = { { Idtype, 0 }, { Quad, 1 + QUAD_ALIGN }, - { Procctl, 1 + QUAD_ALIGN + QUAD_SLOTS }, - { Ptr, 2 + QUAD_ALIGN + QUAD_SLOTS } } }, - { .name = "sysarch", .ret_type = 1, .nargs = 2, - .args = { { Sysarch, 0 }, { Ptr, 1 } } }, - { .name = "_umtx_op", .ret_type = 1, .nargs = 5, - .args = { { Ptr, 0 }, { Umtxop, 1 }, { LongHex, 2 }, { Ptr, 3 }, - { Ptr, 4 } } }, - { .name = "thr_kill", .ret_type = 1, .nargs = 2, - .args = { { Long, 0 }, { Signal, 1 } } }, - { .name = "thr_self", .ret_type = 1, .nargs = 1, - .args = { { Ptr, 0 } } }, + { .name = "write", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 } } }, + + /* Linux ABI */ + { .name = "linux_access", .ret_type = 1, .nargs = 2, + .args = { { Name, 0 }, { Accessmode, 1 } } }, + { .name = "linux_execve", .ret_type = 1, .nargs = 3, + .args = { { Name | IN, 0 }, { ExecArgs | IN, 1 }, + { ExecEnv | IN, 2 } } }, + { .name = "linux_lseek", .ret_type = 2, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } }, + { .name = "linux_mkdir", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Int, 1 } } }, + { .name = "linux_newfstat", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Ptr | OUT, 1 } } }, + { .name = "linux_newstat", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } }, + { .name = "linux_open", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } }, + { .name = "linux_readlink", .ret_type = 1, .nargs = 3, + .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, + { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, + { .name = "linux_stat64", .ret_type = 1, .nargs = 3, + .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, + { .name = 0 }, }; static STAILQ_HEAD(, syscall) syscalls; From owner-svn-src-all@freebsd.org Tue Oct 6 19:49:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C32AB9B6F10; Tue, 6 Oct 2015 19:49:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9005A1C14; Tue, 6 Oct 2015 19:49:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igcrk20 with SMTP id rk20so93452938igc.1; Tue, 06 Oct 2015 12:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=6cubx/1EpdsoEywxjzPfK3hWthSipMSagi55sKid0ao=; b=tfSUMjTp4t+OL/3yfrfrUaiQLVcowkbrO7plfWzaM1SivGknAKKd5ZiGM18DKO6Hao wS0HVBV97N5atV3XNqaC63wkYjHNNIyHN0iejadpbs8ytviFyJbYIDd9UBzZpOsoWiWp QJJiojafJErCDm9IOHI0ziU8wC/cTGwqKeFJQZmIgkz4tcFE3Tn+m7XuP0cZR+dATt2r uoLhehlQWnb64YAHVwlj3d0RdDfolV5pXQ0NnLtB7i3lOoCTmK0sxNAfi9o0qEOoMct4 BMOWQ2QFWLU96FtS+YjW7/AybD/qnwrKfKmNUT56wMMGChZPDAAaGNYfF+ghvGHMSoQa aXzQ== X-Received: by 10.50.18.16 with SMTP id s16mr6193654igd.33.1444160978863; Tue, 06 Oct 2015 12:49:38 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Tue, 6 Oct 2015 12:49:19 -0700 (PDT) In-Reply-To: <201510061906.t96J6Yqr096589@repo.freebsd.org> References: <201510061906.t96J6Yqr096589@repo.freebsd.org> From: Ed Maste Date: Tue, 6 Oct 2015 15:49:19 -0400 X-Google-Sender-Auth: _if8W61NFe5106F-Fk7o4TW5_-Q Message-ID: Subject: Re: svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes To: Glen Barber Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:49:39 -0000 On 6 October 2015 at 15:06, Glen Barber wrote: > Author: gjb > Date: Tue Oct 6 19:06:34 2015 > New Revision: 288947 > URL: https://svnweb.freebsd.org/changeset/base/288947 > > Log: > Document r288943, clang, llvm, etc. updated to upstream 3.7.0. I think we ought to list all of the individual components. In the past often Clang and LLVM were the only parts updated, and LLDB, compiler-rt etc were updated on their own schedules. Importing them together represents a new approach and I think we should mention that explicitly. From owner-svn-src-all@freebsd.org Tue Oct 6 19:49:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60B4C9B6F52; Tue, 6 Oct 2015 19:49:54 +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 2DACA1D7F; Tue, 6 Oct 2015 19:49: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 t96JnrRo010173; Tue, 6 Oct 2015 19:49:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96JnrY0010172; Tue, 6 Oct 2015 19:49:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510061949.t96JnrY0010172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 6 Oct 2015 19:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288951 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:49:54 -0000 Author: dim Date: Tue Oct 6 19:49:53 2015 New Revision: 288951 URL: https://svnweb.freebsd.org/changeset/base/288951 Log: For llvm/clang libraries, skip including tablegen-produced .d files when the target is "make depend". This works around errors during incremental make depend of some clang libraries, for example "don't know how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td". Reported by: emaste Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Tue Oct 6 19:31:07 2015 (r288950) +++ head/lib/clang/clang.build.mk Tue Oct 6 19:49:53 2015 (r288951) @@ -247,9 +247,11 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td -.for dep in ${TGHDRS:C/$/.inc.d/} -. sinclude "${dep}" -.endfor +.if !make(depend) +. for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +. endfor +.endif SRCS+= ${TGHDRS:C/$/.inc.h/} DPSRCS+= ${TGHDRS:C/$/.inc.h/} From owner-svn-src-all@freebsd.org Tue Oct 6 19:50:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC77E9D0116; Tue, 6 Oct 2015 19:50:51 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0113.outbound.protection.outlook.com [157.56.111.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E5EF1FBD; Tue, 6 Oct 2015 19:50:50 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from BL2PR05CA0016.namprd05.prod.outlook.com (10.255.226.16) by CY1PR0501MB1388.namprd05.prod.outlook.com (10.160.148.142) with Microsoft SMTP Server (TLS) id 15.1.280.20; Tue, 6 Oct 2015 19:50:43 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:129) by BL2PR05CA0016.outlook.office365.com (2a01:111:e400:c04::16) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Tue, 6 Oct 2015 19:50:42 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BN1BFFO11FD042.mail.protection.outlook.com (10.58.144.105) with Microsoft SMTP Server (TLS) id 15.1.286.14 via Frontend Transport; Tue, 6 Oct 2015 19:50:42 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 6 Oct 2015 12:50:41 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t96JoeD29508; Tue, 6 Oct 2015 12:50:40 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id 27140580A9; Tue, 6 Oct 2015 12:50:40 -0700 (PDT) To: Bryan Drewery CC: Warner Losh , , , , Subject: Re: svn commit: r288911 - head/share/mk In-Reply-To: <56140CAD.8080200@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> Comments: In-reply-to: Bryan Drewery message dated "Tue, 06 Oct 2015 11:02:21 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15988.1444161040.1@chaos> Date: Tue, 6 Oct 2015 12:50:40 -0700 Message-ID: <15356.1444161040@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD042; 1:X4zyIElZXmBltx4qM4Whw7uJsoSwuHoQ0Tz3RH4UD0KAf1AvKqGFw5a8ERaj0iqq1FGfrFM5p6muswqkuUmLu3RBEdlr1qp+K9gzyFIaBIvLrj7m2oTt/+Bwj/arYm48GORcdfcys1/LpnGomoYQ1/xKp5JyX+nwa17N5xplV35aFXY/zvJwWyYrfDtWsiEQqhzlM9+CcMmL2WFNjllHai+Rs4k1xpK219EDRne9bcFag8F//iW078qXP1VbZOuQKz19uYzL/xkTXQK/iTEe8t3+DQIgytPZkRVosNId+xz5OA2LuAMyqRYK1QBgZObMuT0lfHZB4+cLp2EL6usddA== X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(24454002)(199003)(189002)(11100500001)(50226001)(46102003)(6806005)(92566002)(76506005)(5008740100001)(105596002)(86362001)(97756001)(117636001)(5007970100001)(19580395003)(450100001)(2950100001)(64706001)(33716001)(106466001)(81156007)(19580405001)(57986006)(77096005)(87936001)(5001920100001)(47776003)(50986999)(110136002)(23726002)(50466002)(189998001)(76176999)(46406003)(97736004)(5001960100002)(107886002)(69596002)(42262002)(62816006)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0501MB1388; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1388; 2:/ykq96nKOuMVSyz0W0Y40xNZ9Twk4C1Uz2me0xWWhktZ1PqKpNQpZee3d9MCVfDIAtMV39A3Z8+jICrTyUYW3g/9a5INTfpTcG3+mj9E7UqK5w6ILn0xeb3og8nNHziF4wczJoJ93cM3sQPa36CVn1RyJtuxB/ePYVBiFVmRM3I=; 3:7Pdb705rIvIB8iinxHzXYU0QyfA80EZaWblWSrAggvYTyurnG6MQCykSKd9IQDNm91OgHJ/vilJoeo/bjxWiDuTleHYILPCK/t29ukrFjEV6mFhuCvfNok2pPDqkZZc0TrK5h0ctAMWqtLbjuYQnjtgpzh08ZGjEDZ8TsFEVU5TOzb1Jf4pLddQqk8yXz83jxPsJRwkWwwDbKlMRB+qY0VUGT8CKClTjZv43x73JNEs=; 25:Aye7N8+8D5CQrIjMfSOJEdUBjzCHJZc+jJiRJmhzbTOrIug4o1f6Y7K4j2T5r5d5Y7MH2TDfViqWjhiLJai+tVKfE4btSq/xx2bJzv6r19bNdd09uqpDmcUuQbnoQe/zktGaRiqwjJ7K4eyqIlC/4QRyWKfgTv1Rb3DQ5aHxVPA5Epiv7VOVpCqZzd8JJpAvmV1zGjeAFQ9m/j5vebXJPfoyHMtjqYxQQRxIfpVPJIVYxh5GjAk1BvL9CCrq0JML X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0501MB1388; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1388; 20:nTgxfk0o3T1WnvixwJP0/W4JfQ0BLmCWYa0QXLbFVbPP+cMfmHrVd1GepEGOb0VXJ6t4pHGl/ppVXDohGYkfBarof3DkKvoMO4g1RjdeWf+uAH4tpfxY5HuHT+/rTuvOBGZHStqNA4+fq99eCdSqfmYn/KOZheOIWoMnW9dDIOUKwVLKx3xzSOny8FtzJyYB0A8qPdW7lr9DQAWlreLnrVQDgzKZA0cHH/yNFKxCtSqW9FYIO8nCBjeVyJks4pR/dBTzwjoQ0TYsJcUmx/dNLfD+qp3C0ZYpmTV7/7de4zybT03hLg279R9EvPs4qFNQhMi/1U0ItZlr1yKREgKGknmcAb3Siv7iM+x7yxgwYgYZVpp0M1Oo7hFSLgFILm7rAG/S7NHRo/NMO4X/hpqsTbtPm6Ya4/LZbwhucN6k7sxIYOBRwVCBrrwyb8886p7yZJDr/8RhFknOwkAi7s5Znv+bMuC1dU/QQqGziAYxMRcItMD6Jmx0t0Rs1FPUt/4u; 4:2WJbI9IFnx9X4PSeaZREo5qAEOhKta0kFhXrlYcI5+4K+T+OfPtHzhPEMPjqFn9LPqSBTeROQ1IcjAYHVkKi+myDmsq8M7Adeec7u5fy1qB3YcJBOGVjnTel3Ouf8XpLnWzHvY8zJhRh9oiUwdaji++QzOit0D01rp5/ONWBq8y3O5JaWRdCcqXvXro69fX9JQYxFoqLtZ9cJnN7b3hkghg8ZPTB15bFT1j48tNZqUTVJkCCzEVBhz6rse1phYHFoSEHyyl9vHSaafgIf4aeXD3EhCvVSU+DZybQjQ3UXNZ7EBaaihwd6zc1OXa3z+Kp6pz3cmpCriAhungwV7EyeQQwIEFVZbIZIdim/IPl/Os= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:CY1PR0501MB1388; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0501MB1388; X-Forefront-PRVS: 07215D0470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0501MB1388; 23:yhCPJdMV2hPi0O8hywUUUpZr9WoAkEpe3eSIRVe?= =?us-ascii?Q?UNEFLGh2I2HFeqxFr3XTH+yKUCisFjCxfUx88Ah0s8Q1rCWH1zYTvMNo7bTJ?= =?us-ascii?Q?jYDJlFW1a93SoAplKWL9iBDK8ij8t2QPeMh9rqqt+t/wlAiv6sYylCPFcgug?= =?us-ascii?Q?rCUlvgjx0oj6WTBuJSzAyBkhH6t94k/pJs6SLCIZQNeEMypSy2fmsqUbJ9Pw?= =?us-ascii?Q?IZMvnB/QyT9pBmZxB3cP9pJ/HGWLDJkg83u6SO7NyW+QS17cYh4VwOY/hAUY?= =?us-ascii?Q?S7GuR6/JOJnLSNHAHgtfmb7eexSo1Nx8acwKFOeJ5yUTD2EAac39sq7WA0W2?= =?us-ascii?Q?942qBH4/eTaGL1nP90+WN4xd6YmmTJjcNQVJK/lqbsvn39oCAmnzb+olyq0L?= =?us-ascii?Q?dGEBQ0EdxN2kME5GhilVugs65WAhp4l4MCYoHUWfH/qAGlNS//Mqz/defy4d?= =?us-ascii?Q?LT1M4TN8Z44WrWYf9OjB8fRD6HTUe8cPM0yUH9sKcG2g8/qc8mOPDyB+BxOn?= =?us-ascii?Q?n2IgcTY8yBcZfHslanxcUQVEXkq70QEh7sTevuOmjz6x4t8NEBgdSDElnMMd?= =?us-ascii?Q?Zmuf2k9Jv8DYoQy2s2oK16kZmAPuGajM/wrEZs4UZN/T1OG6Ulz7ATOXePE6?= =?us-ascii?Q?V+91iWfmiedQbjE+mq1hAL+P7QZIsf7PAxjsqTbkltamR6MK0b5plkxw2/nn?= =?us-ascii?Q?Bt2AzxbqX6RZJWydb6v6gc3gzLjtN5bV2fWg0TxrQDdWn08/YpCRl+bG5tIt?= =?us-ascii?Q?mXmHXbSqiUYKS5ea1D/sR/UJroHlITDb4kVSUx61giM09t3KqAFV2I3Fin9D?= =?us-ascii?Q?7LNtGsxCZqOqZYZpVMTKPzrodOpXI1wVRB6DOAz4PIfUaD6S1t9NYL4CVXlO?= =?us-ascii?Q?LTf3B+c87J0nrfZcxW79rgsdPz99pvxKFxY89QHFYTt2LvvLlDDAg68Hlrz2?= =?us-ascii?Q?PrjyqMNZnX1OODI0a8qdQZs4/YgiKCOMeoKpVCb4n/hVz+MM1V/WHuCnaVUE?= =?us-ascii?Q?54+iIsDvLEbxpMSv3avaXy/mwfK5weNSEpKFbiNp1Tvlm80RzLmlJXuHhfH3?= =?us-ascii?Q?koL8vWvDRvaXO6xRslu6ezTcX1RQXk1ac+fIFn2Jvgsj8CsYcEIqw4BM3hF8?= =?us-ascii?Q?KvLvpLW6dU4XKRuuMM8PcsG1iLJdyvJAh0Vc/zBmohV0Q5JEDQeMUiARQcmK?= =?us-ascii?Q?UJLnBZkY+fyn1aCA=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0501MB1388; 5:0rFxCTFgKBAjFOoMQ1W+lAuDwOrDEpJQ6gQ97/MZ1tQjJcVeCUx8wIDCA8mNl3H+7nqiDPTOhhj5iwdg+VZepKDgJzjDIN/GjL5c4Rtp2jsuWUBocfn8UDsl9eBk3tYkIpTnpGuyEEa8Cc4P4BOyag==; 24:vr4JmdqSNjguBMAjIYstEsA7nMgROOngEIWTYxZyOyOgdMxKNDlcreRo1V7mBMJpl1vQodVJ4UiksSEg2raEcfBLJWY4Ik2Ap22RZ07kfPs=; 20:T32O18rgNYvZ8Aq0DL8390mXoBgeOZwkI8rjW2eICwj33HmLvltSetuZ6HUZkIpG+BB0tG2AOwLTxQeckwiW7g== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2015 19:50:42.1753 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0501MB1388 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 19:50:52 -0000 Bryan Drewery wrote: > Why would anyone build ports in a sub-dir of src? It's convenient for a > vendor building their own product that needs their own ports tree. Some > decisions can't easily be changed; if the root of the source code > checkout is already src/, there is no simple way to avoid the problem. But wouldn't that imply that /usr/src/share/mk is the right set of makefiles to use for /usr/src/ports/ What would you consider the right sys.mk etc would be in such a case? From owner-svn-src-all@freebsd.org Tue Oct 6 20:00:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E54889D0A8A; Tue, 6 Oct 2015 20:00:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C7CAAA48; Tue, 6 Oct 2015 20:00:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C071F1AD3; Tue, 6 Oct 2015 20:00:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 50E9E10938; Tue, 6 Oct 2015 20:00:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id Y6XMx8AKgEtW; Tue, 6 Oct 2015 20:00:48 +0000 (UTC) Subject: Re: svn commit: r288911 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 5E07710931 To: "Simon J. Gerraty" References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <15356.1444161040@chaos> Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc X-Enigmail-Draft-Status: N1110 Organization: FreeBSD Message-ID: <5614286D.7020904@FreeBSD.org> Date: Tue, 6 Oct 2015 13:00:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <15356.1444161040@chaos> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OGfbECOx08J1i4lG9e2WJXTm87D7JQfv4" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:00:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OGfbECOx08J1i4lG9e2WJXTm87D7JQfv4 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/6/2015 12:50 PM, Simon J. Gerraty wrote: > Bryan Drewery wrote: >> Why would anyone build ports in a sub-dir of src? It's convenient for = a >> vendor building their own product that needs their own ports tree. So= me >> decisions can't easily be changed; if the root of the source code >> checkout is already src/, there is no simple way to avoid the problem.= >=20 > But wouldn't that imply that /usr/src/share/mk is the right set of > makefiles to use for /usr/src/ports/ >=20 > What would you consider the right sys.mk etc would be in such a case? >=20 For our case we want the checked in src/share/mk to be used rather than the older /usr/share/mk as it is easier to support. If there's a problem we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be used by updating the checkout. This was something we backported, without the src.conf inclusion in sys.mk, and were running with fine. Excluding src.conf is enough to satisfy our needs as it prevents a lot of extra environment, variables, and target overrides we have added into our src.conf to avoid touching FreeBSD files where possible. The biggest problem I hit so far was some LOCAL_LIBRARIES we added in that needed their own __L targets in our src.conf, which bleed into non-src builds now and cause obscure errors. Modifying CFLAGS is another that we have a separate src.conf and ports_make.conf value for, with a shared make.con= f. The changes made by including src.*.mk have not been a problem for us so far. There's really not much hidden from /usr/share/mk except some src-only option handling and library lists. It's possible the inclusion of the meta mode "src".*.mk files could cause problems for us, but I haven't investigated it yet. My biggest problem here is that lack of _WITHOUT_SRCCONF support in bsd.port.mk. The nested build of a non-src build in src/ is easily handled by a -m argument, or using gmake as the upstream was expecting it to be anyhow. In the case we've hit this we have a BSD Makefile that calls the upstream build, so we can control what make arguments and other environment are done from there. However, a user going into src/ports and typing 'make' will get the src.conf pulled in with other surprises. --=20 Regards, Bryan Drewery --OGfbECOx08J1i4lG9e2WJXTm87D7JQfv4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFChtAAoJEDXXcbtuRpfPHNQH/0ZI7n7+TsIZ/gsLpRoVwvtd Q9b2eRjyPoe38ZzSKHEzk0EJKPHsfoqY0ilnWn/LPlFMR6ENJ46O5g/uXGR7jnTj llTNk1VyGPpECmgFpk3lhbCB/tvK+JDmGA+/mP9hYmG0yMiTJTZoc8IHeWo2ww9z 7EqEvhAoMlEoHcvA6GbyHP/rD3ebUh6u9IKlAmzzTKHISDulc+f87lJatoTfEUPa fo19QMWsByYEN4rVyk8rtl4q53jJ5RWa2NqP0X1nnk+JdnrYam6cFrjjeZnzdXD4 GSCJGmD1Qwu4NM4I/PexaA92AdJXmlcsf8skKyyhVZnLKN8imbYJHK7JwLoqT6I= =ZmYX -----END PGP SIGNATURE----- --OGfbECOx08J1i4lG9e2WJXTm87D7JQfv4-- From owner-svn-src-all@freebsd.org Tue Oct 6 20:10:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 230189D026E; Tue, 6 Oct 2015 20:10:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0F54D37B; Tue, 6 Oct 2015 20:10:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id 6F73F1FD5; Tue, 6 Oct 2015 20:10:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Tue, 6 Oct 2015 20:10:55 +0000 From: Glen Barber To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r288947 - head/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20151006201055.GE8600@FreeBSD.org> References: <201510061906.t96J6Yqr096589@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Dzs2zDY0zgkG72+7" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:10:58 -0000 --Dzs2zDY0zgkG72+7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 06, 2015 at 03:49:19PM -0400, Ed Maste wrote: > On 6 October 2015 at 15:06, Glen Barber wrote: > > Author: gjb > > Date: Tue Oct 6 19:06:34 2015 > > New Revision: 288947 > > URL: https://svnweb.freebsd.org/changeset/base/288947 > > > > Log: > > Document r288943, clang, llvm, etc. updated to upstream 3.7.0. >=20 > I think we ought to list all of the individual components. In the > past often Clang and LLVM were the only parts updated, and LLDB, > compiler-rt etc were updated on their own schedules. Importing them > together represents a new approach and I think we should mention that > explicitly. >=20 Makes sense. I'll update this. Thanks. Glen --Dzs2zDY0zgkG72+7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWFCrPAAoJEAMUWKVHj+KTqxoP/juJZCbG8DZux5aZMcjk36SI KjDQnaT2BBnjOIqpi9qL01A+klBzN9E4gqQU3EU5A9TPLditBCxFouQI4rctmNJ+ CPdJr42okpZYEmC/1fQqXGEYYEcvMakMgDllK9TpxhrAl2WB8OUJvj3uhHwAk0qt jBQ2xVv7rO0mwTm9kHLBFYcwsrtL5srR4iQ15LDwWyBQdCgLsL1K9U3BID4BJppW /hCTB9cHNL/D0NtW1M3jFT6J5IqnthAwCAtSYCjjgkYES7umVflHUQcU1JPHA1g0 oBFPbwsfMB+2qzY8OIoPdK5HEqG4+2/QaSDbDLLgCiijG4I0AhmKyM3CBEvZPTzg Hx/6d4JaP8MEbCSd+sUMspmyIiC+CAIUHP29F/1YNRHZwi74se6YpYvUxq1tu2yV Q0J+qz+kz3hq3kyg3MIQkpTpCGOI0qjqt4TfuwMbd5bcyIvv+DdNuUev07EMxNuh UQQEp3rGPoEkcfcN+/twb5U3rqDebWbicut7lVYGaGUJWx+jt3uz4CAfmGqy5kqZ /OGQdfH6bHcDeL9LfgLIndvF7JG0DNDEuY2ZckXEIZHyFV6GW5m/EPGKwHxBqHas 5Jf5/Rw3ejHE1voEbC5fMCF6DqremH8Jo9RswyQK7kVJ12XnGrdhJw+prWZl3dNV QwxZt/dXwnykHpeAJlg+ =+wNd -----END PGP SIGNATURE----- --Dzs2zDY0zgkG72+7-- From owner-svn-src-all@freebsd.org Tue Oct 6 20:19:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B0E09D0746; Tue, 6 Oct 2015 20:19:33 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22B5D9CC; Tue, 6 Oct 2015 20:19:33 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZjYht-000C0L-La; Tue, 06 Oct 2015 22:19:29 +0200 Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 To: Konstantin Belousov , s3erios@gmail.com References: <201510040745.t947jbp7082807@repo.freebsd.org> <20151004094649.GG11284@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= X-Enigmail-Draft-Status: N1110 Message-ID: <56142CCC.7000807@FreeBSD.org> Date: Tue, 6 Oct 2015 22:19:24 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151004094649.GG11284@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hQKVL1tg7rA5lq4WiDLcLkOwA95fU2IWN" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:19:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hQKVL1tg7rA5lq4WiDLcLkOwA95fU2IWN Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 04.10.2015 11:46, Konstantin Belousov wrote: > On Sun, Oct 04, 2015 at 07:45:37AM +0000, Adrian Chadd wrote: >> * Add missing case statement (gen =3D=3D 3) in intel_gpu_reset(). > This seems to be wrong. The i915 and G33 chipsets do not have register= s > declared in the 8xx chipset documentation. More, i915 and G33 have dif= ferent > reset procedures. >=20 > The absence of '3' case was copied from the corresponding Linux kernel.= > Was this change tested, or is there a reference to upstream where the > handling was added in this manner ? You're right, even in Linux 3.8, the switch does not have a case for generation 3. >> * Replace M_WAITOK with M_NOWAIT when the return value of malloc is = checked (may be incorrect). > This is also incorrect. At least the modesetting pathes are executed i= n > the syscall context, and sleeping is allowed; the modesetting locks wer= e > selected to make sleeping possible. Using nowait causes random syscall= s > failure where the requests would succeed otherwise. My reasoning was that M_WAITOK could make the display hang/unresponsive while the memory is under pressure. The caller should be responsible for handling the error instead. In Linux, *alloc() calls may fail so application should already be responsible for that. --=20 Jean-S=E9bastien P=E9dron --hQKVL1tg7rA5lq4WiDLcLkOwA95fU2IWN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWFCzMXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTM4PMP/jbx0y2EkkYZws8m9E93uxrg m8DfAv5UNayNm9RrfpPE+Bp2HJrl67EIilsI2lVK8faEv5oYLv5gBCZRJhl8lU1z H+QxAaXaOYwofvZG2qTpK8j9ZavKQxUFtDhQluxp7U/oTmxhELnh90ssp/zLrRQ2 96VawrNFVMe6AXUWDmyfrQW6eN732I7w4wfkRGqRmooDRQh7JesBi2aUEEDcC7Ue uJXLgJ1nRGtnf4fVdQoleXJgrQuGNz/OP2+NOJjyq39nvOBnD8IbeKrgjYQWHTkE SwPnjEvV4pWiv3kR8LzqW6ZGpSbsZvLopsLNt8hkgmgrnu60JCilYAks+MLHO3GY C0b317PnFlNPbm2ktpn/3xnseDc35ITqQ1mn9lFqoaQT8mQPQ8v8OFlWwW7tkGpj SsSsOqeVU3HYk33xpHZjxj0orjw93am9/wEEexHuf+frG70oN+xzinZa5KkfiXWh V708z8qJjHpaZ2c33iNdppxQaUfqlTzeFIgK1reL343k2Tv6XZ+zVpJJnSlySrAP r4GlltF/7a7BuPAo6EteNRzZe4fM2oiMv03C/+VFCqBEPydHUmYPjOQvsPaOJl/3 ENJQEP5Ht4DXiEyjflaTzqfqvkmswk4ZMDlsrf0z3AFuVsS0+KTqsLiStQN/fykz dtH13BXsKGWvu0QbpGmS =gCDQ -----END PGP SIGNATURE----- --hQKVL1tg7rA5lq4WiDLcLkOwA95fU2IWN-- From owner-svn-src-all@freebsd.org Tue Oct 6 20:20:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 330509D08DE; Tue, 6 Oct 2015 20:20:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF6F5C65; Tue, 6 Oct 2015 20:20:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh134 with SMTP id h134so235788364iof.0; Tue, 06 Oct 2015 13:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=aRhY9y/etpsnLlJ0M8BWfVvo/eVEhIqy/8YVai+Tawk=; b=qvYZLY31VgO/y77wNLPJ/gwtHLr5sjE7xbgT1KuQSpEet8SJx+DWV95tGQyUhX9Ca5 2u6EhjNX14DD5wcT1wvm5CU7MCwM/cq46FTGJFdEnGySdsOCCy+ZCUwnH5H+cOutrjcz yIUWIt/bf2RMmsF+0RTcXEKtNPUmyTj9YoShM5oVvKqd9bbqr1SgOMi6JC5997tm/6xB R6R8yR3OYhMpCs2kBf1ik3fdvRrB9wePGAIavAd5etRYxHxNqoXPTymD/XlstjiH/s/E zLBECT6XFx99wJpQ6Dtuwr6hsX+AEOZYSF6TvASuktL5W0PtxSD0OqZZ4PWZa74lJ8fr nj6Q== MIME-Version: 1.0 X-Received: by 10.107.35.78 with SMTP id j75mr34752007ioj.123.1444162837407; Tue, 06 Oct 2015 13:20:37 -0700 (PDT) Received: by 10.36.46.15 with HTTP; Tue, 6 Oct 2015 13:20:37 -0700 (PDT) In-Reply-To: <56142CCC.7000807@FreeBSD.org> References: <201510040745.t947jbp7082807@repo.freebsd.org> <20151004094649.GG11284@kib.kiev.ua> <56142CCC.7000807@FreeBSD.org> Date: Tue, 6 Oct 2015 13:20:37 -0700 Message-ID: Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 From: Adrian Chadd To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Cc: Konstantin Belousov , Andriy Voskoboinyk , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:20:38 -0000 ok, so what should we rip out? That '3' case? -a On 6 October 2015 at 13:19, Jean-S=C3=A9bastien P=C3=A9dron wrote: > On 04.10.2015 11:46, Konstantin Belousov wrote: >> On Sun, Oct 04, 2015 at 07:45:37AM +0000, Adrian Chadd wrote: >>> * Add missing case statement (gen =3D=3D 3) in intel_gpu_reset(). >> This seems to be wrong. The i915 and G33 chipsets do not have registers >> declared in the 8xx chipset documentation. More, i915 and G33 have diff= erent >> reset procedures. >> >> The absence of '3' case was copied from the corresponding Linux kernel. >> Was this change tested, or is there a reference to upstream where the >> handling was added in this manner ? > > You're right, even in Linux 3.8, the switch does not have a case for > generation 3. > >>> * Replace M_WAITOK with M_NOWAIT when the return value of malloc is c= hecked (may be incorrect). >> This is also incorrect. At least the modesetting pathes are executed in >> the syscall context, and sleeping is allowed; the modesetting locks were >> selected to make sleeping possible. Using nowait causes random syscalls >> failure where the requests would succeed otherwise. > > My reasoning was that M_WAITOK could make the display hang/unresponsive > while the memory is under pressure. The caller should be responsible for > handling the error instead. > > In Linux, *alloc() calls may fail so application should already be > responsible for that. > > -- > Jean-S=C3=A9bastien P=C3=A9dron > From owner-svn-src-all@freebsd.org Tue Oct 6 20:24:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B7299D0BFC; Tue, 6 Oct 2015 20:24:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC5CFE4; Tue, 6 Oct 2015 20:24:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZjYmE-000C5B-Ki; Tue, 06 Oct 2015 22:23:58 +0200 Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 To: Adrian Chadd References: <201510040745.t947jbp7082807@repo.freebsd.org> <20151004094649.GG11284@kib.kiev.ua> <56142CCC.7000807@FreeBSD.org> Cc: Konstantin Belousov , Andriy Voskoboinyk , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Message-ID: <56142DDD.9060609@FreeBSD.org> Date: Tue, 6 Oct 2015 22:23:57 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="17HV0LwNA8h9i1e21b3ILHFhCUrc9HVOB" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:24:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --17HV0LwNA8h9i1e21b3ILHFhCUrc9HVOB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06.10.2015 22:20, Adrian Chadd wrote: > ok, so what should we rip out? That '3' case? Yes. Regarding M_WAITOK vs. M_NOWAIT, if we decide to restore M_WAITOK, the error check must be retained so the diff with Linux remains small. --=20 Jean-S=C3=A9bastien P=C3=A9dron --17HV0LwNA8h9i1e21b3ILHFhCUrc9HVOB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWFC3eXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMsIIP/RpSD4x5QpC0P3ouDXGUW1Bq N0LazjXVOF3EJyz7Z0TRvqfKrIihmHq5Eo+HCu8EOpeXsysSbe6QmJaJLqNxzrS0 gdr/2pTDlG1AEjc8ArFHiDGdvUyiwRNIpxpOe3kxTe4Osvn8PYFel+skn1600jSH QwefzueGj58bXbN7UWiHZufArT3RwTl2edi4+YN4JY82S49P2BKWmRZqiYmt5Iq2 Pbt4ZCEylJrcVllY2izXBYRiLTHTwp+L1v3okCZlP31RqDg3Vx04XOyfDvSmhjDd qx1ReI5CyeCFvYsJ5errQgLfjNyzjRk96oWp0W7a+gW9XxILs3JqtTgCoeUzP9VY nuJjbDZOcpZeUDB+BAFQBZlVgPDbYyn+Eu7iTv6zb3wslClf1JQftQFm07hhBquA 6BW6l57r9iDgoztQpPHzANS+OoGM7GdiuCOvlBM3tI7jgWiQXqWhawDQ8cPJOTp5 9nISdVDsSXMtrWo6Vr9znDTNBzeMq007nELQGR2rndNOMrRlKWfwk1yGpvcry1Gw 25QQRh8mgQjuK9d0GTX8KL3aEVrCOndUh/Knzz8CBLh+hAoSDsnJqVwgKM51vh0f NdpqFYydSPOGW5FP66oCy5P1QvxCb+sUySWwdADvcvbUyvIecbDMi7Ikz2i0POia Iy2/lrH0GGyPt5D+fFEA =q3qI -----END PGP SIGNATURE----- --17HV0LwNA8h9i1e21b3ILHFhCUrc9HVOB-- From owner-svn-src-all@freebsd.org Tue Oct 6 20:24:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C81D69D0C67 for ; Tue, 6 Oct 2015 20:24:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D99E1A7 for ; Tue, 6 Oct 2015 20:24:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padhy16 with SMTP id hy16so79605576pad.1 for ; Tue, 06 Oct 2015 13:24:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=8LrrdWOT4be+bT6YPzH4BcHNvbW4VteLQj2JCjNq2YI=; b=SFhPtN1BZISIOJ0iNvH71z9RWDJGPaRgKstz8J3bZxW4rVm1+8e/dlvnu6q4V5UgxE a1fNe2X7Ryj5F6EEuuo57F6mxI6hJQwpfaeCaY404viFOf/MSXR9lBk/VKu582wMVewc 0rP29lfIJg5gK9pQNe2iNmGkbihEcoD1/OjOjfBPQGaq4ZyKPdDiJWjYO/nRwFXXgoOv PyVJPcEKVfOncSFN/cAbK98i4AT1TPvsleqI5W6LmyKxf4fi32/Bkt/Pf+0/PR3bOeMu RIwHu3dfBkaCvSeGIM7NzgCPVPulyAwl0y38HdrCEe0b2995DJ5ip9c+KWbbCY8Fci/U OGFQ== X-Gm-Message-State: ALoCoQkkSd06c8GvLP5Q0DyD2Tsrvn720zgd/sVFcQmEYVqxLs1zo3xwia3GdhDFy0rPEz8xVOxT X-Received: by 10.68.227.227 with SMTP id sd3mr49441330pbc.116.1444163067729; Tue, 06 Oct 2015 13:24:27 -0700 (PDT) Received: from ip-100-127-129-73.ec2.internal ([69.53.245.7]) by smtp.gmail.com with ESMTPSA id xd10sm35304073pab.25.2015.10.06.13.24.26 (version=TLS1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Oct 2015 13:24:27 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r288911 - head/share/mk Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0826EF31-BDA6-4AD7-BE36-5374B309BE59"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <56140CAD.8080200@FreeBSD.org> Date: Tue, 6 Oct 2015 14:24:24 -0600 Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:24:34 -0000 --Apple-Mail=_0826EF31-BDA6-4AD7-BE36-5374B309BE59 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 6, 2015, at 12:02 PM, Bryan Drewery = wrote: >=20 > On 10/5/2015 9:18 PM, Warner Losh wrote: >> Author: imp >> Date: Tue Oct 6 04:18:48 2015 >> New Revision: 288911 >> URL: https://svnweb.freebsd.org/changeset/base/288911 >>=20 >> Log: >> Previous versions of bsd.own.mk included bsd.compiler.mk >> only when _WITHOUT_SRCCONF wasn't defined. Restore this >> behavior because bsd.ports.mk depends on this in subtle >> ways. The compat include of bsd.compiler.mk should >> be removed in 12 anyway. >>=20 >> PR: 203540 >>=20 >=20 > Perhaps the wrong place to discuss this, but I will anyhow as I don't > think it will change. >=20 > The sys.mk change to include src.conf breaks building ports in a = sub-dir > of src. Meaning, /usr/src/ports/. The MAKESYSPATH with '.../share/mk' > finds /usr/src/share/mk and runs off with all of the src.*.mk stuff = long > before the port Makefile includes bsd.port.mk, from > /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF=3D guard = set > on it to avoid bsd.own.mk from including src.conf. But because sys.mk > is already included long before this, src.conf is already included and > anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF > unless it is in the environment Yuck! But the real problem here is MAKESYSPATH of =E2=80=A6/share/mk. That was = a hack until we had something like SRCTOP that we could use for finding the right stuff and for individual builds. So if we can solve that part = of the problem, we can get rid of the default =E2=80=A6/share/mk definition. It = wasn=E2=80=99t anticipated to be something forever, just something for the moment. > [Note that the actual inclusion of src.conf no longer has a > _WITHOUT_SRCCONF=3D check, but that is trivial to fix] That likely got lost in the shuffle. Agreed, it=E2=80=99s easier to add = back in. > Why would anyone build ports in a sub-dir of src? It's convenient for = a > vendor building their own product that needs their own ports tree. = Some > decisions can't easily be changed; if the root of the source code > checkout is already src/, there is no simple way to avoid the problem. We do it too=E2=80=A6 It=E2=80=99s evil, but there you go. > With the META_MODE changes, sjg introduced this /etc/src-env.conf file > that is included from sys.mk early, that can be used for overriding > things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be set > extremely early for AUTO_OBJ support, among other things). >=20 > As far as I can tell, the sys.mk change to include src.conf early was > done out of convenience. Meaning, we could remove that and just add > back a .include or similar at the top of all src = Makefiles. All src makefiles? Yea, I=E2=80=99d rather hoped to avoid that, though = it is easily scripted. I=E2=80=99d thought of this solution at the time I did the = MAKESYSPATH hack, and rejected it as being too unwieldy. And having that at the top of all the files would still require MAKESYSPATH need to be =E2=80=A6/shar= e/mk to work out. I was rather hoping we could find some good way around doing that. > I would really like to find a solution to this as it is a looming > problem for my work's build approaching in a few months. I figured out = a > hack we can use locally, to set _WITHOUT_SRCCONF=3D, when the current > directory has "ports/" in it. That works for us, but not for other > vendors who don't realize this is coming. Perhaps the scope of people > doing this is not large. One trivial solution would be to only do ports sub-builds with _WITHOUT_SRCCONF defined. But like all good kludges, I imagine there=E2=80=99d be logistical issues with that. Warner --Apple-Mail=_0826EF31-BDA6-4AD7-BE36-5374B309BE59 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWFC34AAoJEGwc0Sh9sBEAEkQP/R8z7vjC4m6crEhhO1hQVCCD qHNbIL3qXGrM0IKTqJRTQ4GXLd1ep5394DhCbU3DhqY2GXyHp9HS0+GrIGv/9Kxz IVN821cDZwyPKjnK/nvoXfIfJdKs//GFRhDnX28BEW6CTIrQp9xoQR2DjCMNbsaT Ru+r/VGDyjv+ebT8Qs9fvBUQNO6zRlCuhyy0/BFjLck+JyfV62PSsE901ivMUkxx 33fqw/0VVlsbj4htQU4WV8RbexQwswwuDUxcnd9esz6hgttJ0A37K5tNi8mgr+i6 XOQhKJBwqJ4erJTZODotnaK5DglY3h6JhnPyWpwohixhb7O8YaGOuUB+15ohQrVF bfCPSP/YSNTN4OF/61BR1bqkjlDxgW7DTkYPmHyGs1iANALJal58DHxW4W73walf FZZTuiyxDHppLZp5dt/BLFAaVNe8cXeR98QaVa9WQLVBUF29YCkhNkMjlpPA9e58 5/ivIlcbe2+7cqZF0X4xg5L2mBNsGtfE5SFsMqRqIBxfMbg0jPSDmE6Q5/t2GjrC tWHT1G8shfBcgZTIIGETCOAReQA57kM7j8g1MUXsGAiaJbCinJ9yc4fw+MrxDDQw VOKpHecuS6C7cPfIPRtMsGkyEZzQHLFOVi7A8fJT1WCC1EiqkrwQfDiEWBhF05Hd LRncRi3iy6iFRpHiTpWW =vZzd -----END PGP SIGNATURE----- --Apple-Mail=_0826EF31-BDA6-4AD7-BE36-5374B309BE59-- From owner-svn-src-all@freebsd.org Tue Oct 6 20:58:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64BE39D08A4; Tue, 6 Oct 2015 20:58:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB1EA91; Tue, 6 Oct 2015 20:58:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96Kwk83031703; Tue, 6 Oct 2015 20:58:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Kwkhu031702; Tue, 6 Oct 2015 20:58:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510062058.t96Kwkhu031702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Oct 2015 20:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288952 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 20:58:47 -0000 Author: adrian Date: Tue Oct 6 20:58:45 2015 New Revision: 288952 URL: https://svnweb.freebsd.org/changeset/base/288952 Log: Remove gen3 check introduced in r286653. kib spotted this and noticed it's not correct. Submitted by: kib Reviewed by: dumbbell Modified: head/sys/dev/drm2/i915/i915_drv.c Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Tue Oct 6 19:49:53 2015 (r288951) +++ head/sys/dev/drm2/i915/i915_drv.c Tue Oct 6 20:58:45 2015 (r288952) @@ -894,7 +894,6 @@ int intel_gpu_reset(struct drm_device *d case 4: ret = i965_do_reset(dev); break; - case 3: case 2: ret = i8xx_do_reset(dev); break; From owner-svn-src-all@freebsd.org Tue Oct 6 21:17:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB0059B65AB; Tue, 6 Oct 2015 21:17:11 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0133.outbound.protection.outlook.com [157.56.110.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAC8A7F; Tue, 6 Oct 2015 21:17:10 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from BY2PR05CA062.namprd05.prod.outlook.com (10.141.250.52) by DM2PR0501MB1390.namprd05.prod.outlook.com (10.161.224.12) with Microsoft SMTP Server (TLS) id 15.1.286.20; Tue, 6 Oct 2015 21:17:08 +0000 Received: from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::170) by BY2PR05CA062.outlook.office365.com (2a01:111:e400:2c5f::52) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Tue, 6 Oct 2015 21:17:07 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) with Microsoft SMTP Server (TLS) id 15.1.286.14 via Frontend Transport; Tue, 6 Oct 2015 21:17:06 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 6 Oct 2015 14:17:05 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t96LH4D13568; Tue, 6 Oct 2015 14:17:04 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id EB921580A9; Tue, 6 Oct 2015 14:17:03 -0700 (PDT) To: Bryan Drewery CC: Warner Losh , , , , Subject: Re: svn commit: r288911 - head/share/mk In-Reply-To: <5614286D.7020904@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <15356.1444161040@chaos> <5614286D.7020904@FreeBSD.org> Comments: In-reply-to: Bryan Drewery message dated "Tue, 06 Oct 2015 13:00:45 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19413.1444166223.1@chaos> Date: Tue, 6 Oct 2015 14:17:03 -0700 Message-ID: <18968.1444166223@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC007; 1:2A2xXnDC4bnX80h4CCfbJLJuLEfGntI23Z7c6/LxhrPmxfmP65tow5lgRu90NFKIvBybLAzc4EJrYLqjkqaIYOL6LmDWag4zGgfcPFv5amqzwZo5EU1Kbw8VIOX1/2vo/23UxoBp3w83KP4AYB1cDmMVcAYtLIefNwKKTT7h1ezVzrsE4veJ6VLw9Ezs7HkHe0IYhRlph5nEwCCA0hHrw/6RlRCPl13pqqOjbxPRCVtoCoh380YKP+NN25BMC1PYZfsXu9W+hVkhAg9nFzzCUYHsNKuhLuRtnjzSMD0y3rEJ+gMoc6DIZBewjrYRyvhtgvGIaeqz/n3sLFX6V+dpsQ== X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(199003)(189002)(24454002)(93886004)(117636001)(19580395003)(23726002)(64706001)(86362001)(97756001)(5008740100001)(19580405001)(47776003)(50466002)(33716001)(105596002)(106466001)(50986999)(46406003)(6806005)(76176999)(189998001)(46102003)(76506005)(50226001)(5007970100001)(5001960100002)(69596002)(92566002)(110136002)(2950100001)(87936001)(97736004)(81156007)(57986006)(107886002)(5001920100001)(77096005)(450100001)(62816006)(42262002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0501MB1390; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 2:eDnEPTp/jxL19uH1FWcuUdR9ldjHDhiHdAP4g8+qQvC7V41Gzq/sGGLvz4N3bcl6d4eNWaoBveAzGja2BkPXR8bDKK3ZWhfdWHtPNf/ykf+USnKfbG3wI5RRMZpWLunCQ2s1rfT8SUeFHlw88RJJv7NMGV7l2T3G5KH3/gp5R1Y=; 3:D849F/9TFDEdJeNgvpRIn/mFVNXax8q66ESvId+x7QffI76calUSJL4IUWqKsBNH8ZdvgQD3Hx5VjlMp7Cm4iklao6CtChyBhsUPg8ymYb4K/tf+CUzU51PcKk/UQ3nLRhcBg0i0+P2mN8PJ6Jz0F+RGW8wpgPr0krKceTUu7y5zQM2wVNwd8NuY3zaYu/ZwTYmss/tgJhWOIzyPXbBe1HipUYNllMwRd08Uu1q4k1w=; 25:mdvmDPQSOuEXHmdko5/t1pRulkKTq7jc+/s+7/UHqr7XggzxyrfGlN5inbolGDoXjXYWJ3dho1GEufdXmofdXjjSPimJOMhntILE8b5sH/E5m9pISXYdLtYgUk68DpghJFL85vqLs+AdT54FLbsbXcoGwSdlBIHsr18BhXt9JYj0ovjeNiaur7jO/zx8/wRJsnC2dRKunhsrA6QcgRuBCgs/QG7xzBaZdPsIt6lHEk5C3LF1q04y7GIbM/uXmlks X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0501MB1390; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 20:uoWQae/0/NWPmivD5KgrjKPatLPgG4Rb0Cqn/CLC4QYz4UE+QGY27gDbQDq6ofA0OZv45kAKUa/PRtJiHwV5YNc/2lBbwmoxWv7prlgRmJ3yKWEV/zpoeBgqLbB4AjtdmbQWaGRwx1QCXwXEQVMRDSuD6GvPio09Noqql6/iVQge34YbniR6DAC7o74jR0bb+xzUvn2hX62cyXUDtUyR9nobjQwmw9KDqmbcVCBkYzk6f6zq6alXD3nAAPIB0HyJ0HMEJkR+EfBcyK+VKMIzCO34ntDYctloYji3IoqCJSlBgoU20btBTP1uuiylZs6Y89bV6mTMCG09zDUcYQlCXjizyj790w4Rl68iHFgSqHFZQr70ZmBKM/NeXCumbkqT8NGzUSU92tAgkVdpLG4R2tSIj8/DSGkQ7ZrcuVuUzfLMDhZWZ0XXsPA98BN5lrlP7lYojRT+8mlSZ49uedCK6Ndb8HVRIZy5y5qcX1TcMlw6cECFSSSirOOqUIvxpT4z; 4:glXYivzADGBAcHBq3k/O/eaCzReiBWCZ4UhGtdWRwmFCjfaJh0QXvkQNF6C6QDi7wPkwCk7l+kk6TEhXc7TDImyqfsysI2cyQa2OjRf9+Cqj7i4qM5s+XnKCxzQsSe8upjQhe2Amd2pb0Z3xlbhhxnZZuE969+ZtNOEyfVf4cGZvKdxe7F0f0FEu5p1WYf023y3YVePbdXU70v0vnFi6jdSp/e94u7pwtbG/nSeN3Lsj5/dTUQcs9t7tAwO2/hOJ5P57phqT6G6OL+HoLtIUfmgzYlAdNoTYKdWJp9EYlCAcCKRlzYptvnJaTyH4NSunZJ+j6DGN8Qhn0NEZZoU0TRFvpPFBTPPJI6ojgF5tVo0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:DM2PR0501MB1390; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0501MB1390; X-Forefront-PRVS: 07215D0470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0501MB1390; 23:wm070ok2mynh0C1XXXmEhWpV3Q+fEL/LJXTIVea?= =?us-ascii?Q?ydlb/qOojeOgAQ7jU3tp0jActM2dlg+rRsIcbe2RMv6SewOJgOMr8+IgUBxb?= =?us-ascii?Q?JJm3D+6tSLrMiXBwZRmCzULefrXEU3ZXuWEsRKKPIIiZqmqdpMwWPuD8D4mc?= =?us-ascii?Q?efy5lJ722W5BVYOVg+jd2oxXTQqXOcj6cM8C/JjfD5d5q4Hoia11RgBQtS82?= =?us-ascii?Q?GcPcOef22TwPDz6D9L/r8iWpVWUM3C7QRge6d+6LuzIrJ50gYaGexqQ/xoPl?= =?us-ascii?Q?ZDnaUFiRtrI25ZlpVLmHO+Hy+uYUiPALJLpw+S5gTVu1tPEJU+D9U5O0HjzN?= =?us-ascii?Q?xuZHvJpNheAdh2DUpDCvgYrcEuINuyMFIGngs4iMZ1NJtkvGUcrVKy4f6psq?= =?us-ascii?Q?5+rTXiQVzya4/GWuGAk2w4VjwbNoRDDQrRwEWwY9lx7+KlBY1wjW7VP0Go5b?= =?us-ascii?Q?9w4aDR0D3CkY7o7GSfzkXQCyro2+xq55D8wzBE7lH0P6NQZ9f+qfSksZkTT7?= =?us-ascii?Q?b6STe6ShWPQRCKltbYeaJUFZ3q5bNSuAm8VAqUP0aQwXZJdf0yvXONFoVZl8?= =?us-ascii?Q?WARoNCJ9fgzReic1Z0mvWKbPUrbPVlkXLzTkGEPXrAiuQABe8zkDZZbE5Kkt?= =?us-ascii?Q?sN6tTdWbk4u5asq+rBvir6QUiPYkiSBQM+VSUvX5NU4OKZiJWiisd9lwGPGV?= =?us-ascii?Q?uDDiORc+XAAvz/YrrjHpEe4wtUTMI+Q1hlJR2ZZxGDZJT/i2DDxv5MM6DvIS?= =?us-ascii?Q?9i+c/CMWi4TSxi0eTSktoAcMGWXQy8Fgy3Lx2DaJC0cAHhF6WCXNsVGQhurq?= =?us-ascii?Q?hGUTZV70icL6TLEbl9zi8vfifstRR3Yurzz8+vyh0TO/mdo4eYY0jLlBpUR0?= =?us-ascii?Q?DCD2CGlKRmB/LaXUjGp6Q77iJsFfHkaSh/JoOebdJ6JHT+Xec8AmClGRoEDU?= =?us-ascii?Q?Nj+NPL7DA0QQKAFhZGGsAArWhR6BzRCHkUJP1takdvMe4Q7A/+5kFpEvxg1T?= =?us-ascii?Q?VPR7XZlaHJ8v4KaqAE4xMFyjNhh8zAggCraCbxZzEJBIBcSsnM5uDtdNpnsQ?= =?us-ascii?Q?cfOudwFEp5h4Adq/dAaAOqG2+lJeZgqq4L8VU30e03gqZ20CoaqfeEKmH7AH?= =?us-ascii?Q?mgrwyEAqhocrgwyg275BkU6RigpGySpfbr2r0MKRny3aMdc9daIQNhauUqwG?= =?us-ascii?Q?MlxiBDD9odjg5u6o=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 5:QWmLjdVKsi9+ji0/x0xsc8JG0iiWvRcSdf8hGlDe0sjTS3Mwfbr5xm+A4dYc+5lhv16SYkrDynO3qRSzUCSTDXIlf13sJKbbZ5JMsuaZ0+1P9EFISYuLVTnAYNTSQ1qH/fOYj+IKqU1rQLrwassRmA==; 24:Q89vUsIHrvMWLL2lUkNJsnJgLU8cwqe5NIjgqvnZJCdG4whpYHXkqwJhgT+PaGomOI6aM8Y7HXqTMs5p3K2rt0tb8vzvrYSjmy3PPqyWWRU=; 20:8Ak/ytue7H0DzjHP+yj9kElH6MxvHqA932G63GjjvG9uizCUmnfywSLaPUcWlifdw0HsIFVrkBErkbrgGz9E6Q== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2015 21:17:06.8070 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB1390 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:17:12 -0000 Bryan Drewery wrote: > > But wouldn't that imply that /usr/src/share/mk is the right set of > > makefiles to use for /usr/src/ports/ > > > > What would you consider the right sys.mk etc would be in such a case? > > > > For our case we want the checked in src/share/mk to be used rather than Are you refering to a src/share/mk which is sibling to src/ports/* or something else? Because with MAKESYSPATH=.../share/mk src/share/mk/sys.mk is what you should find. > the older /usr/share/mk as it is easier to support. If there's a problem > we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be > used by updating the checkout. This was something we backported, > without the src.conf inclusion in sys.mk, and were running with fine. I might be confused... It might help to differentiate the question of finding the right sys.mk which IMO is critical to a happy outcome, from what to do with src.* if present. Normally anything under $SRCTOP should be subject to src.* - by definition. But there's no reason you cannot make exceptions - by (as I think you already mentioned) adding a check for $SRCTOP/ports in local*sys*mk to suppress src.conf at least. From owner-svn-src-all@freebsd.org Tue Oct 6 21:21:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BC669B6A0A for ; Tue, 6 Oct 2015 21:21:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB22E19 for ; Tue, 6 Oct 2015 21:21:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qkap81 with SMTP id p81so92183332qka.2 for ; Tue, 06 Oct 2015 14:21:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FMXOQLb8PlE7LEWAp+O9/eH2uqYcXA0HabDdAunmqnc=; b=XrOdvyazsvOyTBMAWj1GTtH4eLIKieDDTvWeK6Z2V1My4bAYb/ObUea6LblZxge3db TFcqpf9hJJ22Aga+MABhubf1oiWumTo8nIytT9+p3rrc0E9OGwv2YUOjhBt/4Obfgbmj YXwEG/adXuX3Dv9xrKCYyQdoSS6Fdn28axVQTKdO8EqmXLjM8hGKxafc7jWwHjU77jz7 yTdqLhi3KrRrpLW4DAN17zrag6ACX4VWXwcoGtH+18BKez4x//K91KbWSlEdfLzujLhD 4UVaGvC30YUtCMSPDPGx8d4S/VkFHOcLmZamzRToJlhUJ4z/9RckFNrO3oPA6s0FeYzg NIHA== X-Gm-Message-State: ALoCoQnEiZVi8MqVXXklFZ0MrzNNNWUHnRPe3IwsaE33epLOGD53bBW6BDyjj8HwQBjEPwq7k9Z2 MIME-Version: 1.0 X-Received: by 10.55.221.65 with SMTP id n62mr8153760qki.42.1444166465167; Tue, 06 Oct 2015 14:21:05 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.167 with HTTP; Tue, 6 Oct 2015 14:21:05 -0700 (PDT) X-Originating-IP: [69.53.245.7] In-Reply-To: <20169.1444165538@chaos> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <20169.1444165538@chaos> Date: Tue, 6 Oct 2015 15:21:05 -0600 X-Google-Sender-Auth: OTYsUHsykley4TWNpr7lEBKLPJQ Message-ID: Subject: Re: svn commit: r288911 - head/share/mk From: Warner Losh To: "Simon J. Gerraty" Cc: Bryan Drewery , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:21:12 -0000 On Tue, Oct 6, 2015 at 3:05 PM, Simon J. Gerraty wrote: > Warner Losh wrote: > > > The sys.mk change to include src.conf breaks building ports in a > sub-dir > > > of src. Meaning, /usr/src/ports/. The MAKESYSPATH with '.../share/mk= ' > > > finds /usr/src/share/mk and runs off with all of the src.*.mk stuff > long > > > before the port Makefile includes bsd.port.mk, from > > > /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF=3D guard = set > > > on it to avoid bsd.own.mk from including src.conf. But because sys.m= k > > > is already included long before this, src.conf is already included an= d > > > anything handled in sys.mk has no real way to respect _WITHOUT_SRCCON= F > > > unless it is in the environment > > > > Yuck! > > > > But the real problem here is MAKESYSPATH of =E2=80=A6/share/mk. That wa= s a > > hack until we had something like SRCTOP that we could use for finding > > the right stuff and for individual builds. So if we can solve that > > part of th > > but you only get SRCTOP as a consequence of finding the right > sys.mk et al. Which presumes you have MAKESYSPATH set correctly. > Ie. you find the right src.sys.env.mk and it can set SRCTOP based on > knowing its own location. > > A bit of chicken & egg... > That's why I haven't fixed it. I haven't puzzled out a how to cut the Gordian Knot yet. Warner From owner-svn-src-all@freebsd.org Tue Oct 6 21:21:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 502909B6A30; Tue, 6 Oct 2015 21:21:19 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0123.outbound.protection.outlook.com [207.46.100.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48650E75; Tue, 6 Oct 2015 21:21:17 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from BL2PR05CA0047.namprd05.prod.outlook.com (10.255.226.47) by BLUPR05MB056.namprd05.prod.outlook.com (10.255.210.151) with Microsoft SMTP Server (TLS) id 15.1.286.20; Tue, 6 Oct 2015 21:06:10 +0000 Received: from BY2FFO11FD006.protection.gbl (2a01:111:f400:7c0c::160) by BL2PR05CA0047.outlook.office365.com (2a01:111:e400:c04::47) with Microsoft SMTP Server (TLS) id 15.1.286.20 via Frontend Transport; Tue, 6 Oct 2015 21:06:10 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BY2FFO11FD006.mail.protection.outlook.com (10.1.14.127) with Microsoft SMTP Server (TLS) id 15.1.286.14 via Frontend Transport; Tue, 6 Oct 2015 21:06:09 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 6 Oct 2015 14:06:01 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t96L5dD03499; Tue, 6 Oct 2015 14:05:39 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id D5349580A9; Tue, 6 Oct 2015 14:05:38 -0700 (PDT) To: Warner Losh CC: Bryan Drewery , Warner Losh , , , , Subject: Re: svn commit: r288911 - head/share/mk In-Reply-To: <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> Comments: In-reply-to: Warner Losh message dated "Tue, 06 Oct 2015 14:24:24 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 6 Oct 2015 14:05:38 -0700 Message-ID: <20169.1444165538@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD006; 1:Cree25KN7QfUwzMOZWbFG6agmDUeN/IZrImKr8CDlTebzqjZ2BJZ+g90BSWDCIr2Cc69vv2DzsqfC+9MY18qfGjxcXgUD/ZlQbiBcVSCtp7rvso2ZkX5Dn0jdC5ao7unhEbBq/9Ag/yr6a+RT7XnLDgH4H2HRvI+3+QEq/7aOKqC4voi0vXMHIeh4Eu16EHD4nDPksJdt6rpBhAo2JEFphALgXRgf93FBnnnYjcOcnJBWmXm1US2vYxqqr04YpYdR6NQBdWkw5bXU35rJJatDTveYHsciARsYaT3nmCRo+GqHbh4dsVei9odKoRARJWPLYOnW3xlLTkl67Ob14RddzZugtwuq8o81EVapATQNH0SB6cMBxim2pyadk2HHWUG X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(189002)(199003)(24454002)(64706001)(87936001)(11100500001)(46102003)(47776003)(50986999)(57986006)(77096005)(19580405001)(50226001)(69596002)(86362001)(107886002)(105596002)(76176999)(19580395003)(50466002)(76506005)(106466001)(97736004)(189998001)(81156007)(5007970100001)(5008740100001)(92566002)(23676002)(2950100001)(6806005)(117636001)(110136002)(5001960100002)(33716001)(62816006)(4001430100001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB056; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB056; 2:yBLMZQ3i4zDG9tJ2jh9RC0eH9AchDwnMgAvoTGL/TANQ3DH9hzFfZqSL23XTFom4FV16YGIvoiaG38WM3tYmXAP92yXYJtW/57LUzBu/iU+4+yPv4C1HGxGfw0TOvxTQsATxp5ZpD8DQXR6IaqYN2qZmprNlGXAwJ0sn9Dp6wbI=; 3:xZm/KwHVEj8TXBvdj5M3StAC+PpvMsUVjEkZ8XpjXzdKt2UaSLVqTGCEiOUp2ZYufhA9PkZv7idDM325v/u6r6HY35EF98qdshSdT3DWfKgQhIY4s2wF1a6BNnD3Ub4c+lPqzkn3+9jG/3PML3ybCUeZ/yjf4iZoG6aPXXiGTTqPIQqlg6ZPqH0iJ/pQpc2rHB4pPXTzN2TdEyTW0FwD7J45UzHUokoOEX9zaGtFueY=; 25:Nk8VLOHyL7+8ZOPoAunLcueUhgoV0kRlSzoNVUT3jy5XPKH1+Tu5VKC7xCDpjfQHex//ddlDBTbXQLo5v/fb+/STiZDrY9HfSWPGoipcG8E1N4ruueUd/eGPXidQ5qNM4Wcp0AqhbFbF4+PCz2tbNIIx0TJO61UgfAGhfwVfFyYSOzcp5CXmrInWyMqV9OVdr7fU/P9kE8CCq6FaIuThov6PgR+bPBH/ZtGsP44musZclT/VWW02P22Y9foZD5obNSh29tvjoQGF+hn6PDyQIQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB056; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB056; 20:xsjyLyJWm8WrBDm3/jrwBVGUnyKbnQ1WOhZEftaM7pK4EfmCYgnRelwZpJlD4Rwu+UrN7KubAana3aaF/r+rlB8YWuZIF4vjZRVOBRezgSUUelP4s+sw7405W5hRNWVx1+J7FfFriZCgWRYCFf5CS0FXA/p8uorgzr+l1crCO59XTgziyfxP/T3gtHadjkoZdbS0LEPF3Dadng2kHXFlxVAuUHsEW1y2aZpkphgKjHm5i2fklwtl/4Hcgdo8RRFh2P0eRlea8KfeXCb0CH10ywoTFQZoUbB6G6ciA+cxwv4tBdLHZlamV0ZOLlUIf1UXhF8zlabBwSV+nteFKLLzp1E7jFx2x51+36BBrTRo0FNJ7FGiV+pNf3buqlLAmMUjlUirO0BitQcVC6fG8FXE/WQjkcEljPzu1Xu/Bqb1JWDdmha1I7/fK59vRCR2iiRudMy9IJKXVTeD3bPJvSKDAFqzsTX/luZeOARWonLW/H4Y9HR1r6MTDPrVXRZL+ZEj; 4:L7Z4Wicpu1YXIUmWN13Qfbd6GWibTn8ob/V35vJwRfSb28pYg91fI4oyOnvG/UMuO2PXuOCfFcutn7vWaasrDB3paEF+p+dSW1X/JrQTwWdGwuYaJeOCi9TZ7uApp52VXp48HV22CeLTRc2u1qOsDeb8RQ1au13EKDXwfAyLYESzGJEK7bw3ZNtoTZfJoDtYLJRH/sJLbJRmRcQyb9mbSnwVZ1zhMY8a/FETnhsUMszAzMTOT37AuEvZR0d7UUVBuxx3/hFIwVifmMXBjCm/Yfus26AhVrAZ9PLEIt7csrxiz+PTkErLXH+KBzsHjSrk5HXg3XPActCBQy8Z99IEXmptywszWeLNFp3uY4MdGTI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:BLUPR05MB056; BCL:0; PCL:0; RULEID:; SRVR:BLUPR05MB056; X-Forefront-PRVS: 07215D0470 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjA1TUIwNTY7MjM6djhpRERHZDdENUduckordUdaclkrdVU4bVVH?= =?utf-8?B?YmZUL2Z3dFJjVWp1aGdmTitWT2JQTzdYaHM0bG5xQS9TVy9uajVQSmtWRk12?= =?utf-8?B?ZVcxTnJueC9vK1Q1MFdFUVEzM3p1aFViZkFHaWhsWkZXdHB3M1BObUZTTnE4?= =?utf-8?B?bUlvSGhuNW90YVFFTWdTSVJxbTBpZlBqOXdsWEdRYnpZMFNxZkpERXZwUU1q?= =?utf-8?B?ZGZJcTNEd1R1ZkVFbWcwcitFb1V0b3dUNnpDQmxZSjRwSGFlU1lyODBtVDVE?= =?utf-8?B?MTl1TXJ1SXpzQmtoOTI3bzNVaE91bmxPQW5ENlcrbXFDY09BQ3RwWUZrZVdU?= =?utf-8?B?SHF3SHRsQmVjay8wRWdZSVVhZjE1dlo5VHZxam55eHRnTERKQmlIZlQwK0JE?= =?utf-8?B?ME1UdEN4dXNEUGF4TkFtSmJHeXQ2ZlQ3M3BSTlJXR2tXUy9UYkl3alZVQWNE?= =?utf-8?B?NGY4Z0ptTlpUNHJHdHIyZjhJeUJjYjNKWTU2ekwrNjVqOWhEWlhSWDFWY3h4?= =?utf-8?B?UnVRWURUaU9YdTR5ZlN6QkFsWURVdkVVdmZwSXRZWWNTZEs4bjRtVFROTWFV?= =?utf-8?B?OUowVzhodHQxbUE1SVp1SlZiSXhrL3BIbVF5d2FSK2F0elVyWmdGR2JSSHRX?= =?utf-8?B?L2VYMTlzQW9GMWZRR2lDR2ZKUytoOFZiNWd5eEJEOG5NNm9DMXZmUVRBTHZh?= =?utf-8?B?UDlXTVhpbHhLR1RjZ2xBMkRscXRUL0w1d1JMWmM4eEtrWkRrRXZnZzhhVTBW?= =?utf-8?B?WWU1Nm5uN0VjT0NySnRudlBGUHNKUzJuV3oydnZPYlNkemZLTis3MEk3c2V0?= =?utf-8?B?bFk0RkF4SHA1ZzF5U2hqaktqYUtScVg2eUd2a3Nkd2NYZ29KSERZa3BSazhw?= =?utf-8?B?Q1lHMkxNYmtJQTRRZFRtL1lMTFlQS2wyU1RtOUJVR0VqRDRjRXF0WUJMRVIz?= =?utf-8?B?WUE0ajF3bUNXU1VqM3UzY0FINEozYjZPWXRJamFiNjQraGRhYk53djdlOTlS?= =?utf-8?B?RGhFZWFHc21QbUt3OWV3R0JmY040L041T0tYN283bW9RVVpHWnZBSUZoT3Bq?= =?utf-8?B?cDNianpwRnpCSnNJSHJKMHNpUHZOOHdMSlpvMG5wTGZ2YWJmdU1MMkF1cDgz?= =?utf-8?B?ZHF6bjgzVE90ZUIvQVovVnFwNGpGaVV4TVlIbkpKRXB0Y2xzcGlYc1FyWFZ6?= =?utf-8?B?VFBRMlIveXBIb3dzS1FFeFFxVWRiNEYzakJQdklMWVd2OWtBU2VYTVRldDg4?= =?utf-8?B?aC9hUXlUdWZIUDEwbFZaTy81blcxeWZkckxNUk1kR0Q2dmlic2xEVDJFclM1?= =?utf-8?B?bEJDWURxMHVEZmoya1hqeU9Yb2VDYXpPQUlKVFV1aHFibGtpd051dTQ5bk45?= =?utf-8?B?czlUa3FzVkdpNk5ZbVlSeVE1OHBHTC9DMUVSQ2N2eWg3cE80U3ErOUtMbmZZ?= =?utf-8?Q?Wr/I/APiHpWGiXP3/4ANnglgav?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB056; 5:FqlhRDjfGUaiY4+3ExcfngfcSsQ8oqu0juwec4QYzM6HoAN9abYOofen2uF8RP4EubnSG3ukuZeYYUeFTfkplZ5Hd2smYYDNSviKppHcw4HmbrChXzmB7hjG1cgOjC5ZxA8UEhjAhvdOlwCFMJgHSQ==; 24:AVrjanJjSa5KC4lHPAFnbFxU8OcNwiQhisH1h8rtCMlnehU5pQtPRPyTSKMK0kr+BGPjTA4YTYjdocvS5tJxHOXXKQl6npkl1M1s7sip0Ww=; 20:uzTiq8HA8C4X3k2HSwuvPG8fWK+eCYWx2fEZwhn7xxTGR5p+9A0N2IGBrwNypegkneiZKOdiHkJuh3/r2hWqqQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2015 21:06:09.9722 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB056 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:21:19 -0000 Warner Losh wrote: > > The sys.mk change to include src.conf breaks building ports in a sub-dir > > of src. Meaning, /usr/src/ports/. The MAKESYSPATH with '.../share/mk' > > finds /usr/src/share/mk and runs off with all of the src.*.mk stuff long > > before the port Makefile includes bsd.port.mk, from > > /usr/src/share/mk/bsd.port.mk, which has a _WITHOUT_SRCCONF=3D guard set > > on it to avoid bsd.own.mk from including src.conf. But because sys.mk > > is already included long before this, src.conf is already included and > > anything handled in sys.mk has no real way to respect _WITHOUT_SRCCONF > > unless it is in the environment >=20 > Yuck! >=20 > But the real problem here is MAKESYSPATH of =E2=80=A6/share/mk. That was = a > hack until we had something like SRCTOP that we could use for finding > the right stuff and for individual builds. So if we can solve that > part of th but you only get SRCTOP as a consequence of finding the right sys.mk et al. Which presumes you have MAKESYSPATH set correctly. Ie. you find the right src.sys.env.mk and it can set SRCTOP based on knowing its own location. A bit of chicken & egg... From owner-svn-src-all@freebsd.org Tue Oct 6 21:23:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F222A9B6C32; Tue, 6 Oct 2015 21:23:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D5158138C; Tue, 6 Oct 2015 21:23:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id CD5FE1DDE; Tue, 6 Oct 2015 21:23:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 8227910B49; Tue, 6 Oct 2015 21:23:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ewJ8FzNaSaab; Tue, 6 Oct 2015 21:23:03 +0000 (UTC) Subject: Re: svn commit: r288911 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com DF51D10B42 To: "Simon J. Gerraty" References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <15356.1444161040@chaos> <5614286D.7020904@FreeBSD.org> <18968.1444166223@chaos> Cc: Warner Losh , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56143BB6.1010700@FreeBSD.org> Date: Tue, 6 Oct 2015 14:23:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <18968.1444166223@chaos> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="26olRiEkvPI8vRIH7DSPGNrI2tURh4dHB" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:23:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --26olRiEkvPI8vRIH7DSPGNrI2tURh4dHB Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/6/2015 2:17 PM, Simon J. Gerraty wrote: > Bryan Drewery wrote: >>> But wouldn't that imply that /usr/src/share/mk is the right set of >>> makefiles to use for /usr/src/ports/ >>> >>> What would you consider the right sys.mk etc would be in such a case?= >>> >> >> For our case we want the checked in src/share/mk to be used rather tha= n >=20 > Are you refering to a src/share/mk which is sibling to src/ports/* or > something else? >=20 > Because with MAKESYSPATH=3D.../share/mk src/share/mk/sys.mk is what yo= u > should find. Right. That's what I'm referring to and what I prefer. >=20 >> the older /usr/share/mk as it is easier to support. If there's a probl= em >> we fix in our local.sys.env.mk or bsd.port.mk for instance, it will be= >> used by updating the checkout. This was something we backported, >> without the src.conf inclusion in sys.mk, and were running with fine. >=20 > I might be confused... If we update our checked in share/mk/custom.sys.env.mk file, we want all builds to get it before having to install it to /usr/share/mk. We for a period were using a script to wrap make to setup the environment before we realized sys.mk was already capable of doing this. Being able to bind a build to a specific environment is important, vs using the environment installed from the last build or a foreign /usr/share/mk (FreeBSD's files= ). >=20 > It might help to differentiate the question of finding the right sys.mk= > which IMO is critical to a happy outcome, from what to do with src.* if= > present. >=20 > Normally anything under $SRCTOP should be subject to src.* - by > definition. >=20 > But there's no reason you cannot make exceptions - by (as I think you > already mentioned) adding a check for $SRCTOP/ports in local*sys*mk > to suppress src.conf at least. >=20 Yes that has been my local fix for now. Perhaps my fix should get checked in so no one else is surprised by src.conf, and all of the tweaks its options set, coming in. It feels really dirty though. --=20 Regards, Bryan Drewery --26olRiEkvPI8vRIH7DSPGNrI2tURh4dHB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFDu3AAoJEDXXcbtuRpfPynkH/1iSg/ORAkiBmq6ugaZQGj1T ewz2r/Z4i2oAvFaaE2vvXlk/7ITduEq+TG64oG5lFFiCfGR0uyCeHMkevxEqnJuU SWh3l5399yTcmpQpfZU5RqW86nLvzdWk6dFKIviboMI8hf9bjqPIDIPFh4nZPAgu 50Snq1LbMfiuXVITxQQS753TUD7GGN1pbPFsM6SJHcfvCRYGTfA4oVEtJXhqiRO0 AcY/gEGN6NkXGbj3W5k5u+Cgwugg+riE35oaIHkYfcb4a8vwD/UU/WGw+c803u6p UvMU1tTi+rx5geExHhvSXSPYk46YCJ0xGlDKYyL1u8/GRY4r8oXXUgFlM/WQBEU= =GDIk -----END PGP SIGNATURE----- --26olRiEkvPI8vRIH7DSPGNrI2tURh4dHB-- From owner-svn-src-all@freebsd.org Tue Oct 6 21:23:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 365949B6C64; Tue, 6 Oct 2015 21:23:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B4313A2; Tue, 6 Oct 2015 21:23:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8BDFFB915; Tue, 6 Oct 2015 17:23:07 -0400 (EDT) From: John Baldwin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288907 - head/bin/ls/tests Date: Tue, 06 Oct 2015 11:26:36 -0700 Message-ID: <2474554.zI8qz6W2Yp@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510060100.t9610CXc077196@repo.freebsd.org> References: <201510060100.t9610CXc077196@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 06 Oct 2015 17:23:07 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:23:09 -0000 On Tuesday, October 06, 2015 01:00:12 AM Garrett Cooper wrote: > Author: ngie > Date: Tue Oct 6 01:00:12 2015 > New Revision: 288907 > URL: https://svnweb.freebsd.org/changeset/base/288907 > > Log: > Call sync consistently using atf_check > > Remove superfluous sync's You should not need to call sync() to see the results of earlier namespace changes (file create, rename, delete, etc.), even for NFS when looking on the same client that made the namespace change. Are you doing this to force mtime updates? You should not need sync() for that on UFS (ufs_getattr() forces any pending lazy timestamp updates). You would for NFS (not sure about ZFS). Whatever the reason for the syncs, I think it warrants a comment. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Oct 6 21:23:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E13F99B6C6A; Tue, 6 Oct 2015 21:23:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD71E13BA; Tue, 6 Oct 2015 21:23:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C9481B917; Tue, 6 Oct 2015 17:23:08 -0400 (EDT) From: John Baldwin To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288917 - in head/sys: amd64/amd64 amd64/include dev/xen/blkfront i386/i386 i386/include xen xen/interface xen/interface/arch-arm/hvm xen/interface/arch-x86 xen/interface/arch-x86/hvm x... Date: Tue, 06 Oct 2015 11:14:18 -0700 Message-ID: <7101921.fgLPs09qKP@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510061129.t96BTjJ7038973@repo.freebsd.org> References: <201510061129.t96BTjJ7038973@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 06 Oct 2015 17:23:08 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:23:10 -0000 On Tuesday, October 06, 2015 11:29:45 AM Roger Pau Monn=E9 wrote: > Author: royger > Date: Tue Oct 6 11:29:44 2015 > New Revision: 288917 > URL: https://svnweb.freebsd.org/changeset/base/288917 >=20 > Log: > Update Xen headers from 4.2 to 4.6 > =20 > Pull the latest headers for Xen which allow us to add support for A= RM and > use new features in FreeBSD. Should we be importing these into vendor-sys as vendor sources? --=20 John Baldwin From owner-svn-src-all@freebsd.org Tue Oct 6 21:28:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5BE39D018F; Tue, 6 Oct 2015 21:28: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 853C41AC8; Tue, 6 Oct 2015 21:28:55 +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 t96LSsFr041180; Tue, 6 Oct 2015 21:28:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96LSsP9041179; Tue, 6 Oct 2015 21:28:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510062128.t96LSsP9041179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 6 Oct 2015 21:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288953 - head/lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:28:55 -0000 Author: dim Date: Tue Oct 6 21:28:54 2015 New Revision: 288953 URL: https://svnweb.freebsd.org/changeset/base/288953 Log: Stop linking libc++.so verbosely, there is no need to. MFC after: 3 days Modified: head/lib/libc++/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Tue Oct 6 20:58:45 2015 (r288952) +++ head/lib/libc++/Makefile Tue Oct 6 21:28:54 2015 (r288953) @@ -63,7 +63,6 @@ CXXFLAGS+= -std=c++11 .endif LIBADD+= cxxrt -LDFLAGS+= --verbose INCSGROUPS= STD EXP EXT STD_HEADERS= __bit_reference\ From owner-svn-src-all@freebsd.org Tue Oct 6 21:36:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA85E9D07DB; Tue, 6 Oct 2015 21:36:46 +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 B32D91AB; Tue, 6 Oct 2015 21:36:46 +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 t96LajbY044064; Tue, 6 Oct 2015 21:36:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Laj53044063; Tue, 6 Oct 2015 21:36:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510062136.t96Laj53044063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 21:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288954 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:36:47 -0000 Author: jhb Date: Tue Oct 6 21:36:45 2015 New Revision: 288954 URL: https://svnweb.freebsd.org/changeset/base/288954 Log: Move td_oncpu and td_lastcpu out of the "zero'd on fork" section of struct thread since they are always explicitly initialized during fork and thread creation after r286256. Suggested by: kib Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Oct 6 21:28:54 2015 (r288953) +++ head/sys/sys/proc.h Tue Oct 6 21:36:45 2015 (r288954) @@ -235,8 +235,6 @@ struct thread { int td_sqqueue; /* (t) Sleepqueue queue blocked on. */ void *td_wchan; /* (t) Sleep address. */ const char *td_wmesg; /* (t) Reason for sleep. */ - int td_lastcpu; /* (t) Last cpu we were on. */ - int td_oncpu; /* (t) Which cpu we are on. */ volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */ u_char td_tsqueue; /* (t) Turnstile queue blocked on. */ short td_locks; /* (k) Debug: count of non-spin locks */ @@ -335,6 +333,8 @@ struct thread { struct vm_page **td_ma; /* (k) uio pages held */ int td_ma_cnt; /* (k) size of *td_ma */ void *td_emuldata; /* Emulator state data */ + int td_lastcpu; /* (t) Last cpu we were on. */ + int td_oncpu; /* (t) Which cpu we are on. */ }; struct mtx *thread_lock_block(struct thread *); From owner-svn-src-all@freebsd.org Tue Oct 6 21:58:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3B679D17DA; Tue, 6 Oct 2015 21:58:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B902ECB; Tue, 6 Oct 2015 21:58:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96LwdY3050639; Tue, 6 Oct 2015 21:58:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96LwdSr050630; Tue, 6 Oct 2015 21:58:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510062158.t96LwdSr050630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 6 Oct 2015 21:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288957 - in head: lib/libc/sys usr.bin/kdump usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 06 Oct 2015 22:16:33 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 21:58:41 -0000 Author: bdrewery Date: Tue Oct 6 21:58:38 2015 New Revision: 288957 URL: https://svnweb.freebsd.org/changeset/base/288957 Log: truss: Add support for utrace(2). This uses the kdump(1) utrace support code directly until a common library is created. This allows malloc(3) tracing with MALLOC_CONF=utrace:true and rtld tracing with LD_UTRACE=1. Unknown utrace(2) data is just printed as hex. PR: 43819 [inspired by] Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3819 Added: head/usr.bin/kdump/utrace.c (contents, props changed) Modified: head/lib/libc/sys/utrace.2 head/usr.bin/kdump/Makefile head/usr.bin/kdump/kdump.c head/usr.bin/truss/Makefile head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c head/usr.bin/truss/truss.1 Modified: head/lib/libc/sys/utrace.2 ============================================================================== --- head/lib/libc/sys/utrace.2 Tue Oct 6 21:44:48 2015 (r288956) +++ head/lib/libc/sys/utrace.2 Tue Oct 6 21:58:38 2015 (r288957) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2014 +.Dd October 5, 2015 .Dt UTRACE 2 .Os .Sh NAME @@ -70,7 +70,8 @@ support .Sh SEE ALSO .Xr kdump 1 , .Xr ktrace 1 , -.Xr ktrace 2 +.Xr ktrace 2 , +.Xr truss 1 .Sh HISTORY The .Fn utrace Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/kdump/Makefile Tue Oct 6 21:58:38 2015 (r288957) @@ -6,7 +6,7 @@ .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump_subr.c kdump.c ioctl.c subr.c +SRCS= kdump_subr.c kdump.c ioctl.c subr.c utrace.c DPSRCS= kdump_subr.h CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/kdump/kdump.c Tue Oct 6 21:58:38 2015 (r288957) @@ -67,7 +67,6 @@ extern int errno; #include #include #include -#include #include #include #include @@ -117,6 +116,7 @@ void ktrfaultend(struct ktr_faultend *); void limitfd(int fd); void usage(void); void ioctlname(unsigned long, int); +int kdump_print_utrace(FILE *, void *, size_t, int); #define TIMESTAMP_NONE 0x0 #define TIMESTAMP_ABSOLUTE 0x1 @@ -1536,151 +1536,13 @@ ktrcsw(struct ktr_csw *cs) cs->user ? "user" : "kernel", cs->wmesg); } -#define UTRACE_DLOPEN_START 1 -#define UTRACE_DLOPEN_STOP 2 -#define UTRACE_DLCLOSE_START 3 -#define UTRACE_DLCLOSE_STOP 4 -#define UTRACE_LOAD_OBJECT 5 -#define UTRACE_UNLOAD_OBJECT 6 -#define UTRACE_ADD_RUNDEP 7 -#define UTRACE_PRELOAD_FINISHED 8 -#define UTRACE_INIT_CALL 9 -#define UTRACE_FINI_CALL 10 -#define UTRACE_DLSYM_START 11 -#define UTRACE_DLSYM_STOP 12 - -struct utrace_rtld { - char sig[4]; /* 'RTLD' */ - int event; - void *handle; - void *mapbase; - size_t mapsize; - int refcnt; - char name[MAXPATHLEN]; -}; - -void -ktruser_rtld(int len, void *p) -{ - struct utrace_rtld *ut = p; - unsigned char *cp; - void *parent; - int mode; - - switch (ut->event) { - case UTRACE_DLOPEN_START: - mode = ut->refcnt; - printf("dlopen(%s, ", ut->name); - switch (mode & RTLD_MODEMASK) { - case RTLD_NOW: - printf("RTLD_NOW"); - break; - case RTLD_LAZY: - printf("RTLD_LAZY"); - break; - default: - printf("%#x", mode & RTLD_MODEMASK); - } - if (mode & RTLD_GLOBAL) - printf(" | RTLD_GLOBAL"); - if (mode & RTLD_TRACE) - printf(" | RTLD_TRACE"); - if (mode & ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE)) - printf(" | %#x", mode & - ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE)); - printf(")\n"); - break; - case UTRACE_DLOPEN_STOP: - printf("%p = dlopen(%s) ref %d\n", ut->handle, ut->name, - ut->refcnt); - break; - case UTRACE_DLCLOSE_START: - printf("dlclose(%p) (%s, %d)\n", ut->handle, ut->name, - ut->refcnt); - break; - case UTRACE_DLCLOSE_STOP: - printf("dlclose(%p) finished\n", ut->handle); - break; - case UTRACE_LOAD_OBJECT: - printf("RTLD: loaded %p @ %p - %p (%s)\n", ut->handle, - ut->mapbase, (char *)ut->mapbase + ut->mapsize - 1, - ut->name); - break; - case UTRACE_UNLOAD_OBJECT: - printf("RTLD: unloaded %p @ %p - %p (%s)\n", ut->handle, - ut->mapbase, (char *)ut->mapbase + ut->mapsize - 1, - ut->name); - break; - case UTRACE_ADD_RUNDEP: - parent = ut->mapbase; - printf("RTLD: %p now depends on %p (%s, %d)\n", parent, - ut->handle, ut->name, ut->refcnt); - break; - case UTRACE_PRELOAD_FINISHED: - printf("RTLD: LD_PRELOAD finished\n"); - break; - case UTRACE_INIT_CALL: - printf("RTLD: init %p for %p (%s)\n", ut->mapbase, ut->handle, - ut->name); - break; - case UTRACE_FINI_CALL: - printf("RTLD: fini %p for %p (%s)\n", ut->mapbase, ut->handle, - ut->name); - break; - case UTRACE_DLSYM_START: - printf("RTLD: dlsym(%p, %s)\n", ut->handle, ut->name); - break; - case UTRACE_DLSYM_STOP: - printf("RTLD: %p = dlsym(%p, %s)\n", ut->mapbase, ut->handle, - ut->name); - break; - default: - cp = p; - cp += 4; - len -= 4; - printf("RTLD: %d ", len); - while (len--) - if (decimal) - printf(" %d", *cp++); - else - printf(" %02x", *cp++); - printf("\n"); - } -} - -struct utrace_malloc { - void *p; - size_t s; - void *r; -}; - -void -ktruser_malloc(void *p) -{ - struct utrace_malloc *ut = p; - - if (ut->p == (void *)(intptr_t)(-1)) - printf("malloc_init()\n"); - else if (ut->s == 0) - printf("free(%p)\n", ut->p); - else if (ut->p == NULL) - printf("%p = malloc(%zu)\n", ut->r, ut->s); - else - printf("%p = realloc(%p, %zu)\n", ut->r, ut->p, ut->s); -} - void ktruser(int len, void *p) { unsigned char *cp; - if (len >= 8 && bcmp(p, "RTLD", 4) == 0) { - ktruser_rtld(len, p); - return; - } - - if (len == sizeof(struct utrace_malloc)) { - ktruser_malloc(p); + if (kdump_print_utrace(stdout, p, len, decimal)) { + printf("\n"); return; } Added: head/usr.bin/kdump/utrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/kdump/utrace.c Tue Oct 6 21:58:38 2015 (r288957) @@ -0,0 +1,187 @@ +/*- + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +int kdump_print_utrace(FILE *, void *, size_t, int); + +#define UTRACE_DLOPEN_START 1 +#define UTRACE_DLOPEN_STOP 2 +#define UTRACE_DLCLOSE_START 3 +#define UTRACE_DLCLOSE_STOP 4 +#define UTRACE_LOAD_OBJECT 5 +#define UTRACE_UNLOAD_OBJECT 6 +#define UTRACE_ADD_RUNDEP 7 +#define UTRACE_PRELOAD_FINISHED 8 +#define UTRACE_INIT_CALL 9 +#define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 + +struct utrace_rtld { + char sig[4]; /* 'RTLD' */ + int event; + void *handle; + void *mapbase; + size_t mapsize; + int refcnt; + char name[MAXPATHLEN]; +}; + +static void +print_utrace_rtld(FILE *fp, void *p, size_t len, int decimal) +{ + struct utrace_rtld *ut = p; + unsigned char *cp; + void *parent; + int mode; + + switch (ut->event) { + case UTRACE_DLOPEN_START: + mode = ut->refcnt; + fprintf(fp, "dlopen(%s, ", ut->name); + switch (mode & RTLD_MODEMASK) { + case RTLD_NOW: + fprintf(fp, "RTLD_NOW"); + break; + case RTLD_LAZY: + fprintf(fp, "RTLD_LAZY"); + break; + default: + fprintf(fp, "%#x", mode & RTLD_MODEMASK); + } + if (mode & RTLD_GLOBAL) + fprintf(fp, " | RTLD_GLOBAL"); + if (mode & RTLD_TRACE) + fprintf(fp, " | RTLD_TRACE"); + if (mode & ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE)) + fprintf(fp, " | %#x", mode & + ~(RTLD_MODEMASK | RTLD_GLOBAL | RTLD_TRACE)); + fprintf(fp, ")"); + break; + case UTRACE_DLOPEN_STOP: + fprintf(fp, "%p = dlopen(%s) ref %d", ut->handle, ut->name, + ut->refcnt); + break; + case UTRACE_DLCLOSE_START: + fprintf(fp, "dlclose(%p) (%s, %d)", ut->handle, ut->name, + ut->refcnt); + break; + case UTRACE_DLCLOSE_STOP: + fprintf(fp, "dlclose(%p) finished", ut->handle); + break; + case UTRACE_LOAD_OBJECT: + fprintf(fp, "RTLD: loaded %p @ %p - %p (%s)", ut->handle, + ut->mapbase, (char *)ut->mapbase + ut->mapsize - 1, + ut->name); + break; + case UTRACE_UNLOAD_OBJECT: + fprintf(fp, "RTLD: unloaded %p @ %p - %p (%s)", ut->handle, + ut->mapbase, (char *)ut->mapbase + ut->mapsize - 1, + ut->name); + break; + case UTRACE_ADD_RUNDEP: + parent = ut->mapbase; + fprintf(fp, "RTLD: %p now depends on %p (%s, %d)", parent, + ut->handle, ut->name, ut->refcnt); + break; + case UTRACE_PRELOAD_FINISHED: + fprintf(fp, "RTLD: LD_PRELOAD finished"); + break; + case UTRACE_INIT_CALL: + fprintf(fp, "RTLD: init %p for %p (%s)", ut->mapbase, ut->handle, + ut->name); + break; + case UTRACE_FINI_CALL: + fprintf(fp, "RTLD: fini %p for %p (%s)", ut->mapbase, ut->handle, + ut->name); + break; + case UTRACE_DLSYM_START: + fprintf(fp, "RTLD: dlsym(%p, %s)", ut->handle, ut->name); + break; + case UTRACE_DLSYM_STOP: + fprintf(fp, "RTLD: %p = dlsym(%p, %s)", ut->mapbase, ut->handle, + ut->name); + break; + default: + cp = p; + cp += 4; + len -= 4; + fprintf(fp, "RTLD: %zu ", len); + while (len--) + if (decimal) + fprintf(fp, " %d", *cp++); + else + fprintf(fp, " %02x", *cp++); + } +} + +struct utrace_malloc { + void *p; + size_t s; + void *r; +}; + +static void +print_utrace_malloc(FILE *fp, void *p) +{ + struct utrace_malloc *ut = p; + + if (ut->p == (void *)(intptr_t)(-1)) + fprintf(fp, "malloc_init()"); + else if (ut->s == 0) + fprintf(fp, "free(%p)", ut->p); + else if (ut->p == NULL) + fprintf(fp, "%p = malloc(%zu)", ut->r, ut->s); + else + fprintf(fp, "%p = realloc(%p, %zu)", ut->r, ut->p, ut->s); +} + +int +kdump_print_utrace(FILE *fp, void *p, size_t len, int decimal) +{ + + if (len >= 8 && bcmp(p, "RTLD", 4) == 0) { + print_utrace_rtld(fp, p, len, decimal); + return (1); + } + + if (len == sizeof(struct utrace_malloc)) { + print_utrace_malloc(fp, p); + return (1); + } + + return (0); +} Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/truss/Makefile Tue Oct 6 21:58:38 2015 (r288957) @@ -10,6 +10,9 @@ SRCS+= ${MACHINE_ARCH}-fbsd.c SRCS+= ${MACHINE_CPUARCH}-fbsd.c .endif +.PATH: ${.CURDIR:H}/kdump +SRCS+= utrace.c + CFLAGS+= -I${.CURDIR} -I. CLEANFILES= syscalls.master syscalls.h ioctl.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/truss/syscall.h Tue Oct 6 21:58:38 2015 (r288957) @@ -27,6 +27,7 @@ * Sigprocmask -- the first argument to sigprocmask(). Prints the name. * Kevent -- a pointer to an array of struct kevents. Prints all elements. * Pathconf -- the 2nd argument of pathconf(). + * Utrace -- utrace(2) buffer. * * In addition, the pointer types (String, Ptr) may have OUT masked in -- * this means that the data is set on *return* from the system call -- or @@ -43,7 +44,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, - Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex }; + Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace }; #define ARG_MASK 0xff #define OUT 0x100 Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/truss/syscalls.c Tue Oct 6 21:58:38 2015 (r288957) @@ -72,6 +72,9 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "syscall.h" +/* usr.bin/kdump/utrace.c */ +int kdump_print_utrace(FILE *, void *, size_t, int); + /* 64-bit alignment on 32-bit platforms. */ #if !defined(__LP64__) && defined(__powerpc__) #define QUAD_ALIGN 1 @@ -342,6 +345,8 @@ static struct syscall decoded_syscalls[] { Atflags, 3 } } }, { .name = "utimes", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } }, + { .name = "utrace", .ret_type = 1, .nargs = 1, + .args = { { Utrace, 0 } } }, { .name = "wait4", .ret_type = 1, .nargs = 4, .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, { Rusage | OUT, 3 } } }, @@ -860,6 +865,24 @@ print_kevent(FILE *fp, struct kevent *ke fprintf(fp, ",%p,%p", (void *)ke->data, (void *)ke->udata); } +static void +print_utrace(FILE *fp, void *utrace_addr, size_t len) +{ + unsigned char *utrace_buffer; + + fprintf(fp, "{ "); + if (kdump_print_utrace(fp, utrace_addr, len, 0)) { + fprintf(fp, " }"); + return; + } + + utrace_buffer = utrace_addr; + fprintf(fp, "%zu:", len); + while (len--) + fprintf(fp, " %02x", *utrace_buffer++); + fprintf(fp, " }"); +} + /* * Converts a syscall argument into a string. Said string is * allocated via malloc(), so needs to be free()'d. sc is @@ -1601,6 +1624,20 @@ print_arg(struct syscall_args *sc, unsig fprintf(fp, "{ %ld, %ld }", retval[0], retval[1]); retval[0] = 0; break; + case Utrace: { + size_t len; + void *utrace_addr; + + len = args[sc->offset + 1]; + utrace_addr = calloc(1, len); + if (get_struct(pid, (void *)args[sc->offset], + (void *)utrace_addr, len) != -1) + print_utrace(fp, utrace_addr, len); + else + fprintf(fp, "0x%lx", args[sc->offset]); + free(utrace_addr); + break; + } default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } Modified: head/usr.bin/truss/truss.1 ============================================================================== --- head/usr.bin/truss/truss.1 Tue Oct 6 21:44:48 2015 (r288956) +++ head/usr.bin/truss/truss.1 Tue Oct 6 21:58:38 2015 (r288957) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd May 12, 2009 +.Dd October 5, 2015 .Dt TRUSS 1 .Os .Sh NAME @@ -95,7 +95,8 @@ options are mutually exclusive.) .Sh SEE ALSO .Xr kdump 1 , .Xr ktrace 1 , -.Xr ptrace 2 +.Xr ptrace 2 , +.Xr utrace 2 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Tue Oct 6 22:28:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3CBA9B6C3E; Tue, 6 Oct 2015 22:28: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 8E8651D7; Tue, 6 Oct 2015 22:28:29 +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 t96MSSgL060420; Tue, 6 Oct 2015 22:28:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96MSS4p060419; Tue, 6 Oct 2015 22:28:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510062228.t96MSS4p060419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 22:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288958 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:28:29 -0000 Author: jhb Date: Tue Oct 6 22:28:28 2015 New Revision: 288958 URL: https://svnweb.freebsd.org/changeset/base/288958 Log: MFC 287833: Threads holding a read lock of a sleepable rm lock are not permitted to sleep. The rmlock implementation enforces this by disabling sleeping when a read lock is acquired. To simplify the implementation, sleeping is disabled for most of the duration of rm_rlock. However, it doesn't need to be disabled until the lock is acquired. If a sleepable rm lock is contested, then rm_rlock may need to acquire the backing sx lock. This tripped the overly-broad assertion. Fix by relaxing the assertion around the call to sx_xlock(). Modified: stable/10/sys/kern/kern_rmlock.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/kern_rmlock.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/kern_rmlock.c ============================================================================== --- stable/10/sys/kern/kern_rmlock.c Tue Oct 6 21:58:38 2015 (r288957) +++ stable/10/sys/kern/kern_rmlock.c Tue Oct 6 22:28:28 2015 (r288958) @@ -402,9 +402,11 @@ _rm_rlock_hard(struct rmlock *rm, struct return (0); } } else { - if (rm->lock_object.lo_flags & LO_SLEEPABLE) + if (rm->lock_object.lo_flags & LO_SLEEPABLE) { + THREAD_SLEEPING_OK(); sx_xlock(&rm->rm_lock_sx); - else + THREAD_NO_SLEEPING(); + } else mtx_lock(&rm->rm_lock_mtx); } From owner-svn-src-all@freebsd.org Tue Oct 6 22:28:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8D4C9B6C42; Tue, 6 Oct 2015 22:28: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 B6AEA1D9; Tue, 6 Oct 2015 22:28:29 +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 t96MSSYR060427; Tue, 6 Oct 2015 22:28:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96MSS9a060426; Tue, 6 Oct 2015 22:28:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510062228.t96MSS9a060426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 22:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288958 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:28:30 -0000 Author: jhb Date: Tue Oct 6 22:28:28 2015 New Revision: 288958 URL: https://svnweb.freebsd.org/changeset/base/288958 Log: MFC 287833: Threads holding a read lock of a sleepable rm lock are not permitted to sleep. The rmlock implementation enforces this by disabling sleeping when a read lock is acquired. To simplify the implementation, sleeping is disabled for most of the duration of rm_rlock. However, it doesn't need to be disabled until the lock is acquired. If a sleepable rm lock is contested, then rm_rlock may need to acquire the backing sx lock. This tripped the overly-broad assertion. Fix by relaxing the assertion around the call to sx_xlock(). Modified: stable/9/sys/kern/kern_rmlock.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/kern_rmlock.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/kern_rmlock.c ============================================================================== --- stable/9/sys/kern/kern_rmlock.c Tue Oct 6 21:58:38 2015 (r288957) +++ stable/9/sys/kern/kern_rmlock.c Tue Oct 6 22:28:28 2015 (r288958) @@ -375,9 +375,11 @@ _rm_rlock_hard(struct rmlock *rm, struct return (0); } } else { - if (rm->lock_object.lo_flags & LO_SLEEPABLE) + if (rm->lock_object.lo_flags & LO_SLEEPABLE) { + THREAD_SLEEPING_OK(); sx_xlock(&rm->rm_lock_sx); - else + THREAD_NO_SLEEPING(); + } else mtx_lock(&rm->rm_lock_mtx); } From owner-svn-src-all@freebsd.org Tue Oct 6 22:45:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B299D0B2F; Tue, 6 Oct 2015 22:45:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DFD6F86; Tue, 6 Oct 2015 22:45:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96MjNWc066371; Tue, 6 Oct 2015 22:45:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96MjNoB066369; Tue, 6 Oct 2015 22:45:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510062245.t96MjNoB066369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Oct 2015 22:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288959 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:45:24 -0000 Author: delphij Date: Tue Oct 6 22:45:23 2015 New Revision: 288959 URL: https://svnweb.freebsd.org/changeset/base/288959 Log: Remove a few unused headers. MFC after: 2 weeks Modified: head/usr.sbin/iscsid/discovery.c head/usr.sbin/iscsid/pdu.c Modified: head/usr.sbin/iscsid/discovery.c ============================================================================== --- head/usr.sbin/iscsid/discovery.c Tue Oct 6 22:28:28 2015 (r288958) +++ head/usr.sbin/iscsid/discovery.c Tue Oct 6 22:45:23 2015 (r288959) @@ -33,10 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include #include #include Modified: head/usr.sbin/iscsid/pdu.c ============================================================================== --- head/usr.sbin/iscsid/pdu.c Tue Oct 6 22:28:28 2015 (r288958) +++ head/usr.sbin/iscsid/pdu.c Tue Oct 6 22:45:23 2015 (r288959) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-all@freebsd.org Tue Oct 6 22:49:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23E7C9D0E08; Tue, 6 Oct 2015 22:49:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E47DA116E; Tue, 6 Oct 2015 22:49:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96MnQAe066534; Tue, 6 Oct 2015 22:49:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96MnQil066533; Tue, 6 Oct 2015 22:49:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510062249.t96MnQil066533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Oct 2015 22:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288960 - head/usr.sbin/watch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:49:27 -0000 Author: delphij Date: Tue Oct 6 22:49:25 2015 New Revision: 288960 URL: https://svnweb.freebsd.org/changeset/base/288960 Log: Use strlcpy() when the string is expected to be nul-terminated. MFC after: 2 weeks Modified: head/usr.sbin/watch/watch.c Modified: head/usr.sbin/watch/watch.c ============================================================================== --- head/usr.sbin/watch/watch.c Tue Oct 6 22:45:23 2015 (r288959) +++ head/usr.sbin/watch/watch.c Tue Oct 6 22:49:25 2015 (r288960) @@ -247,7 +247,7 @@ set_dev(const char *name) if ((sb.st_mode & S_IFMT) != S_IFCHR) fatal(EX_DATAERR, "must be a character device"); - strncpy(dev_name, buf, DEV_NAME_LEN); + strlcpy(dev_name, buf, sizeof(dev_name)); attach_snp(); } @@ -340,7 +340,7 @@ main(int ac, char *av[]) else fatal(EX_DATAERR, "no device name given"); } else - strncpy(dev_name, *av, DEV_NAME_LEN); + strlcpy(dev_name, *av, sizeof(dev_name)); set_dev(dev_name); From owner-svn-src-all@freebsd.org Tue Oct 6 22:54:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 796E49D12B6; Tue, 6 Oct 2015 22:54:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4722D1768; Tue, 6 Oct 2015 22:54:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96Ms4sD069268; Tue, 6 Oct 2015 22:54:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Ms4fb069267; Tue, 6 Oct 2015 22:54:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510062254.t96Ms4fb069267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 6 Oct 2015 22:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288961 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:54:05 -0000 Author: bdrewery Date: Tue Oct 6 22:54:04 2015 New Revision: 288961 URL: https://svnweb.freebsd.org/changeset/base/288961 Log: Fix build with older GCC which, doesn't like 'main' being a variable name. Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Tue Oct 6 22:49:25 2015 (r288960) +++ head/tests/sys/kern/ptrace_test.c Tue Oct 6 22:54:04 2015 (r288961) @@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall { struct ptrace_lwpinfo pl; pid_t fpid, wpid; - lwpid_t main; + lwpid_t mainpid; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); - main = pl.pl_lwpid; + mainpid = pl.pl_lwpid; /* * Continue the child ignoring the SIGSTOP and tracing all @@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall sizeof(pl)) != -1); ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE(pl.pl_syscall_code != 0); - if (pl.pl_lwpid != main) + if (pl.pl_lwpid != mainpid) /* New thread seen. */ break; From owner-svn-src-all@freebsd.org Tue Oct 6 22:59:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD8DE9D15A6; Tue, 6 Oct 2015 22:59:01 +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 A858B19F1; Tue, 6 Oct 2015 22:59:01 +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 t96Mx0vN069485; Tue, 6 Oct 2015 22:59:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Mx0iJ069484; Tue, 6 Oct 2015 22:59:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510062259.t96Mx0iJ069484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Oct 2015 22:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288962 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 22:59:02 -0000 Author: jhb Date: Tue Oct 6 22:59:00 2015 New Revision: 288962 URL: https://svnweb.freebsd.org/changeset/base/288962 Log: Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP) identifier, not a pid. Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Tue Oct 6 22:54:04 2015 (r288961) +++ head/tests/sys/kern/ptrace_test.c Tue Oct 6 22:59:00 2015 (r288962) @@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall { struct ptrace_lwpinfo pl; pid_t fpid, wpid; - lwpid_t mainpid; + lwpid_t mainlwp; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); - mainpid = pl.pl_lwpid; + mainlwp = pl.pl_lwpid; /* * Continue the child ignoring the SIGSTOP and tracing all @@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall sizeof(pl)) != -1); ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE(pl.pl_syscall_code != 0); - if (pl.pl_lwpid != mainpid) + if (pl.pl_lwpid != mainlwp) /* New thread seen. */ break; From owner-svn-src-all@freebsd.org Tue Oct 6 23:16:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B2249D0286; Tue, 6 Oct 2015 23:16:55 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0129.outbound.protection.outlook.com [65.55.169.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 569F265D; Tue, 6 Oct 2015 23:16:53 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from CO2PR05CA038.namprd05.prod.outlook.com (10.141.241.166) by BY1PR0501MB1381.namprd05.prod.outlook.com (10.160.107.139) with Microsoft SMTP Server (TLS) id 15.1.286.20; Tue, 6 Oct 2015 23:16:51 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::113) by CO2PR05CA038.outlook.office365.com (2a01:111:e400:1429::38) with Microsoft SMTP Server (TLS) id 15.1.286.20 via Frontend Transport; Tue, 6 Oct 2015 23:16:51 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (TLS) id 15.1.286.14 via Frontend Transport; Tue, 6 Oct 2015 23:16:50 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 6 Oct 2015 16:16:46 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t96NGYD30472; Tue, 6 Oct 2015 16:16:34 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id ECE28580A9; Tue, 6 Oct 2015 16:16:33 -0700 (PDT) To: Bryan Drewery CC: Warner Losh , , , , Subject: Re: svn commit: r288911 - head/share/mk In-Reply-To: <56143BB6.1010700@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <15356.1444161040@chaos> <5614286D.7020904@FreeBSD.org> <18968.1444166223@chaos> <56143BB6.1010700@FreeBSD.org> Comments: In-reply-to: Bryan Drewery message dated "Tue, 06 Oct 2015 14:23:02 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25844.1444173393.1@chaos> Date: Tue, 6 Oct 2015 16:16:33 -0700 Message-ID: <23330.1444173393@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:4GC4cq0rnTwizoMtWCo1okH4kiib6TSTBjd/pNnyggr/2yY84jcyEPyMiEEJ6C1F8rA7eXDWGm51ejiFEcjiTHYGphTeBTP60GpMuiYNY6Z7bJoehcByH9J7zC3aooOuq7Pz/YbWish1Iwxr1pkPl2hd3/ZFJawoQpUBOZnwzSByOVp8DMQs89EuinX5+fymXqwLx6OCmAURF9TwP02X2kBWTD+lgaXjOTSDJiDDwje8juKqqhS3+NPx3P1sFM6KU88KI+UZSeCiVlO2jFFT1QtU/VNf3rrRz/SoCTCtwK+i8e2N3XYkWYE2UoJMP9A8/gRp/L3+4JgNXzEFFZuJPA== X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(189002)(199003)(24454002)(86362001)(76506005)(110136002)(5008740100001)(23726002)(107886002)(5007970100001)(50986999)(97756001)(5001960100002)(46406003)(11100500001)(76176999)(6806005)(57986006)(46102003)(69596002)(64706001)(19580395003)(50466002)(450100001)(19580405001)(106466001)(50226001)(105596002)(97736004)(2950100001)(87936001)(47776003)(33716001)(93886004)(81156007)(189998001)(117636001)(77096005)(92566002)(42262002)(4001430100001)(62816006); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0501MB1381; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0501MB1381; 2:BvchvLc25PbsJL2G0IZ1ACEtHDKKMa91RRUuV5pHKKVMQr/imeozApRj5hRKgRfLCbOgSx8NDUwYJmtcIx9rboG5TXrjUpfAxRLGDFX6HZX0TC1KThsbofhN0WhtmF/x7ZzgtMnXa/YQYkAhEU6VbJCrCcrBMMtNZhLNsVQcLMg=; 3:Ro0icfHpjgagW8cQgIU7/4TuNEQ9nWYQKL4xlsy4TzHIvVwgzqS7lVv40IkrImJMIXO0oJhgVFJCE5QfA/FYcjaYZhtfSgw1bdJ5nS3r4EoueUvlEbzm4wn37Q67JqXUVjfei0vk3v2WKHq8GqO4mo6evoRByuhjuGw7K7X41NeynuPNYfOeeHjCrCn8aFud0DniJYZcebRz+BGwy+vBjaV91JyPHRt2d0kFqVHSgII=; 25:QuquC1glMHLxT1yUTihePydlDZaMjOuO0Bw8FN23BX/GA0YDYpqADABurSf8BnJx3/RoELxwvOMwV369jZEjyLjPIQgSaCTQEhFsKxRBydjqXJ0ofjfDKKFrDApZ1SqgVXD6cAzAbrcFCU6ROdW1Nuwgiajo5pEOpNRaK3aunTLLVtKqPIVUr2762/RmiOLYcM+PXhRLiSpKoRdKiyVHFKEq5sAZpL8flavB/crYw7Jpo64p8oYQyCVlUdTkT9V3ks0G3BXsI3RxynRBqjczrA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0501MB1381; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0501MB1381; 20:rSREleIZKB2ZptO0h0EyosSSSWYaO/j78x7Y/CG4kd1CEuaiC+s3kreq/ddx1vOQO8OLl8lZL5OXcutMG9hAuW1RQ3yaYajwHK2Wa0A6/sm1/zJKqifj03vE8KcDaCj6rK625ducpyrVI4cQuqpgy7yncosBj+Mfi5lawBNJA9QvAUGLN5i12Mmzyp3tkoDQL1cvozXtZdPRvZa6KOWnl3qGbjNg7SiTLfb2x5q5nkYNi8fe5GGe1a705Td1tALYxKhs47olCPFGSLNcy/huZ15fa2uH6OkaY80tmGy5UCgI758k0a1vnc55OwyS5HimDIyYLg/s9sPCpsKWzpnp/8hZD8TinFRYTGNFpU3eUoOZl3Aav1ZWdv9Bks5FnYNx4Oha8cHI40k/bNCtxtjEUq181IbbtQ07mAQmWv3hRFELNxFcikyL1dCIAAh7/ryL2JT/G/zrdeAY1LnHp03A3+qZcfoCEy/gNpiHZdOgK2O8i1uBE7UMUo/u4jzBlEJ3; 4:km7FsJHIATrfUHjO4vCeNfZEh5RqaM9+Epzb37AYnRYk5ZYW+Yh8DYshIXCIejbLHhNIIokGWqXU0ZB4EBsM8coA4fhvNbZIlYklX6/A0GNQfQCItKYvQhwIlyKdOedw8ym1f9550T+oLtE8HziBRP5gqrnvKYUP6HpvDoMBeKcuqjaaLv6eobhNoAbC10fxF/hI6PGVUDp+2yggzdi0iU9fV7pK09oY3BTZdNBdAQlEI2QZGh+2azl7h6fHAWt5cehkJuMoireBxTyV9pH7MvlQjxWi4jdPSVEw4McBzGNmD2KnSvXQdQQUl8wdRfq2XiO5ejXprtdHIsCKDoK991XS6PE00UMfjNj1CXAhzlo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:BY1PR0501MB1381; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0501MB1381; X-Forefront-PRVS: 07215D0470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0501MB1381; 23:Rv14q6k3vgVajl1c0qam/PImf91qnjNwL7AcvKc?= =?us-ascii?Q?PUofBCOBmzmS5kRZJqFKFGsJa0W0rwKCx47V955DTpWoVyKwQ+kP7rvPd8x6?= =?us-ascii?Q?U84nJTM+XRXS2ACgrUWqfQmcJmy+1BP3g/TTll2jyognUOoh+pE4VyH2IoM0?= =?us-ascii?Q?cmGYjohTWe/3CVmx2hvWdDUmZReP6SdIQBDFLx/r4+mlxd1oy9Vzos8dDnyL?= =?us-ascii?Q?t1Phv0BYxpy7JvQ4i0M91JvH2bUjG24JPAY+MZFfYPxda0ka6AkKPs1w36XA?= =?us-ascii?Q?EHTHIKHQB59V/XY/u7vQRhyNuILaqO/23LNitI+oSMoMoW8Cc1SnRlAhH6fA?= =?us-ascii?Q?kyfQq1Chh8c2Ah3eP4oxnlFhhJHHL6+zFrG2AFfvGgKyl1drwEPN1eBWDsMB?= =?us-ascii?Q?XazAaBnESD110OyWsXu34SIuycTFaJZZdfkF1bBvnnquuUKJ/+F3lo2C3vEJ?= =?us-ascii?Q?P3vttEz2IWdeOP4/lvsPOmq0LvRw+PDp/TOyP4B2oTjCJRlhuHDwDH63OrvH?= =?us-ascii?Q?EJj8naNUjtULPvcJ8WIQ15VEeLGr98ojfPWHD//u8kRm3fl5Na0zn5SIEPiE?= =?us-ascii?Q?h5xbMikDUgAyD5OiM7D9iItSrFGC28nhcAO8wp0D924AN/xQcgsIBmhCb0do?= =?us-ascii?Q?+XK6ilS4yy6WNIB1RuNY9g4iSYvehrbLrMp2tWuPJ3HgHqxQQV2z/v+3yoZ+?= =?us-ascii?Q?mssqq90VdMwj8/Pjv5kD648Rdiq0e0yk3+M/QQYZJ4+mclV0ZjNo3mcw0JEr?= =?us-ascii?Q?FSRv18mC8Jrd58lYm0JSLEQA1Jqlb9iw870SL5ZfKz+l2g4MDD/RglDAB21T?= =?us-ascii?Q?hMABl77RoLPivEr3cv0Wx/DXQq7EA9fLRfEqj6lvcsFRIBbC9LvArupv7b7l?= =?us-ascii?Q?ChA/p1OicwJphJMZYj8OvwDcF8o9U/n9PKJSGVBktrbnbN/PjA2JoHf6KUNB?= =?us-ascii?Q?F0XJs+ypDuTikpFmgsSTrMlI4zRpLJd6cBrFe+B45Nqyz7cymKUjx8RnS1Jx?= =?us-ascii?Q?64s7MNVeJakqvnMzEnBakthb9kf4LqGMsYD+xZ9SS3n0sYq07vCaq6h2jlSy?= =?us-ascii?Q?9LlfbVYJFPCZyJJMZfT7uLMXQYFdY0TB4+EqdsKQ8/yLYBN7llMrBGM3fKDN?= =?us-ascii?Q?/K8DzRbGoUMnJ6424V/5665DHh9mV6z6uQII8dDvyrfilAQWRD2ouZA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0501MB1381; 5:KXuZ49Hhp4R/Oxrwb7HptSXIYQj1hBYg1E7NGp6DRBO8QqFMwN+bsYZnE5CrKjZnhucUp+mh9yFugdNjwVt19wArinEsDDMiUAGteZKGDfBfCvGtuEPaBLpfDY/mUyvwHRxEWd9vGLoVGL5HqJs8AA==; 24:IW7YRJDJ1t1rOMRgSxGnzvFpyU8ZnHqQD+nffX80szsMNGRGr2jvpw0ZH0j84QcoXs4J582b9fexAbVe3zGVHLF6BnmTDde9ZILHnGCzWng=; 20:uxtEvPi9mjVa9jRWekvBSucDk8m/LEd8RMYwNrE1Z62pE6VFWmEGEXmFfApqo4pKcpI1+ImgF2mAP8oxuHYyEg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2015 23:16:50.3964 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0501MB1381 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 23:16:55 -0000 Bryan Drewery wrote: > > Are you refering to a src/share/mk which is sibling to src/ports/* or > > something else? > > > > Because with MAKESYSPATH=.../share/mk src/share/mk/sys.mk is what you > > should find. > > Right. That's what I'm referring to and what I prefer. Ok good. > If we update our checked in share/mk/custom.sys.env.mk file, we want all > builds to get it before having to install it to /usr/share/mk. We for a > period were using a script to wrap make to setup the environment before > we realized sys.mk was already capable of doing this. Being able to bind > a build to a specific environment is important, vs using the environment > installed from the last build or a foreign /usr/share/mk (FreeBSD's files). Sure, we use a wrapper script as it keeps life simple. > > But there's no reason you cannot make exceptions - by (as I think you > > already mentioned) adding a check for $SRCTOP/ports in local*sys*mk > > to suppress src.conf at least. > > > > Yes that has been my local fix for now. Ok - FWIW I don't see any particular problem with that. > Perhaps my fix should get checked in so no one else is surprised by > src.conf, and all of the tweaks its options set, coming in. Not sure I'd go that far. You could perhaps add a comment to src.conf for anyone who's frustrated? From owner-svn-src-all@freebsd.org Tue Oct 6 23:42:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E834E9D17DE; Tue, 6 Oct 2015 23:42:02 +0000 (UTC) (envelope-from rpaulo@me.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7AF17E8; Tue, 6 Oct 2015 23:42:02 +0000 (UTC) (envelope-from rpaulo@me.com) Received: from akita.hsd1.ca.comcast.net (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NVT00I0OOHXP220@mr11p00im-asmtp004.me.com>; Tue, 06 Oct 2015 23:42:01 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-10-07_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.11022302462516e-16 compositescore=0.981618935876834 phishscore=0 kscore.is_spamscore=0 rbsscore=0.981618935876834 recipient_to_sender_totalscore=0 spamscore=0 urlsuspectscore=0.981618935876834 adultscore=0 kscore.compositescore=0 circleOfTrustscore=0 suspectscore=0 recipient_domain_to_sender_totalscore=0 bulkscore=0 recipient_domain_to_sender_domain_totalscore=0 recipient_to_sender_domain_totalscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1412110000 definitions=main-1510060266 Message-id: <1444174917.6210.43.camel@me.com> Subject: Re: svn commit: r288657 - head/sys/netinet6 From: Rui Paulo To: "Alexander V. Chernikov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 06 Oct 2015 16:41:57 -0700 In-reply-to: <201510040821.t948LGH7000421@repo.freebsd.org> References: <201510040821.t948LGH7000421@repo.freebsd.org> Content-type: text/plain; charset=UTF-8 X-Mailer: Evolution 3.16.5-1 MIME-version: 1.0 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 23:42:03 -0000 On Sun, 2015-10-04 at 08:21 +0000, Alexander V. Chernikov wrote: > Author: melifaro > Date: Sun Oct 4 08:21:15 2015 > New Revision: 288657 > URL: https://svnweb.freebsd.org/changeset/base/288657 > > Log: > Add __noinline attribute to several functions to ease dtrace > instrumentation > What instrumentation? Is there a DTrace script in userland that uses these functions? If not, this should not have been committed as you just made the code slower. This is one of those changes that should be kept in your own repository. -- Rui Paulo From owner-svn-src-all@freebsd.org Tue Oct 6 23:43:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE7739D18AF; Tue, 6 Oct 2015 23:42:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3ADA964; Tue, 6 Oct 2015 23:42:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t96NgwHA084226; Tue, 6 Oct 2015 23:42:58 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t96Ngw77084221; Tue, 6 Oct 2015 23:42:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510062342.t96Ngw77084221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Oct 2015 23:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288963 - in head: sbin/rtsol usr.sbin/rtadvd usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 23:43:00 -0000 Author: delphij Date: Tue Oct 6 23:42:58 2015 New Revision: 288963 URL: https://svnweb.freebsd.org/changeset/base/288963 Log: Now that we own the code, use arc4random(3) unconditionally and remove the corresponding HAVE_ARC4RANDOM conditions. MFC after: 2 weeks Modified: head/sbin/rtsol/Makefile head/usr.sbin/rtadvd/Makefile head/usr.sbin/rtadvd/rtadvd.c head/usr.sbin/rtsold/Makefile head/usr.sbin/rtsold/rtsold.c Modified: head/sbin/rtsol/Makefile ============================================================================== --- head/sbin/rtsol/Makefile Tue Oct 6 22:59:00 2015 (r288962) +++ head/sbin/rtsol/Makefile Tue Oct 6 23:42:58 2015 (r288963) @@ -21,6 +21,6 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump MAN= WARNS?= 3 -CFLAGS+= -DHAVE_ARC4RANDOM -DSMALL +CFLAGS+= -DSMALL .include Modified: head/usr.sbin/rtadvd/Makefile ============================================================================== --- head/usr.sbin/rtadvd/Makefile Tue Oct 6 22:59:00 2015 (r288962) +++ head/usr.sbin/rtadvd/Makefile Tue Oct 6 23:42:58 2015 (r288963) @@ -21,8 +21,6 @@ SRCS= rtadvd.c rrenum.c advcap.c if.c co LIBADD= util -CFLAGS+= -DHAVE_ARC4RANDOM - WARNS?= 1 .include Modified: head/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.c Tue Oct 6 22:59:00 2015 (r288962) +++ head/usr.sbin/rtadvd/rtadvd.c Tue Oct 6 23:42:58 2015 (r288963) @@ -241,14 +241,6 @@ main(int argc, char *argv[]) /* timer initialization */ rtadvd_timer_init(); -#ifndef HAVE_ARC4RANDOM - /* random value initialization */ -#ifdef __FreeBSD__ - srandomdev(); -#else - srandom((unsigned long)time(NULL)); -#endif -#endif pfh = pidfile_open(pidfilename, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) @@ -1015,11 +1007,7 @@ set_short_delay(struct ifinfo *ifi) * delay and send the advertisement at the * already-scheduled time. RFC 4861 6.2.6 */ -#ifdef HAVE_ARC4RANDOM delay = arc4random_uniform(MAX_RA_DELAY_TIME); -#else - delay = random() % MAX_RA_DELAY_TIME; -#endif interval.tv_sec = 0; interval.tv_nsec = delay * 1000; rest = rtadvd_timer_rest(ifi->ifi_ra_timer); @@ -1893,13 +1881,8 @@ ra_timer_update(void *arg, struct timesp * MaxRtrAdvInterval (RFC4861 6.2.4). */ interval = rai->rai_mininterval; -#ifdef HAVE_ARC4RANDOM interval += arc4random_uniform(rai->rai_maxinterval - rai->rai_mininterval); -#else - interval += random() % (rai->rai_maxinterval - - rai->rai_mininterval); -#endif break; case IFI_STATE_TRANSITIVE: /* Modified: head/usr.sbin/rtsold/Makefile ============================================================================== --- head/usr.sbin/rtsold/Makefile Tue Oct 6 22:59:00 2015 (r288962) +++ head/usr.sbin/rtsold/Makefile Tue Oct 6 23:42:58 2015 (r288963) @@ -20,6 +20,5 @@ MLINKS= rtsold.8 rtsol.8 SRCS= rtsold.c rtsol.c if.c probe.c dump.c rtsock.c WARNS?= 3 -CFLAGS+= -DHAVE_ARC4RANDOM .include Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Tue Oct 6 22:59:00 2015 (r288962) +++ head/usr.sbin/rtsold/rtsold.c Tue Oct 6 23:42:58 2015 (r288963) @@ -214,10 +214,6 @@ main(int argc, char **argv) errx(1, "pid filename (%s) must be an absolute path", pidfilename); } -#ifndef HAVE_ARC4RANDOM - /* random value initialization */ - srandom((u_long)time(NULL)); -#endif #if (__FreeBSD_version < 900000) if (Fflag) { @@ -725,11 +721,7 @@ rtsol_timer_update(struct ifinfo *ifi) ifi->timer = tm_max; /* stop timer(valid?) */ break; case IFS_DELAY: -#ifndef HAVE_ARC4RANDOM - interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION); -#else interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); -#endif ifi->timer.tv_sec = interval / MILLION; ifi->timer.tv_nsec = (interval % MILLION) * 1000; break; From owner-svn-src-all@freebsd.org Wed Oct 7 00:24:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E1D9D0B99; Wed, 7 Oct 2015 00:24:29 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74D40F61; Wed, 7 Oct 2015 00:24:29 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t970OS92095987; Wed, 7 Oct 2015 00:24:28 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970OScD095982; Wed, 7 Oct 2015 00:24:28 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510070024.t970OScD095982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 7 Oct 2015 00:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288964 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:24:29 -0000 Author: sjg Date: Wed Oct 7 00:24:27 2015 New Revision: 288964 URL: https://svnweb.freebsd.org/changeset/base/288964 Log: In jobs mode we can use .ORDER to force stage_links to run after other stage_* targets. In non-jobs mode we can achieve the same result by simply introducing the targets in the correct order. Thus in bsd*.mk we simply add targets to STAGE_TARGETS which we realize in meta.stage.mk Reviewed by: bdrewery Modified: head/share/mk/bsd.incs.mk head/share/mk/bsd.man.mk head/share/mk/bsd.nls.mk head/share/mk/bsd.sys.mk head/share/mk/meta.stage.mk Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Tue Oct 6 23:42:58 2015 (r288963) +++ head/share/mk/bsd.incs.mk Wed Oct 7 00:24:27 2015 (r288964) @@ -91,9 +91,9 @@ realinstall: installincludes .if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) .if !defined(NO_STAGE_INCLUDES) -staging: stage_includes +STAGE_TARGETS+= stage_includes .if !empty(INCSLINKS) -staging: stage_symlinks +STAGE_TARGETS+= stage_symlinks STAGE_SYMLINKS.INCS= ${INCSLINKS} .endif .endif Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Tue Oct 6 23:42:58 2015 (r288963) +++ head/share/mk/bsd.man.mk Wed Oct 7 00:24:27 2015 (r288964) @@ -128,7 +128,7 @@ ZEXT= ${MCOMPRESS_EXT} .if defined(MAN) && !empty(MAN) .if ${MK_STAGING_MAN} == "yes" -staging: stage_files +STAGE_TARGETS+= stage_files _mansets:= ${MAN:E:O:u:M*[1-9]:@s@man$s@} STAGE_SETS+= ${_mansets} .for _page in ${MAN} @@ -137,7 +137,7 @@ STAGE_DIR.man${_page:T:E}?= ${STAGE_OBJT .endfor .if !empty(MLINKS) STAGE_SETS+= mlinks -staging: stage_links +STAGE_TARGETS+= stage_links STAGE_LINKS.mlinks:= ${MLINKS:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@} stage_links.mlinks: ${_mansets:@s@stage_files.$s@} .endif Modified: head/share/mk/bsd.nls.mk ============================================================================== --- head/share/mk/bsd.nls.mk Tue Oct 6 23:42:58 2015 (r288963) +++ head/share/mk/bsd.nls.mk Wed Oct 7 00:24:27 2015 (r288964) @@ -63,7 +63,7 @@ NLSDIR?= ${SHAREDIR}/nls # .if ${MK_STAGING_PROG} == "yes" .if !defined(_SKIP_BUILD) -staging: stage_symlinks +STAGE_TARGETS+= stage_symlinks .endif STAGE_SYMLINKS.NLS= ${NLSSYMLINKS} STAGE_SYMLINKS_DIR.NLS= ${STAGE_OBJTOP} Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Tue Oct 6 23:42:58 2015 (r288963) +++ head/share/mk/bsd.sys.mk Wed Oct 7 00:24:27 2015 (r288964) @@ -205,7 +205,7 @@ stage_as.prog: ${PROG} .else STAGE_SETS+= prog stage_files.prog: ${PROG} -staging: stage_files +STAGE_TARGETS+= stage_files .endif .endif .endif @@ -251,18 +251,18 @@ beforebuild: stage_includes .for t in stage_libs stage_files stage_as .if target($t) -staging: $t +STAGE_TARGETS+= $t .endif .endfor .if !empty(STAGE_AS_SETS) -staging: stage_as +STAGE_TARGETS+= stage_as .endif .if !empty(_LIBS) || ${MK_STAGING_PROG} != "no" .if !empty(LINKS) -staging: stage_links +STAGE_TARGETS+= stage_links .if ${MAKE_VERSION} < 20131001 stage_links.links: ${_LIBS} ${PROG} .endif @@ -271,7 +271,7 @@ STAGE_LINKS.links= ${LINKS} .endif .if !empty(SYMLINKS) -staging: stage_symlinks +STAGE_TARGETS+= stage_symlinks STAGE_SETS+= links STAGE_SYMLINKS.links= ${SYMLINKS} .endif Modified: head/share/mk/meta.stage.mk ============================================================================== --- head/share/mk/meta.stage.mk Tue Oct 6 23:42:58 2015 (r288963) +++ head/share/mk/meta.stage.mk Wed Oct 7 00:24:27 2015 (r288964) @@ -24,6 +24,8 @@ _dirdep = ${RELDIR}.${MACHINE} _dirdep = ${RELDIR} .endif +CLEANFILES+= .dirdep + # this allows us to trace dependencies back to their src dir .dirdep: @echo '${_dirdep}' > $@ @@ -134,7 +136,7 @@ _STAGE_AS_BASENAME_USE: .USE ${.T .if !empty(STAGE_INCSDIR) STAGE_TARGETS += stage_incs -STAGE_INCS ?= ${.ALLSRC:N.dirdep} +STAGE_INCS ?= ${.ALLSRC:N.dirdep:Nstage_*} stage_includes: stage_incs stage_incs: .dirdep @@ -145,7 +147,7 @@ stage_incs: .dirdep .if !empty(STAGE_LIBDIR) STAGE_TARGETS += stage_libs -STAGE_LIBS ?= ${.ALLSRC:N.dirdep} +STAGE_LIBS ?= ${.ALLSRC:N.dirdep:Nstage_*} stage_libs: .dirdep @${STAGE_FILE_SCRIPT}; StageFiles ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} ${STAGE_LIBS} @@ -177,8 +179,8 @@ CLEANFILES += ${STAGE_SETS:@s@stage*$s@} # some makefiles need to populate multiple directories .for s in ${STAGE_SETS:O:u} -STAGE_FILES.$s ?= ${.ALLSRC:N.dirdep} -STAGE_SYMLINKS.$s ?= ${.ALLSRC:N.dirdep} +STAGE_FILES.$s ?= ${.ALLSRC:N.dirdep:Nstage_*} +STAGE_SYMLINKS.$s ?= ${.ALLSRC:N.dirdep:Nstage_*} STAGE_LINKS_DIR.$s ?= ${STAGE_OBJTOP} STAGE_SYMLINKS_DIR.$s ?= ${STAGE_OBJTOP} @@ -224,7 +226,7 @@ STAGE_TARGETS += stage_as # each ${file} will be staged as ${STAGE_AS_${file:T}} # one could achieve the same with SYMLINKS .for s in ${STAGE_AS_SETS:O:u} -STAGE_AS.$s ?= ${.ALLSRC:N.dirdep} +STAGE_AS.$s ?= ${.ALLSRC:N.dirdep:Nstage_*} stage_as: stage_as.$s stage_as.$s: .dirdep @@ -237,15 +239,16 @@ stage_as.$s: .dirdep CLEANFILES += ${STAGE_TARGETS} stage_incs stage_includes # stage_*links usually needs to follow any others. -.if !empty(STAGE_SETS) && !empty(STAGE_TARGETS:Nstage_links) -.for s in ${STAGE_SETS:O:u} -stage_links.$s: ${STAGE_TARGETS:Nstage_links:O:u} +# for non-jobs mode the order here matters +staging: ${STAGE_TARGETS:N*_links} ${STAGE_TARGETS:M*_links} + +.if ${.MAKE.JOBS:U0} > 0 && ${STAGE_TARGETS:M*_links} != "" +# the above isn't sufficient +.for t in ${STAGE_TARGETS:N*links:O:u} +.ORDER: $t stage_links .endfor .endif -# make sure this exists -staging: - # generally we want staging to wait until everything else is done STAGING_WAIT ?= .WAIT From owner-svn-src-all@freebsd.org Wed Oct 7 00:28:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A01749D0F79; Wed, 7 Oct 2015 00:28:25 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEC77F7; Wed, 7 Oct 2015 00:28:25 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t970SOKi096657; Wed, 7 Oct 2015 00:28:24 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970SOKJ096656; Wed, 7 Oct 2015 00:28:24 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510070028.t970SOKJ096656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 7 Oct 2015 00:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288965 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:28:25 -0000 Author: sjg Date: Wed Oct 7 00:28:24 2015 New Revision: 288965 URL: https://svnweb.freebsd.org/changeset/base/288965 Log: Do not assume host toolchain supports sysroot Modified: head/share/mk/local.init.mk Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Wed Oct 7 00:24:27 2015 (r288964) +++ head/share/mk/local.init.mk Wed Oct 7 00:28:24 2015 (r288965) @@ -9,11 +9,12 @@ .endif .endif -.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) +.if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host" CFLAGS_LAST+= --sysroot=${SYSROOT} CXXFLAGS_LAST+= --sysroot=${SYSROOT} LDADD+= --sysroot=${SYSROOT} .elif ${MK_STAGING} == "yes" +CFLAGS+= -nostdinc CFLAGS+= -I${STAGE_INCLUDEDIR} LDADD+= -L${STAGE_LIBDIR} .endif From owner-svn-src-all@freebsd.org Wed Oct 7 00:32:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D0C29D1346; Wed, 7 Oct 2015 00:32:35 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19324BE5; Wed, 7 Oct 2015 00:32:35 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t970WYZ8099369; Wed, 7 Oct 2015 00:32:34 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970WYvU099368; Wed, 7 Oct 2015 00:32:34 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510070032.t970WYvU099368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 7 Oct 2015 00:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288966 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:32:35 -0000 Author: sjg Date: Wed Oct 7 00:32:33 2015 New Revision: 288966 URL: https://svnweb.freebsd.org/changeset/base/288966 Log: To help bootstrap new local depends, if SRCS contains *.h for which there are targets, make buildfiles depend on them - so they get generated early. Modified: head/share/mk/local.autodep.mk Modified: head/share/mk/local.autodep.mk ============================================================================== --- head/share/mk/local.autodep.mk Wed Oct 7 00:28:24 2015 (r288965) +++ head/share/mk/local.autodep.mk Wed Oct 7 00:32:33 2015 (r288966) @@ -14,6 +14,12 @@ LDFLAGS+= ${LDFLAGS_LAST} CLEANFILES+= .depend +.for h in ${SRCS:M*.h} +.if target($h) +buildfiles: $h +.endif +.endfor + # handy for debugging .SUFFIXES: .S .c .cc .cpp .cpp-out From owner-svn-src-all@freebsd.org Wed Oct 7 00:33:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B16D9D140A; Wed, 7 Oct 2015 00:33:46 +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 180FFDDF; Wed, 7 Oct 2015 00:33:46 +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 t970XjVo099468; Wed, 7 Oct 2015 00:33:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970XjMQ099467; Wed, 7 Oct 2015 00:33:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510070033.t970XjMQ099467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Oct 2015 00:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288967 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:33:46 -0000 Author: jhb Date: Wed Oct 7 00:33:44 2015 New Revision: 288967 URL: https://svnweb.freebsd.org/changeset/base/288967 Log: MFC 287864: When a process group leader exits, all of the processes in the group are sent SIGHUP and SIGCONT if any of the processes are stopped. Currently this behavior is triggered for any type of process stop including ptrace() stops and transient stops for single threading during exit() and execve(). Thus, if a debugger is attached to a process in a group when the leader exits, the entire group can be HUPed. Instead, only send the signals if a process in the group is stopped due to SIGSTOP. Modified: stable/9/sys/kern/kern_proc.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/kern_proc.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Wed Oct 7 00:32:33 2015 (r288966) +++ stable/9/sys/kern/kern_proc.c Wed Oct 7 00:33:44 2015 (r288967) @@ -691,7 +691,7 @@ orphanpg(pg) LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); - if (P_SHOULDSTOP(p)) { + if (P_SHOULDSTOP(p) == P_STOPPED_SIG) { PROC_UNLOCK(p); LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); From owner-svn-src-all@freebsd.org Wed Oct 7 00:33:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D6519D1404; Wed, 7 Oct 2015 00:33:46 +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 DD092DDD; Wed, 7 Oct 2015 00:33:45 +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 t970Xi35099462; Wed, 7 Oct 2015 00:33:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970Xif9099461; Wed, 7 Oct 2015 00:33:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510070033.t970Xif9099461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Oct 2015 00:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288967 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:33:46 -0000 Author: jhb Date: Wed Oct 7 00:33:44 2015 New Revision: 288967 URL: https://svnweb.freebsd.org/changeset/base/288967 Log: MFC 287864: When a process group leader exits, all of the processes in the group are sent SIGHUP and SIGCONT if any of the processes are stopped. Currently this behavior is triggered for any type of process stop including ptrace() stops and transient stops for single threading during exit() and execve(). Thus, if a debugger is attached to a process in a group when the leader exits, the entire group can be HUPed. Instead, only send the signals if a process in the group is stopped due to SIGSTOP. Modified: stable/10/sys/kern/kern_proc.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/kern_proc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Wed Oct 7 00:32:33 2015 (r288966) +++ stable/10/sys/kern/kern_proc.c Wed Oct 7 00:33:44 2015 (r288967) @@ -692,7 +692,7 @@ orphanpg(pg) LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); - if (P_SHOULDSTOP(p)) { + if (P_SHOULDSTOP(p) == P_STOPPED_SIG) { PROC_UNLOCK(p); LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); From owner-svn-src-all@freebsd.org Wed Oct 7 00:43:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A457A9D1B37; Wed, 7 Oct 2015 00:43:06 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6F013CF; Wed, 7 Oct 2015 00:43:06 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t970h50U002521; Wed, 7 Oct 2015 00:43:05 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970h5M2002518; Wed, 7 Oct 2015 00:43:05 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510070043.t970h5M2002518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 7 Oct 2015 00:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288968 - in head: gnu/usr.bin/binutils/ld usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:43:06 -0000 Author: sjg Date: Wed Oct 7 00:43:05 2015 New Revision: 288968 URL: https://svnweb.freebsd.org/changeset/base/288968 Log: Updated depends Modified: head/gnu/usr.bin/binutils/ld/Makefile.depend.host head/usr.bin/truss/Makefile.depend.amd64 Modified: head/gnu/usr.bin/binutils/ld/Makefile.depend.host ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.depend.host Wed Oct 7 00:33:44 2015 (r288967) +++ head/gnu/usr.bin/binutils/ld/Makefile.depend.host Wed Oct 7 00:43:05 2015 (r288968) @@ -4,6 +4,7 @@ DIRDEPS = \ gnu/usr.bin/binutils/libbfd \ gnu/usr.bin/binutils/libiberty \ + usr.bin/yacc \ .include Modified: head/usr.bin/truss/Makefile.depend.amd64 ============================================================================== --- head/usr.bin/truss/Makefile.depend.amd64 Wed Oct 7 00:33:44 2015 (r288967) +++ head/usr.bin/truss/Makefile.depend.amd64 Wed Oct 7 00:43:05 2015 (r288968) @@ -17,6 +17,8 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree +amd64-cloudabi64.o: cloudabi64_syscalls.h +amd64-cloudabi64.po: cloudabi64_syscalls.h amd64-fbsd.o: syscalls.h amd64-fbsd.po: syscalls.h amd64-fbsd32.o: freebsd32_syscalls.h From owner-svn-src-all@freebsd.org Wed Oct 7 00:46:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE9B9D1E2A; Wed, 7 Oct 2015 00:46:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D8B09188A; Wed, 7 Oct 2015 00:46:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D1CD617BA; Wed, 7 Oct 2015 00:46:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 752741200B; Wed, 7 Oct 2015 00:46:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id oDrJsQ6pnrlT; Wed, 7 Oct 2015 00:46:07 +0000 (UTC) Subject: Re: svn commit: r288966 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8AB5D12006 To: "Simon J. Gerraty" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510070032.t970WYvU099368@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56146B4E.5040401@FreeBSD.org> Date: Tue, 6 Oct 2015 17:46:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510070032.t970WYvU099368@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0AQRMloXhuWgsaT2opsPpw5bdJLLqsmNo" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:46:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0AQRMloXhuWgsaT2opsPpw5bdJLLqsmNo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/6/2015 5:32 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Wed Oct 7 00:32:33 2015 > New Revision: 288966 > URL: https://svnweb.freebsd.org/changeset/base/288966 >=20 > Log: > To help bootstrap new local depends, > if SRCS contains *.h for which there are targets, > make buildfiles depend on them - so they get generated early. >=20 > Modified: > head/share/mk/local.autodep.mk >=20 > Modified: head/share/mk/local.autodep.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/local.autodep.mk Wed Oct 7 00:28:24 2015 (r288965) > +++ head/share/mk/local.autodep.mk Wed Oct 7 00:32:33 2015 (r288966) > @@ -14,6 +14,12 @@ LDFLAGS+=3D ${LDFLAGS_LAST} > =20 > CLEANFILES+=3D .depend > =20 > +.for h in ${SRCS:M*.h} I think we can use DPSRCS as well for this. > +.if target($h) > +buildfiles: $h > +.endif > +.endfor > + > # handy for debugging > .SUFFIXES: .S .c .cc .cpp .cpp-out > =20 >=20 --=20 Regards, Bryan Drewery --0AQRMloXhuWgsaT2opsPpw5bdJLLqsmNo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFGtPAAoJEDXXcbtuRpfPHQQIALbw8Gv47P87/+2HOKk225Q4 ++QegGzHvA+G8QHJlsKjNgmv7Af+IUvWX/Yn2ak8h7/M0MJeGV5t9MbWflTP95p6 5n8g3n4LAi+A7E/Q+gEblfll2qcP2W37I/7JM5j5m6uqVyCnNHudPok3Mb6oUs4D 60JWhprYWQzWZUtav8CzqT9FXPYLrsyq+fI3HepgIT9qqFLRO3PEYKSH+sMpMTQE TJygC8FeQIiKtk0TraiEcmjrn3I1rUt7faK62JiiiQWCsxp/3ro7IoJz9Qhs/MxV IOY01kR+56jJF5uzBShwdYsdznEsK2XpFUYJOv/dHk7ak7FY298UESEtzG6KHPc= =RaIq -----END PGP SIGNATURE----- --0AQRMloXhuWgsaT2opsPpw5bdJLLqsmNo-- From owner-svn-src-all@freebsd.org Wed Oct 7 00:50:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC639D0071; Wed, 7 Oct 2015 00:50:27 +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 4415A1A7D; Wed, 7 Oct 2015 00:50:27 +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 t970oQqK003128; Wed, 7 Oct 2015 00:50:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970oQxV003127; Wed, 7 Oct 2015 00:50:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510070050.t970oQxV003127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Oct 2015 00:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288969 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:50:27 -0000 Author: jhb Date: Wed Oct 7 00:50:26 2015 New Revision: 288969 URL: https://svnweb.freebsd.org/changeset/base/288969 Log: MFC 287870: Always clear TDB_USERWR before fetching system call arguments. The TDB_USERWR flag may still be set after a debugger detaches from a process via PT_DETACH. Previously the flag would never be cleared forcing a double fetch of the system call arguments for each system call. Note that the flag cannot be cleared at PT_DETACH time in case one of the threads in the process is currently stopped in syscallenter() and the debugger has modified the arguments for that pending system call before detaching. Modified: stable/10/sys/kern/subr_syscall.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/subr_syscall.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/subr_syscall.c ============================================================================== --- stable/10/sys/kern/subr_syscall.c Wed Oct 7 00:43:05 2015 (r288968) +++ stable/10/sys/kern/subr_syscall.c Wed Oct 7 00:50:26 2015 (r288969) @@ -64,14 +64,14 @@ syscallenter(struct thread *td, struct s td->td_pticks = 0; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_TRACED) { - traced = 1; + traced = (p->p_flag & P_TRACED) != 0; + if (traced || td->td_dbgflags & TDB_USERWR) { PROC_LOCK(p); td->td_dbgflags &= ~TDB_USERWR; - td->td_dbgflags |= TDB_SCE; + if (traced) + td->td_dbgflags |= TDB_SCE; PROC_UNLOCK(p); - } else - traced = 0; + } error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) From owner-svn-src-all@freebsd.org Wed Oct 7 00:50:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9343E9D0072; Wed, 7 Oct 2015 00:50:27 +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 5EF101A7E; Wed, 7 Oct 2015 00:50:27 +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 t970oQvi003134; Wed, 7 Oct 2015 00:50:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t970oQms003133; Wed, 7 Oct 2015 00:50:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510070050.t970oQms003133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Oct 2015 00:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288969 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 00:50:27 -0000 Author: jhb Date: Wed Oct 7 00:50:26 2015 New Revision: 288969 URL: https://svnweb.freebsd.org/changeset/base/288969 Log: MFC 287870: Always clear TDB_USERWR before fetching system call arguments. The TDB_USERWR flag may still be set after a debugger detaches from a process via PT_DETACH. Previously the flag would never be cleared forcing a double fetch of the system call arguments for each system call. Note that the flag cannot be cleared at PT_DETACH time in case one of the threads in the process is currently stopped in syscallenter() and the debugger has modified the arguments for that pending system call before detaching. Modified: stable/9/sys/kern/subr_syscall.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/subr_syscall.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/subr_syscall.c ============================================================================== --- stable/9/sys/kern/subr_syscall.c Wed Oct 7 00:43:05 2015 (r288968) +++ stable/9/sys/kern/subr_syscall.c Wed Oct 7 00:50:26 2015 (r288969) @@ -64,14 +64,14 @@ syscallenter(struct thread *td, struct s td->td_pticks = 0; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_TRACED) { - traced = 1; + traced = (p->p_flag & P_TRACED) != 0; + if (traced || td->td_dbgflags & TDB_USERWR) { PROC_LOCK(p); td->td_dbgflags &= ~TDB_USERWR; - td->td_dbgflags |= TDB_SCE; + if (traced) + td->td_dbgflags |= TDB_SCE; PROC_UNLOCK(p); - } else - traced = 0; + } error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) From owner-svn-src-all@freebsd.org Wed Oct 7 01:25:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1990E9D1D93; Wed, 7 Oct 2015 01:25:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D47CCDB7; Wed, 7 Oct 2015 01:25:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t971PlKf014949; Wed, 7 Oct 2015 01:25:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t971PlvA014948; Wed, 7 Oct 2015 01:25:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510070125.t971PlvA014948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 7 Oct 2015 01:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288970 - head/usr.bin/fortune/strfile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 01:25:49 -0000 Author: delphij Date: Wed Oct 7 01:25:47 2015 New Revision: 288970 URL: https://svnweb.freebsd.org/changeset/base/288970 Log: Remove support of ancient (pre-8.0R, 800041) FreeBSD releases. MFC after: 2 weeks Modified: head/usr.bin/fortune/strfile/strfile.c Modified: head/usr.bin/fortune/strfile/strfile.c ============================================================================== --- head/usr.bin/fortune/strfile/strfile.c Wed Oct 7 00:50:26 2015 (r288969) +++ head/usr.bin/fortune/strfile/strfile.c Wed Oct 7 01:25:47 2015 (r288970) @@ -438,10 +438,6 @@ randomize(void) off_t tmp; off_t *sp; -#if __FreeBSD_version < 800041 - srandomdev(); -#endif - Tbl.str_flags |= STR_RANDOM; cnt = Tbl.str_numstr; @@ -450,11 +446,7 @@ randomize(void) */ for (sp = Seekpts; cnt > 0; cnt--, sp++) { -#if __FreeBSD_version < 800041 - i = random() % cnt; -#else i = arc4random_uniform(cnt); -#endif tmp = sp[0]; sp[0] = sp[i]; sp[i] = tmp; From owner-svn-src-all@freebsd.org Wed Oct 7 02:12:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C80999D024D; Wed, 7 Oct 2015 02:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9689DE99; Wed, 7 Oct 2015 02:12:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t972Ci8w030459; Wed, 7 Oct 2015 02:12:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t972CiPp030458; Wed, 7 Oct 2015 02:12:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510070212.t972CiPp030458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Oct 2015 02:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288973 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 02:12:45 -0000 Author: gjb Date: Wed Oct 7 02:12:44 2015 New Revision: 288973 URL: https://svnweb.freebsd.org/changeset/base/288973 Log: Refine the r286591 entry based on feedback from jilles@. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:43 2015 (r288972) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:44 2015 (r288973) @@ -1054,8 +1054,9 @@ CPU model information. The &man.uart.4; driver has been - updated to allow tuning packets per second captured during - runtime. + updated to allow tuning pulses per second captured in the + CTS line during runtime, whereas previously only the DCD line + could be used without rebuilding the kernel. From owner-svn-src-all@freebsd.org Wed Oct 7 02:12:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8B5E9D0243; Wed, 7 Oct 2015 02:12:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D2F6E96; Wed, 7 Oct 2015 02:12:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t972Cgqr030373; Wed, 7 Oct 2015 02:12:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t972Cg8l030372; Wed, 7 Oct 2015 02:12:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510070212.t972Cg8l030372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Oct 2015 02:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288971 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 02:12:43 -0000 Author: gjb Date: Wed Oct 7 02:12:42 2015 New Revision: 288971 URL: https://svnweb.freebsd.org/changeset/base/288971 Log: Split the r288943 entry into different entries, since the entire clang/llvm/lldb/etc may not always be in sync with upstream. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 01:25:47 2015 (r288970) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:42 2015 (r288971) @@ -585,9 +585,21 @@ The &man.nc.1; utility has been updated to the OpenBSD 5.8 version. - LLVM and - Clang have been updated to - version 3.7.0. + Clang has + been updated to version 3.7.0. + + LLVM has + been updated to version 3.7.0. + + LLDB has + been updated to version 3.7.0. + + libc++ has + been updated to version 3.7.0. + + The + compiler_rt utility has been + updated to version 3.7.0. From owner-svn-src-all@freebsd.org Wed Oct 7 02:12:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1FEE9D024A; Wed, 7 Oct 2015 02:12:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8475E97; Wed, 7 Oct 2015 02:12:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t972ChJJ030416; Wed, 7 Oct 2015 02:12:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t972Chlg030415; Wed, 7 Oct 2015 02:12:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510070212.t972Chlg030415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Oct 2015 02:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288972 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 02:12:45 -0000 Author: gjb Date: Wed Oct 7 02:12:43 2015 New Revision: 288972 URL: https://svnweb.freebsd.org/changeset/base/288972 Log: Remove entry for r287469, Skylake/i219 support is not yet complete. Reported by: Adam McDougall Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:42 2015 (r288971) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:43 2015 (r288972) @@ -1260,10 +1260,6 @@ scrub fragment reassemble filtering rule, without necessary intervention. - The &man.em.4; driver has been updated - to support the Skylake I219 chipset. - The &man.lagg.4; driver has been updated to remove support for the fec protocol. From owner-svn-src-all@freebsd.org Wed Oct 7 02:13:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4E29D02D9; Wed, 7 Oct 2015 02:13:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6377C1277; Wed, 7 Oct 2015 02:13:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t972D2oG030517; Wed, 7 Oct 2015 02:13:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t972D2GK030516; Wed, 7 Oct 2015 02:13:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510070213.t972D2GK030516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Oct 2015 02:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288974 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 02:13:03 -0000 Author: gjb Date: Wed Oct 7 02:13:02 2015 New Revision: 288974 URL: https://svnweb.freebsd.org/changeset/base/288974 Log: Refine the r287037 entry based on feedback from jilles@. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:12:44 2015 (r288973) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 02:13:02 2015 (r288974) @@ -263,8 +263,9 @@ System Tuning and Controls The &man.uart.4; driver has been - updated to allow tuning packets per second captured during - runtime. + updated to allow tuning pulses per second captured in the + CTS line during runtime, whereas previously only the DCD line + could be used without rebuilding the kernel. From owner-svn-src-all@freebsd.org Wed Oct 7 03:02:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E06EF9D0988; Wed, 7 Oct 2015 03:02:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2FA11A8; Wed, 7 Oct 2015 03:02:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pablk4 with SMTP id lk4so6092022pab.3; Tue, 06 Oct 2015 20:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dzyeasrKEzzve9siqs3N0kwMyr0J4TDASSMKap3t3mk=; b=TEhhMOm2CUXm4+A4gpn9DZStE32xmKExfygzCV6diAI3W7OHY/fW9pwJBs9R3Eqvtd Uhn3izhXkamfnaxhIw9zY6LI4mfdTZMysatODnuKKweuShtEzHbglOpZ5nzqC3ZvBarA lbaw+GCB7ovNTaMNx4izwH+50v1iGsZqjNMUxIFlCbshSiAXtDQtLrMFE03T7AdCoxPA +gCR6lSo6bNxFItJaRHkpJxmRrm1GDPVWWhu4rRC/VzWZn+747AKHnuRd0ybmJizoCWo RSvUXtMAAs2TZ/nCxQPCNDXyQIQNaMLWg7yZmDAWe4fgjUj8DVTwqTYmpNvokf2gnmXA Pw9A== X-Received: by 10.66.242.138 with SMTP id wq10mr50896440pac.2.1444186965189; Tue, 06 Oct 2015 20:02:45 -0700 (PDT) Received: from [192.168.20.11] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id bw8sm36435378pab.47.2015.10.06.20.02.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Oct 2015 20:02:44 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r288966 - head/share/mk From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: <56146B4E.5040401@FreeBSD.org> Date: Tue, 6 Oct 2015 20:02:43 -0700 Cc: "Simon J. Gerraty" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201510070032.t970WYvU099368@repo.freebsd.org> <56146B4E.5040401@FreeBSD.org> To: Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 03:02:46 -0000 > On Oct 6, 2015, at 17:46, Bryan Drewery wrote: ... > I think we can use DPSRCS as well for this. If it's something that needs to build before depend, yes. Thanks! -NGie From owner-svn-src-all@freebsd.org Wed Oct 7 03:33:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0048C9D1BC5; Wed, 7 Oct 2015 03:33:27 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC56115F; Wed, 7 Oct 2015 03:33:26 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t973XP42054298; Wed, 7 Oct 2015 03:33:25 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t973XPWR054297; Wed, 7 Oct 2015 03:33:25 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510070333.t973XPWR054297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 7 Oct 2015 03:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288975 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 03:33:27 -0000 Author: kevlo Date: Wed Oct 7 03:33:25 2015 New Revision: 288975 URL: https://svnweb.freebsd.org/changeset/base/288975 Log: Declare odata as a pointer type instead of a pointer to pointer. Reviewed by: adrian Modified: head/sys/dev/otus/if_otusreg.h Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Wed Oct 7 02:13:02 2015 (r288974) +++ head/sys/dev/otus/if_otusreg.h Wed Oct 7 03:33:25 2015 (r288975) @@ -874,7 +874,7 @@ struct otus_softc; struct otus_tx_cmd { uint8_t *buf; uint16_t buflen; - void * *odata; + void *odata; uint16_t odatalen; uint16_t token; STAILQ_ENTRY(otus_tx_cmd) next_cmd; From owner-svn-src-all@freebsd.org Wed Oct 7 06:15:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316EE9D0E25; Wed, 7 Oct 2015 06:15:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE50D255; Wed, 7 Oct 2015 06:14:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t976Erwk037773 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 7 Oct 2015 09:14:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t976Erwk037773 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t976ErhI037772; Wed, 7 Oct 2015 09:14:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 7 Oct 2015 09:14:53 +0300 From: Konstantin Belousov To: Jean-S??bastien P??dron Cc: s3erios@gmail.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 Message-ID: <20151007061453.GH2257@kib.kiev.ua> References: <201510040745.t947jbp7082807@repo.freebsd.org> <20151004094649.GG11284@kib.kiev.ua> <56142CCC.7000807@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56142CCC.7000807@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 06:15:00 -0000 On Tue, Oct 06, 2015 at 10:19:24PM +0200, Jean-S??bastien P??dron wrote: > On 04.10.2015 11:46, Konstantin Belousov wrote: > > On Sun, Oct 04, 2015 at 07:45:37AM +0000, Adrian Chadd wrote: > >> * Add missing case statement (gen == 3) in intel_gpu_reset(). > > This seems to be wrong. The i915 and G33 chipsets do not have registers > > declared in the 8xx chipset documentation. More, i915 and G33 have different > > reset procedures. > > > > The absence of '3' case was copied from the corresponding Linux kernel. > > Was this change tested, or is there a reference to upstream where the > > handling was added in this manner ? > > You're right, even in Linux 3.8, the switch does not have a case for > generation 3. > > >> * Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect). > > This is also incorrect. At least the modesetting pathes are executed in > > the syscall context, and sleeping is allowed; the modesetting locks were > > selected to make sleeping possible. Using nowait causes random syscalls > > failure where the requests would succeed otherwise. > > My reasoning was that M_WAITOK could make the display hang/unresponsive > while the memory is under pressure. The caller should be responsible for > handling the error instead. The majority of the calls changed were for the modesetting. In other words, the failures would probably affect only setup path, and probably leave the display in half-configured state. That said, hang is not the expected outcome of M_WAITOK behaviour. M_WAITOK indeed prevents real-time, but it only causes hang in case of memory deadlock. M_NOWAIT should only be used in contexts where sleepable wait for memory or address space is impossible or causes a damage to the managed hardware. > > In Linux, *alloc() calls may fail so application should already be > responsible for that. I believe there are subtle differences between our- and Linux- nowait behaviour. I claim (but do not want to take liability of prove it with references to Linux code) that our M_NOWAIT may fail transiently due to pagedaemon not keeping up with load, while Linux top-half nowait alloc only fails for real out-of-resources conditions. What I am trying to say, leave M_NOWAIT out of syscalls. Some time ago M_NOWAIT also means that the caller is allowed to use reserves to satisfy allocation, but this was fixed. From owner-svn-src-all@freebsd.org Wed Oct 7 06:24:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E41E9D144B; Wed, 7 Oct 2015 06:24:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCCC09C9; Wed, 7 Oct 2015 06:24:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by iow1 with SMTP id 1so11799520iow.1; Tue, 06 Oct 2015 23:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=YIJnM532PDw85wTmPAmsDaksFt4d7TG83ZivPEOgapM=; b=ZqJwHTnZecxloSEnRGrcZ2OPcMbNGu4pxdWPJyZ9WfQRf/jZ68BnfYGDKVzRDsPLE6 ASVdAs2LQ8qy2z8kb88K9cvdH+m1JRmjkjtTtgwFKEJTI6OnrZPKPt0RtRaCzlNtZkoR uN7k7qMtjJFfEUKo03mBJC4bK3hTH0UlIXFxn6Jvx7m0y+p+Kkv9gmf/m/E1RSGV+38E 6vGDJWsfaxoZTCCXerx76CFcJcAjIjBnQr8lU0ZjQI77QzfMZeZH01QnAbekgnHX3ceG V7W9xaHm7kI7HD2AZfRLaDPiErRawS/+Al2N7QuAvvNtlBTTBYi61eOaOWrwcGw2kMMv 9Udg== X-Received: by 10.107.135.196 with SMTP id r65mr44960033ioi.131.1444199077210; Tue, 06 Oct 2015 23:24:37 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:74ff:5034:d9e4:f4ee? ([2601:601:800:126d:74ff:5034:d9e4:f4ee]) by smtp.gmail.com with ESMTPSA id 39sm13861316ioh.38.2015.10.06.23.24.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Oct 2015 23:24:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r288907 - head/bin/ls/tests From: NGie Cooper In-Reply-To: <2474554.zI8qz6W2Yp@ralph.baldwin.cx> Date: Tue, 6 Oct 2015 23:24:35 -0700 Cc: Garrett Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <53B741C2-C962-41FA-A617-2019BEF2A0D4@gmail.com> References: <201510060100.t9610CXc077196@repo.freebsd.org> <2474554.zI8qz6W2Yp@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 06:24:38 -0000 > On Oct 6, 2015, at 11:26, John Baldwin wrote: >=20 > On Tuesday, October 06, 2015 01:00:12 AM Garrett Cooper wrote: >> Author: ngie >> Date: Tue Oct 6 01:00:12 2015 >> New Revision: 288907 >> URL: https://svnweb.freebsd.org/changeset/base/288907 >>=20 >> Log: >> Call sync consistently using atf_check >>=20 >> Remove superfluous sync's >=20 > You should not need to call sync() to see the results of earlier = namespace > changes (file create, rename, delete, etc.), even for NFS when looking = on the > same client that made the namespace change. >=20 > Are you doing this to force mtime updates? You should not need sync() = for > that on UFS (ufs_getattr() forces any pending lazy timestamp updates). = You > would for NFS (not sure about ZFS). >=20 > Whatever the reason for the syncs, I think it warrants a comment. You=E2=80=99re right about it not being clear as to why they=E2=80=99re = there. I ran into issues earlier on when developing the test cases, but it = might have been how I wrote them, along with bugs I fixed while = developing them. I=E2=80=99ll retest without the syncs. Depending on the outcome I=E2=80=99= ll either remove them entirely or comment on why they=E2=80=99re there. = I=E2=80=99ll probably do a combination of both if I run into issues. Thanks :)! -NGie PS I run my tests with UFS and atime on, mostly, but I also use ZFS = periodically. My work system runs ZFS, but I=E2=80=99m a few months = behind because of deliverables in flight and having to take down the = system/risk an upgrade with the recent churn in ZFS.= From owner-svn-src-all@freebsd.org Wed Oct 7 06:32:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 785FB9D1D5D; Wed, 7 Oct 2015 06:32:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6E8147; Wed, 7 Oct 2015 06:32:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t976WYXx006976; Wed, 7 Oct 2015 06:32:34 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t976WYmC006975; Wed, 7 Oct 2015 06:32:34 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201510070632.t976WYmC006975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 7 Oct 2015 06:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288980 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 06:32:35 -0000 Author: hrs Date: Wed Oct 7 06:32:34 2015 New Revision: 288980 URL: https://svnweb.freebsd.org/changeset/base/288980 Log: Fix a bug that caused reinitialization failure of MAC addresses on the lagg interface when removing the primary port. PR: 201916 Differential Revision: https://reviews.freebsd.org/D3301 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Oct 7 06:31:14 2015 (r288979) +++ head/sys/net/if_lagg.c Wed Oct 7 06:32:34 2015 (r288980) @@ -640,7 +640,7 @@ lagg_port_lladdr(struct lagg_port *lp, u /* Check to make sure its not already queued to be changed */ SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp) { + if (llq->llq_ifp == ifp && llq->llq_primary == primary) { pending = 1; break; } @@ -855,7 +855,7 @@ static int lagg_port_destroy(struct lagg_port *lp, int rundelport) { struct lagg_softc *sc = lp->lp_softc; - struct lagg_port *lp_ptr; + struct lagg_port *lp_ptr, *lp0; struct lagg_llq *llq; struct ifnet *ifp = lp->lp_ifp; uint64_t *pval, vdiff; @@ -897,18 +897,26 @@ lagg_port_destroy(struct lagg_port *lp, if (lp == sc->sc_primary) { uint8_t lladdr[ETHER_ADDR_LEN]; - if ((lp_ptr = SLIST_FIRST(&sc->sc_ports)) == NULL) { + if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) { bzero(&lladdr, ETHER_ADDR_LEN); } else { - bcopy(lp_ptr->lp_lladdr, + bcopy(lp0->lp_lladdr, lladdr, ETHER_ADDR_LEN); } lagg_lladdr(sc, lladdr); - sc->sc_primary = lp_ptr; - /* Update link layer address for each port */ + /* + * Update link layer address for each port. No port is + * marked as primary at this moment. + */ SLIST_FOREACH(lp_ptr, &sc->sc_ports, lp_entries) lagg_port_lladdr(lp_ptr, lladdr); + /* + * Mark lp0 as the new primary. This invokes an + * iflladdr_event. + */ + sc->sc_primary = lp0; + lagg_port_lladdr(lp0, lladdr); } /* Remove any pending lladdr changes from the queue */ From owner-svn-src-all@freebsd.org Wed Oct 7 06:48:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F6A9D0A64; Wed, 7 Oct 2015 06:48:20 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F16A2D; Wed, 7 Oct 2015 06:48:19 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZjiWQ-0008OS-6H; Wed, 07 Oct 2015 08:48:18 +0200 Subject: Re: svn commit: r288653 - in head/sys/dev/drm2: . i915 To: Konstantin Belousov References: <201510040745.t947jbp7082807@repo.freebsd.org> <20151004094649.GG11284@kib.kiev.ua> <56142CCC.7000807@FreeBSD.org> <20151007061453.GH2257@kib.kiev.ua> Cc: s3erios@gmail.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= X-Enigmail-Draft-Status: N1110 Message-ID: <5614C02B.6040504@FreeBSD.org> Date: Wed, 7 Oct 2015 08:48:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151007061453.GH2257@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GTdhrikxstKqSutV7oOQ0oQDv3rac3TnB" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 06:48:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GTdhrikxstKqSutV7oOQ0oQDv3rac3TnB Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07.10.2015 08:14, Konstantin Belousov wrote: > I believe there are subtle differences between our- and Linux- nowait > behaviour. I claim (but do not want to take liability of prove it with= > references to Linux code) that our M_NOWAIT may fail transiently due to= > pagedaemon not keeping up with load, while Linux top-half nowait alloc > only fails for real out-of-resources conditions. >=20 > What I am trying to say, leave M_NOWAIT out of syscalls. Some time ago= > M_NOWAIT also means that the caller is allowed to use reserves to satis= fy > allocation, but this was fixed. Ok, I understand. Let's revert to use M_WAITOK then. During the DRM core update, I also used M_NOWAIT. Likewise for the i915 WIP. I will change some of them back to M_WAITOK after checking the context of the allocation (syscall or not). Thank you for the clarification on those flags! --=20 Jean-S=E9bastien P=E9dron --GTdhrikxstKqSutV7oOQ0oQDv3rac3TnB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWFMAxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMdAgQANEBsBUr8NULutL992GnpuYb UM7jnuVhpr3Kg3LuQC9DkmOxYvub+QKEYQeMSSvX0Iv2XqoAxj18MzPW1PBpbmrB BoAnPmHNvm9tpxYWAY1QB04fx5bfxjpdRGhsPYwIktG32ll+lGp07yX57IRiG1Us ohWKf/SgUsaaQ6X3kOdGyhTVprAb+AI9xWi+nIK5Il9U567w5tZmnMT/j+dgy81c +OzPtBc/QEee79xw8kGSAhnfEb506KF7Pw+CVl9FMk8vYoxwwG8Z96ayTPpBnbP+ OZqYgSFbpY5QV7SwUY2wuRgvh9Kk/qF6Q8WjEdgj16nCDaTj3Hoev5LF81AWFihp SQnGGZyo+myrw31Y8QfMb1va1QYAnYO03lQnxjjV5bRU9uVW/UThFSGDbZzh2rOw Lb/wKPnzt3yhS4S8GalinVf9JPM/d/pcUrC2MPoHs/i8oQLx9uquVECKj9EyqiqH +vl4cUCMf9h0q4+SjFn+DKm3/K/adTrseI9w0Rt5Zh/aMAyTr6UkRw+AyPu0AouB jHYuTH03UiSQcBLbgRdYEdnnEvrukVoetpnnrXmC9RTvjkP04Z0vq1299mL49ejL aSbw79qfEiiOnGqo44pcRTdTsqRhBbZCXLivcGZAhJ4iW/VlfMiCgg/x9MiwwvWg SkNmsp4C3ssSut+dliTF =npGi -----END PGP SIGNATURE----- --GTdhrikxstKqSutV7oOQ0oQDv3rac3TnB-- From owner-svn-src-all@freebsd.org Wed Oct 7 07:35:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A4989D0C24; Wed, 7 Oct 2015 07:35:24 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward19p.cmail.yandex.net (forward19p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::aa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56A5384A; Wed, 7 Oct 2015 07:35:24 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from web12g.yandex.ru (web12g.yandex.ru [95.108.252.112]) by forward19p.cmail.yandex.net (Yandex) with ESMTP id E4D6321D84; Wed, 7 Oct 2015 10:35:07 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web12g.yandex.ru (Yandex) with ESMTP id F096A4262983; Wed, 7 Oct 2015 10:35:06 +0300 (MSK) Received: by web12g.yandex.ru with HTTP; Wed, 07 Oct 2015 10:35:06 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Rui Paulo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <1444174917.6210.43.camel@me.com> References: <201510040821.t948LGH7000421@repo.freebsd.org> <1444174917.6210.43.camel@me.com> Subject: Re: svn commit: r288657 - head/sys/netinet6 MIME-Version: 1.0 Message-Id: <91311444203306@web12g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 07 Oct 2015 10:35:06 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 07:35:24 -0000 07.10.2015, 02:42, "Rui Paulo" : > On Sun, 2015-10-04 at 08:21 +0000, Alexander V. Chernikov wrote: >> šAuthor: melifaro >> šDate: Sun Oct 4 08:21:15 2015 >> šNew Revision: 288657 >> šURL: https://svnweb.freebsd.org/changeset/base/288657 >> >> šLog: >> šššAdd __noinline attribute to several functions to ease dtrace >> šinstrumentation > > What instrumentation? Is there a DTrace script in userland that uses Well, given that ND state machine is a bit complex, it is nice to have some sort of easy-to-turn-on hooks to monitor its state (I suspect this is true not only for me, but to other people hacking IPv6 code). dtrace and its fbt provider does the great thing of exporting most of needed functions. However, due to inlining, not all calls can be hooked. > these functions? If not, this should not have been committed as you > just made the code slower. This is one of those changes that should be I do understand that in general telling compiler not to inline functions might slow things down. However, all functions except nd6_resolve_slow are not used in data path, so, well, losing fraction of percent is not a big deal for control function. Do you have different view on that? nd6_resolve_slow() is currently called when fast path processing failed and we have to acquire lle write lock and so on. (But yes, right now it could be called on per-packet basis in STALE/PROBE state, (which is going to be changed in D3780)). What could be done better is probably having some kind of __dtrace_inline define under KDTRACE_HOOKS kernel options. Does this look better to you or you have some different approach in mind (like explicitly defining dtrace probes or maybe something different) ? > kept in your own repository. > > -- > Rui Paulo From owner-svn-src-all@freebsd.org Wed Oct 7 08:56:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42EA19D1D6F; Wed, 7 Oct 2015 08:56:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD83AFF; Wed, 7 Oct 2015 08:56:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t978u2c9048216; Wed, 7 Oct 2015 08:56:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t978u2mZ048215; Wed, 7 Oct 2015 08:56:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510070856.t978u2mZ048215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 7 Oct 2015 08:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288981 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 08:56:03 -0000 Author: bapt Date: Wed Oct 7 08:56:01 2015 New Revision: 288981 URL: https://svnweb.freebsd.org/changeset/base/288981 Log: Trim spaces at the end of the buffer before trying to convert it to an oid This allows to write entries in sysctl.conf with spaces before the '=' like kern.ipc.shmmax = 9663676416 MFC after: 1 week Sponsored by: Gandi.net Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Wed Oct 7 06:32:34 2015 (r288980) +++ head/sbin/sysctl/sysctl.c Wed Oct 7 08:56:01 2015 (r288981) @@ -262,6 +262,12 @@ parse(const char *string, int lineno) newvalstr = cp; newsize = strlen(cp); } + /* Trim spaces */ + cp = bufp + strlen(bufp) - 1; + while (cp >= bufp && isspace((int)*cp)) { + *cp = '\0'; + cp--; + } len = name2oid(bufp, mib); if (len < 0) { From owner-svn-src-all@freebsd.org Wed Oct 7 08:58:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BC7F9D1FCB; Wed, 7 Oct 2015 08:58:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4D5DC3; Wed, 7 Oct 2015 08:58:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pablk4 with SMTP id lk4so15485888pab.3; Wed, 07 Oct 2015 01:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wGLcUf2SnmVugREIVbtni7lAc3AJeLZFGLQ7bFA+xF8=; b=J/Cw2DQgjRsG2BvLvkTBv9ib9ePq9SW/5khg5TNcDqQ1fD2vXnXYSk7KHW4aR6wKTQ dXWaZs8o5+HAmvzPpBO1JkG6m0bsDvyhALU4hc5kKIFC8AysXGRfjBqMmrbTGELlPDlf 8oozj8hpgXgRy56kDGhnpIzwkStH0aguCA/qvepsD58jajk8/Mvrk2oAzEWaryJOpoNa AaF19BY9XBIPQ5LLvKyuha8f24LLTgCrVE+NpMFVk58JbEVYEtHlHHHxR6Jj5FPonCJs EaGUhe1aGW+soV98rGDGnCQqjCazGDezbU5sOTaAFneoL4eMXSigY0Hw3w52NzRHeE8l XV9Q== X-Received: by 10.67.4.230 with SMTP id ch6mr53015861pad.11.1444208311657; Wed, 07 Oct 2015 01:58:31 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:74ff:5034:d9e4:f4ee? ([2601:601:800:126d:74ff:5034:d9e4:f4ee]) by smtp.gmail.com with ESMTPSA id xz5sm38124878pbb.12.2015.10.07.01.58.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Oct 2015 01:58:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r288981 - head/sbin/sysctl From: NGie Cooper In-Reply-To: <201510070856.t978u2mZ048215@repo.freebsd.org> Date: Wed, 7 Oct 2015 01:58:29 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <52FE118F-5C0E-4CC2-9078-27015D72315B@gmail.com> References: <201510070856.t978u2mZ048215@repo.freebsd.org> To: Baptiste Daroussin X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 08:58:32 -0000 > On Oct 7, 2015, at 01:56, Baptiste Daroussin wrote: >=20 > Author: bapt > Date: Wed Oct 7 08:56:01 2015 > New Revision: 288981 > URL: https://svnweb.freebsd.org/changeset/base/288981 >=20 > Log: > Trim spaces at the end of the buffer before trying to convert it to = an oid >=20 > This allows to write entries in sysctl.conf with spaces before the = '=3D' like > kern.ipc.shmmax =3D 9663676416 >=20 > MFC after: 1 week > Sponsored by: Gandi.net Won=E2=80=99t this cause issues if the intent of the original value is = to have a space before the rest of the value, e.g. sysctl my.oid=3D=E2=80=9C i really wanted a leading space=E2=80=9D ?= From owner-svn-src-all@freebsd.org Wed Oct 7 09:08:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30B6E9D08B8; Wed, 7 Oct 2015 09:08:18 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4B133AF; Wed, 7 Oct 2015 09:08:17 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so203321932wic.0; Wed, 07 Oct 2015 02:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=O1VQcqG4aGRatOeJEbyU25hVpl/1f4mN/8BlH6TggvM=; b=T9OTPN3goPYAT+mWlqm5Zq+L8DTkCk6yqBI2d+Ez0E7fKTe9r958jbhkmIAoNDHVL4 Oo7icGOhzPhh/ETLiDDEDG0bIR/SylQSSDmReBnlDQQolnh13Pt/racUPWWaISqol4Ux ni6rk68lrUjBxlWaKRFWj/TBETCI51T1SCSQSpRkZJtoyi30XiDhWMy+QhwQ8ibrMuss gug7XjHwbE2napFxMuJmdUzYGpFpDQX0+9EN62NquasoF9wNNMSymGD1TuhI/yHT9GUf PwyMtAu/7LbJEyXJVeDFlJzrT1XJ/BfXfX5zVC3Fvl3CN4b8n+ND213TnA3XTit/Z7VT iYcQ== X-Received: by 10.194.187.72 with SMTP id fq8mr41195532wjc.131.1444208896245; Wed, 07 Oct 2015 02:08:16 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id s2sm1653005wib.15.2015.10.07.02.08.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 02:08:15 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 7 Oct 2015 11:08:13 +0200 From: Baptiste Daroussin To: NGie Cooper Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r288981 - head/sbin/sysctl Message-ID: <20151007090812.GA91729@ivaldir.etoilebsd.net> References: <201510070856.t978u2mZ048215@repo.freebsd.org> <52FE118F-5C0E-4CC2-9078-27015D72315B@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <52FE118F-5C0E-4CC2-9078-27015D72315B@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:08:18 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 07, 2015 at 01:58:29AM -0700, NGie Cooper wrote: >=20 > > On Oct 7, 2015, at 01:56, Baptiste Daroussin wrote: > >=20 > > Author: bapt > > Date: Wed Oct 7 08:56:01 2015 > > New Revision: 288981 > > URL: https://svnweb.freebsd.org/changeset/base/288981 > >=20 > > Log: > > Trim spaces at the end of the buffer before trying to convert it to an= oid > >=20 > > This allows to write entries in sysctl.conf with spaces before the '= =3D' like > > kern.ipc.shmmax =3D 9663676416 > >=20 > > MFC after: 1 week > > Sponsored by: Gandi.net >=20 > Won=E2=80=99t this cause issues if the intent of the original value is to= have a space before the rest of the value, e.g. >=20 > sysctl my.oid=3D=E2=80=9C i really wanted a leading space=E2=80=9D Note that here I am only trimming spaces _before_ the =3D and I'm not touch= ing the parsing after the '=3D' for the exact reason you are raising. Best regards, Bapt --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYU4PwACgkQ8kTtMUmk6EyepwCfV9thV+voILJFAMtZ9uUA+6Sy qUwAn3eiyos1gVtzynuUjpxBpLMKpcOM =Jvmf -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp-- From owner-svn-src-all@freebsd.org Wed Oct 7 09:12:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 973A69D0D9F; Wed, 7 Oct 2015 09:12:51 +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 52978ACD; Wed, 7 Oct 2015 09:12:51 +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 t979CoC5054141; Wed, 7 Oct 2015 09:12:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979Co21054138; Wed, 7 Oct 2015 09:12:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510070912.t979Co21054138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 7 Oct 2015 09:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288983 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:12:51 -0000 Author: kib Date: Wed Oct 7 09:12:49 2015 New Revision: 288983 URL: https://svnweb.freebsd.org/changeset/base/288983 Log: A follow-up to r288492. In fact, revert the mentioned commit for pre-VFPv3 processors, since they do require software support code to handle denormals. For VFPv3 and later, enable flush-to-zero if hardware does not claim full denormals arithmetic support by VMVFR1_FZ field in mvfr1 register. The end result is that we do use correct fpu environment on Cortexes with VFPv3, while ARM11 (e.g. rpi) is in non-compliant flush-to-zero mode. At least CPUs without complete hardware implementation of IEEE 754 do not cause unhandled floating point exception on underflow, as it was before r288492. Noted by: ian Tested by: gjb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/arm/arm/vfp.c head/sys/arm/arm/vm_machdep.c head/sys/arm/include/md_var.h Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Wed Oct 7 08:56:38 2015 (r288982) +++ head/sys/arm/arm/vfp.c Wed Oct 7 09:12:49 2015 (r288983) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -128,6 +129,15 @@ vfp_init(void) tmp = fmrx(mvfr1); PCPU_SET(vfpmvfr1, tmp); + + if (PCPU_GET(cpuid) == 0) { + if ((tmp & VMVFR1_FZ_MASK) == 0x1) { + /* Denormals arithmetic support */ + initial_fpscr &= ~VFPSCR_FZ; + thread0.td_pcb->pcb_vfpstate.fpscr = + initial_fpscr; + } + } } /* initialize the coprocess 10 and 11 calls Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Wed Oct 7 08:56:38 2015 (r288982) +++ head/sys/arm/arm/vm_machdep.c Wed Oct 7 09:12:49 2015 (r288983) @@ -85,6 +85,8 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct switchframe) == 48); CTASSERT(sizeof(struct trapframe) == 80); +uint32_t initial_fpscr = VFPSCR_DN | VFPSCR_FZ; + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -134,7 +136,7 @@ cpu_fork(register struct thread *td1, re pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); pcb2->pcb_vfpcpu = -1; - pcb2->pcb_vfpstate.fpscr = VFPSCR_DN; + pcb2->pcb_vfpstate.fpscr = initial_fpscr; tf = td2->td_frame; tf->tf_spsr &= ~PSR_C; Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Wed Oct 7 08:56:38 2015 (r288982) +++ head/sys/arm/include/md_var.h Wed Oct 7 09:12:49 2015 (r288983) @@ -71,4 +71,6 @@ void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); +extern uint32_t initial_fpscr; + #endif /* !_MACHINE_MD_VAR_H_ */ From owner-svn-src-all@freebsd.org Wed Oct 7 09:28:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF809B68D9; Wed, 7 Oct 2015 09:28:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B13F14D; Wed, 7 Oct 2015 09:28:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t979SsZb057995; Wed, 7 Oct 2015 09:28:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979SsMQ057994; Wed, 7 Oct 2015 09:28:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510070928.t979SsMQ057994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 7 Oct 2015 09:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288984 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:28:55 -0000 Author: bapt Date: Wed Oct 7 09:28:54 2015 New Revision: 288984 URL: https://svnweb.freebsd.org/changeset/base/288984 Log: Only print the errno string in case sysctl(3) does not file with ENOENT This reduces the noise in error reporing from sysctl(8): Before: $ sysctl bla=something sysctl: unknown oid 'bla': No such file or directory After: $ sysctl bla=something sysctl: unknown oid 'bla' MFC after: 1 week Sponsored by: Gandi.net Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Wed Oct 7 09:12:49 2015 (r288983) +++ head/sbin/sysctl/sysctl.c Wed Oct 7 09:28:54 2015 (r288984) @@ -276,7 +276,11 @@ parse(const char *string, int lineno) if (qflag) return (1); else { - warn("unknown oid '%s'%s", bufp, line); + if (errno == ENOENT) { + warnx("unknown oid '%s'%s", bufp, line); + } else { + warn("unknown oid '%s'%s", bufp, line); + } return (1); } } From owner-svn-src-all@freebsd.org Wed Oct 7 09:29:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 809F89B6988; Wed, 7 Oct 2015 09:29:43 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7242D3; Wed, 7 Oct 2015 09:29:43 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t979TgaS058101; Wed, 7 Oct 2015 09:29:42 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979Tg4B058100; Wed, 7 Oct 2015 09:29:42 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510070929.t979Tg4B058100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Wed, 7 Oct 2015 09:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288985 - stable/10/sys/gnu/fs/reiserfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:29:43 -0000 Author: avatar Date: Wed Oct 7 09:29:42 2015 New Revision: 288985 URL: https://svnweb.freebsd.org/changeset/base/288985 Log: MFC r287698: Fixing a memory leak on module unloading. Modified: stable/10/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/10/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:28:54 2015 (r288984) +++ stable/10/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:29:42 2015 (r288985) @@ -1022,6 +1022,7 @@ uint32_t find_hash_out(struct reiserfs_m } } while (0); + free(ip, M_REISERFSNODE); pathrelse(&path); return (hash); } From owner-svn-src-all@freebsd.org Wed Oct 7 09:30:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E23AD9B6A33; Wed, 7 Oct 2015 09:30:09 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 963E065F; Wed, 7 Oct 2015 09:30:09 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t979U8bI058201; Wed, 7 Oct 2015 09:30:08 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979U8io058200; Wed, 7 Oct 2015 09:30:08 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510070930.t979U8io058200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Wed, 7 Oct 2015 09:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288986 - in stable/9/sys: dev/usb/wlan gnu/fs/reiserfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:30:10 -0000 Author: avatar Date: Wed Oct 7 09:30:08 2015 New Revision: 288986 URL: https://svnweb.freebsd.org/changeset/base/288986 Log: MFC r287698: Fixing a memory leak on module unloading. Modified: stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:29:42 2015 (r288985) +++ stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:30:08 2015 (r288986) @@ -1023,6 +1023,7 @@ uint32_t find_hash_out(struct reiserfs_m } } while (0); + free(ip, M_REISERFSNODE); pathrelse(&path); return (hash); } From owner-svn-src-all@freebsd.org Wed Oct 7 09:39:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DC0D9B927A; Wed, 7 Oct 2015 09:39:47 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B05C00; Wed, 7 Oct 2015 09:39:47 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t979dkAR061257; Wed, 7 Oct 2015 09:39:46 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979dk1I061256; Wed, 7 Oct 2015 09:39:46 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510070939.t979dk1I061256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Wed, 7 Oct 2015 09:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r288987 - in stable/8/sys: . amd64/amd64 dev/sound gnu/fs/reiserfs i386/i386 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:39:47 -0000 Author: avatar Date: Wed Oct 7 09:39:45 2015 New Revision: 288987 URL: https://svnweb.freebsd.org/changeset/base/288987 Log: MFC r238980: Just like the other file systems found in /sys/fs, g_vfs_open() should be paried with g_vfs_close(). Though g_vfs_close() is a wrapper around g_wither_geom_close(), r206130 added the following test in g_vfs_open(): if (bo->bo_private != vp) return (EBUSY); Which will cause a 'Device busy' error inside reiserfs_mountfs() if the same file system is re-mounted again after umount or mounting failure: (case 1, /dev/ad4s3 is not a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Invalid argument # mount -t msdosfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy (case 2, /dev/ad4s3 is a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt # umount /mnt # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy On the other hand, g_vfs_close() 'fixed' the above cases by doing an extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers synchronised. Reviewed by: kib Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/Makefile (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/amd64/amd64/intr_machdep.c (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/bsm/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/compat/ (props changed) stable/8/sys/conf/ (props changed) stable/8/sys/contrib/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/crypto/ (props changed) stable/8/sys/ddb/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/aac/ (props changed) stable/8/sys/dev/acpi_support/ (props changed) stable/8/sys/dev/acpica/ (props changed) stable/8/sys/dev/adb/ (props changed) stable/8/sys/dev/adlink/ (props changed) stable/8/sys/dev/advansys/ (props changed) stable/8/sys/dev/ae/ (props changed) stable/8/sys/dev/age/ (props changed) stable/8/sys/dev/agp/ (props changed) stable/8/sys/dev/aha/ (props changed) stable/8/sys/dev/ahb/ (props changed) stable/8/sys/dev/ahci/ (props changed) stable/8/sys/dev/aic/ (props changed) stable/8/sys/dev/aic7xxx/ (props changed) stable/8/sys/dev/alc/ (props changed) stable/8/sys/dev/ale/ (props changed) stable/8/sys/dev/amd/ (props changed) stable/8/sys/dev/amdsbwd/ (props changed) stable/8/sys/dev/amdtemp/ (props changed) stable/8/sys/dev/amr/ (props changed) stable/8/sys/dev/an/ (props changed) stable/8/sys/dev/arcmsr/ (props changed) stable/8/sys/dev/asmc/ (props changed) stable/8/sys/dev/asr/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ath/ (props changed) stable/8/sys/dev/atkbdc/ (props changed) stable/8/sys/dev/auxio/ (props changed) stable/8/sys/dev/bce/ (props changed) stable/8/sys/dev/bfe/ (props changed) stable/8/sys/dev/bge/ (props changed) stable/8/sys/dev/bktr/ (props changed) stable/8/sys/dev/bm/ (props changed) stable/8/sys/dev/buslogic/ (props changed) stable/8/sys/dev/bwi/ (props changed) stable/8/sys/dev/bwn/ (props changed) stable/8/sys/dev/cardbus/ (props changed) stable/8/sys/dev/cas/ (props changed) stable/8/sys/dev/ce/ (props changed) stable/8/sys/dev/cfe/ (props changed) stable/8/sys/dev/cfi/ (props changed) stable/8/sys/dev/ciss/ (props changed) stable/8/sys/dev/cm/ (props changed) stable/8/sys/dev/cmx/ (props changed) stable/8/sys/dev/coretemp/ (props changed) stable/8/sys/dev/cp/ (props changed) stable/8/sys/dev/cpuctl/ (props changed) stable/8/sys/dev/cpufreq/ (props changed) stable/8/sys/dev/cs/ (props changed) stable/8/sys/dev/ct/ (props changed) stable/8/sys/dev/ctau/ (props changed) stable/8/sys/dev/cx/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) stable/8/sys/dev/cy/ (props changed) stable/8/sys/dev/dc/ (props changed) stable/8/sys/dev/dcons/ (props changed) stable/8/sys/dev/de/ (props changed) stable/8/sys/dev/digi/ (props changed) stable/8/sys/dev/dpms/ (props changed) stable/8/sys/dev/dpt/ (props changed) stable/8/sys/dev/drm/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/ed/ (props changed) stable/8/sys/dev/eisa/ (props changed) stable/8/sys/dev/en/ (props changed) stable/8/sys/dev/ep/ (props changed) stable/8/sys/dev/esp/ (props changed) stable/8/sys/dev/et/ (props changed) stable/8/sys/dev/ex/ (props changed) stable/8/sys/dev/exca/ (props changed) stable/8/sys/dev/fatm/ (props changed) stable/8/sys/dev/fb/ (props changed) stable/8/sys/dev/fdc/ (props changed) stable/8/sys/dev/fe/ (props changed) stable/8/sys/dev/firewire/ (props changed) stable/8/sys/dev/flash/ (props changed) stable/8/sys/dev/fxp/ (props changed) stable/8/sys/dev/gem/ (props changed) stable/8/sys/dev/glxsb/ (props changed) stable/8/sys/dev/hatm/ (props changed) stable/8/sys/dev/hifn/ (props changed) stable/8/sys/dev/hme/ (props changed) stable/8/sys/dev/hpt27xx/ (props changed) stable/8/sys/dev/hptiop/ (props changed) stable/8/sys/dev/hptmv/ (props changed) stable/8/sys/dev/hptrr/ (props changed) stable/8/sys/dev/hwpmc/ (props changed) stable/8/sys/dev/ic/ (props changed) stable/8/sys/dev/ichsmb/ (props changed) stable/8/sys/dev/ichwd/ (props changed) stable/8/sys/dev/ida/ (props changed) stable/8/sys/dev/ie/ (props changed) stable/8/sys/dev/ieee488/ (props changed) stable/8/sys/dev/if_ndis/ (props changed) stable/8/sys/dev/iicbus/ (props changed) stable/8/sys/dev/iir/ (props changed) stable/8/sys/dev/io/ (props changed) stable/8/sys/dev/ipmi/ (props changed) stable/8/sys/dev/ips/ (props changed) stable/8/sys/dev/ipw/ (props changed) stable/8/sys/dev/isci/ (props changed) stable/8/sys/dev/iscsi/ (props changed) stable/8/sys/dev/isp/ (props changed) stable/8/sys/dev/ispfw/ (props changed) stable/8/sys/dev/iwi/ (props changed) stable/8/sys/dev/iwn/ (props changed) stable/8/sys/dev/ixgb/ (props changed) stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/jme/ (props changed) stable/8/sys/dev/joy/ (props changed) stable/8/sys/dev/kbd/ (props changed) stable/8/sys/dev/kbdmux/ (props changed) stable/8/sys/dev/ksyms/ (props changed) stable/8/sys/dev/le/ (props changed) stable/8/sys/dev/led/ (props changed) stable/8/sys/dev/lge/ (props changed) stable/8/sys/dev/lindev/ (props changed) stable/8/sys/dev/lmc/ (props changed) stable/8/sys/dev/malo/ (props changed) stable/8/sys/dev/mc146818/ (props changed) stable/8/sys/dev/mca/ (props changed) stable/8/sys/dev/mcd/ (props changed) stable/8/sys/dev/md/ (props changed) stable/8/sys/dev/mem/ (props changed) stable/8/sys/dev/mfi/ (props changed) stable/8/sys/dev/mge/ (props changed) stable/8/sys/dev/mii/ (props changed) stable/8/sys/dev/mk48txx/ (props changed) stable/8/sys/dev/mlx/ (props changed) stable/8/sys/dev/mly/ (props changed) stable/8/sys/dev/mmc/ (props changed) stable/8/sys/dev/mn/ (props changed) stable/8/sys/dev/mps/ (props changed) stable/8/sys/dev/mpt/ (props changed) stable/8/sys/dev/mse/ (props changed) stable/8/sys/dev/msk/ (props changed) stable/8/sys/dev/mvs/ (props changed) stable/8/sys/dev/mwl/ (props changed) stable/8/sys/dev/mxge/ (props changed) stable/8/sys/dev/my/ (props changed) stable/8/sys/dev/ncv/ (props changed) stable/8/sys/dev/netmap/ (props changed) stable/8/sys/dev/nfe/ (props changed) stable/8/sys/dev/nge/ (props changed) stable/8/sys/dev/nmdm/ (props changed) stable/8/sys/dev/nsp/ (props changed) stable/8/sys/dev/null/ (props changed) stable/8/sys/dev/nve/ (props changed) stable/8/sys/dev/nvram/ (props changed) stable/8/sys/dev/nxge/ (props changed) stable/8/sys/dev/oce/ (props changed) stable/8/sys/dev/ofw/ (props changed) stable/8/sys/dev/patm/ (props changed) stable/8/sys/dev/pbio/ (props changed) stable/8/sys/dev/pccard/ (props changed) stable/8/sys/dev/pccbb/ (props changed) stable/8/sys/dev/pcf/ (props changed) stable/8/sys/dev/pci/ (props changed) stable/8/sys/dev/pcn/ (props changed) stable/8/sys/dev/pdq/ (props changed) stable/8/sys/dev/powermac_nvram/ (props changed) stable/8/sys/dev/ppbus/ (props changed) stable/8/sys/dev/ppc/ (props changed) stable/8/sys/dev/pst/ (props changed) stable/8/sys/dev/puc/ (props changed) stable/8/sys/dev/quicc/ (props changed) stable/8/sys/dev/ral/ (props changed) stable/8/sys/dev/rc/ (props changed) stable/8/sys/dev/re/ (props changed) stable/8/sys/dev/rndtest/ (props changed) stable/8/sys/dev/rp/ (props changed) stable/8/sys/dev/safe/ (props changed) stable/8/sys/dev/sbni/ (props changed) stable/8/sys/dev/scc/ (props changed) stable/8/sys/dev/scd/ (props changed) stable/8/sys/dev/sdhci/ (props changed) stable/8/sys/dev/sec/ (props changed) stable/8/sys/dev/sf/ (props changed) stable/8/sys/dev/sge/ (props changed) stable/8/sys/dev/si/ (props changed) stable/8/sys/dev/siba/ (props changed) stable/8/sys/dev/siis/ (props changed) stable/8/sys/dev/sio/ (props changed) stable/8/sys/dev/sis/ (props changed) stable/8/sys/dev/sk/ (props changed) stable/8/sys/dev/smbus/ (props changed) stable/8/sys/dev/smc/ (props changed) stable/8/sys/dev/sn/ (props changed) stable/8/sys/dev/snc/ (props changed) stable/8/sys/dev/snp/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/chip.h (props changed) stable/8/sys/dev/sound/clone.c (props changed) stable/8/sys/dev/sound/clone.h (props changed) stable/8/sys/dev/sound/driver.c (props changed) stable/8/sys/dev/sound/isa/ (props changed) stable/8/sys/dev/sound/macio/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) stable/8/sys/dev/sound/pcm/ (props changed) stable/8/sys/dev/sound/sbus/ (props changed) stable/8/sys/dev/sound/unit.c (props changed) stable/8/sys/dev/sound/unit.h (props changed) stable/8/sys/dev/sound/usb/ (props changed) stable/8/sys/dev/sound/version.h (props changed) stable/8/sys/dev/speaker/ (props changed) stable/8/sys/dev/spibus/ (props changed) stable/8/sys/dev/ste/ (props changed) stable/8/sys/dev/stg/ (props changed) stable/8/sys/dev/stge/ (props changed) stable/8/sys/dev/streams/ (props changed) stable/8/sys/dev/sym/ (props changed) stable/8/sys/dev/syscons/ (props changed) stable/8/sys/dev/tdfx/ (props changed) stable/8/sys/dev/ti/ (props changed) stable/8/sys/dev/tl/ (props changed) stable/8/sys/dev/tpm/ (props changed) stable/8/sys/dev/trm/ (props changed) stable/8/sys/dev/tsec/ (props changed) stable/8/sys/dev/twa/ (props changed) stable/8/sys/dev/twe/ (props changed) stable/8/sys/dev/tws/ (props changed) stable/8/sys/dev/tx/ (props changed) stable/8/sys/dev/txp/ (props changed) stable/8/sys/dev/uart/ (props changed) stable/8/sys/dev/ubsec/ (props changed) stable/8/sys/dev/usb/ (props changed) stable/8/sys/dev/utopia/ (props changed) stable/8/sys/dev/vge/ (props changed) stable/8/sys/dev/viawd/ (props changed) stable/8/sys/dev/virtio/ (props changed) stable/8/sys/dev/vkbd/ (props changed) stable/8/sys/dev/vr/ (props changed) stable/8/sys/dev/vte/ (props changed) stable/8/sys/dev/vx/ (props changed) stable/8/sys/dev/watchdog/ (props changed) stable/8/sys/dev/wb/ (props changed) stable/8/sys/dev/wbwd/ (props changed) stable/8/sys/dev/wds/ (props changed) stable/8/sys/dev/wi/ (props changed) stable/8/sys/dev/wl/ (props changed) stable/8/sys/dev/wpi/ (props changed) stable/8/sys/dev/xe/ (props changed) stable/8/sys/dev/xen/ (props changed) stable/8/sys/dev/xl/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/gdb/ (props changed) stable/8/sys/geom/ (props changed) stable/8/sys/gnu/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/i386/i386/intr_machdep.c (props changed) stable/8/sys/ia64/ (props changed) stable/8/sys/isa/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/kgssapi/ (props changed) stable/8/sys/libkern/ (props changed) stable/8/sys/mips/ (props changed) stable/8/sys/modules/ (props changed) stable/8/sys/net/ (props changed) stable/8/sys/net80211/ (props changed) stable/8/sys/netatalk/ (props changed) stable/8/sys/netgraph/ (props changed) stable/8/sys/netinet/ (props changed) stable/8/sys/netinet6/ (props changed) stable/8/sys/netipsec/ (props changed) stable/8/sys/netipx/ (props changed) stable/8/sys/netnatm/ (props changed) stable/8/sys/netncp/ (props changed) stable/8/sys/netsmb/ (props changed) stable/8/sys/nfs/ (props changed) stable/8/sys/nfsclient/ (props changed) stable/8/sys/nfsserver/ (props changed) stable/8/sys/nlm/ (props changed) stable/8/sys/opencrypto/ (props changed) stable/8/sys/pc98/ (props changed) stable/8/sys/pci/ (props changed) stable/8/sys/powerpc/ (props changed) stable/8/sys/rpc/ (props changed) stable/8/sys/security/ (props changed) stable/8/sys/sparc64/ (props changed) stable/8/sys/sun4v/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/tools/ (props changed) stable/8/sys/ufs/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/sys/xdr/ (props changed) stable/8/sys/xen/ (props changed) Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:30:08 2015 (r288986) +++ stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:39:45 2015 (r288987) @@ -227,7 +227,7 @@ reiserfs_unmount(struct mount *mp, int m DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(rmp->rm_cp->geom, ENXIO); + g_vfs_close(rmp->rm_cp); g_topology_unlock(); PICKUP_GIANT(); vrele(rmp->rm_devvp); @@ -638,7 +638,7 @@ out: if (cp != NULL) { DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(cp->geom, ENXIO); + g_vfs_close(cp); g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-all@freebsd.org Wed Oct 7 09:41:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD4109B93F7; Wed, 7 Oct 2015 09:41:18 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9471BF0C; Wed, 7 Oct 2015 09:41:18 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t979fHTc061977; Wed, 7 Oct 2015 09:41:17 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t979fH5Q061976; Wed, 7 Oct 2015 09:41:17 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510070941.t979fH5Q061976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Wed, 7 Oct 2015 09:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r288988 - stable/7/sys/gnu/fs/reiserfs X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:41:18 -0000 Author: avatar Date: Wed Oct 7 09:41:17 2015 New Revision: 288988 URL: https://svnweb.freebsd.org/changeset/base/288988 Log: MFC r286888: Using consistent coding style to deal with error inside the loop. Modified: stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:39:45 2015 (r288987) +++ stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Wed Oct 7 09:41:17 2015 (r288988) @@ -985,8 +985,8 @@ uint32_t find_hash_out(struct reiserfs_m key.on_disk_key.k_objectid, key.on_disk_key.k_dir_id); retval = search_by_entry_key(sbi, &key, &path, &de); if (retval == IO_ERROR) { - pathrelse(&path); - return (UNSET_HASH); + hash = UNSET_HASH; + break; } if (retval == NAME_NOT_FOUND) de.de_entry_num--; From owner-svn-src-all@freebsd.org Wed Oct 7 12:36:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D3E49D0ABF; Wed, 7 Oct 2015 12:36:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD09FE6A; Wed, 7 Oct 2015 12:36:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97CaS4E013797; Wed, 7 Oct 2015 12:36:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97CaS0U013796; Wed, 7 Oct 2015 12:36:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510071236.t97CaS0U013796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 7 Oct 2015 12:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288989 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 12:36:30 -0000 Author: glebius Date: Wed Oct 7 12:36:28 2015 New Revision: 288989 URL: https://svnweb.freebsd.org/changeset/base/288989 Log: In softdep_setup_freeblocks(): - Move the bread() to the beginning of function. - Return if it fails, otherwise we will panic. Submitted by: mckusick Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Oct 7 09:41:17 2015 (r288988) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Oct 7 12:36:28 2015 (r288989) @@ -6835,6 +6835,13 @@ softdep_setup_freeblocks(ip, length, fla ip->i_number, length); KASSERT(length == 0, ("softdep_setup_freeblocks: non-zero length")); fs = ip->i_fs; + if ((error = bread(ip->i_devvp, + fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), + (int)fs->fs_bsize, NOCRED, &bp)) != 0) { + brelse(bp); + softdep_error("softdep_setup_freeblocks", error); + return; + } freeblks = newfreeblks(mp, ip); extblocks = 0; datablocks = 0; @@ -6871,12 +6878,6 @@ softdep_setup_freeblocks(ip, length, fla * to delete its dependencies below. Once the dependencies are gone * the buffer can be safely released. */ - if ((error = bread(ip->i_devvp, - fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), - (int)fs->fs_bsize, NOCRED, &bp)) != 0) { - brelse(bp); - softdep_error("softdep_setup_freeblocks", error); - } if (ump->um_fstype == UFS1) { dp1 = ((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)); From owner-svn-src-all@freebsd.org Wed Oct 7 12:40:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 249359D0CE0; Wed, 7 Oct 2015 12:40:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF24C1B3; Wed, 7 Oct 2015 12:40:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97Ce0aM014060; Wed, 7 Oct 2015 12:40:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97Ce0dw014059; Wed, 7 Oct 2015 12:40:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510071240.t97Ce0dw014059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 7 Oct 2015 12:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288990 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 12:40:02 -0000 Author: glebius Date: Wed Oct 7 12:40:00 2015 New Revision: 288990 URL: https://svnweb.freebsd.org/changeset/base/288990 Log: Fix regression from r248371. We need to copy packet header to new mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set only on a first mbuf. Reported & tested by: Andriy Voskoboinyk Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Wed Oct 7 12:36:28 2015 (r288989) +++ head/sys/kern/uipc_mbuf.c Wed Oct 7 12:40:00 2015 (r288990) @@ -1867,6 +1867,11 @@ m_unshare(struct mbuf *m0, int how) m_freem(m0); return (NULL); } + if (m->m_flags & M_PKTHDR) { + KASSERT(mprev == NULL, ("%s: m0 %p, m %p has M_PKTHDR", + __func__, m0, m)); + m_move_pkthdr(n, m); + } len = m->m_len; off = 0; mfirst = n; From owner-svn-src-all@freebsd.org Wed Oct 7 13:10:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C589D1FB6; Wed, 7 Oct 2015 13:10:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEBD39E6; Wed, 7 Oct 2015 13:10:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97DAQJ4023228; Wed, 7 Oct 2015 13:10:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97DAQ97023227; Wed, 7 Oct 2015 13:10:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510071310.t97DAQ97023227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 7 Oct 2015 13:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288991 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 13:10:28 -0000 Author: glebius Date: Wed Oct 7 13:10:26 2015 New Revision: 288991 URL: https://svnweb.freebsd.org/changeset/base/288991 Log: Fix regression from r287779, that bite me. If we call m_pullup() unconditionally, we end up with an mbuf chain of two mbufs, which later in in_arpreply() is rewritten from ARP request to ARP reply and is sent out. Looks like igb(4) (at least mine, and at least at my network) fails on such mbuf chain, so ARP reply doesn't go out wire. Thus, make the m_pullup() call conditional, as it is everywhere. Of course, the bug in igb(?) should be investigated, but better first fix the head. And unconditional m_pullup() was suboptimal, anyway. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Oct 7 12:40:00 2015 (r288990) +++ head/sys/netinet/if_ether.c Wed Oct 7 13:10:26 2015 (r288991) @@ -531,12 +531,15 @@ arpintr(struct mbuf *m) ar = mtod(m, struct arphdr *); /* Check if length is sufficient */ - if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { - ARP_LOG(LOG_NOTICE, "short packet received on %s\n", - if_name(ifp)); - return; + if (m->m_len < arphdr_len(ar)) { + m = m_pullup(m, arphdr_len(ar)); + if (m == NULL) { + ARP_LOG(LOG_NOTICE, "short packet received on %s\n", + if_name(ifp)); + return; + } + ar = mtod(m, struct arphdr *); } - ar = mtod(m, struct arphdr *); hlen = 0; layer = ""; From owner-svn-src-all@freebsd.org Wed Oct 7 13:19:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223EE9D06A4; Wed, 7 Oct 2015 13:19:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E25FD16E; Wed, 7 Oct 2015 13:19:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97DJjB8026377; Wed, 7 Oct 2015 13:19:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97DJiOi026375; Wed, 7 Oct 2015 13:19:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510071319.t97DJiOi026375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Oct 2015 13:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288992 - in head/sys: arm/ti conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 13:19:46 -0000 Author: andrew Date: Wed Oct 7 13:19:44 2015 New Revision: 288992 URL: https://svnweb.freebsd.org/changeset/base/288992 Log: Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc specific as we may use the pmu registers for other uses. No configs seem to currently build this. This will allow for more use of this device. Discussed with: bz Sponsored by: ABT Systems Ltd Modified: head/sys/arm/ti/files.ti head/sys/conf/files.arm Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Wed Oct 7 13:10:26 2015 (r288991) +++ head/sys/arm/ti/files.ti Wed Oct 7 13:19:44 2015 (r288992) @@ -5,7 +5,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard -arm/arm/pmu.c optional hwpmc arm/ti/ti_common.c standard arm/ti/ti_cpuid.c standard Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Oct 7 13:10:26 2015 (r288991) +++ head/sys/conf/files.arm Wed Oct 7 13:19:44 2015 (r288992) @@ -56,6 +56,7 @@ arm/arm/platform_if.m optional platform arm/arm/pmap.c optional !armv6 arm/arm/pmap-v6.c optional armv6 !arm_new_pmap arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap +arm/arm/pmu.c optional pmu arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-all@freebsd.org Wed Oct 7 13:43:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0139A9B6AFE; Wed, 7 Oct 2015 13:43:26 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 981EA853; Wed, 7 Oct 2015 13:43:25 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wicge5 with SMTP id ge5so213871949wic.0; Wed, 07 Oct 2015 06:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=gaza91rN/3JoYT86rSnD+OrDOKecyfz7EIjHXy7D1Y0=; b=J6w5FxcI/ysQcBEKkHcpCR+nmv6AZUfmxxAVGtbsm8FGh+B6X/732h0+FpitSp0akd tDPEkW8pb2efO40ls3IsSpyzeJItFAoJAtbG9aRYZ218trSPnDx7RCRYA9bK5yr65jtu UTvs8rUiig06xRBAVxq3pDa39OyIcByBLMkEk1icZGUgtdVwclkcSWawYdzKrtAM4v5C BMBemPT8ou6dYgxW9/se3Br8qSuNFmY06e054X9cBDG+TPvGYJXtiQh2Nc9oCH1QQ+Vg iBxfkn4IbtQhY3s8fkpHeA+mAKBghGKdLHPTjjMJ+eOgnNSutBAw2UW/1LVvgLyUx0HC RkNQ== X-Received: by 10.194.115.199 with SMTP id jq7mr1455103wjb.82.1444225404075; Wed, 07 Oct 2015 06:43:24 -0700 (PDT) Received: from [172.16.1.30] (184.Red-88-8-140.dynamicIP.rima-tde.net. [88.8.140.184]) by smtp.gmail.com with ESMTPSA id he3sm39384842wjc.48.2015.10.07.06.43.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 06:43:23 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r288917 - in head/sys: amd64/amd64 amd64/include dev/xen/blkfront i386/i386 i386/include xen xen/interface xen/interface/arch-arm/hvm xen/interface/arch-x86 xen/interface/arch-x86/hvm x... To: John Baldwin References: <201510061129.t96BTjJ7038973@repo.freebsd.org> <7101921.fgLPs09qKP@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <5615217A.5050908@FreeBSD.org> Date: Wed, 7 Oct 2015 15:43:22 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <7101921.fgLPs09qKP@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 13:43:26 -0000 El 06/10/15 a les 20.14, John Baldwin ha escrit: > On Tuesday, October 06, 2015 11:29:45 AM Roger Pau Monné wrote: >> Author: royger >> Date: Tue Oct 6 11:29:44 2015 >> New Revision: 288917 >> URL: https://svnweb.freebsd.org/changeset/base/288917 >> >> Log: >> Update Xen headers from 4.2 to 4.6 >> >> Pull the latest headers for Xen which allow us to add support for ARM and >> use new features in FreeBSD. > > Should we be importing these into vendor-sys as vendor sources? AFAIK Xen headers have always been imported unmodified and directly, but I guess it makes sense to import them into vendor-sys even if we don't need to perform any adjustments. I will look at doing it for the next import. Roger. From owner-svn-src-all@freebsd.org Wed Oct 7 17:52:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62F849D15F7; Wed, 7 Oct 2015 17:52:19 +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 2CA6BDBD; Wed, 7 Oct 2015 17:52:19 +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 t97HqIQ1010003; Wed, 7 Oct 2015 17:52:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97HqIlq010002; Wed, 7 Oct 2015 17:52:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510071752.t97HqIlq010002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Oct 2015 17:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288993 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 17:52:19 -0000 Author: jhb Date: Wed Oct 7 17:52:18 2015 New Revision: 288993 URL: https://svnweb.freebsd.org/changeset/base/288993 Log: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo. Reviewed by: emaste, kib Differential Revision: https://reviews.freebsd.org/D3833 Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Wed Oct 7 13:19:44 2015 (r288992) +++ head/lib/libc/sys/ptrace.2 Wed Oct 7 17:52:18 2015 (r288993) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd July 3, 2015 +.Dd October 6, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -307,6 +307,8 @@ struct ptrace_lwpinfo { siginfo_t pl_siginfo; char pl_tdname[MAXCOMLEN + 1]; int pl_child_pid; + u_int pl_syscall_code; + u_int pl_syscall_narg; }; .Ed .Pp @@ -395,6 +397,27 @@ stop when .Dv PL_FLAG_FORKED is set in .Va pl_flags . +.It pl_syscall_code +The ABI-specific identifier of the current system call. +Note that for indirect system calls this field reports the indirected +system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. +.It pl_syscall_narg +The number of arguments passed to the current system call not counting +the system call identifier. +Note that for indirect system calls this field reports the arguments +passed to the indirected system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. .El .It PT_GETNUMLWPS This request returns the number of kernel threads associated with the From owner-svn-src-all@freebsd.org Wed Oct 7 18:02:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2A3A9D1BF8; Wed, 7 Oct 2015 18:02:31 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0110.outbound.protection.outlook.com [157.56.111.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9E0652; Wed, 7 Oct 2015 18:02:30 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from BY2PR05CA035.namprd05.prod.outlook.com (10.141.250.25) by BLUPR05MB053.namprd05.prod.outlook.com (10.255.210.139) with Microsoft SMTP Server (TLS) id 15.1.293.16; Wed, 7 Oct 2015 18:02:22 +0000 Received: from BN1BFFO11FD013.protection.gbl (2a01:111:f400:7c10::1:176) by BY2PR05CA035.outlook.office365.com (2a01:111:e400:2c5f::25) with Microsoft SMTP Server (TLS) id 15.1.286.20 via Frontend Transport; Wed, 7 Oct 2015 18:02:23 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BN1BFFO11FD013.mail.protection.outlook.com (10.58.144.76) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Wed, 7 Oct 2015 18:02:21 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 7 Oct 2015 11:02:06 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t97I25D37178; Wed, 7 Oct 2015 11:02:06 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id E2827580A9; Wed, 7 Oct 2015 11:02:05 -0700 (PDT) To: Bryan Drewery CC: , , , Subject: Re: svn commit: r288966 - head/share/mk In-Reply-To: <56146B4E.5040401@FreeBSD.org> References: <201510070032.t970WYvU099368@repo.freebsd.org> <56146B4E.5040401@FreeBSD.org> Comments: In-reply-to: Bryan Drewery message dated "Tue, 06 Oct 2015 17:46:06 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1896.1444240925.1@chaos> Date: Wed, 7 Oct 2015 11:02:05 -0700 Message-ID: <24053.1444240925@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD013; 1:kMEttnLhU6HNSZFd2OeMwBTnnGEbVVNkIrAN96deJK1RVikBhgdtEhbdTB8JKFC5zCO5EaAeIZpEK8r/5hQoPsZ+jIBWMPaWJt1XBMRgKdj03628hY6S2hEVVQRpfRwA5kGMkL13Q/IiVFLcLC3c5Arf30f/BrSwJCAFEalPp6VPe4VVNaL/zW4hWK01EdhyUeSbndqFLgSwJrGcGJaNKashX9aTnmkaYREUgiaoYqaQduipe9crBCUeD/5ybWGU34uc7jFG1Oq8SHlqczZbi/0IvOfZN3+P6tcKVgksWVdJMSgWsIZ/TqkoOdRjOgEGBisp7qI4w9hw/5HLy3UvxA== X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(199003)(189002)(24454002)(2950100001)(105596002)(19580405001)(77096005)(81156007)(97736004)(86362001)(189998001)(11100500001)(6806005)(46406003)(76506005)(57986006)(46102003)(23726002)(87936001)(47776003)(5008740100001)(64706001)(106466001)(450100001)(76176999)(50986999)(50466002)(19580395003)(50226001)(97756001)(110136002)(5001960100002)(558084003)(33716001)(5007970100001)(107886002)(92566002)(117636001)(69596002)(4001430100001)(62816006)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB053; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB053; 2:mQ+YZeuGCZLsd7NwguzjhXhd30d2OQNWxonYe3byDFVPpiifcOKQ50nMYiTlDCmA0aBHI1KImxecOb91BZgDO5dnsUftfozlrulxNoSd0puysy9fpFxzSik6zJBsQvWUxn5SwfwejryQc/y4LOEbvbtEmIurlspxLKpBM/Jezf0=; 3:3Gq65AK47utmtDgKTZgMo8JFTZQswkfBbX04FMFkMuAudGqXzITKqoKl8C4lnz6DnNZh7geY/mmp0QzQPPCoazIJjmwSJbZebXe9C+sSixUOhMCJeD6i09Dwyscj7WN4MceoyP4vGVur6VV1RSuDPR3wiI2uNL0FpgEG7HRjaTIk1pWhvlo5DcmZ7FDU0fVpxQ2lalJXEaOm00lQqD4GNZFxBJ/i9+MTW0WqyQOxTv4=; 25:xWrEOGC+UtIYc6TjLRysKL3/QGlkPvlyZDUpnT6FAKvG22VLZmx06OLM8HVJT/+qVt24cKzUERAoaaIrBnfBRrMOimoEz2+d6Fl9WqiUHK6R3vWDmvWtOoBcYuN0v9v4INB+xvXOxSiNaC5UBQNOzCfSegCr+4ludv/iLkHLd7Ob7iuy1Pv38lAZdHmFpr3K87QDvx3YUxyCVw9bFHvk/7v4EZWwtN4Z7SBDseFOBDCZroioyXc6Ki6UJcByBVGF2miasJ6ONCC/8RYnsxvXFA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB053; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB053; 20:XtdqljVxwYTfafR0s0gyg+cyvYwniGeAXyh483NclsWBMWGnNXJpfAOOshIMvdwEHTeEtlawNO/bXZ8XC+8UF43NM4D4GWhdnepHFdE+R11s+OvO9J7Ut/Z9o04k02Vr0JMv/LjNlIO2rklNv3Asul+SL+P4102lUu8567LtyktdnEv4sXU/sYSiTcBCL2+zalB1S7wyQdAhvp6VhTtrTXAZK8BPeCpQl4/MRUgv0snRh7AlIFitc7L8EBiJ8aZzR16YDEl7/BG85ideBx2QsERAoKnUKGO8ga1Z+lCwD38up1I5W6xNcLLVQlQVUI9qJ8cqltQFBK5u+EogchqfM8wCPieyNVcJZ2lrghbgFy6PRZ9wGcBWILC22TbdS6cStil0mdrrgmVUrjVrFUoS0wS+HYMuO7cHw1dHcjjhagqxJuX4GlKildr5nJhOkBemnR9mg6StPVvvM5LuoYroDk4XMIr2Eu6QRDbQ5Ti0lGFCYPW/dcAmxtxrrgwI6uXY; 4:9fzhXKr42Irz1xuO0EfPscOEK5dCn2LRCITQXeEOq/yZJWS7FjIzxMHExdANYOyrEj2Jcw84TBZAQgr7QBuzNfMtamx2hamVaCQSWy4wm/D9Cq2pY5/bNjUDWxBR8CieAMhGlOwGjL3ozkToUSnm50Jpvo8uAhmryi+Qs4s6QrIuKQylbP+q/sWOiIkrAuGmrLrhx0bOSypmn4ZFLzJAA8E50MkewwMHBIu9iS4PLgSDjktbZNyr08y0sdBBi+KC5RCMYbsOS4XHLfqmc2Ox1gj6uqZB9mx0X1hsMhhL1BVqDEcF+aEsSsybZsVAdEgcR57AOw1OkiCEaAh0zDRJpoDOLGSbeN/+g5gXotrVACw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001); SRVR:BLUPR05MB053; BCL:0; PCL:0; RULEID:; SRVR:BLUPR05MB053; X-Forefront-PRVS: 0722981D2A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR05MB053; 23:01+CvYbDskdglhH9YZiZPp/UEaHfsCBouEsnukMhO6?= =?us-ascii?Q?jOgFpdVVCQummI1c+L7kQj6L49aY/3JRLJleF+qWBy1MkyUsWZgiW9WVw1QF?= =?us-ascii?Q?ptQxOSn3NhDJVcnVSdEhq1tJLIhZiSlNClU3h/7nY+EizCwqE4Y4lHEG+75G?= =?us-ascii?Q?0csBgxlyG4FCgrAIvEikNHvtcYuxysilgEWftuhCjfcO2DYOye58epR2LFx6?= =?us-ascii?Q?XGUr66jbHClh2LKIBVNLKzrvLDgExvppnp9L+3ehLb9WsqN+6XP2LJCtxpzv?= =?us-ascii?Q?WhcBUNuNtd945qxvxo2zoTkWx1sOdeF3LCb2KaWZ1JWKPVVRoAohyEvO4xyh?= =?us-ascii?Q?EhSLsWplmLnYU387QGXkok8Od1qGi+uE/mRpM1oyPGnhcg0daqEjC/f/3Cf4?= =?us-ascii?Q?uwsooW6WT93ZLH/RSw471ROctQElyVQGoShFJ4NIbyqWWfVnUB5j3ek+y+aq?= =?us-ascii?Q?t8J4wwAUd/x32RJi+GHn2srhX6W+CrImKWhQlstmbP741TZp9N3ga1E6zBZ0?= =?us-ascii?Q?zprNztiDkxdF8bzRfnuiawsh+I3ohPW384jYMQVOCrLmZyflMKybfWOL3L0a?= =?us-ascii?Q?633/o7Xz+YFhj/zo9LBJquCzaiNnyNgTVw8Vq9A1BSonJ2wPvlAko2U8TUXI?= =?us-ascii?Q?QgBR0fCkvA1liKkcCHZ8zYplAfBXp75CB5/1lcw/Qi95+xPkLNwTRhc0Mtfu?= =?us-ascii?Q?rb5n3Ib/V6ias+dlXhEvQSavot49HyqJ5m19pr1hfNJKbnPjwYxwiMZ16DZa?= =?us-ascii?Q?1oe4FZS+k6TsfkNVmoTSfACTOFF9Zb95+CLkN6jL44TSnCIkYpjSj7oZn2zu?= =?us-ascii?Q?5XhSFpj4BrvHtEowmOA6ivnRmzCS7ljoHi+OxxnQqTzzAu4/auKYW5Lt1aMW?= =?us-ascii?Q?K6O1HTG8skxhP1X3Eqpmv7P1tYH/0JOTh97hs3WnZbajWzDQVtPX6Ixyax+N?= =?us-ascii?Q?HsMz3PQnhRFu9oGFWkHHTXMcsSYAVQ46JEdVcPCeR+C5tkF2E0lI4vCEK4TR?= =?us-ascii?Q?ZVeZdEWsgjhZq+b4ZxdeNafUa7sby8iGmArCTU300NkpGnWO6JlvLYshLehJ?= =?us-ascii?Q?kaRat7AAc+JbNHodoB3Kecmm0H7+qQL6JVRwCy2f3b6KT7GaLmDQKorey+HE?= =?us-ascii?Q?iDCBENg5mtkaKxXPwPWntCOOXa0iU96HuTWZ/vM+RFLcOP/7YBXqih3MH5rE?= =?us-ascii?Q?nOwGqSljGAgu0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB053; 5:rCxIFxHzQzeMstdQYw0HjNr1fjxfN/2U7J5uw4pAmQvX7ASwJx2D0uMLqne5g22hoaP4IqYpbDaStRZ48i+eHvM65mKir4AuAtu3iQ6ovR+Us73kgyA7BdkQxd4sPTdnZGMY2EF4JvFpGKXYB//MCQ==; 24:ceof8feNt8MPdptH9QRzmWQhYYV3+48+GQaBV/nscZu84CUY25cyunog6zTrjANDQadx+YGSMo7GltzHR3YJIv3Yg4wAoxwDSNi29HBnZB0=; 20:V+6Ql2UQh+rRbP0lJ26yA5yyG1NsRbTzaOB68rG7FGhMmdE1iUQhcnMoRi5y+VbeHN5n/y/CpTRqceMluIOVdQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2015 18:02:21.5591 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB053 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 18:02:31 -0000 Bryan Drewery wrote: > > +.for h in ${SRCS:M*.h} > > I think we can use DPSRCS as well for this. Not sure. usr.bin/truss/Makefile didn't use that. I only see it set in bsd.dep.mk - which we don't use in meta mode. From owner-svn-src-all@freebsd.org Wed Oct 7 18:09:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D44D49D011F; Wed, 7 Oct 2015 18:09:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id BC9B6F3F; Wed, 7 Oct 2015 18:09:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B629416D5; Wed, 7 Oct 2015 18:09:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5D81915967; Wed, 7 Oct 2015 18:09:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id YNJWFs0E2jYJ; Wed, 7 Oct 2015 18:09:38 +0000 (UTC) Subject: Re: svn commit: r288966 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com ED18D15960 To: "Simon J. Gerraty" References: <201510070032.t970WYvU099368@repo.freebsd.org> <56146B4E.5040401@FreeBSD.org> <24053.1444240925@chaos> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56155FE0.7020809@FreeBSD.org> Date: Wed, 7 Oct 2015 11:09:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <24053.1444240925@chaos> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tuqMh49h3Uw1S5gekSqFk9vJkWw7u80oh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 18:09:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tuqMh49h3Uw1S5gekSqFk9vJkWw7u80oh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/7/2015 11:02 AM, Simon J. Gerraty wrote: > Bryan Drewery wrote: >>> +.for h in ${SRCS:M*.h} >> >> I think we can use DPSRCS as well for this. >=20 > Not sure. > usr.bin/truss/Makefile didn't use that. > I only see it set in bsd.dep.mk - which we don't use in meta mode. >=20 I'm less thinking about the usage in bsd.dep.mk and more these that manually set it: gnu/lib/libreadline/readline/Makefile:DPSRCS+=3D ${INSTALLED_HEADERS} lib/libc/tests/rpc/Makefile:DPSRCS+=3D h_testbits.h sbin/ipf/ipf/Makefile:DPSRCS+=3D ${GENHDRS} sbin/ipf/ipftest/Makefile:DPSRCS+=3D ${GENHDRS} sbin/ipf/ipmon/Makefile:DPSRCS+=3D ${GENHDRS} sbin/ipf/ipnat/Makefile:DPSRCS+=3D ${GENHDRS} sbin/ipf/ippool/Makefile:DPSRCS+=3D ${GENHDRS} sys/modules/linux/Makefile:DPSRCS=3D linux${SFX}_genassym.c sys/modules/linux64/Makefile:DPSRCS=3D linux_genassym.c sys/modules/vmm/Makefile:DPSRCS=3D vmx_genassym.c svm_genassym.c usr.bin/kdump/Makefile:DPSRCS=3D kdump_subr.h usr.bin/netstat/Makefile:DPSRCS=3D nl_defs.h usr.bin/svn/svn/Makefile:DPSRCS+=3D freebsd-organization.h I ran into at least one case, I think usr.bin/netstat, where the file in DPSRCS was missing and Makefile.depend had to learn how to build it before it would work. I can test more to see if adding it has any effect. --=20 Regards, Bryan Drewery --tuqMh49h3Uw1S5gekSqFk9vJkWw7u80oh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFV/gAAoJEDXXcbtuRpfPIa4IAKM8fk5RLmDsCSl2PAwdBTPf ejHx63qh4OckWRB+gItp6KRqpOyAZZasKL3Vn1MZgBrNcDHgXEyLWVSQShlUjLnK 6r/gNQcRZIOJWYTOuaS1NbrHMJ1/4lNh3jyRnMyRh303gpGSW0tFo8fwBkd16SKs ikzaQu5/D1fFBLMKbOVUwub30isPxc7tDY1EvGUeMsVm+R/4uU/qj29hiP/sPnzN qTC/rGTM3erokWLEuRb7cOoczGW3Qy4oK2Z5I84Jkp5YJPoitWmAjX7sukUbK5FC iiq3/7QW0CBHrjgS5O0hfdBTftB4XxhdPjOMKLAd4hpr5FEzyNJKXvLxZP851EA= =rLjZ -----END PGP SIGNATURE----- --tuqMh49h3Uw1S5gekSqFk9vJkWw7u80oh-- From owner-svn-src-all@freebsd.org Wed Oct 7 19:10:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 598699D0A99; Wed, 7 Oct 2015 19:10:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0535B24F; Wed, 7 Oct 2015 19:10:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97JAdww031678; Wed, 7 Oct 2015 19:10:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97JAdWM031677; Wed, 7 Oct 2015 19:10:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510071910.t97JAdWM031677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 7 Oct 2015 19:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288994 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 19:10:40 -0000 Author: bdrewery Date: Wed Oct 7 19:10:38 2015 New Revision: 288994 URL: https://svnweb.freebsd.org/changeset/base/288994 Log: Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers. r161611 added some of the code from sys_vfork() directly into the Linux module wrappers since they use RFSTOPPED. In r232240, the RFFPWAIT handling was moved to syscallret(), thus this code in the Linux module is no longer needed as it will be called later. This also allows the Linux wrappers to benefit from the fix in r275616 for threads not getting suspended if their vforked child is stopped while they wait on them. Reviewed by: jhb, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3828 Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Wed Oct 7 17:52:18 2015 (r288993) +++ head/sys/compat/linux/linux_fork.c Wed Oct 7 19:10:38 2015 (r288994) @@ -106,20 +106,14 @@ linux_vfork(struct thread *td, struct li printf(ARGS(vfork, "")); #endif - /* Exclude RFPPWAIT */ - if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2, - NULL, 0, NULL)) != 0) + if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED, + 0, &p2, NULL, 0, NULL)) != 0) return (error); - td2 = FIRST_THREAD_IN_PROC(p2); linux_proc_init(td, td2, 0); - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - td->td_retval[0] = p2->p_pid; /* @@ -130,12 +124,6 @@ linux_vfork(struct thread *td, struct li sched_add(td2, SRQ_BORING); thread_unlock(td2); - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - return (0); } @@ -179,6 +167,9 @@ linux_clone_proc(struct thread *td, stru if (args->parent_tidptr == NULL) return (EINVAL); + if (args->flags & LINUX_CLONE_VFORK) + ff |= RFPPWAIT; + error = fork1(td, ff, 0, &p2, NULL, 0, NULL); if (error) return (error); @@ -228,12 +219,6 @@ linux_clone_proc(struct thread *td, stru exit_signal); #endif - if (args->flags & LINUX_CLONE_VFORK) { - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - } - /* * Make this runnable after we are finished with it. */ @@ -244,14 +229,6 @@ linux_clone_proc(struct thread *td, stru td->td_retval[0] = p2->p_pid; - if (args->flags & LINUX_CLONE_VFORK) { - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - } - return (0); } From owner-svn-src-all@freebsd.org Wed Oct 7 19:55:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E38FC9D0BD1; Wed, 7 Oct 2015 19:55:59 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADFC3207; Wed, 7 Oct 2015 19:55:59 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97Jtwvi046283; Wed, 7 Oct 2015 19:55:58 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97JtwMt046281; Wed, 7 Oct 2015 19:55:58 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201510071955.t97JtwMt046281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 7 Oct 2015 19:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288995 - head/lib/libc/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 19:56:00 -0000 Author: rodrigc Date: Wed Oct 7 19:55:58 2015 New Revision: 288995 URL: https://svnweb.freebsd.org/changeset/base/288995 Log: Use proper function prototypes. Eliminates -Wstrict-prototypes warning Modified: head/lib/libc/rpc/getpublickey.c head/lib/libc/rpc/key_call.c Modified: head/lib/libc/rpc/getpublickey.c ============================================================================== --- head/lib/libc/rpc/getpublickey.c Wed Oct 7 19:10:38 2015 (r288994) +++ head/lib/libc/rpc/getpublickey.c Wed Oct 7 19:55:58 2015 (r288995) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); /* * Hack to let ypserv/rpc.nisd use AUTH_DES. */ -int (*__getpublickey_LOCAL)() = 0; +int (*__getpublickey_LOCAL)(const char *, char *) = 0; /* * Get somebody's public key Modified: head/lib/libc/rpc/key_call.c ============================================================================== --- head/lib/libc/rpc/key_call.c Wed Oct 7 19:10:38 2015 (r288994) +++ head/lib/libc/rpc/key_call.c Wed Oct 7 19:55:58 2015 (r288995) @@ -81,9 +81,9 @@ __FBSDID("$FreeBSD$"); * implementations of these functions, and to call those in key_call(). */ -cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0; -cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0; -des_block *(*__key_gendes_LOCAL)() = 0; +cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, void *arg) = 0; +cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, void *arg) = 0; +des_block *(*__key_gendes_LOCAL)(uid_t, void *) = 0; static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *); From owner-svn-src-all@freebsd.org Wed Oct 7 20:04:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF1909D11A7; Wed, 7 Oct 2015 20:04:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8588CB73; Wed, 7 Oct 2015 20:04:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t97K4WaK049227; Wed, 7 Oct 2015 20:04:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t97K4Wvc049226; Wed, 7 Oct 2015 20:04:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510072004.t97K4Wvc049226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Oct 2015 20:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288996 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 20:04:33 -0000 Author: gjb Date: Wed Oct 7 20:04:32 2015 New Revision: 288996 URL: https://svnweb.freebsd.org/changeset/base/288996 Log: Correct the command-line utility in the r285420 entry: s/jail/jexec/ Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 19:55:58 2015 (r288995) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Oct 7 20:04:32 2015 (r288996) @@ -403,10 +403,10 @@ The &man.quota.1; utility has been updated to include support for IPv6. - The &man.jail.8; utility has been + The &man.jexec.8; utility has been updated to include a new flag, -l, which ensures a clean environment in the target jail when used. - Additionally, &man.jail.8; will run a shell within the target + Additionally, &man.jexec.8; will run a shell within the target jail when run no commands are specified. The &man.w.1; utility has been updated From owner-svn-src-all@freebsd.org Wed Oct 7 22:02:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 970A89D1C68; Wed, 7 Oct 2015 22:02:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2192483D; Wed, 7 Oct 2015 22:02:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdg206 with SMTP id g206so32046182ykd.1; Wed, 07 Oct 2015 15:02:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=IdSJk66yo76mTN8lxEODuW7cwfEnqw1oIwtzaqgNXuA=; b=D/5pzDcWfE1UIWM1sM+B5ZGGrsv9N0M4+zheoRGftRLqOUbajb45G+dI/NbuusInUU UyyMhZN+cH2h6TA0lVre1qsCR18pZuvhWX7v0DsHBK88QHmZEEAWRyxdrA7AgV7+ILjc pBev93AFjNYsxSgcgmeTKMixE/AAfyHY0k4r07KxEHSbFLkcJbEvleFG0ADzfNDe+KzC ZCbPJ4eUd96VAoq+cr4xRO6OHvthux/35PRX1mql+k9LX2KaF6b3d9bQH8rBCkNtGDTZ jO/bQGMWUn3cWivAKV9Olq5wr/VrYmeR22dagqQPj2pmtcqN+QA0pA0MZWNYpZ6QO0h4 iapw== X-Received: by 10.129.51.23 with SMTP id z23mr2918399ywz.198.1444254963131; Wed, 07 Oct 2015 14:56:03 -0700 (PDT) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id w184sm14733285ywe.50.2015.10.07.14.56.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 14:56:03 -0700 (PDT) Received: by ykdz138 with SMTP id z138so31925777ykd.2; Wed, 07 Oct 2015 14:56:02 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.159.194 with SMTP id w185mr2911294ywg.272.1444254962681; Wed, 07 Oct 2015 14:56:02 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Wed, 7 Oct 2015 14:56:02 -0700 (PDT) In-Reply-To: <201510070928.t979SsMQ057994@repo.freebsd.org> References: <201510070928.t979SsMQ057994@repo.freebsd.org> Date: Wed, 7 Oct 2015 14:56:02 -0700 Message-ID: Subject: Re: svn commit: r288984 - head/sbin/sysctl From: Conrad Meyer To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:02:52 -0000 On Wed, Oct 7, 2015 at 2:28 AM, Baptiste Daroussin wrote: > --- head/sbin/sysctl/sysctl.c Wed Oct 7 09:12:49 2015 (r288983) > +++ head/sbin/sysctl/sysctl.c Wed Oct 7 09:28:54 2015 (r288984) > @@ -276,7 +276,11 @@ parse(const char *string, int lineno) > if (qflag) > return (1); > else { > - warn("unknown oid '%s'%s", bufp, line); > + if (errno == ENOENT) { > + warnx("unknown oid '%s'%s", bufp, line); > + } else { > + warn("unknown oid '%s'%s", bufp, line); Is "unknown oid" an appropriate warning for errno != ENOENT? > + } > return (1); > } > } > Best, Conrad From owner-svn-src-all@freebsd.org Wed Oct 7 22:35:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5D0C9D13F7; Wed, 7 Oct 2015 22:35:38 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 770C590D; Wed, 7 Oct 2015 22:35:38 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicfx3 with SMTP id fx3so3903919wic.1; Wed, 07 Oct 2015 15:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=j02LJDP28xVqqDQONrvusuWpue8D5HxLvtGjb61RNd0=; b=pYceH96c6r80JBxc/MLKImRVlNjBlBSIbhLa7fUZJoINsQYKK1tZZJv/CXGMQjnuMX HXsRhj8TdmjPKFs6/zPIhbb10yjTA+xBTMa3KSi1P5ixYyllxN0gmF2n0P3dHPLxykG3 DrvyWKSBB/YdgSWS31+GZhxVxDV7hrHIQCdzsGZ2oDLBvN6wNdGRcylp4YWKJl9zFN4a VHftHY1pvNFsr/TQrxs3Lsc176wOM9n3qqP0lJyEAX23lyBzvMyiyJ/DKELRnVx3xgUT CK1tmTTGQOCPNRUAdObDzPSe5Xr/oWJNjKeO55v6BsiBO3G0Kbbljyt7SXCp4WHfZRd4 5TGA== X-Received: by 10.180.102.195 with SMTP id fq3mr118713wib.7.1444257336038; Wed, 07 Oct 2015 15:35:36 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id s1sm4448631wik.16.2015.10.07.15.35.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 15:35:35 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 8 Oct 2015 00:35:33 +0200 From: Baptiste Daroussin To: Conrad Meyer Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r288984 - head/sbin/sysctl Message-ID: <20151007223533.GF91729@ivaldir.etoilebsd.net> References: <201510070928.t979SsMQ057994@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L2Brqb15TUChFOBK" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:35:39 -0000 --L2Brqb15TUChFOBK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 07, 2015 at 02:56:02PM -0700, Conrad Meyer wrote: > On Wed, Oct 7, 2015 at 2:28 AM, Baptiste Daroussin wro= te: > > --- head/sbin/sysctl/sysctl.c Wed Oct 7 09:12:49 2015 (r28898= 3) > > +++ head/sbin/sysctl/sysctl.c Wed Oct 7 09:28:54 2015 (r28898= 4) > > @@ -276,7 +276,11 @@ parse(const char *string, int lineno) > > if (qflag) > > return (1); > > else { > > - warn("unknown oid '%s'%s", bufp, line); > > + if (errno =3D=3D ENOENT) { > > + warnx("unknown oid '%s'%s", bufp, line); > > + } else { > > + warn("unknown oid '%s'%s", bufp, line); >=20 > Is "unknown oid" an appropriate warning for errno !=3D ENOENT? I do not think it is, but I couldn't find a way to reproduce another case t= han ENOENT, so I thought maybe the best would be to keep the current behaviour = for other cases :) Best regards, Bapt --L2Brqb15TUChFOBK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYVnjUACgkQ8kTtMUmk6ExvPgCgqRAfz3BxreD1eoS2QFdWfklV 3BQAnjRos9wGMxd6ou/yGjghNw5EJIIg =lSMh -----END PGP SIGNATURE----- --L2Brqb15TUChFOBK-- From owner-svn-src-all@freebsd.org Wed Oct 7 22:41:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BEBF9D18C8; Wed, 7 Oct 2015 22:41:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09605D52; Wed, 7 Oct 2015 22:41:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkas79 with SMTP id s79so12141025qka.0; Wed, 07 Oct 2015 15:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DEOMcVm7q2JxL0KVJtHLMafL3ovSGi77jev0uq0ewZc=; b=qxWQzfyCqwd6fxkGmy4r9llbbzZR8Pu4Y+EopH0eyatAxiFPJrGk3go0FVIX0QZ6n8 lbkM5Tu8Uk7wNnD9hjMtm9F7Qw5frZlUVv/X29zYfaQWbTw8sXexTYVbB1iSm8JTzdI9 esLj8WvO8aH7fDpAXGcvCd4z62cJ04IpBibTmwK7Yxkjb6mlAcCoZVxoZxVrN8hBtd7e UmTazj29A1PNECV7Ci3VuC2JLwH82nsF44AFGPaZn+FVFI3Uv0dFFFyP9tOsi1944SxO vSyVaBO6RTB1jfile1KsaHWTZcJmQBsBPrfyLOBmel+sxo1YfGWG2QCEhybCW983tR0n x3Eg== MIME-Version: 1.0 X-Received: by 10.55.221.65 with SMTP id n62mr4518385qki.42.1444257713014; Wed, 07 Oct 2015 15:41:53 -0700 (PDT) Received: by 10.140.94.44 with HTTP; Wed, 7 Oct 2015 15:41:52 -0700 (PDT) In-Reply-To: <20151007223533.GF91729@ivaldir.etoilebsd.net> References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> Date: Wed, 7 Oct 2015 15:41:52 -0700 Message-ID: Subject: Re: svn commit: r288984 - head/sbin/sysctl From: NGie Cooper To: Baptiste Daroussin Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:41:54 -0000 On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin wrote: ... > I do not think it is, but I couldn't find a way to reproduce another case than > ENOENT, so I thought maybe the best would be to keep the current behaviour for > other cases :) Can't hit ENOTDIR: # sysctl kern=ireallyshouldnotbedoingthis sysctl: oid 'kern' isn't a leaf node Can't hit EPERM: # sysctl kern.boottime=1000 sysctl: oid 'kern.boottime' is read only Not sure how to hit EINVAL, other than maybe try and read a sysctl that dynamically populates itself (this might trigger ENOMEM errors though): # sysctl kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda=1000 sysctl: unknown oid 'kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda': No such file or directory FWIW I think Conrad's right though about fixing the message to be more meaningful in the errno != ENOENT case though. Thanks! -NGie From owner-svn-src-all@freebsd.org Wed Oct 7 22:45:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E89499D1A70; Wed, 7 Oct 2015 22:45:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id CB124F18; Wed, 7 Oct 2015 22:45:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C40821620; Wed, 7 Oct 2015 22:45:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5C2AE1508B; Wed, 7 Oct 2015 22:45:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id GFbqTP8whPtO; Wed, 7 Oct 2015 22:45:11 +0000 (UTC) Subject: Re: svn commit: r288984 - head/sbin/sysctl DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3543A15086 To: NGie Cooper , Baptiste Daroussin References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5615A076.9010403@FreeBSD.org> Date: Wed, 7 Oct 2015 15:45:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BxuM2UdJHdL1wsTCVbLBgfSlo8C8ED4lH" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:45:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BxuM2UdJHdL1wsTCVbLBgfSlo8C8ED4lH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/7/2015 3:41 PM, NGie Cooper wrote: > On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin w= rote: > ... >> I do not think it is, but I couldn't find a way to reproduce another c= ase than >> ENOENT, so I thought maybe the best would be to keep the current behav= iour for >> other cases :) >=20 Here's the relevant code: sys/kern/kern_sysctl.c:SYSCTL_PROC(_sysctl, 3, name2oid =2E.. static SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_next, ""); static int name2oid(char *name, int *oid, int *len, struct sysctl_oid **oidpp) { struct sysctl_oid *oidp; struct sysctl_oid_list *lsp =3D &sysctl__children; char *p; SYSCTL_ASSERT_LOCKED(); for (*len =3D 0; *len < CTL_MAXNAME;) { p =3D strsep(&name, "."); oidp =3D SLIST_FIRST(lsp); for (;; oidp =3D SLIST_NEXT(oidp, oid_link)) { if (oidp =3D=3D NULL) return (ENOENT); if (strcmp(p, oidp->oid_name) =3D=3D 0) break; } *oid++ =3D oidp->oid_number; (*len)++; if (name =3D=3D NULL || *name =3D=3D '\0') { if (oidpp) *oidpp =3D oidp; return (0); } if ((oidp->oid_kind & CTLTYPE) !=3D CTLTYPE_NODE) break; if (oidp->oid_handler) break; lsp =3D SYSCTL_CHILDREN(oidp); } return (ENOENT); } It can only return 0 or ENOENT. --=20 Regards, Bryan Drewery --BxuM2UdJHdL1wsTCVbLBgfSlo8C8ED4lH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFaB2AAoJEDXXcbtuRpfP0cUIAJBG1opVCr9WWRp2kEbOecUa vUj32Fm40Sq8N3L7M4T8k10z6jxGCjrXO+2C5Lilr963hxec8k4EGZwt0ek1udWf Lv7gxigbvpL0SX9WGTCNUpj47cXR+B5s7AJm2R6Fa1v5UxCOI+Z1NPpQ+YSDqMtk vnRjVlHf9Vwg11Z+jI9zgKn8Ylahot6xtXC4FL71MXNqz4BitEQc0TbKv0Itf4+r QORs+9PdDccjBSKfe47b9WztCWxD3nu1G/HvWM+2k/oZeN3101zb1DlrlCRXueVi JY2RuEve4dVknsC0JaL6DX8U0ICCkUD/fL10vWby5jpCRFHE66r8cuWN9bVxdsY= =2FhS -----END PGP SIGNATURE----- --BxuM2UdJHdL1wsTCVbLBgfSlo8C8ED4lH-- From owner-svn-src-all@freebsd.org Wed Oct 7 22:45:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B7529D1AA4 for ; Wed, 7 Oct 2015 22:45:21 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84D9CFC5 for ; Wed, 7 Oct 2015 22:45:20 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by wicfx3 with SMTP id fx3so1059240wic.0 for ; Wed, 07 Oct 2015 15:45:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=ZbxlPX6G6JvcjXRlhkZp1Xrfqyj35GmDQCJva401pXw=; b=Q49w034AdT1GYHKlzzT93WM8iymE7OrEngYH1ogd7pOsatuSFMjziuOgJnqPyiIFs3 FMthT53L7dQfCslYQkBj7OGpYkUP9IKri5VgvY82drSRfiWPd4AoNv2MAvFPOAM65nIO OCQbqerNJyzw3kk8AGeIEpjelL0ZeVLa+z803396MSvDHwgfpgyhXbDlbWkMVrMq++rd c9ZSv+9+5JYuN1zUc1n6z8DgKmqy/gqU+MEDnsH8cB9bZdSE+FkiBq5LC38PmbqayQrU chKBAvnbnaIgWLqU0DZSAlv8xUT4AhYkKZ9/fGXzoqcT9ZVKxWtX7AlFCLEIngreOBoJ lLYA== X-Gm-Message-State: ALoCoQkLo+qORsHbCYhENnSwdKTxaIziFSA8+RQMG/0XY3hqABw1zooqAJxJyZA5pfMCSbo7ZJkD X-Received: by 10.180.74.175 with SMTP id u15mr151169wiv.66.1444257913187; Wed, 07 Oct 2015 15:45:13 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id bv2sm42073379wjc.11.2015.10.07.15.45.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Oct 2015 15:45:11 -0700 (PDT) Subject: Re: svn commit: r288984 - head/sbin/sysctl To: NGie Cooper , Baptiste Daroussin References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Steven Hartland Message-ID: <5615A071.60203@multiplay.co.uk> Date: Wed, 7 Oct 2015 23:45:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:45:21 -0000 On 07/10/2015 23:41, NGie Cooper wrote: > On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin wrote: > ... >> I do not think it is, but I couldn't find a way to reproduce another case than >> ENOENT, so I thought maybe the best would be to keep the current behaviour for >> other cases :) > Can't hit ENOTDIR: > > # sysctl kern=ireallyshouldnotbedoingthis > sysctl: oid 'kern' isn't a leaf node > > Can't hit EPERM: > > # sysctl kern.boottime=1000 > sysctl: oid 'kern.boottime' is read only > > Not sure how to hit EINVAL, other than maybe try and read a sysctl > that dynamically populates itself (this might trigger ENOMEM errors > though): Assign a valid which a sysctl func rejects? > # sysctl kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda=1000 > sysctl: unknown oid > 'kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda': No such file > or directory > > FWIW I think Conrad's right though about fixing the message to be more > meaningful in the errno != ENOENT case though. From owner-svn-src-all@freebsd.org Wed Oct 7 22:52:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4449D00C0; Wed, 7 Oct 2015 22:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E490A0E; Wed, 7 Oct 2015 22:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so4318407wic.0; Wed, 07 Oct 2015 15:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=RlRkIIKAEZkO12mIaaFMK6brmsqUd9cepnKAQOcaEVk=; b=K82bLFxPihmT3OPVNhc79dIVx0c8tZL+HJPMA9O07QK9UKCMGE9F0bQoR1noT8neXP TfS74dyuyl5jaOUors8YpmcyCZKPALqzj8iAo/EHaZL8DDywdUbGktsrfV4HrcAU3IUT PfamHkkuvFjLusp0+vSvJDWV+i/0Z/wlrIe15c8kxe9eJWl7qBr1/ZGbyHJKkZtFqERs cWl1pMtzHnV63pCRI1L7YcuYZQSdYQEKiSisJ6p613HaPUX7JjqvOOIfoA0zlAYb47de RE1hceONXEZRB2BDGgBINStfXKLCxEuByY8uMf+4zsMWY4v0uGm07f5egfxLH4dklfe6 /vog== X-Received: by 10.180.223.102 with SMTP id qt6mr162654wic.11.1444258330040; Wed, 07 Oct 2015 15:52:10 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id hd7sm4491151wib.23.2015.10.07.15.52.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 15:52:09 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 8 Oct 2015 00:52:07 +0200 From: Baptiste Daroussin To: NGie Cooper Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Conrad Meyer Subject: Re: svn commit: r288984 - head/sbin/sysctl Message-ID: <20151007225207.GG91729@ivaldir.etoilebsd.net> References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="reI/iBAAp9kzkmX4" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:52:12 -0000 --reI/iBAAp9kzkmX4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 07, 2015 at 03:41:52PM -0700, NGie Cooper wrote: > On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin wro= te: > ... > > I do not think it is, but I couldn't find a way to reproduce another ca= se than > > ENOENT, so I thought maybe the best would be to keep the current behavi= our for > > other cases :) >=20 > Can't hit ENOTDIR: >=20 > # sysctl kern=3Direallyshouldnotbedoingthis > sysctl: oid 'kern' isn't a leaf node And this is handle by sysctl(8) and never hit the code I modified >=20 > Can't hit EPERM: >=20 > # sysctl kern.boottime=3D1000 > sysctl: oid 'kern.boottime' is read only Same >=20 > Not sure how to hit EINVAL, other than maybe try and read a sysctl > that dynamically populates itself (this might trigger ENOMEM errors > though): >=20 > # sysctl kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda=3D1000 > sysctl: unknown oid > 'kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda': No such file > or directory This is the one I fixed >=20 > FWIW I think Conrad's right though about fixing the message to be more > meaningful in the errno !=3D ENOENT case though. So you haven't hit any other case for the code I have modified. Bapt --reI/iBAAp9kzkmX4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYVohcACgkQ8kTtMUmk6Ew70ACgwfncW2+vSmxZnLvB+frqj3Ze BPwAoID9I0a9byDu8uSfLk3zms1ZOZOq =qPxd -----END PGP SIGNATURE----- --reI/iBAAp9kzkmX4-- From owner-svn-src-all@freebsd.org Thu Oct 8 00:31:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE069D0EFA; Thu, 8 Oct 2015 00:31:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF8723A0; Thu, 8 Oct 2015 00:31:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t980VBMS028227; Thu, 8 Oct 2015 00:31:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t980VBH9028226; Thu, 8 Oct 2015 00:31:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510080031.t980VBH9028226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 00:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288997 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 00:31:13 -0000 Author: bdrewery Date: Thu Oct 8 00:31:11 2015 New Revision: 288997 URL: https://svnweb.freebsd.org/changeset/base/288997 Log: Correct a comment. Modified: head/usr.bin/truss/truss.h Modified: head/usr.bin/truss/truss.h ============================================================================== --- head/usr.bin/truss/truss.h Wed Oct 7 20:04:32 2015 (r288996) +++ head/usr.bin/truss/truss.h Thu Oct 8 00:31:11 2015 (r288997) @@ -51,7 +51,7 @@ struct procabi { /* * This is confusingly named. It holds per-thread state about the - * currently executing system call. syscalls.h defines a struct + * currently executing system call. syscall.h defines a struct * syscall that holds metadata used to format system call arguments. * * NB: args[] stores the raw argument values (e.g. from registers) From owner-svn-src-all@freebsd.org Thu Oct 8 00:48:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD3A29D1B43; Thu, 8 Oct 2015 00:48:30 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A54F515D; Thu, 8 Oct 2015 00:48:30 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t980mTWa031996; Thu, 8 Oct 2015 00:48:29 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t980mT03031995; Thu, 8 Oct 2015 00:48:29 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201510080048.t980mT03031995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 8 Oct 2015 00:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288998 - head/lib/clang/libclangbasic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 00:48:31 -0000 Author: rodrigc Date: Thu Oct 8 00:48:29 2015 New Revision: 288998 URL: https://svnweb.freebsd.org/changeset/base/288998 Log: Use -fpermissive if compiling with GCC. Works around GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67888 when compiling Module.cpp Modified: head/lib/clang/libclangbasic/Makefile Modified: head/lib/clang/libclangbasic/Makefile ============================================================================== --- head/lib/clang/libclangbasic/Makefile Thu Oct 8 00:31:11 2015 (r288997) +++ head/lib/clang/libclangbasic/Makefile Thu Oct 8 00:48:29 2015 (r288998) @@ -47,3 +47,6 @@ TGHDRS= AttrHasAttributeImpl \ arm_neon .include "../clang.lib.mk" + +# XX: work around GCC bug 67888 +CFLAGS.gcc += -fpermissive From owner-svn-src-all@freebsd.org Thu Oct 8 00:52:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30DFE9D1F8A; Thu, 8 Oct 2015 00:52:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E474E833; Thu, 8 Oct 2015 00:52:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t980qgFI034704; Thu, 8 Oct 2015 00:52:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t980qf7P034702; Thu, 8 Oct 2015 00:52:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080052.t980qf7P034702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 00:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288999 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 00:52:43 -0000 Author: adrian Date: Thu Oct 8 00:52:41 2015 New Revision: 288999 URL: https://svnweb.freebsd.org/changeset/base/288999 Log: wpi(4): remove software queues Use direct dispatch into the destination hardware ring instead of using a staging queue. Submitted by: Differential Revision: https://reviews.freebsd.org/D3757 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 00:48:29 2015 (r288998) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 00:52:41 2015 (r288999) @@ -206,7 +206,6 @@ static int wpi_tx_data_raw(struct wpi_so static int wpi_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static int wpi_transmit(struct ieee80211com *, struct mbuf *); -static void wpi_start(void *, int); static void wpi_watchdog_rfkill(void *); static void wpi_scan_timeout(void *); static void wpi_tx_timeout(void *); @@ -525,7 +524,6 @@ wpi_attach(device_t dev) TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); TASK_INIT(&sc->sc_radiooff_task, 0, wpi_radio_off, sc); TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); - TASK_INIT(&sc->sc_start_task, 0, wpi_start, sc); sc->sc_tq = taskqueue_create("wpi_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_tq); @@ -685,7 +683,6 @@ wpi_detach(device_t dev) if (ic->ic_vap_create == wpi_vap_create) { ieee80211_draintask(ic, &sc->sc_radioon_task); - ieee80211_draintask(ic, &sc->sc_start_task); wpi_stop(sc); @@ -1165,7 +1162,6 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, ring->queued = 0; ring->cur = 0; ring->update = 0; - mbufq_init(&ring->snd, ifqmaxlen); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -1293,8 +1289,6 @@ wpi_reset_tx_ring(struct wpi_softc *sc, memset(ring->desc, 0, ring->desc_dma.size); bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - mbufq_drain(&ring->snd); - sc->qfullmsk &= ~(1 << ring->qid); ring->queued = 0; ring->cur = 0; ring->update = 0; @@ -2104,16 +2098,9 @@ wpi_tx_done(struct wpi_softc *sc, struct ieee80211_tx_complete(ni, m, (status & WPI_TX_STATUS_FAIL) != 0); WPI_TXQ_STATE_LOCK(sc); - ring->queued -= 1; - if (ring->queued > 0) { + if (--ring->queued > 0) callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); - - if ((sc->qfullmsk & (1 << ring->qid)) != 0 && - ring->queued < WPI_TX_RING_LOMARK) { - sc->qfullmsk &= ~(1 << ring->qid); - ieee80211_runtask(ic, &sc->sc_start_task); - } - } else + else callout_stop(&sc->tx_timeout); WPI_TXQ_STATE_UNLOCK(sc); @@ -2692,10 +2679,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp sc->sc_update_tx_ring(sc, ring); if (ring->qid < WPI_CMD_QUEUE_NUM) { - /* Mark TX ring as full if we reach a certain threshold. */ WPI_TXQ_STATE_LOCK(sc); - if (++ring->queued > WPI_TX_RING_HIMARK) - sc->qfullmsk |= 1 << ring->qid; + ring->queued++; callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); WPI_TXQ_STATE_UNLOCK(sc); } @@ -3063,7 +3048,6 @@ wpi_transmit(struct ieee80211com *ic, st { struct wpi_softc *sc = ic->ic_softc; struct ieee80211_node *ni; - struct mbufq *sndq; int ac, error; WPI_TX_LOCK(sc); @@ -3077,10 +3061,8 @@ wpi_transmit(struct ieee80211com *ic, st /* Check for available space. */ ac = M_WME_GETAC(m); - sndq = &sc->txq[ac].snd; - if (wpi_tx_ring_is_full(sc, ac) || mbufq_len(sndq) != 0) { - /* wpi_tx_done() will dequeue it. */ - error = mbufq_enqueue(sndq, m); + if (wpi_tx_ring_is_full(sc, ac)) { + error = ENOBUFS; goto unlock; } @@ -3097,44 +3079,6 @@ unlock: WPI_TX_UNLOCK(sc); return (error); } -/** - * Process data waiting to be sent on the output queue - */ -static void -wpi_start(void *arg0, int pending) -{ - struct wpi_softc *sc = arg0; - struct ieee80211_node *ni; - struct mbuf *m; - uint8_t i; - - WPI_TX_LOCK(sc); - if (sc->sc_running == 0) - goto unlock; - - DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); - - for (i = 0; i < WPI_CMD_QUEUE_NUM; i++) { - struct mbufq *sndq = &sc->txq[i].snd; - - for (;;) { - if (wpi_tx_ring_is_full(sc, i)) - break; - - if ((m = mbufq_dequeue(sndq)) == NULL) - break; - - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - if (wpi_tx_data(sc, m, ni) != 0) { - wpi_handle_tx_failure(ni); - } - } - } - - DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); -unlock: WPI_TX_UNLOCK(sc); -} - static void wpi_watchdog_rfkill(void *arg) { Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Thu Oct 8 00:48:29 2015 (r288998) +++ head/sys/dev/wpi/if_wpivar.h Thu Oct 8 00:52:41 2015 (r288999) @@ -72,7 +72,6 @@ struct wpi_tx_ring { struct wpi_tx_cmd *cmd; struct wpi_tx_data data[WPI_TX_RING_COUNT]; bus_dma_tag_t data_dmat; - struct mbufq snd; int qid; int queued; int cur; @@ -188,7 +187,6 @@ struct wpi_softc { /* TX Thermal Callibration. */ struct callout calib_to; - int calib_cnt; struct callout scan_timeout; struct callout tx_timeout; @@ -212,7 +210,6 @@ struct wpi_softc { struct mtx rxon_mtx; int temp; - uint32_t qfullmsk; uint32_t nodesmsk; struct mtx nt_mtx; @@ -235,7 +232,6 @@ struct wpi_softc { struct task sc_reinittask; struct task sc_radiooff_task; struct task sc_radioon_task; - struct task sc_start_task; /* Taskqueue */ struct taskqueue *sc_tq; From owner-svn-src-all@freebsd.org Thu Oct 8 01:17:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7437C9D1465; Thu, 8 Oct 2015 01:17:46 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41CDC1878; Thu, 8 Oct 2015 01:17:46 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t981Hjv2040779; Thu, 8 Oct 2015 01:17:45 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t981HjO7040778; Thu, 8 Oct 2015 01:17:45 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510080117.t981HjO7040778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Thu, 8 Oct 2015 01:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289000 - head/lib/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 01:17:46 -0000 Author: peter Date: Thu Oct 8 01:17:45 2015 New Revision: 289000 URL: https://svnweb.freebsd.org/changeset/base/289000 Log: Move SHLIBDIR?=/lib before so that it works again. Modified: head/lib/libxo/Makefile Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Thu Oct 8 00:52:41 2015 (r288999) +++ head/lib/libxo/Makefile Thu Oct 8 01:17:45 2015 (r289000) @@ -1,5 +1,7 @@ # $FreeBSD$ +SHLIBDIR?= /lib + .include LIBXOSRC= ${SRCTOP}/contrib/libxo @@ -9,8 +11,6 @@ LIBXOSRC= ${SRCTOP}/contrib/libxo LIB= xo SHLIB_MAJOR=0 -SHLIBDIR?= /lib - SRCS= libxo.c xo_encoder.c xo_syslog.c CFLAGS+=-I${LIBXOSRC}/libxo From owner-svn-src-all@freebsd.org Thu Oct 8 01:34:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B439D0235; Thu, 8 Oct 2015 01:34:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 02A1FC8; Thu, 8 Oct 2015 01:34:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id EAA971282; Thu, 8 Oct 2015 01:34:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 891011529F; Thu, 8 Oct 2015 01:34:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id DZ4Gs1w7P37W; Thu, 8 Oct 2015 01:34:05 +0000 (UTC) Subject: Re: svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4A5CF1529A To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510061658.t96GwmGj056703@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5615C80C.5080302@FreeBSD.org> Date: Wed, 7 Oct 2015 18:34:04 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510061658.t96GwmGj056703@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKaUogcnAj0fGPVauOT1q1p5udeuCT4Vb" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 01:34:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gKaUogcnAj0fGPVauOT1q1p5udeuCT4Vb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/6/2015 9:58 AM, Garrett Cooper wrote: > Author: ngie > Date: Tue Oct 6 16:58:47 2015 > New Revision: 288929 > URL: https://svnweb.freebsd.org/changeset/base/288929 >=20 > Log: > Integrate the tests from libxo into the FreeBSD test suite > =20 > The functional_test.sh harness for each test subdir was inspired > by the version in bin/sh/tests/functional_test.sh > =20 > Some gymnastics were required to deal with implicit rules for > .c / .o -> .out as the suffix transformation rules were > incorrectly trying to create the test outputs from some of the > source files > =20 > Sponsored by: EMC / Isilon Storage Division >=20 > Added: > head/lib/libxo/tests/ > head/lib/libxo/tests/Makefile (contents, props changed) > head/lib/libxo/tests/functional_test.sh > - copied, changed from r288904, head/bin/sh/tests/functional_test.= sh > head/usr.bin/xo/tests/ > head/usr.bin/xo/tests/Makefile (contents, props changed) > head/usr.bin/xo/tests/functional_test.sh > - copied, changed from r288904, head/bin/sh/tests/functional_test.= sh > Modified: > head/etc/mtree/BSD.tests.dist > head/lib/libxo/Makefile > head/usr.bin/xo/Makefile >=20 > Modified: head/etc/mtree/BSD.tests.dist > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/etc/mtree/BSD.tests.dist Tue Oct 6 16:35:50 2015 (r288928) > +++ head/etc/mtree/BSD.tests.dist Tue Oct 6 16:58:47 2015 (r288929) > @@ -310,6 +310,8 @@ > .. > libutil > .. > + libxo > + .. > msun > .. > .. > @@ -568,6 +570,8 @@ > .. > xargs > .. > + xo > + .. > yacc > yacc > .. >=20 > Modified: head/lib/libxo/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libxo/Makefile Tue Oct 6 16:35:50 2015 (r288928) > +++ head/lib/libxo/Makefile Tue Oct 6 16:58:47 2015 (r288929) > @@ -1,5 +1,7 @@ > # $FreeBSD$ > =20 > +.include > + > LIBXOSRC=3D ${SRCTOP}/contrib/libxo > =20 > .PATH: ${LIBXOSRC}/libxo =2E.. LIB=3D xo SHLIB_MAJOR=3D0 SHLIBDIR?=3D /lib FYI SHLIBDIR? needs to be before the src.opts.mk otherwise it changes to /usr/lib, which Peter found breaks boot :) --=20 Regards, Bryan Drewery --gKaUogcnAj0fGPVauOT1q1p5udeuCT4Vb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEbBAEBAgAGBQJWFcgMAAoJEDXXcbtuRpfPZzkH+KTkUPr6JFHfxKaXxyAK3GLR 5l5uDrbGPbVRtPWpTXtiaU34ugsKwEb2SN1vecBRLAaId0Z7GDLPbVPEHok8udqU xsZKNXgoEt2FF+SXRkY9gsY/Ql7DGuMi0DRyNOVpOQpRYxfQFlgqFHlWbK9d7wb+ JRgJGbI7xR5TyNAJ7wEgqHA7VKqfKyPMUqDmK90JmC+2ytrChPvCZHGYG6Hi5pG6 2EwR398fqehPk15+MC+4Fp7R2Lt3/DRDE2N1jzlW/+h4X4qTp9sDbcOpCKTO1TUh t5N9zSt2nyybXKmOzPXeH59n+CGdD8+y/YV+1/PVxzYr9Q9bD59hu/DIpsqYmw== =xtxf -----END PGP SIGNATURE----- --gKaUogcnAj0fGPVauOT1q1p5udeuCT4Vb-- From owner-svn-src-all@freebsd.org Thu Oct 8 01:38:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4388A9D055E; Thu, 8 Oct 2015 01:38:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 027DC30F; Thu, 8 Oct 2015 01:38:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkdo1 with SMTP id o1so4474546qkd.1; Wed, 07 Oct 2015 18:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dPCgTGBawougAA+i0J90k4jduIHD3g3oHzmHmvsEqVY=; b=R/oMFNeXJ3Egt1Y1+OF3Y2qyuNDg+a5A2L1pAlFJQ0dpAPIOGE+Hm5s022q6kC8sAL nA472VjkmfTs7fwhXBQ8d5pxpDHXoz0SwzEO1fJwUrwjmjCdiG09j0/2V9IPWc9WDyve 4YJhpEhLEurVeaEl1HSPUkMU8mcV033eeeZAsv9lrBhCa4j4WiPRoh5N6V01uAfqRY1N loNnn7PJvjWyae4xuFsUVPvsEaZEIU++DaHGZ2uAKfoc6adFKkRvDSJzpg9h8jn6QNBh Md6pSr6Xum7Ow0ursFTE/dxYFWCIh06YQiToLFFTA6ih+CCM/tZah8H2ZHTR8qmPgS/h vdrw== MIME-Version: 1.0 X-Received: by 10.55.198.20 with SMTP id b20mr5209405qkj.35.1444268279122; Wed, 07 Oct 2015 18:37:59 -0700 (PDT) Received: by 10.140.94.44 with HTTP; Wed, 7 Oct 2015 18:37:59 -0700 (PDT) In-Reply-To: <5615C80C.5080302@FreeBSD.org> References: <201510061658.t96GwmGj056703@repo.freebsd.org> <5615C80C.5080302@FreeBSD.org> Date: Wed, 7 Oct 2015 18:37:59 -0700 Message-ID: Subject: Re: svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests From: NGie Cooper To: Bryan Drewery Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 01:38:00 -0000 On Wed, Oct 7, 2015 at 6:34 PM, Bryan Drewery wrote: ... >> Modified: head/lib/libxo/Makefile >> ============================================================================== >> --- head/lib/libxo/Makefile Tue Oct 6 16:35:50 2015 (r288928) >> +++ head/lib/libxo/Makefile Tue Oct 6 16:58:47 2015 (r288929) >> @@ -1,5 +1,7 @@ >> # $FreeBSD$ >> >> +.include >> + >> LIBXOSRC= ${SRCTOP}/contrib/libxo >> >> .PATH: ${LIBXOSRC}/libxo > ... > LIB= xo > SHLIB_MAJOR=0 > > SHLIBDIR?= /lib > > > FYI SHLIBDIR? needs to be before the src.opts.mk otherwise it changes to > /usr/lib, which Peter found breaks boot :) *smacks head* Yes, I forgot about that caveat ;(. From owner-svn-src-all@freebsd.org Thu Oct 8 01:39:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0F39D0678; Thu, 8 Oct 2015 01:39:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 94D246BC; Thu, 8 Oct 2015 01:39:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 8DC4B1561; Thu, 8 Oct 2015 01:39:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 3B4E0152CC; Thu, 8 Oct 2015 01:39:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 3TOuIOWWdVbj; Thu, 8 Oct 2015 01:39:02 +0000 (UTC) Subject: Re: svn commit: r288911 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 73714152C7 To: Warner Losh References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5615C935.2060204@FreeBSD.org> Date: Wed, 7 Oct 2015 18:39:01 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GO7rOjJfS2l40apc9Swudr4BHuCWbTl7x" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 01:39:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GO7rOjJfS2l40apc9Swudr4BHuCWbTl7x Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/6/2015 1:24 PM, Warner Losh wrote: >> With the META_MODE changes, sjg introduced this /etc/src-env.conf file= >> that is included from sys.mk early, that can be used for overriding >> things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be set >> extremely early for AUTO_OBJ support, among other things). >> >> As far as I can tell, the sys.mk change to include src.conf early was >> done out of convenience. Meaning, we could remove that and just add >> back a .include or similar at the top of all src Makefil= es. > All src makefiles? Yea, I=E2=80=99d rather hoped to avoid that, though = it is easily > scripted. I=E2=80=99d thought of this solution at the time I did the MA= KESYSPATH > hack, and rejected it as being too unwieldy. And having that at the top= > of all the files would still require MAKESYSPATH need to be =E2=80=A6/s= hare/mk > to work out. I was rather hoping we could find some good way around > doing that. r289000 confuses me. Clearly src.opts.mk is still needed in Makefiles. So why are we including src.conf in sys.mk and not src.opts.mk? --=20 Regards, Bryan Drewery --GO7rOjJfS2l40apc9Swudr4BHuCWbTl7x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFck2AAoJEDXXcbtuRpfP3PsIAJfi1TuIRAI+xwKngm1jf2tw H8wD9sp+3cb40joqQyEcDR8pEd5mcnz75WCPOrkNMonG6lSVw+rlK4to2QRTRUMQ ML5eFaj/1PM2sdpLRLZUnNdVHievVZRKzIedxa6KqkZZGgBvT7OGWz5grhPcbT5B qyL+bzLgjAad5tle6zhTM3jHQqfDolEsWn33nOvj9131Eb4Ia7R+k4wNNQ9vVxJ+ XOVARkO2kAphwmMq96ph9KobRPZEfPfP697Jg7hZ2lLKtNxFKf4YNYI2dRIBA6+i cYJkpkjzOsOfSfB6VCjD+fyBdApGU6DwFURkw88WLNhaDhrtWtxk0daCiTxefaI= =5Y83 -----END PGP SIGNATURE----- --GO7rOjJfS2l40apc9Swudr4BHuCWbTl7x-- From owner-svn-src-all@freebsd.org Thu Oct 8 01:39:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B81289D06E1; Thu, 8 Oct 2015 01:39:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A4D9806; Thu, 8 Oct 2015 01:39:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkas79 with SMTP id s79so13492543qka.0; Wed, 07 Oct 2015 18:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=C0yeDMLydqmCl40phNYG1G711bmkvrc6ZUJxVZTANjg=; b=mJfEjZXX5BtE8aIKLV4hyj7ol0tMaZH8THcCVDzL/k3rnpLEkO1pb8nf4elfvGQxCR dEYqElPE4coSo5aOazNvH3vPhcYmVZZM0QwX7MuQyz7hy/45IDIpSBOT0I9Cx0gjSwlV 0bcMvy6B8LmalrM0UWmTLg6HUGTQ3v6gNdQ/u2IrKr+Ka4ucPiyEwHDBQd6Zjpa3FrrA O9ISW0Zp9agaXjgqj+LkD3RrWXz4BVsI7N3mbFOjkZtBcwH0tMbXs/OijyIEoP5j9/Ve yUDDmDnQK1c2TzmklLAw/RxeywYve0O6Bx53PwBtJ9UeR1RnUeXXaRc7E1o0tG3Ri+me NgbQ== MIME-Version: 1.0 X-Received: by 10.55.221.65 with SMTP id n62mr5175080qki.42.1444268351431; Wed, 07 Oct 2015 18:39:11 -0700 (PDT) Received: by 10.140.94.44 with HTTP; Wed, 7 Oct 2015 18:39:11 -0700 (PDT) In-Reply-To: <201510080117.t981HjO7040778@repo.freebsd.org> References: <201510080117.t981HjO7040778@repo.freebsd.org> Date: Wed, 7 Oct 2015 18:39:11 -0700 Message-ID: Subject: Re: svn commit: r289000 - head/lib/libxo From: NGie Cooper To: Peter Wemm Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 01:39:12 -0000 On Wed, Oct 7, 2015 at 6:17 PM, Peter Wemm wrote: > Author: peter > Date: Thu Oct 8 01:17:45 2015 > New Revision: 289000 > URL: https://svnweb.freebsd.org/changeset/base/289000 > > Log: > Move SHLIBDIR?=/lib before so that it works again. Sorry :(... I forgot about that caveat (I wish src.opts.mk didn't set a default LIBDIR/SHLIBDIR...) Pointyhat to: ngie From owner-svn-src-all@freebsd.org Thu Oct 8 02:04:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 347019D19E2; Thu, 8 Oct 2015 02:04:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 19E3A1BB5; Thu, 8 Oct 2015 02:04:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 124321F1C; Thu, 8 Oct 2015 02:04:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 9B54B1534B; Thu, 8 Oct 2015 02:04:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id YQtS7NEKcGnZ; Thu, 8 Oct 2015 02:04:37 +0000 (UTC) Subject: Re: svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com EFC5C15346 To: NGie Cooper References: <201510061658.t96GwmGj056703@repo.freebsd.org> <5615C80C.5080302@FreeBSD.org> Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5615CF35.3030609@FreeBSD.org> Date: Wed, 7 Oct 2015 19:04:37 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QNcB6swoqOrsF8dfTx9xm0KGRsUgbvVBL" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 02:04:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QNcB6swoqOrsF8dfTx9xm0KGRsUgbvVBL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/7/2015 6:37 PM, NGie Cooper wrote: > On Wed, Oct 7, 2015 at 6:34 PM, Bryan Drewery wr= ote: > ... >>> Modified: head/lib/libxo/Makefile >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/lib/libxo/Makefile Tue Oct 6 16:35:50 2015 (r28892= 8) >>> +++ head/lib/libxo/Makefile Tue Oct 6 16:58:47 2015 (r28892= 9) >>> @@ -1,5 +1,7 @@ >>> # $FreeBSD$ >>> >>> +.include >>> + >>> LIBXOSRC=3D ${SRCTOP}/contrib/libxo >>> >>> .PATH: ${LIBXOSRC}/libxo >> ... >> LIB=3D xo >> SHLIB_MAJOR=3D0 >> >> SHLIBDIR?=3D /lib >> >> >> FYI SHLIBDIR? needs to be before the src.opts.mk otherwise it changes = to >> /usr/lib, which Peter found breaks boot :) >=20 > *smacks head* >=20 > Yes, I forgot about that caveat ;(. >=20 It would have bitten me too. It's a strange thing. --=20 Regards, Bryan Drewery --QNcB6swoqOrsF8dfTx9xm0KGRsUgbvVBL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFc81AAoJEDXXcbtuRpfP6VgH/0//GWMOFAvPdFePJjIu3UJf EjPoyI0jNCQDQU5M6rJf+pm8JowLQLzEa21USiPOqpSuzFfeOHwhLY3bqgF/CO9Q uGOnyRAVHrc9OqNuiYd4UxHxOx8j/NxHEKcQWYcMn1/uWQiDM/NYdGGmUIySrL/w fvJuWIecbACAYUzeU5kRNAUN5/2/uKnPrQ33+UEdYBwrhIDTQCFFRZaml9Qr7fKA sM+KShY5uIge6jIits9M2iu1pElRmfhc6xENHew3bt23NZMdOvS+pmknrDj8uZaw 3RXgYcfH0BJpMvxEVm0slGVznH0o5n5E4rfLIRowSwx1wQ5ZMe0lgF2LqT6kSyo= =F/dk -----END PGP SIGNATURE----- --QNcB6swoqOrsF8dfTx9xm0KGRsUgbvVBL-- From owner-svn-src-all@freebsd.org Thu Oct 8 02:08:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5AD89D1BFA; Thu, 8 Oct 2015 02:08:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8394E1D80; Thu, 8 Oct 2015 02:08:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkas79 with SMTP id s79so13702191qka.0; Wed, 07 Oct 2015 19:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O1ayCcAal/U3Ly7ACRvbPAJ4+C5QGwReGMkaQNO4YhY=; b=atrXqub4Y9Jfx+BvcXoZskPNTsyl8F3PZCGuj6gFWoZmmi+r6YRtpfvIX9LrxHVZZr eOi7hmmtAC+26TTlV/quGxgbUeTzoiMpNeTL0mbAxjwvttXmIhJExjFseuOxz1SllcJV JCb57/FP6R4RtGWwinAvBmaReWXSNCAIGc9Qz78+T0qLRWJltuwT3EXALLeDtYnzKkiC QEBsoJyWzZtYm9FkNzvTjtK9CHbnjFkD3MTyEizRJ3/A5tcC9QUdjZEwi+shaG9SQEUl g9L1AwWNsvk5zxlAYa1ev9RaqekOqEQtnM0FaKFQ3yzUei54wNo4FE47kOVMxUKB4HXS eOeA== MIME-Version: 1.0 X-Received: by 10.55.198.20 with SMTP id b20mr5308826qkj.35.1444270085747; Wed, 07 Oct 2015 19:08:05 -0700 (PDT) Received: by 10.140.94.44 with HTTP; Wed, 7 Oct 2015 19:08:05 -0700 (PDT) In-Reply-To: <5615CF35.3030609@FreeBSD.org> References: <201510061658.t96GwmGj056703@repo.freebsd.org> <5615C80C.5080302@FreeBSD.org> <5615CF35.3030609@FreeBSD.org> Date: Wed, 7 Oct 2015 19:08:05 -0700 Message-ID: Subject: Re: svn commit: r288929 - in head: etc/mtree lib/libxo lib/libxo/tests usr.bin/xo usr.bin/xo/tests From: NGie Cooper To: Bryan Drewery Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 02:08:06 -0000 On Wed, Oct 7, 2015 at 7:04 PM, Bryan Drewery wrote: ... >> *smacks head* >> >> Yes, I forgot about that caveat ;(. > > It would have bitten me too. It's a strange thing. It's technically be me once before and another person as well at $work. Libraries in /lib is not the norm so the default works for most cases (but not with bsd.libnames.mk when dealing with libraries that are not in /usr/lib for instance >_>..). Thanks for the reminder :(.. From owner-svn-src-all@freebsd.org Thu Oct 8 02:28:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 923EB9D0E80; Thu, 8 Oct 2015 02:28:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC33E89; Thu, 8 Oct 2015 02:28:24 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t982SN7S061300; Thu, 8 Oct 2015 02:28:23 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t982SNU5061297; Thu, 8 Oct 2015 02:28:23 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201510080228.t982SNU5061297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 8 Oct 2015 02:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289001 - in head: share/examples/bhyve usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 02:28:24 -0000 Author: marcel Date: Thu Oct 8 02:28:22 2015 New Revision: 289001 URL: https://svnweb.freebsd.org/changeset/base/289001 Log: Add option -l for specifying which OS loader to dlopen(3). By default this is /boot/userboot.so. This option allows for the development and use of other OS loaders. Modified: head/share/examples/bhyve/vmrun.sh head/usr.sbin/bhyveload/bhyveload.8 head/usr.sbin/bhyveload/bhyveload.c Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Thu Oct 8 01:17:45 2015 (r289000) +++ head/share/examples/bhyve/vmrun.sh Thu Oct 8 02:28:22 2015 (r289001) @@ -48,8 +48,8 @@ usage() { echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" echo " [-e ] [-g ] [-H ]" - echo " [-I ] [-m ]" - echo " [-t ] " + echo " [-I ] [-l ]" + echo " [-m ] [-t ] " echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" @@ -61,6 +61,7 @@ usage() { echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" + echo " -l: the OS loader to use (default is /boot/userboot.so)" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" @@ -92,7 +93,7 @@ loader_opt="" bhyverun_opt="-H -A -P" pass_total=0 -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c I) isofile=${OPTARG} ;; + l) + loader_opt="${loader_opt} -l ${OPTARG}" + ;; m) memsize=${OPTARG} ;; Modified: head/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 Thu Oct 8 01:17:45 2015 (r289000) +++ head/usr.sbin/bhyveload/bhyveload.8 Thu Oct 8 02:28:22 2015 (r289001) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2012 +.Dd October 7, 2015 .Dt BHYVELOAD 8 .Os .Sh NAME @@ -40,6 +40,7 @@ guest inside a bhyve virtual machine .Op Fl d Ar disk-path .Op Fl e Ar name=value .Op Fl h Ar host-path +.Op Fl l Ar os-loader .Op Fl m Ar mem-size .Ar vmname .Sh DESCRIPTION @@ -56,6 +57,7 @@ is based on and will present an interface identical to the .Fx loader on the user's terminal. +This behavior can be changed by specifying a different OS loader. .Pp The virtual machine is identified as .Ar vmname @@ -78,7 +80,9 @@ The .Ar disk-path is the pathname of the guest's boot disk image. .It Fl e Ar name=value -Set the FreeBSD loader environment variable +Set the +.Fx +loader environment variable .Ar name to .Ar value . @@ -89,6 +93,15 @@ variable. The .Ar host-path is the directory at the top of the guest's boot filesystem. +.It Fl l Ar os-loader +Specify a different OS loader. +By default +.Nm +will use +.Pa /boot/userboot.so , +which presents a standard +.Fx +loader. .It Fl m Ar mem-size Xo .Sm off .Op Cm K | k | M | m | G | g | T | t Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Thu Oct 8 01:17:45 2015 (r289000) +++ head/usr.sbin/bhyveload/bhyveload.c Thu Oct 8 02:28:22 2015 (r289001) @@ -639,6 +639,7 @@ usage(void) int main(int argc, char** argv) { + char *loader; void *h; void (*func)(struct loader_callbacks *, void *, int, int); uint64_t mem_size; @@ -646,13 +647,15 @@ main(int argc, char** argv) progname = basename(argv[0]); + loader = NULL; + memflags = 0; mem_size = 256 * MB; consin_fd = STDIN_FILENO; consout_fd = STDOUT_FILENO; - while ((opt = getopt(argc, argv, "Sc:d:e:h:m:")) != -1) { + while ((opt = getopt(argc, argv, "Sc:d:e:h:l:m:")) != -1) { switch (opt) { case 'c': error = altcons_open(optarg); @@ -674,6 +677,14 @@ main(int argc, char** argv) host_base = optarg; break; + case 'l': + if (loader != NULL) + errx(EX_USAGE, "-l can only be given once"); + loader = strdup(optarg); + if (loader == NULL) + err(EX_OSERR, "malloc"); + break; + case 'm': error = vm_parse_memsize(optarg, &mem_size); if (error != 0) @@ -726,26 +737,36 @@ main(int argc, char** argv) exit(1); } - tcgetattr(consout_fd, &term); - oldterm = term; - cfmakeraw(&term); - term.c_cflag |= CLOCAL; - - tcsetattr(consout_fd, TCSAFLUSH, &term); - - h = dlopen("/boot/userboot.so", RTLD_LOCAL); + if (loader == NULL) { + loader = strdup("/boot/userboot.so"); + if (loader == NULL) + err(EX_OSERR, "malloc"); + } + h = dlopen(loader, RTLD_LOCAL); if (!h) { printf("%s\n", dlerror()); + free(loader); return (1); } func = dlsym(h, "loader_main"); if (!func) { printf("%s\n", dlerror()); + free(loader); return (1); } + tcgetattr(consout_fd, &term); + oldterm = term; + cfmakeraw(&term); + term.c_cflag |= CLOCAL; + + tcsetattr(consout_fd, TCSAFLUSH, &term); + addenv("smbios.bios.vendor=BHYVE"); addenv("boot_serial=1"); func(&cb, NULL, USERBOOT_VERSION_3, ndisks); + + free(loader); + return (0); } From owner-svn-src-all@freebsd.org Thu Oct 8 03:28:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0334B9D1FF3; Thu, 8 Oct 2015 03:28:17 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5E6380C; Thu, 8 Oct 2015 03:28:16 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t983SF2j079597; Thu, 8 Oct 2015 03:28:15 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t983SFZ0079596; Thu, 8 Oct 2015 03:28:15 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201510080328.t983SFZ0079596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 8 Oct 2015 03:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289002 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 03:28:17 -0000 Author: rodrigc Date: Thu Oct 8 03:28:15 2015 New Revision: 289002 URL: https://svnweb.freebsd.org/changeset/base/289002 Log: Use print as a function, not operator. Modified: head/release/scripts/list-new-changesets.py Modified: head/release/scripts/list-new-changesets.py ============================================================================== --- head/release/scripts/list-new-changesets.py Thu Oct 8 02:28:22 2015 (r289001) +++ head/release/scripts/list-new-changesets.py Thu Oct 8 03:28:15 2015 (r289002) @@ -44,6 +44,7 @@ # list-new-changesets.py -r254153:261794 \ # svn://svn.freebsd.org/base/stable/9 +from __future__ import print_function import os import subprocess import sys @@ -60,15 +61,15 @@ def print_logentry(logentry): date = logentry.find('date').text msg = logentry.find('msg').text - print "-" * 71 - print "%s | %s | %s" % (rev, author, date) - print "Changed paths:" + print("-" * 71) + print("%s | %s | %s" % (rev, author, date)) + print("Changed paths:") for paths in logentry.findall('paths'): for path in paths.findall('path'): - print " %s %s" % (path.attrib['action'], path.text) + print(" %s %s" % (path.attrib['action'], path.text)) - print - print msg.encode('utf-8') + print() + print(msg.encode('utf-8')) def main(args): """Main function. @@ -80,13 +81,13 @@ def main(args): cmd = ["svn", "log", "-v", "--xml"] cmd += args[1:] - print " ".join(cmd) + print(" ".join(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = proc.communicate() if proc.returncode != 0: - print err + print(err) sys.exit(proc.returncode) displayed_entries = 0 @@ -107,10 +108,10 @@ def main(args): displayed_entries += 1 if displayed_entries == 0: - print "No changesets with Added or Deleted files" + print("No changesets with Added or Deleted files") if displayed_entries > 0: - print "-" * 71 + print("-" * 71) if __name__ == "__main__": From owner-svn-src-all@freebsd.org Thu Oct 8 04:29:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D399D10DB; Thu, 8 Oct 2015 04:29:41 +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 E67A0356; Thu, 8 Oct 2015 04:29: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 t984Tet8098270; Thu, 8 Oct 2015 04:29:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t984TdJd098267; Thu, 8 Oct 2015 04:29:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201510080429.t984TdJd098267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 8 Oct 2015 04:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289003 - vendor-sys/illumos/dist/uts/common/dtrace vendor-sys/illumos/dist/uts/common/sys vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 04:29:41 -0000 Author: markj Date: Thu Oct 8 04:29:39 2015 New Revision: 289003 URL: https://svnweb.freebsd.org/changeset/base/289003 Log: 6271 dtrace caused excessive fork time Author: Bryan Cantrill Reviewed by: Adam Leventhal Reviewed by: Dan McDonald Reviewed by: Richard Lowe Approved by: Gordon Ross illumos/illumos-gate@7bd3c1d12d0c764e1517c3aca62c634409356764 Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c vendor-sys/illumos/dist/uts/common/sys/dtrace.h Changes in other areas also in this revision: Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh.out Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Thu Oct 8 03:28:15 2015 (r289002) +++ vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Thu Oct 8 04:29:39 2015 (r289003) @@ -14809,8 +14809,8 @@ dtrace_helper_provider_add(dof_helper_t * Check to make sure this isn't a duplicate. */ for (i = 0; i < help->dthps_nprovs; i++) { - if (dofhp->dofhp_dof == - help->dthps_provs[i]->dthp_prov.dofhp_dof) + if (dofhp->dofhp_addr == + help->dthps_provs[i]->dthp_prov.dofhp_addr) return (EALREADY); } @@ -15162,7 +15162,14 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ dtrace_enabling_destroy(enab); if (dhp != NULL && nprovs > 0) { + /* + * Now that this is in-kernel, we change the sense of the + * members: dofhp_dof denotes the in-kernel copy of the DOF + * and dofhp_addr denotes the address at user-level. + */ + dhp->dofhp_addr = dhp->dofhp_dof; dhp->dofhp_dof = (uint64_t)(uintptr_t)dof; + if (dtrace_helper_provider_add(dhp, gen) == 0) { mutex_exit(&dtrace_lock); dtrace_helper_provider_register(curproc, help, dhp); Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Thu Oct 8 03:28:15 2015 (r289002) +++ vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Thu Oct 8 04:29:39 2015 (r289003) @@ -1784,6 +1784,18 @@ fasttrap_meta_provide(void *arg, dtrace_ return (provider); } +/* + * We know a few things about our context here: we know that the probe being + * created doesn't already exist (DTrace won't load DOF at the same address + * twice, even if explicitly told to do so) and we know that we are + * single-threaded with respect to the meta provider machinery. Knowing that + * this is a new probe and that there is no way for us to race with another + * operation on this provider allows us an important optimization: we need not + * lookup a probe before adding it. Saving this lookup is important because + * this code is in the fork path for processes with USDT probes, and lookups + * here are potentially very expensive because of long hash conflicts on + * module, function and name (DTrace doesn't hash on provider name). + */ /*ARGSUSED*/ static void fasttrap_meta_create_probe(void *arg, void *parg, @@ -1820,19 +1832,6 @@ fasttrap_meta_create_probe(void *arg, vo return; } - /* - * Grab the creation lock to ensure consistency between calls to - * dtrace_probe_lookup() and dtrace_probe_create() in the face of - * other threads creating probes. - */ - mutex_enter(&provider->ftp_cmtx); - - if (dtrace_probe_lookup(provider->ftp_provid, dhpb->dthpb_mod, - dhpb->dthpb_func, dhpb->dthpb_name) != 0) { - mutex_exit(&provider->ftp_cmtx); - return; - } - ntps = dhpb->dthpb_noffs + dhpb->dthpb_nenoffs; ASSERT(ntps > 0); @@ -1840,7 +1839,6 @@ fasttrap_meta_create_probe(void *arg, vo if (fasttrap_total > fasttrap_max) { atomic_add_32(&fasttrap_total, -ntps); - mutex_exit(&provider->ftp_cmtx); return; } @@ -1904,8 +1902,6 @@ fasttrap_meta_create_probe(void *arg, vo */ pp->ftp_id = dtrace_probe_create(provider->ftp_provid, dhpb->dthpb_mod, dhpb->dthpb_func, dhpb->dthpb_name, FASTTRAP_OFFSET_AFRAMES, pp); - - mutex_exit(&provider->ftp_cmtx); } /*ARGSUSED*/ Modified: vendor-sys/illumos/dist/uts/common/sys/dtrace.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/dtrace.h Thu Oct 8 03:28:15 2015 (r289002) +++ vendor-sys/illumos/dist/uts/common/sys/dtrace.h Thu Oct 8 04:29:39 2015 (r289003) @@ -2131,12 +2131,18 @@ extern void dtrace_probe(dtrace_id_t, ui * * 1.2.4 Caller's context * - * dtms_create_probe() is called from either ioctl() or module load context. - * The DTrace framework is locked in such a way that meta providers may not - * register or unregister. This means that the meta provider cannot call - * dtrace_meta_register() or dtrace_meta_unregister(). However, the context is - * such that the provider may (and is expected to) call provider-related - * DTrace provider APIs including dtrace_probe_create(). + * dtms_create_probe() is called from either ioctl() or module load context + * in the context of a newly-created provider (that is, a provider that + * is a result of a call to dtms_provide_pid()). The DTrace framework is + * locked in such a way that meta providers may not register or unregister, + * such that no other thread can call into a meta provider operation and that + * atomicity is assured with respect to meta provider operations across + * dtms_provide_pid() and subsequent calls to dtms_create_probe(). + * The context is thus effectively single-threaded with respect to the meta + * provider, and that the meta provider cannot call dtrace_meta_register() + * or dtrace_meta_unregister(). However, the context is such that the + * provider may (and is expected to) call provider-related DTrace provider + * APIs including dtrace_probe_create(). * * 1.3 void *dtms_provide_pid(void *arg, dtrace_meta_provider_t *mprov, * pid_t pid) From owner-svn-src-all@freebsd.org Thu Oct 8 05:27:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23FAB9D1A9E; Thu, 8 Oct 2015 05:27:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB8DA681; Thu, 8 Oct 2015 05:27:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t985RkpC016374; Thu, 8 Oct 2015 05:27:46 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t985Rj6h016369; Thu, 8 Oct 2015 05:27:45 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510080527.t985Rj6h016369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 8 Oct 2015 05:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289004 - in head: sys/compat/cloudabi usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 05:27:47 -0000 Author: ed Date: Thu Oct 8 05:27:45 2015 New Revision: 289004 URL: https://svnweb.freebsd.org/changeset/base/289004 Log: Properly format pointer size independent CloudABI system calls. CloudABI has approximately 50 system calls that do not depend on the pointer size of the system. As the ABI is pretty compact, it takes little effort to each truss(8) the formatting rules for these system calls. Start off by formatting pointer size independent system calls. Changes: - Make it possible to include the CloudABI system call definitions in FreeBSD userspace builds. Add ${root}/sys to the truss(8) Makefile so we can pull in . - Refactoring: patch up amd64-cloudabi64.c to use the CLOUDABI_* constants instead of rolling our own table. - Add table entries for all of the system calls. - Add new generic formatting types (UInt, IntArray) that we'll be using to format unsigned integers and arrays of integers. - Add CloudABI specific formatting types. Approved by: jhb Differential Revision: https://reviews.freebsd.org/D3836 Modified: head/sys/compat/cloudabi/cloudabi_syscalldefs.h head/usr.bin/truss/Makefile head/usr.bin/truss/amd64-cloudabi64.c head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/sys/compat/cloudabi/cloudabi_syscalldefs.h ============================================================================== --- head/sys/compat/cloudabi/cloudabi_syscalldefs.h Thu Oct 8 04:29:39 2015 (r289003) +++ head/sys/compat/cloudabi/cloudabi_syscalldefs.h Thu Oct 8 05:27:45 2015 (r289004) @@ -28,12 +28,19 @@ #ifndef _CLOUDABI_SYSCALLDEFS_H_ #define _CLOUDABI_SYSCALLDEFS_H_ +#ifdef _KERNEL #include #include #define alignas _Alignas #define alignof _Alignof #define static_assert _Static_assert +#else +#include +#include +#include +#include +#endif /* Import machine-independent CloudABI definitions. */ #include Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Thu Oct 8 04:29:39 2015 (r289003) +++ head/usr.bin/truss/Makefile Thu Oct 8 05:27:45 2015 (r289004) @@ -13,7 +13,7 @@ SRCS+= ${MACHINE_CPUARCH}-fbsd.c .PATH: ${.CURDIR:H}/kdump SRCS+= utrace.c -CFLAGS+= -I${.CURDIR} -I. +CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys CLEANFILES= syscalls.master syscalls.h ioctl.c .SUFFIXES: .master Modified: head/usr.bin/truss/amd64-cloudabi64.c ============================================================================== --- head/usr.bin/truss/amd64-cloudabi64.c Thu Oct 8 04:29:39 2015 (r289003) +++ head/usr.bin/truss/amd64-cloudabi64.c Thu Oct 8 05:27:45 2015 (r289004) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "cloudabi64_syscalls.h" #include "truss.h" @@ -67,18 +69,82 @@ amd64_cloudabi64_fetch_args(struct truss } static const int cloudabi_errno_table[] = { - 0, E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, - EAGAIN, EALREADY, EBADF, EBADMSG, EBUSY, ECANCELED, ECHILD, - ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, - EDOM, EDQUOT, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EIDRM, - EILSEQ, EINPROGRESS, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, - EMFILE, EMLINK, EMSGSIZE, EMULTIHOP, ENAMETOOLONG, ENETDOWN, - ENETRESET, ENETUNREACH, ENFILE, ENOBUFS, ENODEV, ENOENT, - ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC, - ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE, ENOTSOCK, - ENOTSUP, ENOTTY, ENXIO, EOVERFLOW, EOWNERDEAD, EPERM, EPIPE, - EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, - ESRCH, ESTALE, ETIMEDOUT, ETXTBSY, EXDEV, ENOTCAPABLE, + [CLOUDABI_E2BIG] = E2BIG, + [CLOUDABI_EACCES] = EACCES, + [CLOUDABI_EADDRINUSE] = EADDRINUSE, + [CLOUDABI_EADDRNOTAVAIL] = EADDRNOTAVAIL, + [CLOUDABI_EAFNOSUPPORT] = EAFNOSUPPORT, + [CLOUDABI_EAGAIN] = EAGAIN, + [CLOUDABI_EALREADY] = EALREADY, + [CLOUDABI_EBADF] = EBADF, + [CLOUDABI_EBADMSG] = EBADMSG, + [CLOUDABI_EBUSY] = EBUSY, + [CLOUDABI_ECANCELED] = ECANCELED, + [CLOUDABI_ECHILD] = ECHILD, + [CLOUDABI_ECONNABORTED] = ECONNABORTED, + [CLOUDABI_ECONNREFUSED] = ECONNREFUSED, + [CLOUDABI_ECONNRESET] = ECONNRESET, + [CLOUDABI_EDEADLK] = EDEADLK, + [CLOUDABI_EDESTADDRREQ] = EDESTADDRREQ, + [CLOUDABI_EDOM] = EDOM, + [CLOUDABI_EDQUOT] = EDQUOT, + [CLOUDABI_EEXIST] = EEXIST, + [CLOUDABI_EFAULT] = EFAULT, + [CLOUDABI_EFBIG] = EFBIG, + [CLOUDABI_EHOSTUNREACH] = EHOSTUNREACH, + [CLOUDABI_EIDRM] = EIDRM, + [CLOUDABI_EILSEQ] = EILSEQ, + [CLOUDABI_EINPROGRESS] = EINPROGRESS, + [CLOUDABI_EINTR] = EINTR, + [CLOUDABI_EINVAL] = EINVAL, + [CLOUDABI_EIO] = EIO, + [CLOUDABI_EISCONN] = EISCONN, + [CLOUDABI_EISDIR] = EISDIR, + [CLOUDABI_ELOOP] = ELOOP, + [CLOUDABI_EMFILE] = EMFILE, + [CLOUDABI_EMLINK] = EMLINK, + [CLOUDABI_EMSGSIZE] = EMSGSIZE, + [CLOUDABI_EMULTIHOP] = EMULTIHOP, + [CLOUDABI_ENAMETOOLONG] = ENAMETOOLONG, + [CLOUDABI_ENETDOWN] = ENETDOWN, + [CLOUDABI_ENETRESET] = ENETRESET, + [CLOUDABI_ENETUNREACH] = ENETUNREACH, + [CLOUDABI_ENFILE] = ENFILE, + [CLOUDABI_ENOBUFS] = ENOBUFS, + [CLOUDABI_ENODEV] = ENODEV, + [CLOUDABI_ENOENT] = ENOENT, + [CLOUDABI_ENOEXEC] = ENOEXEC, + [CLOUDABI_ENOLCK] = ENOLCK, + [CLOUDABI_ENOLINK] = ENOLINK, + [CLOUDABI_ENOMEM] = ENOMEM, + [CLOUDABI_ENOMSG] = ENOMSG, + [CLOUDABI_ENOPROTOOPT] = ENOPROTOOPT, + [CLOUDABI_ENOSPC] = ENOSPC, + [CLOUDABI_ENOSYS] = ENOSYS, + [CLOUDABI_ENOTCONN] = ENOTCONN, + [CLOUDABI_ENOTDIR] = ENOTDIR, + [CLOUDABI_ENOTEMPTY] = ENOTEMPTY, + [CLOUDABI_ENOTRECOVERABLE] = ENOTRECOVERABLE, + [CLOUDABI_ENOTSOCK] = ENOTSOCK, + [CLOUDABI_ENOTSUP] = ENOTSUP, + [CLOUDABI_ENOTTY] = ENOTTY, + [CLOUDABI_ENXIO] = ENXIO, + [CLOUDABI_EOVERFLOW] = EOVERFLOW, + [CLOUDABI_EOWNERDEAD] = EOWNERDEAD, + [CLOUDABI_EPERM] = EPERM, + [CLOUDABI_EPIPE] = EPIPE, + [CLOUDABI_EPROTO] = EPROTO, + [CLOUDABI_EPROTONOSUPPORT] = EPROTONOSUPPORT, + [CLOUDABI_EPROTOTYPE] = EPROTOTYPE, + [CLOUDABI_ERANGE] = ERANGE, + [CLOUDABI_EROFS] = EROFS, + [CLOUDABI_ESPIPE] = ESPIPE, + [CLOUDABI_ESRCH] = ESRCH, + [CLOUDABI_ESTALE] = ESTALE, + [CLOUDABI_ETIMEDOUT] = ETIMEDOUT, + [CLOUDABI_ETXTBSY] = ETXTBSY, + [CLOUDABI_EXDEV] = EXDEV, + [CLOUDABI_ENOTCAPABLE] = ENOTCAPABLE, }; static int @@ -97,7 +163,8 @@ amd64_cloudabi64_fetch_retval(struct tru retval[0] = regs.r_rax; retval[1] = regs.r_rdx; *errorp = (regs.r_rflags & PSL_C) != 0; - if (*errorp && *retval >= 0 && *retval < nitems(cloudabi_errno_table)) + if (*errorp && *retval >= 0 && *retval < nitems(cloudabi_errno_table) && + cloudabi_errno_table[*retval] != 0) *retval = cloudabi_errno_table[*retval]; return (0); } Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Thu Oct 8 04:29:39 2015 (r289003) +++ head/usr.bin/truss/syscall.h Thu Oct 8 05:27:45 2015 (r289004) @@ -37,14 +37,21 @@ * $FreeBSD$ */ -enum Argtype { None = 1, Hex, Octal, Int, LongHex, Name, Ptr, Stat, Ioctl, Quad, - Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, Pollfd, - Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, +enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl, + Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, + Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, - Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace }; + Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, + + CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, + CloudABIFDStat, CloudABIFileStat, CloudABIFileType, + CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt, + CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags, + CloudABISignal, CloudABISockStat, CloudABISSFlags, + CloudABITimestamp, CloudABIULFlags, CloudABIWhence }; #define ARG_MASK 0xff #define OUT 0x100 Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Thu Oct 8 04:29:39 2015 (r289003) +++ head/usr.bin/truss/syscalls.c Thu Oct 8 05:27:45 2015 (r289004) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -68,6 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "truss.h" #include "extern.h" #include "syscall.h" @@ -382,6 +385,120 @@ static struct syscall decoded_syscalls[] { .name = "linux_stat64", .ret_type = 1, .nargs = 3, .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, + /* CloudABI system calls. */ + { .name = "cloudabi_sys_clock_res_get", .ret_type = 1, .nargs = 1, + .args = { { CloudABIClockID, 0 } } }, + { .name = "cloudabi_sys_clock_time_get", .ret_type = 1, .nargs = 2, + .args = { { CloudABIClockID, 0 }, { CloudABITimestamp, 1 } } }, + { .name = "cloudabi_sys_condvar_signal", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { CloudABIMFlags, 1 }, { UInt, 2 } } }, + { .name = "cloudabi_sys_fd_close", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "cloudabi_sys_fd_create1", .ret_type = 1, .nargs = 1, + .args = { { CloudABIFileType, 0 } } }, + { .name = "cloudabi_sys_fd_create2", .ret_type = 1, .nargs = 2, + .args = { { CloudABIFileType, 0 }, { PipeFds | OUT, 0 } } }, + { .name = "cloudabi_sys_fd_datasync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "cloudabi_sys_fd_dup", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "cloudabi_sys_fd_replace", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_fd_seek", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { CloudABIWhence, 2 } } }, + { .name = "cloudabi_sys_fd_stat_get", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CloudABIFDStat | OUT, 1 } } }, + { .name = "cloudabi_sys_fd_stat_put", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { CloudABIFDStat | IN, 1 }, + { ClouduABIFDSFlags, 2 } } }, + { .name = "cloudabi_sys_fd_sync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "cloudabi_sys_file_advise", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { Int, 1 }, { Int, 2 }, + { CloudABIAdvice, 3 } } }, + { .name = "cloudabi_sys_file_allocate", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { Int, 2 } } }, + { .name = "cloudabi_sys_file_create", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { BinString | IN, 1 }, + { CloudABIFileType, 3 } } }, + { .name = "cloudabi_sys_file_link", .ret_type = 1, .nargs = 4, + .args = { { CloudABILookup, 0 }, { BinString | IN, 1 }, + { Int, 3 }, { BinString | IN, 4 } } }, + { .name = "cloudabi_sys_file_open", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | IN, 1 }, + { CloudABIOFlags, 3 }, { CloudABIFDStat | IN, 4 } } }, + { .name = "cloudabi_sys_file_readdir", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, + { Int, 3 } } }, + { .name = "cloudabi_sys_file_readlink", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | IN, 1 }, + { BinString | OUT, 3 }, { Int, 4 } } }, + { .name = "cloudabi_sys_file_rename", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { BinString | IN, 1 }, + { Int, 3 }, { BinString | IN, 4 } } }, + { .name = "cloudabi_sys_file_stat_fget", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CloudABIFileStat | OUT, 1 } } }, + { .name = "cloudabi_sys_file_stat_fput", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { CloudABIFileStat | IN, 1 }, + { CloudABIFSFlags, 2 } } }, + { .name = "cloudabi_sys_file_stat_get", .ret_type = 1, .nargs = 3, + .args = { { CloudABILookup, 0 }, { BinString | IN, 1 }, + { CloudABIFileStat | OUT, 3 } } }, + { .name = "cloudabi_sys_file_stat_put", .ret_type = 1, .nargs = 4, + .args = { { CloudABILookup, 0 }, { BinString | IN, 1 }, + { CloudABIFileStat | IN, 3 }, { CloudABIFSFlags, 4 } } }, + { .name = "cloudabi_sys_file_symlink", .ret_type = 1, .nargs = 3, + .args = { { BinString | IN, 0 }, + { Int, 2 }, { BinString | IN, 3 } } }, + { .name = "cloudabi_sys_file_unlink", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { BinString | IN, 1 }, + { CloudABIULFlags, 3 } } }, + { .name = "cloudabi_sys_lock_unlock", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { CloudABIMFlags, 1 } } }, + { .name = "cloudabi_sys_mem_advise", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Int, 1 }, { CloudABIAdvice, 2 } } }, + { .name = "cloudabi_sys_mem_lock", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_mem_map", .ret_type = 1, .nargs = 6, + .args = { { Ptr, 0 }, { Int, 1 }, { CloudABIMProt, 2 }, + { CloudABIMFlags, 3 }, { Int, 4 }, { Int, 5 } } }, + { .name = "cloudabi_sys_mem_protect", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Int, 1 }, { CloudABIMProt, 2 } } }, + { .name = "cloudabi_sys_mem_sync", .ret_type = 1, .nargs = 3, + .args = { { Ptr, 0 }, { Int, 1 }, { CloudABIMSFlags, 2 } } }, + { .name = "cloudabi_sys_mem_unlock", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_mem_unmap", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_proc_exec", .ret_type = 1, .nargs = 5, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, + { IntArray, 3 }, { Int, 4 } } }, + { .name = "cloudabi_sys_proc_exit", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, + { .name = "cloudabi_sys_proc_fork", .ret_type = 1, .nargs = 0 }, + { .name = "cloudabi_sys_proc_raise", .ret_type = 1, .nargs = 1, + .args = { { CloudABISignal, 0 } } }, + { .name = "cloudabi_sys_random_get", .ret_type = 1, .nargs = 2, + .args = { { BinString | OUT, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_sock_accept", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CloudABISockStat | OUT, 1 } } }, + { .name = "cloudabi_sys_sock_bind", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { BinString | IN, 2 } } }, + { .name = "cloudabi_sys_sock_connect", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { BinString | IN, 2 } } }, + { .name = "cloudabi_sys_sock_listen", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Int, 1 } } }, + { .name = "cloudabi_sys_sock_shutdown", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CloudABISDFlags, 1 } } }, + { .name = "cloudabi_sys_sock_stat_get", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { CloudABISockStat | OUT, 1 }, + { CloudABISSFlags, 2 } } }, + { .name = "cloudabi_sys_thread_exit", .ret_type = 1, .nargs = 2, + .args = { { Ptr, 0 }, { CloudABIMFlags, 1 } } }, + { .name = "cloudabi_sys_thread_tcb_set", .ret_type = 1, .nargs = 1, + .args = { { Ptr, 0 } } }, + { .name = "cloudabi_sys_thread_yield", .ret_type = 1, .nargs = 0 }, + { .name = 0 }, }; static STAILQ_HEAD(, syscall) syscalls; @@ -598,6 +715,126 @@ static struct xlat sigprocmask_ops[] = { }; #undef X +#define X(a) { CLOUDABI_##a, #a }, + +static struct xlat cloudabi_advice[] = { + X(ADVICE_DONTNEED) X(ADVICE_NOREUSE) X(ADVICE_NORMAL) + X(ADVICE_RANDOM) X(ADVICE_SEQUENTIAL) X(ADVICE_WILLNEED) + XEND +}; + +static struct xlat cloudabi_clockid[] = { + X(CLOCK_MONOTONIC) X(CLOCK_PROCESS_CPUTIME_ID) + X(CLOCK_REALTIME) X(CLOCK_THREAD_CPUTIME_ID) + XEND +}; + +static struct xlat cloudabi_errno[] = { + X(E2BIG) X(EACCES) X(EADDRINUSE) X(EADDRNOTAVAIL) + X(EAFNOSUPPORT) X(EAGAIN) X(EALREADY) X(EBADF) X(EBADMSG) + X(EBUSY) X(ECANCELED) X(ECHILD) X(ECONNABORTED) X(ECONNREFUSED) + X(ECONNRESET) X(EDEADLK) X(EDESTADDRREQ) X(EDOM) X(EDQUOT) + X(EEXIST) X(EFAULT) X(EFBIG) X(EHOSTUNREACH) X(EIDRM) X(EILSEQ) + X(EINPROGRESS) X(EINTR) X(EINVAL) X(EIO) X(EISCONN) X(EISDIR) + X(ELOOP) X(EMFILE) X(EMLINK) X(EMSGSIZE) X(EMULTIHOP) + X(ENAMETOOLONG) X(ENETDOWN) X(ENETRESET) X(ENETUNREACH) + X(ENFILE) X(ENOBUFS) X(ENODEV) X(ENOENT) X(ENOEXEC) X(ENOLCK) + X(ENOLINK) X(ENOMEM) X(ENOMSG) X(ENOPROTOOPT) X(ENOSPC) + X(ENOSYS) X(ENOTCONN) X(ENOTDIR) X(ENOTEMPTY) X(ENOTRECOVERABLE) + X(ENOTSOCK) X(ENOTSUP) X(ENOTTY) X(ENXIO) X(EOVERFLOW) + X(EOWNERDEAD) X(EPERM) X(EPIPE) X(EPROTO) X(EPROTONOSUPPORT) + X(EPROTOTYPE) X(ERANGE) X(EROFS) X(ESPIPE) X(ESRCH) X(ESTALE) + X(ETIMEDOUT) X(ETXTBSY) X(EXDEV) X(ENOTCAPABLE) + XEND +}; + +static struct xlat cloudabi_fdflags[] = { + X(FDFLAG_APPEND) X(FDFLAG_DSYNC) X(FDFLAG_NONBLOCK) + X(FDFLAG_RSYNC) X(FDFLAG_SYNC) + XEND +}; + +static struct xlat cloudabi_fdsflags[] = { + X(FDSTAT_FLAGS) X(FDSTAT_RIGHTS) + XEND +}; + +static struct xlat cloudabi_filetype[] = { + X(FILETYPE_UNKNOWN) X(FILETYPE_BLOCK_DEVICE) + X(FILETYPE_CHARACTER_DEVICE) X(FILETYPE_DIRECTORY) + X(FILETYPE_FIFO) X(FILETYPE_POLL) X(FILETYPE_PROCESS) + X(FILETYPE_REGULAR_FILE) X(FILETYPE_SHARED_MEMORY) + X(FILETYPE_SOCKET_DGRAM) X(FILETYPE_SOCKET_SEQPACKET) + X(FILETYPE_SOCKET_STREAM) X(FILETYPE_SYMBOLIC_LINK) + XEND +}; + +static struct xlat cloudabi_fsflags[] = { + X(FILESTAT_ATIM) X(FILESTAT_ATIM_NOW) X(FILESTAT_MTIM) + X(FILESTAT_MTIM_NOW) X(FILESTAT_SIZE) + XEND +}; + +static struct xlat cloudabi_mflags[] = { + X(MAP_ANON) X(MAP_FIXED) X(MAP_PRIVATE) X(MAP_SHARED) + XEND +}; + +static struct xlat cloudabi_mprot[] = { + X(PROT_EXEC) X(PROT_WRITE) X(PROT_READ) + XEND +}; + +static struct xlat cloudabi_msflags[] = { + X(MS_ASYNC) X(MS_INVALIDATE) X(MS_SYNC) + XEND +}; + +static struct xlat cloudabi_oflags[] = { + X(O_CREAT) X(O_DIRECTORY) X(O_EXCL) X(O_TRUNC) + XEND +}; + +static struct xlat cloudabi_sa_family[] = { + X(AF_UNSPEC) X(AF_INET) X(AF_INET6) X(AF_UNIX) + XEND +}; + +static struct xlat cloudabi_sdflags[] = { + X(SHUT_RD) X(SHUT_WR) + XEND +}; + +static struct xlat cloudabi_signal[] = { + X(SIGABRT) X(SIGALRM) X(SIGBUS) X(SIGCHLD) X(SIGCONT) X(SIGFPE) + X(SIGHUP) X(SIGILL) X(SIGINT) X(SIGKILL) X(SIGPIPE) X(SIGQUIT) + X(SIGSEGV) X(SIGSTOP) X(SIGSYS) X(SIGTERM) X(SIGTRAP) X(SIGTSTP) + X(SIGTTIN) X(SIGTTOU) X(SIGURG) X(SIGUSR1) X(SIGUSR2) + X(SIGVTALRM) X(SIGXCPU) X(SIGXFSZ) + XEND +}; + +static struct xlat cloudabi_ssflags[] = { + X(SOCKSTAT_CLEAR_ERROR) + XEND +}; + +static struct xlat cloudabi_ssstate[] = { + X(SOCKSTAT_ACCEPTCONN) + XEND +}; + +static struct xlat cloudabi_ulflags[] = { + X(UNLINK_REMOVEDIR) + XEND +}; + +static struct xlat cloudabi_whence[] = { + X(WHENCE_CUR) X(WHENCE_END) X(WHENCE_SET) + XEND +}; + +#undef X #undef XEND /* @@ -910,6 +1147,9 @@ print_arg(struct syscall_args *sc, unsig case Int: fprintf(fp, "%d", (int)args[sc->offset]); break; + case UInt: + fprintf(fp, "%u", (unsigned int)args[sc->offset]); + break; case LongHex: fprintf(fp, "0x%lx", args[sc->offset]); break; @@ -1638,6 +1878,122 @@ print_arg(struct syscall_args *sc, unsig free(utrace_addr); break; } + case IntArray: { + int descriptors[16]; + unsigned long i, ndescriptors; + bool truncated; + + ndescriptors = args[sc->offset + 1]; + truncated = false; + if (ndescriptors > nitems(descriptors)) { + ndescriptors = nitems(descriptors); + truncated = true; + } + if (get_struct(pid, (void *)args[sc->offset], + descriptors, ndescriptors * sizeof(descriptors[0])) != -1) { + fprintf(fp, "{"); + for (i = 0; i < ndescriptors; i++) + fprintf(fp, i == 0 ? " %d" : ", %d", + descriptors[i]); + fprintf(fp, truncated ? ", ... }" : " }"); + } else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + + case CloudABIAdvice: + fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); + break; + case CloudABIClockID: + fputs(xlookup(cloudabi_clockid, args[sc->offset]), fp); + break; + case ClouduABIFDSFlags: + fputs(xlookup_bits(cloudabi_fdsflags, args[sc->offset]), fp); + break; + case CloudABIFDStat: { + cloudabi_fdstat_t fds; + if (get_struct(pid, (void *)args[sc->offset], &fds, sizeof(fds)) + != -1) { + fprintf(fp, "{ %s, ", + xlookup(cloudabi_filetype, fds.fs_filetype)); + fprintf(fp, "%s, ... }", + xlookup_bits(cloudabi_fdflags, fds.fs_flags)); + } else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + case CloudABIFileStat: { + cloudabi_filestat_t fsb; + if (get_struct(pid, (void *)args[sc->offset], &fsb, sizeof(fsb)) + != -1) + fprintf(fp, "{ %s, %lu }", + xlookup(cloudabi_filetype, fsb.st_filetype), + fsb.st_size); + else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + case CloudABIFileType: + fputs(xlookup(cloudabi_filetype, args[sc->offset]), fp); + break; + case CloudABIFSFlags: + fputs(xlookup_bits(cloudabi_fsflags, args[sc->offset]), fp); + break; + case CloudABILookup: + if ((args[sc->offset] & CLOUDABI_LOOKUP_SYMLINK_FOLLOW) != 0) + fprintf(fp, "%d|LOOKUP_SYMLINK_FOLLOW", + (int)args[sc->offset]); + else + fprintf(fp, "%d", (int)args[sc->offset]); + break; + case CloudABIMFlags: + fputs(xlookup_bits(cloudabi_mflags, args[sc->offset]), fp); + break; + case CloudABIMProt: + fputs(xlookup_bits(cloudabi_mprot, args[sc->offset]), fp); + break; + case CloudABIMSFlags: + fputs(xlookup_bits(cloudabi_msflags, args[sc->offset]), fp); + break; + case CloudABIOFlags: + fputs(xlookup_bits(cloudabi_oflags, args[sc->offset]), fp); + break; + case CloudABISDFlags: + fputs(xlookup_bits(cloudabi_sdflags, args[sc->offset]), fp); + break; + case CloudABISignal: + fputs(xlookup(cloudabi_signal, args[sc->offset]), fp); + break; + case CloudABISockStat: { + cloudabi_sockstat_t ss; + if (get_struct(pid, (void *)args[sc->offset], &ss, sizeof(ss)) + != -1) { + fprintf(fp, "{ %s, ", xlookup( + cloudabi_sa_family, ss.ss_sockname.sa_family)); + fprintf(fp, "%s, ", xlookup( + cloudabi_sa_family, ss.ss_peername.sa_family)); + fprintf(fp, "%s, ", xlookup( + cloudabi_errno, ss.ss_error)); + fprintf(fp, "%s }", xlookup_bits( + cloudabi_ssstate, ss.ss_state)); + } else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } + case CloudABISSFlags: + fputs(xlookup_bits(cloudabi_ssflags, args[sc->offset]), fp); + break; + case CloudABITimestamp: + fprintf(fp, "%lu.%09lus", args[sc->offset] / 1000000000, + args[sc->offset] % 1000000000); + break; + case CloudABIULFlags: + fputs(xlookup_bits(cloudabi_ulflags, args[sc->offset]), fp); + break; + case CloudABIWhence: + fputs(xlookup(cloudabi_whence, args[sc->offset]), fp); + break; + default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } From owner-svn-src-all@freebsd.org Thu Oct 8 06:14:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6589D1C18; Thu, 8 Oct 2015 06:14:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3118FF3B; Thu, 8 Oct 2015 06:14:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 305FB1BB3; Thu, 8 Oct 2015 06:14:22 +0000 (UTC) Date: Thu, 8 Oct 2015 06:14:22 +0000 From: Alexey Dokuchaev To: Craig Rodrigues Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289002 - head/release/scripts Message-ID: <20151008061422.GB33319@FreeBSD.org> References: <201510080328.t983SFZ0079596@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510080328.t983SFZ0079596@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 06:14:22 -0000 On Thu, Oct 08, 2015 at 03:28:15AM +0000, Craig Rodrigues wrote: > New Revision: 289002 > URL: https://svnweb.freebsd.org/changeset/base/289002 > > Log: > Use print as a function, not operator. Because?...(even when it looks obvious, commit logs should be crystal clear on what was done (30%) and why (70%). ./danfe From owner-svn-src-all@freebsd.org Thu Oct 8 06:34:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65DED9D0A97; Thu, 8 Oct 2015 06:34:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC70B62; Thu, 8 Oct 2015 06:34:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t986YCni036303; Thu, 8 Oct 2015 06:34:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t986YCQQ036302; Thu, 8 Oct 2015 06:34:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510080634.t986YCQQ036302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 8 Oct 2015 06:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289005 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 06:34:13 -0000 Author: delphij Date: Thu Oct 8 06:34:12 2015 New Revision: 289005 URL: https://svnweb.freebsd.org/changeset/base/289005 Log: Belately bump __FreeBSD_version after r288572 which makes a change to zfeature_info. This is a direct commit to stable/10. Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Thu Oct 8 05:27:45 2015 (r289004) +++ stable/10/sys/sys/param.h Thu Oct 8 06:34:12 2015 (r289005) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1002500 /* Master, propagated to newvers */ +#define __FreeBSD_version 1002501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Thu Oct 8 07:17:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACEAA9D091D; Thu, 8 Oct 2015 07:17:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 606F9FB3; Thu, 8 Oct 2015 07:17:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987HBAo048163; Thu, 8 Oct 2015 07:17:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987HB2x048161; Thu, 8 Oct 2015 07:17:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080717.t987HB2x048161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289006 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:17:12 -0000 Author: adrian Date: Thu Oct 8 07:17:11 2015 New Revision: 289006 URL: https://svnweb.freebsd.org/changeset/base/289006 Log: wpi(4): drop unnecessary locking in wpi_set_pslevel(). Submitted by: Differential Revision: https://reviews.freebsd.org/D3758 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 06:34:12 2015 (r289005) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:17:11 2015 (r289006) @@ -2116,6 +2116,7 @@ wpi_cmd_done(struct wpi_softc *sc, struc { struct wpi_tx_ring *ring = &sc->txq[WPI_CMD_QUEUE_NUM]; struct wpi_tx_data *data; + struct wpi_tx_cmd *cmd; DPRINTF(sc, WPI_DEBUG_CMD, "cmd notification qid %x idx %d flags %x " "type %s len %d\n", desc->qid, desc->idx, @@ -2128,6 +2129,7 @@ wpi_cmd_done(struct wpi_softc *sc, struc KASSERT(ring->queued == 0, ("ring->queued must be 0")); data = &ring->data[desc->idx]; + cmd = &ring->cmd[desc->idx]; /* If the command was mapped in an mbuf, free it. */ if (data->m != NULL) { @@ -2138,11 +2140,16 @@ wpi_cmd_done(struct wpi_softc *sc, struc data->m = NULL; } - wakeup(&ring->cmd[desc->idx]); + wakeup(cmd); if (desc->type == WPI_CMD_SET_POWER_MODE) { + struct wpi_pmgt_cmd *pcmd = (struct wpi_pmgt_cmd *)cmd->data; + + bus_dmamap_sync(ring->data_dmat, ring->cmd_dma.map, + BUS_DMASYNC_POSTREAD); + WPI_TXQ_LOCK(sc); - if (sc->sc_flags & WPI_PS_PATH) { + if (le16toh(pcmd->flags) & WPI_PS_ALLOW_SLEEP) { sc->sc_update_rx_ring = wpi_update_rx_ring_ps; sc->sc_update_tx_ring = wpi_update_tx_ring_ps; } else { @@ -3714,13 +3721,8 @@ wpi_set_pslevel(struct wpi_softc *sc, ui pmgt = &wpi_pmgt[1][level]; memset(&cmd, 0, sizeof cmd); - WPI_TXQ_LOCK(sc); - if (level != 0) { /* not CAM */ + if (level != 0) /* not CAM */ cmd.flags |= htole16(WPI_PS_ALLOW_SLEEP); - sc->sc_flags |= WPI_PS_PATH; - } else - sc->sc_flags &= ~WPI_PS_PATH; - WPI_TXQ_UNLOCK(sc); /* Retrieve PCIe Active State Power Management (ASPM). */ reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1); if (!(reg & 0x1)) /* L0s Entry disabled. */ Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Thu Oct 8 06:34:12 2015 (r289005) +++ head/sys/dev/wpi/if_wpivar.h Thu Oct 8 07:17:11 2015 (r289006) @@ -165,8 +165,6 @@ struct wpi_softc { device_t sc_dev; int sc_debug; - int sc_flags; -#define WPI_PS_PATH (1 << 0) int sc_running; struct mtx sc_mtx; From owner-svn-src-all@freebsd.org Thu Oct 8 07:17:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D6ED9D0978; Thu, 8 Oct 2015 07:17:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE0216E; Thu, 8 Oct 2015 07:17:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987HaQA048220; Thu, 8 Oct 2015 07:17:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987Ha7j048218; Thu, 8 Oct 2015 07:17:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080717.t987Ha7j048218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289007 - in stable/10: share/man/man4 sys/dev/usb/quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:17:37 -0000 Author: hselasky Date: Thu Oct 8 07:17:35 2015 New Revision: 289007 URL: https://svnweb.freebsd.org/changeset/base/289007 Log: MFC r288180: Implement support for reading USB quirks from the kernel environment. Refer to the usb_quirk(4) manual page for more details on how to use this new feature. Submitted by: Maxime Soule PR: 203249 Modified: stable/10/share/man/man4/usb_quirk.4 stable/10/sys/dev/usb/quirk/usb_quirk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 ============================================================================== --- stable/10/share/man/man4/usb_quirk.4 Thu Oct 8 07:17:11 2015 (r289006) +++ stable/10/share/man/man4/usb_quirk.4 Thu Oct 8 07:17:35 2015 (r289007) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2015 +.Dd September 24, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -177,7 +177,53 @@ ejects after HID command .Pp See .Pa /sys/dev/usb/quirk/usb_quirk.h -for the complete list of supported quirks. +or run "usbconfig dump_quirk_names" for the complete list of supported quirks. +.Sh LOADER TUNABLE +The following tunable can be set at the +.Xr loader 8 +prompt before booting the kernel, or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.usb.quirk.%d +The value is a string whose format is: +.Bd -literal -offset indent +.Qo VendorId ProductId LowRevision HighRevision UQ_QUIRK,... Qc +.Ed +.Pp +Installs the quirks +.Ic UQ_QUIRK,... +for all USB devices matching +.Ic VendorId , +.Ic ProductId +and has a hardware revision between and including +.Ic LowRevision +and +.Ic HighRevision . +.Pp +.Ic VendorId , +.Ic ProductId , +.Ic LowRevision +and +.Ic HighRevision +are all 16 bits numbers which can be decimal or hexadecimal based. +.Pp +A maximum of 100 variables +.Ic hw.usb.quirk.0, .1, ..., .99 +can be defined. +.Pp +If a matching entry is found in the kernel's internal quirks table, it +is replaced by the new definition. +.Pp +Else a new entry is created given that the quirk table is not full. +.Pp +The kernel iterates over the +.Ic hw.usb.quirk.N +variables starting at +.Ic N = 0 +and stops at +.Ic N = 99 +or the first non-existing one. +.El .Sh EXAMPLES After attaching a .Nm u3g @@ -186,6 +232,13 @@ device which appears as a USB device on .Bd -literal -offset indent usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT .Ed +.Pp +To install a quirk at boot time, place one or several lines like the +following in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.usb.quirk.0="0x04d9 0xfa50 0 0xffff UQ_KBD_IGNORE" +.Ed .Sh SEE ALSO .Xr usbconfig 8 .Sh HISTORY Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:17:11 2015 (r289006) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:17:35 2015 (r289007) @@ -61,6 +61,7 @@ MODULE_VERSION(usb_quirk, 1); #define USB_DEV_QUIRKS_MAX 384 #define USB_SUB_QUIRKS_MAX 8 +#define USB_QUIRK_ENVROOT "hw.usb.quirk." struct usb_quirk_entry { uint16_t vid; @@ -607,8 +608,32 @@ static const char *usb_quirk_str[USB_QUI static const char * usb_quirkstr(uint16_t quirk) { - return ((quirk < USB_QUIRK_MAX) ? - usb_quirk_str[quirk] : "USB_QUIRK_UNKNOWN"); + return ((quirk < USB_QUIRK_MAX && usb_quirk_str[quirk] != NULL) ? + usb_quirk_str[quirk] : "UQ_UNKNOWN"); +} + +/*------------------------------------------------------------------------* + * usb_strquirk + * + * This function converts a string into a USB quirk code. + * + * Returns: + * Less than USB_QUIRK_MAX: Quirk code + * Else: Quirk code not found + *------------------------------------------------------------------------*/ +static uint16_t +usb_strquirk(const char *str, size_t len) +{ + const char *quirk; + uint16_t x; + + for (x = 0; x != USB_QUIRK_MAX; x++) { + quirk = usb_quirkstr(x); + if (strncmp(str, quirk, len) == 0 && + quirk[len] == 0) + break; + } + return (x); } /*------------------------------------------------------------------------* @@ -853,12 +878,122 @@ usb_quirk_ioctl(unsigned long cmd, caddr return (ENOIOCTL); } +/*------------------------------------------------------------------------* + * usb_quirk_strtou16 + * + * Helper function to scan a 16-bit integer. + *------------------------------------------------------------------------*/ +static uint16_t +usb_quirk_strtou16(const char **pptr, const char *name, const char *what) +{ + unsigned long value; + char *end; + + value = strtoul(*pptr, &end, 0); + if (value > 65535 || *pptr == end || (*end != ' ' && *end != '\t')) { + printf("%s: %s 16-bit %s value set to zero\n", + name, what, *end == 0 ? "incomplete" : "invalid"); + return (0); + } + *pptr = end + 1; + return ((uint16_t)value); +} + +/*------------------------------------------------------------------------* + * usb_quirk_add_entry_from_str + * + * Add a USB quirk entry from string. + * "VENDOR PRODUCT LO_REV HI_REV QUIRK[,QUIRK[,...]]" + *------------------------------------------------------------------------*/ +static void +usb_quirk_add_entry_from_str(const char *name, const char *env) +{ + struct usb_quirk_entry entry = { }; + struct usb_quirk_entry *new; + uint16_t quirk_idx; + uint16_t quirk; + const char *end; + + /* check for invalid environment variable */ + if (name == NULL || env == NULL) + return; + + if (bootverbose) + printf("Adding USB QUIRK '%s' = '%s'\n", name, env); + + /* parse device information */ + entry.vid = usb_quirk_strtou16(&env, name, "Vendor ID"); + entry.pid = usb_quirk_strtou16(&env, name, "Product ID"); + entry.lo_rev = usb_quirk_strtou16(&env, name, "Low revision"); + entry.hi_rev = usb_quirk_strtou16(&env, name, "High revision"); + + /* parse quirk information */ + quirk_idx = 0; + while (*env != 0 && quirk_idx != USB_SUB_QUIRKS_MAX) { + /* skip whitespace before quirks */ + while (*env == ' ' || *env == '\t') + env++; + + /* look for quirk separation character */ + end = strchr(env, ','); + if (end == NULL) + end = env + strlen(env); + + /* lookup quirk in string table */ + quirk = usb_strquirk(env, end - env); + if (quirk < USB_QUIRK_MAX) { + entry.quirks[quirk_idx++] = quirk; + } else { + printf("%s: unknown USB quirk '%.*s' (skipped)\n", + name, (int)(end - env), env); + } + env = end; + + /* skip quirk delimiter, if any */ + if (*env != 0) + env++; + } + + /* register quirk */ + if (quirk_idx != 0) { + if (*env != 0) { + printf("%s: Too many USB quirks, only %d allowed!\n", + name, USB_SUB_QUIRKS_MAX); + } + mtx_lock(&usb_quirk_mtx); + new = usb_quirk_get_entry(entry.vid, entry.pid, + entry.lo_rev, entry.hi_rev, 1); + if (new == NULL) + printf("%s: USB quirks table is full!\n", name); + else + memcpy(new->quirks, entry.quirks, sizeof(entry.quirks)); + mtx_unlock(&usb_quirk_mtx); + } else { + printf("%s: No USB quirks found!\n", name); + } +} + static void usb_quirk_init(void *arg) { + char envkey[sizeof(USB_QUIRK_ENVROOT) + 2]; /* 2 digits max, 0 to 99 */ + int i; + /* initialize mutex */ mtx_init(&usb_quirk_mtx, "USB quirk", NULL, MTX_DEF); + /* look for quirks defined by the environment variable */ + for (i = 0; i != 100; i++) { + snprintf(envkey, sizeof(envkey), USB_QUIRK_ENVROOT "%d", i); + + /* Stop at first undefined var */ + if (!testenv(envkey)) + break; + + /* parse environment variable */ + usb_quirk_add_entry_from_str(envkey, getenv(envkey)); + } + /* register our function */ usb_test_quirk_p = &usb_test_quirk_by_info; usb_quirk_ioctl_p = &usb_quirk_ioctl; From owner-svn-src-all@freebsd.org Thu Oct 8 07:18:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C456B9D0A33; Thu, 8 Oct 2015 07:18:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E7DE2F5; Thu, 8 Oct 2015 07:18:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987ISST048331; Thu, 8 Oct 2015 07:18:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987ISqf048330; Thu, 8 Oct 2015 07:18:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080718.t987ISqf048330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289008 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:18:30 -0000 Author: adrian Date: Thu Oct 8 07:18:28 2015 New Revision: 289008 URL: https://svnweb.freebsd.org/changeset/base/289008 Log: wpi(4): add some branch predictions. Submitted by: Differential Revision: https://reviews.freebsd.org/D3759 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:17:35 2015 (r289007) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:18:28 2015 (r289008) @@ -1925,7 +1925,7 @@ wpi_rx_done(struct wpi_softc *sc, struct stat = (struct wpi_rx_stat *)(desc + 1); - if (stat->len > WPI_STAT_MAXLEN) { + if (__predict_false(stat->len > WPI_STAT_MAXLEN)) { device_printf(sc->sc_dev, "invalid RX statistic header\n"); goto fail1; } @@ -1955,7 +1955,7 @@ wpi_rx_done(struct wpi_softc *sc, struct } m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); - if (m1 == NULL) { + if (__predict_false(m1 == NULL)) { DPRINTF(sc, WPI_DEBUG_ANY, "%s: no mbuf to restock ring\n", __func__); goto fail1; @@ -1964,7 +1964,7 @@ wpi_rx_done(struct wpi_softc *sc, struct error = bus_dmamap_load(ring->data_dmat, data->map, mtod(m1, void *), MJUMPAGESIZE, wpi_dma_map_addr, &paddr, BUS_DMA_NOWAIT); - if (error != 0 && error != EFBIG) { + if (__predict_false(error != 0 && error != EFBIG)) { device_printf(sc->sc_dev, "%s: bus_dmamap_load failed, error %d\n", __func__, error); m_freem(m1); @@ -2198,7 +2198,7 @@ wpi_notif_intr(struct wpi_softc *sc) /* An 802.11 frame has been received. */ wpi_rx_done(sc, desc, data); - if (sc->sc_running == 0) { + if (__predict_false(sc->sc_running == 0)) { /* wpi_stop() was called. */ return; } @@ -2527,7 +2527,8 @@ wpi_intr(void *arg) r1 = WPI_READ(sc, WPI_INT); - if (r1 == 0xffffffff || (r1 & 0xfffffff0) == 0xa5a5a5a0) + if (__predict_false(r1 == 0xffffffff || + (r1 & 0xfffffff0) == 0xa5a5a5a0)) goto end; /* Hardware gone! */ r2 = WPI_READ(sc, WPI_FH_INT); @@ -2542,7 +2543,7 @@ wpi_intr(void *arg) WPI_WRITE(sc, WPI_INT, r1); WPI_WRITE(sc, WPI_FH_INT, r2); - if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { + if (__predict_false(r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR))) { device_printf(sc->sc_dev, "fatal firmware error\n"); #ifdef WPI_DEBUG wpi_debug_registers(sc); @@ -2567,7 +2568,7 @@ wpi_intr(void *arg) done: /* Re-enable interrupts. */ - if (sc->sc_running) + if (__predict_true(sc->sc_running)) WPI_WRITE(sc, WPI_INT_MASK, WPI_INT_MASK_DEF); end: WPI_UNLOCK(sc); @@ -2591,7 +2592,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); - if (sc->sc_running == 0) { + if (__predict_false(sc->sc_running == 0)) { /* wpi_stop() was called */ error = ENETDOWN; goto fail; @@ -2644,7 +2645,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, buf->m, segs, &nsegs, BUS_DMA_NOWAIT); - if (error != 0) { + if (__predict_false(error != 0)) { device_printf(sc->sc_dev, "%s: can't map mbuf (error %d)\n", __func__, error); @@ -3061,7 +3062,7 @@ wpi_transmit(struct ieee80211com *ic, st DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); /* Check if interface is up & running. */ - if (sc->sc_running == 0) { + if (__predict_false(sc->sc_running == 0)) { error = ENXIO; goto unlock; } @@ -3160,7 +3161,7 @@ wpi_cmd(struct wpi_softc *sc, int code, DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); - if (sc->sc_running == 0) { + if (__predict_false(sc->sc_running == 0)) { /* wpi_stop() was called */ if (code == WPI_CMD_SCAN) error = ENETDOWN; From owner-svn-src-all@freebsd.org Thu Oct 8 07:19:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65E179D0B57; Thu, 8 Oct 2015 07:19:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FEE06C0; Thu, 8 Oct 2015 07:19:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987JwB1048429; Thu, 8 Oct 2015 07:19:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987JvPb048427; Thu, 8 Oct 2015 07:19:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080719.t987JvPb048427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289009 - in stable/9: share/man/man4 sys/dev/usb/quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:19:59 -0000 Author: hselasky Date: Thu Oct 8 07:19:57 2015 New Revision: 289009 URL: https://svnweb.freebsd.org/changeset/base/289009 Log: MFC r288180: Implement support for reading USB quirks from the kernel environment. Refer to the usb_quirk(4) manual page for more details on how to use this new feature. Submitted by: Maxime Soule PR: 203249 Modified: stable/9/share/man/man4/usb_quirk.4 stable/9/sys/dev/usb/quirk/usb_quirk.c Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/usb_quirk.4 ============================================================================== --- stable/9/share/man/man4/usb_quirk.4 Thu Oct 8 07:18:28 2015 (r289008) +++ stable/9/share/man/man4/usb_quirk.4 Thu Oct 8 07:19:57 2015 (r289009) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2015 +.Dd September 24, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -177,7 +177,53 @@ ejects after HID command .Pp See .Pa /sys/dev/usb/quirk/usb_quirk.h -for the complete list of supported quirks. +or run "usbconfig dump_quirk_names" for the complete list of supported quirks. +.Sh LOADER TUNABLE +The following tunable can be set at the +.Xr loader 8 +prompt before booting the kernel, or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.usb.quirk.%d +The value is a string whose format is: +.Bd -literal -offset indent +.Qo VendorId ProductId LowRevision HighRevision UQ_QUIRK,... Qc +.Ed +.Pp +Installs the quirks +.Ic UQ_QUIRK,... +for all USB devices matching +.Ic VendorId , +.Ic ProductId +and has a hardware revision between and including +.Ic LowRevision +and +.Ic HighRevision . +.Pp +.Ic VendorId , +.Ic ProductId , +.Ic LowRevision +and +.Ic HighRevision +are all 16 bits numbers which can be decimal or hexadecimal based. +.Pp +A maximum of 100 variables +.Ic hw.usb.quirk.0, .1, ..., .99 +can be defined. +.Pp +If a matching entry is found in the kernel's internal quirks table, it +is replaced by the new definition. +.Pp +Else a new entry is created given that the quirk table is not full. +.Pp +The kernel iterates over the +.Ic hw.usb.quirk.N +variables starting at +.Ic N = 0 +and stops at +.Ic N = 99 +or the first non-existing one. +.El .Sh EXAMPLES After attaching a .Nm u3g @@ -186,6 +232,13 @@ device which appears as a USB device on .Bd -literal -offset indent usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT .Ed +.Pp +To install a quirk at boot time, place one or several lines like the +following in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.usb.quirk.0="0x04d9 0xfa50 0 0xffff UQ_KBD_IGNORE" +.Ed .Sh SEE ALSO .Xr usbconfig 8 .Sh HISTORY Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:18:28 2015 (r289008) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:19:57 2015 (r289009) @@ -61,6 +61,7 @@ MODULE_VERSION(usb_quirk, 1); #define USB_DEV_QUIRKS_MAX 384 #define USB_SUB_QUIRKS_MAX 8 +#define USB_QUIRK_ENVROOT "hw.usb.quirk." struct usb_quirk_entry { uint16_t vid; @@ -607,8 +608,32 @@ static const char *usb_quirk_str[USB_QUI static const char * usb_quirkstr(uint16_t quirk) { - return ((quirk < USB_QUIRK_MAX) ? - usb_quirk_str[quirk] : "USB_QUIRK_UNKNOWN"); + return ((quirk < USB_QUIRK_MAX && usb_quirk_str[quirk] != NULL) ? + usb_quirk_str[quirk] : "UQ_UNKNOWN"); +} + +/*------------------------------------------------------------------------* + * usb_strquirk + * + * This function converts a string into a USB quirk code. + * + * Returns: + * Less than USB_QUIRK_MAX: Quirk code + * Else: Quirk code not found + *------------------------------------------------------------------------*/ +static uint16_t +usb_strquirk(const char *str, size_t len) +{ + const char *quirk; + uint16_t x; + + for (x = 0; x != USB_QUIRK_MAX; x++) { + quirk = usb_quirkstr(x); + if (strncmp(str, quirk, len) == 0 && + quirk[len] == 0) + break; + } + return (x); } /*------------------------------------------------------------------------* @@ -853,12 +878,122 @@ usb_quirk_ioctl(unsigned long cmd, caddr return (ENOIOCTL); } +/*------------------------------------------------------------------------* + * usb_quirk_strtou16 + * + * Helper function to scan a 16-bit integer. + *------------------------------------------------------------------------*/ +static uint16_t +usb_quirk_strtou16(const char **pptr, const char *name, const char *what) +{ + unsigned long value; + char *end; + + value = strtoul(*pptr, &end, 0); + if (value > 65535 || *pptr == end || (*end != ' ' && *end != '\t')) { + printf("%s: %s 16-bit %s value set to zero\n", + name, what, *end == 0 ? "incomplete" : "invalid"); + return (0); + } + *pptr = end + 1; + return ((uint16_t)value); +} + +/*------------------------------------------------------------------------* + * usb_quirk_add_entry_from_str + * + * Add a USB quirk entry from string. + * "VENDOR PRODUCT LO_REV HI_REV QUIRK[,QUIRK[,...]]" + *------------------------------------------------------------------------*/ +static void +usb_quirk_add_entry_from_str(const char *name, const char *env) +{ + struct usb_quirk_entry entry = { }; + struct usb_quirk_entry *new; + uint16_t quirk_idx; + uint16_t quirk; + const char *end; + + /* check for invalid environment variable */ + if (name == NULL || env == NULL) + return; + + if (bootverbose) + printf("Adding USB QUIRK '%s' = '%s'\n", name, env); + + /* parse device information */ + entry.vid = usb_quirk_strtou16(&env, name, "Vendor ID"); + entry.pid = usb_quirk_strtou16(&env, name, "Product ID"); + entry.lo_rev = usb_quirk_strtou16(&env, name, "Low revision"); + entry.hi_rev = usb_quirk_strtou16(&env, name, "High revision"); + + /* parse quirk information */ + quirk_idx = 0; + while (*env != 0 && quirk_idx != USB_SUB_QUIRKS_MAX) { + /* skip whitespace before quirks */ + while (*env == ' ' || *env == '\t') + env++; + + /* look for quirk separation character */ + end = strchr(env, ','); + if (end == NULL) + end = env + strlen(env); + + /* lookup quirk in string table */ + quirk = usb_strquirk(env, end - env); + if (quirk < USB_QUIRK_MAX) { + entry.quirks[quirk_idx++] = quirk; + } else { + printf("%s: unknown USB quirk '%.*s' (skipped)\n", + name, (int)(end - env), env); + } + env = end; + + /* skip quirk delimiter, if any */ + if (*env != 0) + env++; + } + + /* register quirk */ + if (quirk_idx != 0) { + if (*env != 0) { + printf("%s: Too many USB quirks, only %d allowed!\n", + name, USB_SUB_QUIRKS_MAX); + } + mtx_lock(&usb_quirk_mtx); + new = usb_quirk_get_entry(entry.vid, entry.pid, + entry.lo_rev, entry.hi_rev, 1); + if (new == NULL) + printf("%s: USB quirks table is full!\n", name); + else + memcpy(new->quirks, entry.quirks, sizeof(entry.quirks)); + mtx_unlock(&usb_quirk_mtx); + } else { + printf("%s: No USB quirks found!\n", name); + } +} + static void usb_quirk_init(void *arg) { + char envkey[sizeof(USB_QUIRK_ENVROOT) + 2]; /* 2 digits max, 0 to 99 */ + int i; + /* initialize mutex */ mtx_init(&usb_quirk_mtx, "USB quirk", NULL, MTX_DEF); + /* look for quirks defined by the environment variable */ + for (i = 0; i != 100; i++) { + snprintf(envkey, sizeof(envkey), USB_QUIRK_ENVROOT "%d", i); + + /* Stop at first undefined var */ + if (!testenv(envkey)) + break; + + /* parse environment variable */ + usb_quirk_add_entry_from_str(envkey, getenv(envkey)); + } + /* register our function */ usb_test_quirk_p = &usb_test_quirk_by_info; usb_quirk_ioctl_p = &usb_quirk_ioctl; From owner-svn-src-all@freebsd.org Thu Oct 8 07:20:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06ECE9D0BE6; Thu, 8 Oct 2015 07:20:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA7518DE; Thu, 8 Oct 2015 07:20:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987KMbv048524; Thu, 8 Oct 2015 07:20:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987KMFs048523; Thu, 8 Oct 2015 07:20:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080720.t987KMFs048523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289010 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:20:24 -0000 Author: adrian Date: Thu Oct 8 07:20:22 2015 New Revision: 289010 URL: https://svnweb.freebsd.org/changeset/base/289010 Log: wpi(4): fix 'maybe uninitialized' warnings Submitted by: Differential Revision: https://reviews.freebsd.org/D3760 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:19:57 2015 (r289009) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:20:22 2015 (r289010) @@ -2731,6 +2731,7 @@ wpi_tx_data(struct wpi_softc *sc, struct wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + swcrypt = 1; /* Select EDCA Access Category and TX ring for this frame. */ if (IEEE80211_QOS_HAS_SEQ(wh)) { @@ -2844,7 +2845,7 @@ wpi_tx_data(struct wpi_softc *sc, struct tx->id = wn->id; } - if (k != NULL && !swcrypt) { + if (!swcrypt) { switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: tx->security = WPI_CIPHER_CCMP; @@ -2894,6 +2895,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + swcrypt = 1; ac = params->ibp_pri & 3; @@ -2952,7 +2954,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st tx->timeout = htole16(2); } - if (k != NULL && !swcrypt) { + if (!swcrypt) { switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: tx->security = WPI_CIPHER_CCMP; From owner-svn-src-all@freebsd.org Thu Oct 8 07:21:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381719D0EEA; Thu, 8 Oct 2015 07:21:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 046B3CA5; Thu, 8 Oct 2015 07:21:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987LbbE051134; Thu, 8 Oct 2015 07:21:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987Lb7s051133; Thu, 8 Oct 2015 07:21:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080721.t987Lb7s051133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289011 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:21:38 -0000 Author: adrian Date: Thu Oct 8 07:21:36 2015 New Revision: 289011 URL: https://svnweb.freebsd.org/changeset/base/289011 Log: wpi(4): fix some byteorder conversions Submitted by: Differential Revision: https://reviews.freebsd.org/D3761 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:20:22 2015 (r289010) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:21:36 2015 (r289011) @@ -2265,7 +2265,8 @@ wpi_notif_intr(struct wpi_softc *sc) "duration %u, status %x, tsf %ju, mode %x\n", stat->rtsfailcnt, stat->ackfailcnt, stat->btkillcnt, stat->rate, le32toh(stat->duration), - le32toh(stat->status), *tsf, *mode); + le32toh(stat->status), le64toh(*tsf), + le32toh(*mode)); break; } @@ -4121,7 +4122,7 @@ wpi_scan(struct wpi_softc *sc, struct ie * after the scan probe request */ chan = (struct wpi_scan_chan *)frm; - chan->chan = htole16(ieee80211_chan2ieee(ic, c)); + chan->chan = ieee80211_chan2ieee(ic, c); chan->flags = 0; if (nssid) { hdr->crc_threshold = WPI_SCAN_CRC_TH_DEFAULT; From owner-svn-src-all@freebsd.org Thu Oct 8 07:22:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 687909D0FDF; Thu, 8 Oct 2015 07:22:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 331CBE69; Thu, 8 Oct 2015 07:22:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987Me3H051232; Thu, 8 Oct 2015 07:22:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987MeYU051231; Thu, 8 Oct 2015 07:22:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080722.t987MeYU051231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289012 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:22:41 -0000 Author: adrian Date: Thu Oct 8 07:22:40 2015 New Revision: 289012 URL: https://svnweb.freebsd.org/changeset/base/289012 Log: wpi(4): check size before transmitting frames In addition to https://bz-attachments.freebsd.org/attachment.cgi?id=156112; fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=144987. Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3762 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:21:36 2015 (r289011) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:22:40 2015 (r289012) @@ -2603,6 +2603,11 @@ wpi_cmd2(struct wpi_softc *sc, struct wp hdrlen = ieee80211_anyhdrsize(wh); totlen = buf->m->m_pkthdr.len; + if (__predict_false(totlen < sizeof(struct ieee80211_frame_min))) { + error = EINVAL; + goto fail; + } + if (hdrlen & 3) { /* First segment length must be a multiple of 4. */ pad = 4 - (hdrlen & 3); From owner-svn-src-all@freebsd.org Thu Oct 8 07:24:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BE4A9D11AE; Thu, 8 Oct 2015 07:24:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC59300; Thu, 8 Oct 2015 07:24:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987OtVW051417; Thu, 8 Oct 2015 07:24:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987OsBI051415; Thu, 8 Oct 2015 07:24:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080724.t987OsBI051415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289013 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:24:56 -0000 Author: hselasky Date: Thu Oct 8 07:24:54 2015 New Revision: 289013 URL: https://svnweb.freebsd.org/changeset/base/289013 Log: MFC r287355, r287772 and r287825: Add new USB PCI IDs. PR: 202807 Submitted by: Dmitry Luhtionov Differential Revision: https://reviews.freebsd.org/D3665 Modified: stable/10/sys/dev/usb/controller/uhci_pci.c stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/uhci_pci.c Thu Oct 8 07:22:40 2015 (r289012) +++ stable/10/sys/dev/usb/controller/uhci_pci.c Thu Oct 8 07:24:54 2015 (r289013) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include "usb_if.h" #define PCI_UHCI_VENDORID_INTEL 0x8086 +#define PCI_UHCI_VENDORID_HP 0x103c #define PCI_UHCI_VENDORID_VIA 0x1106 /* PIIX4E has no separate stepping */ @@ -222,6 +223,9 @@ uhci_pci_match(device_t self) case 0x76028086: return ("Intel 82372FB/82468GX USB controller"); + case 0x3300103c: + return ("HP iLO Standard Virtual USB controller"); + case 0x30381106: return ("VIA 83C572 USB controller"); @@ -309,6 +313,9 @@ uhci_pci_attach(device_t self) case PCI_UHCI_VENDORID_INTEL: sprintf(sc->sc_vendor, "Intel"); break; + case PCI_UHCI_VENDORID_HP: + sprintf(sc->sc_vendor, "HP"); + break; case PCI_UHCI_VENDORID_VIA: sprintf(sc->sc_vendor, "VIA"); break; Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 07:22:40 2015 (r289012) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 07:24:54 2015 (r289013) @@ -112,6 +112,9 @@ xhci_pci_match(device_t self) case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0xa01b177d: + return ("Cavium ThunderX USB 3.0 controller"); + default: break; } From owner-svn-src-all@freebsd.org Thu Oct 8 07:27:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B18FD9D1434; Thu, 8 Oct 2015 07:27:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 613AD7E6; Thu, 8 Oct 2015 07:27:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987RPF5051732; Thu, 8 Oct 2015 07:27:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987RP5M051730; Thu, 8 Oct 2015 07:27:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080727.t987RP5M051730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289014 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:27:26 -0000 Author: hselasky Date: Thu Oct 8 07:27:25 2015 New Revision: 289014 URL: https://svnweb.freebsd.org/changeset/base/289014 Log: MFC r287355, r287772 and r287825: Add new USB PCI IDs. PR: 202807 Submitted by: Dmitry Luhtionov Differential Revision: https://reviews.freebsd.org/D3665 Modified: stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci_pci.c Thu Oct 8 07:24:54 2015 (r289013) +++ stable/9/sys/dev/usb/controller/uhci_pci.c Thu Oct 8 07:27:25 2015 (r289014) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include "usb_if.h" #define PCI_UHCI_VENDORID_INTEL 0x8086 +#define PCI_UHCI_VENDORID_HP 0x103c #define PCI_UHCI_VENDORID_VIA 0x1106 /* PIIX4E has no separate stepping */ @@ -222,6 +223,9 @@ uhci_pci_match(device_t self) case 0x76028086: return ("Intel 82372FB/82468GX USB controller"); + case 0x3300103c: + return ("HP iLO Standard Virtual USB controller"); + case 0x30381106: return ("VIA 83C572 USB controller"); @@ -309,6 +313,9 @@ uhci_pci_attach(device_t self) case PCI_UHCI_VENDORID_INTEL: sprintf(sc->sc_vendor, "Intel"); break; + case PCI_UHCI_VENDORID_HP: + sprintf(sc->sc_vendor, "HP"); + break; case PCI_UHCI_VENDORID_VIA: sprintf(sc->sc_vendor, "VIA"); break; Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 07:24:54 2015 (r289013) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 07:27:25 2015 (r289014) @@ -112,6 +112,9 @@ xhci_pci_match(device_t self) case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0xa01b177d: + return ("Cavium ThunderX USB 3.0 controller"); + default: break; } From owner-svn-src-all@freebsd.org Thu Oct 8 07:29:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 525DF9D15DA; Thu, 8 Oct 2015 07:29:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 199B2A6E; Thu, 8 Oct 2015 07:29:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987TVbC051919; Thu, 8 Oct 2015 07:29:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987TUEM051917; Thu, 8 Oct 2015 07:29:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080729.t987TUEM051917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289015 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:29:32 -0000 Author: hselasky Date: Thu Oct 8 07:29:30 2015 New Revision: 289015 URL: https://svnweb.freebsd.org/changeset/base/289015 Log: MFC r287321: Add new USB quirk. PR: 202783 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:27:25 2015 (r289014) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:29:30 2015 (r289015) @@ -98,6 +98,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(REALTEK, RTL8153, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1), /* Quirks for printer devices */ USB_QUIRK(HP, 895C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), USB_QUIRK(HP, 880C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Oct 8 07:27:25 2015 (r289014) +++ stable/9/sys/dev/usb/usbdevs Thu Oct 8 07:29:30 2015 (r289015) @@ -1407,6 +1407,7 @@ product CISCOLINKSYS WUSB54GC 0x0020 WUS product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G product CISCOLINKSYS AE1000 0x002f AE1000 +product CISCOLINKSYS USB3GIGV1 0x0041 USB3GIGV1 USB Ethernet Adapter product CISCOLINKSYS2 RT3070 0x4001 RT3070 product CISCOLINKSYS3 RT3070 0x0101 RT3070 From owner-svn-src-all@freebsd.org Thu Oct 8 07:31:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43499D16F9; Thu, 8 Oct 2015 07:31:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B8D2D5B; Thu, 8 Oct 2015 07:31:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987V5SO054002; Thu, 8 Oct 2015 07:31:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987V5tD054000; Thu, 8 Oct 2015 07:31:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080731.t987V5tD054000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289016 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:31:06 -0000 Author: hselasky Date: Thu Oct 8 07:31:05 2015 New Revision: 289016 URL: https://svnweb.freebsd.org/changeset/base/289016 Log: MFC r287321: Add new USB quirk. PR: 202783 Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:29:30 2015 (r289015) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Thu Oct 8 07:31:05 2015 (r289016) @@ -98,6 +98,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(REALTEK, RTL8153, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1), /* Quirks for printer devices */ USB_QUIRK(HP, 895C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), USB_QUIRK(HP, 880C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Thu Oct 8 07:29:30 2015 (r289015) +++ stable/10/sys/dev/usb/usbdevs Thu Oct 8 07:31:05 2015 (r289016) @@ -1407,6 +1407,7 @@ product CISCOLINKSYS WUSB54GC 0x0020 WUS product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G product CISCOLINKSYS AE1000 0x002f AE1000 +product CISCOLINKSYS USB3GIGV1 0x0041 USB3GIGV1 USB Ethernet Adapter product CISCOLINKSYS2 RT3070 0x4001 RT3070 product CISCOLINKSYS3 RT3070 0x0101 RT3070 From owner-svn-src-all@freebsd.org Thu Oct 8 07:34:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 954DE9D19C0; Thu, 8 Oct 2015 07:34:31 +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 61588F8C; Thu, 8 Oct 2015 07:34:31 +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 t987YUB3054813; Thu, 8 Oct 2015 07:34:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987YU6v054812; Thu, 8 Oct 2015 07:34:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510080734.t987YU6v054812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 8 Oct 2015 07:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289017 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:34:31 -0000 Author: mav Date: Thu Oct 8 07:34:30 2015 New Revision: 289017 URL: https://svnweb.freebsd.org/changeset/base/289017 Log: Add missing vnode lock in case of file modify request. Submitted by: Richard Kojedzinszky MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Thu Oct 8 07:31:05 2015 (r289016) +++ head/sys/cam/ctl/ctl_backend_block.c Thu Oct 8 07:34:30 2015 (r289017) @@ -2623,9 +2623,11 @@ ctl_be_block_modify(struct ctl_be_block_ error = ctl_be_block_open(be_lun, req); else if (vn_isdisk(be_lun->vn, &error)) error = ctl_be_block_open_dev(be_lun, req); - else if (be_lun->vn->v_type == VREG) + else if (be_lun->vn->v_type == VREG) { + vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = ctl_be_block_open_file(be_lun, req); - else + VOP_UNLOCK(be_lun->vn, 0); + } else error = EINVAL; if ((cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) && be_lun->vn != NULL) { From owner-svn-src-all@freebsd.org Thu Oct 8 07:41:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47C319D1FBE; Thu, 8 Oct 2015 07:41:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6D396F; Thu, 8 Oct 2015 07:41:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pablk4 with SMTP id lk4so47027593pab.3; Thu, 08 Oct 2015 00:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OhvRYrezkIso3J36IdrdpJ868IFKMAy/bY/rGsk2Wio=; b=SUvfmLOzqCNihFNq124t5+VLROQvf7PxG56j5ntRGASZNVQo3JUXJvETCpcuQlNBDJ WzY6kmk4WEDy6v25GISSsdG7uAOyno82hTmhOli3tX9nTyfZ/4/rpq1tJHc8Y6YGDTqV OiMvYd1QKsSQAKu+2UCL/ydyf1vgRCtEtms9Vemf25/+nGlVZb08I/v6rfkOBWZnf377 2KSqS5YKprM5LxKA+t3jAXWxUSsMoVEmFrbBwIdBCRHIk9CWlatLcWoYNKVSdGTtSkZA fQe6sZr8v+8VwjlMVZRc1xt3QcuoazYGA3vcOxvf0Unl2TRgtgHAqiqvu5t76/OEkqe0 fsCg== X-Received: by 10.68.129.6 with SMTP id ns6mr6535689pbb.77.1444290100783; Thu, 08 Oct 2015 00:41:40 -0700 (PDT) Received: from [33.167.215.6] ([172.56.32.252]) by smtp.gmail.com with ESMTPSA id zc4sm43600073pbb.24.2015.10.08.00.41.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Oct 2015 00:41:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289002 - head/release/scripts From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: <20151008061422.GB33319@FreeBSD.org> Date: Thu, 8 Oct 2015 00:41:32 -0700 Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510080328.t983SFZ0079596@repo.freebsd.org> <20151008061422.GB33319@FreeBSD.org> To: Alexey Dokuchaev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:41:41 -0000 > On Oct 7, 2015, at 23:14, Alexey Dokuchaev wrote: >=20 >> On Thu, Oct 08, 2015 at 03:28:15AM +0000, Craig Rodrigues wrote: >> New Revision: 289002 >> URL: https://svnweb.freebsd.org/changeset/base/289002 >>=20 >> Log: >> Use print as a function, not operator. >=20 > Because?...(even when it looks obvious, commit logs should be crystal clea= r > on what was done (30%) and why (70%). Probably because py3k turns print into a function, but it would have been ni= ce if that was in the commit message.= From owner-svn-src-all@freebsd.org Thu Oct 8 07:50:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56C0B9D0679; Thu, 8 Oct 2015 07:50:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D820D3D; Thu, 8 Oct 2015 07:50:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987opcR057936; Thu, 8 Oct 2015 07:50:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987opa1057933; Thu, 8 Oct 2015 07:50:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080750.t987opa1057933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 07:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289018 - in stable/10: share/man/man3 sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 07:50:52 -0000 Author: hselasky Date: Thu Oct 8 07:50:50 2015 New Revision: 289018 URL: https://svnweb.freebsd.org/changeset/base/289018 Log: MFC r284915: Make the system queue header file fully usable within C++ programs by adding macros to define class lists. This change is backwards compatible for all use within C and C++ programs. Only C++ programs will have added support to use the queue macros within classes. Previously the queue macros could only be used within structures. The queue.3 manual page has been updated to describe the new functionality and some alphabetic sorting has been done while at it. Differential Revision: https://reviews.freebsd.org/D2745 PR: 200827 (exp-run) Modified: stable/10/share/man/man3/Makefile stable/10/share/man/man3/queue.3 stable/10/sys/sys/queue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/Makefile ============================================================================== --- stable/10/share/man/man3/Makefile Thu Oct 8 07:34:30 2015 (r289017) +++ stable/10/share/man/man3/Makefile Thu Oct 8 07:50:50 2015 (r289018) @@ -64,10 +64,13 @@ MLINKS+= fpgetround.3 fpgetmask.3 \ MLINKS+= makedev.3 major.3 \ makedev.3 minor.3 MLINKS+= ${PTHREAD_MLINKS} -MLINKS+= queue.3 LIST_EMPTY.3 \ +MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ + queue.3 LIST_CLASS_HEAD.3 \ + queue.3 LIST_EMPTY.3 \ queue.3 LIST_ENTRY.3 \ queue.3 LIST_FIRST.3 \ queue.3 LIST_FOREACH.3 \ + queue.3 LIST_FOREACH_FROM_SAFE.3 \ queue.3 LIST_FOREACH_SAFE.3 \ queue.3 LIST_HEAD.3 \ queue.3 LIST_HEAD_INITIALIZER.3 \ @@ -79,10 +82,13 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ queue.3 LIST_SWAP.3 \ + queue.3 SLIST_CLASS_ENTRY.3 \ + queue.3 SLIST_CLASS_HEAD.3 \ queue.3 SLIST_EMPTY.3 \ queue.3 SLIST_ENTRY.3 \ queue.3 SLIST_FIRST.3 \ queue.3 SLIST_FOREACH.3 \ + queue.3 SLIST_FOREACH_FROM_SAFE.3 \ queue.3 SLIST_FOREACH_SAFE.3 \ queue.3 SLIST_HEAD.3 \ queue.3 SLIST_HEAD_INITIALIZER.3 \ @@ -94,11 +100,14 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 SLIST_SWAP.3 \ + queue.3 STAILQ_CLASS_ENTRY.3 \ + queue.3 STAILQ_CLASS_HEAD.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ queue.3 STAILQ_ENTRY.3 \ queue.3 STAILQ_FIRST.3 \ queue.3 STAILQ_FOREACH.3 \ + queue.3 STAILQ_FOREACH_FROM_SAFE.3 \ queue.3 STAILQ_FOREACH_SAFE.3 \ queue.3 STAILQ_HEAD.3 \ queue.3 STAILQ_HEAD_INITIALIZER.3 \ @@ -112,12 +121,16 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ queue.3 STAILQ_SWAP.3 \ + queue.3 TAILQ_CLASS_ENTRY.3 \ + queue.3 TAILQ_CLASS_HEAD.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ queue.3 TAILQ_ENTRY.3 \ queue.3 TAILQ_FIRST.3 \ queue.3 TAILQ_FOREACH.3 \ + queue.3 TAILQ_FOREACH_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE.3 \ + queue.3 TAILQ_FOREACH_REVERSE_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE_SAFE.3 \ queue.3 TAILQ_FOREACH_SAFE.3 \ queue.3 TAILQ_HEAD.3 \ Modified: stable/10/share/man/man3/queue.3 ============================================================================== --- stable/10/share/man/man3/queue.3 Thu Oct 8 07:34:30 2015 (r289017) +++ stable/10/share/man/man3/queue.3 Thu Oct 8 07:50:50 2015 (r289018) @@ -32,35 +32,39 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd April 16, 2015 +.Dd June 24, 2015 .Dt QUEUE 3 .Os .Sh NAME +.Nm SLIST_CLASS_ENTRY , +.Nm SLIST_CLASS_HEAD , .Nm SLIST_EMPTY , .Nm SLIST_ENTRY , .Nm SLIST_FIRST , .Nm SLIST_FOREACH , .Nm SLIST_FOREACH_FROM , -.Nm SLIST_FOREACH_SAFE , .Nm SLIST_FOREACH_FROM_SAFE , +.Nm SLIST_FOREACH_SAFE , .Nm SLIST_HEAD , .Nm SLIST_HEAD_INITIALIZER , .Nm SLIST_INIT , .Nm SLIST_INSERT_AFTER , .Nm SLIST_INSERT_HEAD , .Nm SLIST_NEXT , +.Nm SLIST_REMOVE , .Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , -.Nm SLIST_REMOVE , .Nm SLIST_SWAP , +.Nm STAILQ_CLASS_ENTRY , +.Nm STAILQ_CLASS_HEAD , .Nm STAILQ_CONCAT , .Nm STAILQ_EMPTY , .Nm STAILQ_ENTRY , .Nm STAILQ_FIRST , .Nm STAILQ_FOREACH , .Nm STAILQ_FOREACH_FROM , -.Nm STAILQ_FOREACH_SAFE , .Nm STAILQ_FOREACH_FROM_SAFE , +.Nm STAILQ_FOREACH_SAFE , .Nm STAILQ_HEAD , .Nm STAILQ_HEAD_INITIALIZER , .Nm STAILQ_INIT , @@ -69,17 +73,19 @@ .Nm STAILQ_INSERT_TAIL , .Nm STAILQ_LAST , .Nm STAILQ_NEXT , +.Nm STAILQ_REMOVE , .Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , -.Nm STAILQ_REMOVE , .Nm STAILQ_SWAP , +.Nm LIST_CLASS_ENTRY , +.Nm LIST_CLASS_HEAD , .Nm LIST_EMPTY , .Nm LIST_ENTRY , .Nm LIST_FIRST , .Nm LIST_FOREACH , .Nm LIST_FOREACH_FROM , -.Nm LIST_FOREACH_SAFE , .Nm LIST_FOREACH_FROM_SAFE , +.Nm LIST_FOREACH_SAFE , .Nm LIST_HEAD , .Nm LIST_HEAD_INITIALIZER , .Nm LIST_INIT , @@ -90,18 +96,20 @@ .Nm LIST_PREV , .Nm LIST_REMOVE , .Nm LIST_SWAP , +.Nm TAILQ_CLASS_ENTRY , +.Nm TAILQ_CLASS_HEAD , .Nm TAILQ_CONCAT , .Nm TAILQ_EMPTY , .Nm TAILQ_ENTRY , .Nm TAILQ_FIRST , .Nm TAILQ_FOREACH , .Nm TAILQ_FOREACH_FROM , -.Nm TAILQ_FOREACH_SAFE , .Nm TAILQ_FOREACH_FROM_SAFE , .Nm TAILQ_FOREACH_REVERSE , .Nm TAILQ_FOREACH_REVERSE_FROM , -.Nm TAILQ_FOREACH_REVERSE_SAFE , .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE , +.Nm TAILQ_FOREACH_REVERSE_SAFE , +.Nm TAILQ_FOREACH_SAFE , .Nm TAILQ_HEAD , .Nm TAILQ_HEAD_INITIALIZER , .Nm TAILQ_INIT , @@ -119,32 +127,36 @@ lists and tail queues .Sh SYNOPSIS .In sys/queue.h .\" +.Fn SLIST_CLASS_ENTRY "CLASSTYPE" +.Fn SLIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn SLIST_EMPTY "SLIST_HEAD *head" .Fn SLIST_ENTRY "TYPE" .Fn SLIST_FIRST "SLIST_HEAD *head" .Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" +.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .Fn SLIST_HEAD "HEADNAME" "TYPE" .Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" .Fn SLIST_INIT "SLIST_HEAD *head" .Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" .\" +.Fn STAILQ_CLASS_ENTRY "CLASSTYPE" +.Fn STAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" .Fn STAILQ_EMPTY "STAILQ_HEAD *head" .Fn STAILQ_ENTRY "TYPE" .Fn STAILQ_FIRST "STAILQ_HEAD *head" .Fn STAILQ_FOREACH "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" .Fn STAILQ_FOREACH_FROM "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" -.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" .Fn STAILQ_FOREACH_FROM_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" .Fn STAILQ_HEAD "HEADNAME" "TYPE" .Fn STAILQ_HEAD_INITIALIZER "STAILQ_HEAD head" .Fn STAILQ_INIT "STAILQ_HEAD *head" @@ -153,18 +165,20 @@ lists and tail queues .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" +.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" -.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "STAILQ_ENTRY NAME" .\" +.Fn LIST_CLASS_ENTRY "CLASSTYPE" +.Fn LIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn LIST_EMPTY "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" .Fn LIST_FIRST "LIST_HEAD *head" .Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" +.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" .Fn LIST_HEAD "HEADNAME" "TYPE" .Fn LIST_HEAD_INITIALIZER "LIST_HEAD head" .Fn LIST_INIT "LIST_HEAD *head" @@ -176,18 +190,20 @@ lists and tail queues .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" +.Fn TAILQ_CLASS_ENTRY "CLASSTYPE" +.Fn TAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME" .Fn TAILQ_EMPTY "TAILQ_HEAD *head" .Fn TAILQ_ENTRY "TYPE" .Fn TAILQ_FIRST "TAILQ_HEAD *head" .Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_REVERSE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_HEAD "HEADNAME" "TYPE" .Fn TAILQ_HEAD_INITIALIZER "TAILQ_HEAD head" .Fn TAILQ_INIT "TAILQ_HEAD *head" @@ -202,8 +218,18 @@ lists and tail queues .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME" .\" .Sh DESCRIPTION -These macros define and operate on four types of data structures: -singly-linked lists, singly-linked tail queues, lists, and tail queues. +These macros define and operate on four types of data structures which +can be used in both C and C++ source code: +.Bl -enum -compact -offset indent +.It +Lists +.It +Singly-linked lists +.It +Singly-linked tail queues +.It +Tail queues +.El All four structures support the following functionality: .Bl -enum -compact -offset indent .It @@ -305,24 +331,39 @@ than singly-linked lists. .Pp In the macro definitions, .Fa TYPE -is the name of a user defined structure, -that must contain a field of type +is the name of a user defined structure. +The structure must contain a field called +.Fa NAME +which is of type .Li SLIST_ENTRY , .Li STAILQ_ENTRY , .Li LIST_ENTRY , or -.Li TAILQ_ENTRY , -named -.Fa NAME . +.Li TAILQ_ENTRY . +In the macro definitions, +.Fa CLASSTYPE +is the name of a user defined class. +The class must contain a field called +.Fa NAME +which is of type +.Li SLIST_CLASS_ENTRY , +.Li STAILQ_CLASS_ENTRY , +.Li LIST_CLASS_ENTRY , +or +.Li TAILQ_CLASS_ENTRY . The argument .Fa HEADNAME is the name of a user defined structure that must be declared using the macros .Li SLIST_HEAD , +.Li SLIST_CLASS_HEAD , .Li STAILQ_HEAD , +.Li STAILQ_CLASS_HEAD , .Li LIST_HEAD , +.Li LIST_CLASS_HEAD , +.Li TAILQ_HEAD , or -.Li TAILQ_HEAD . +.Li TAILQ_CLASS_HEAD . See the examples below for further explanation of how these macros are used. .Sh SINGLY-LINKED LISTS Modified: stable/10/sys/sys/queue.h ============================================================================== --- stable/10/sys/sys/queue.h Thu Oct 8 07:34:30 2015 (r289017) +++ stable/10/sys/sys/queue.h Thu Oct 8 07:50:50 2015 (r289018) @@ -79,8 +79,10 @@ * * SLIST LIST STAILQ TAILQ * _HEAD + + + + + * _CLASS_HEAD + + + + * _HEAD_INITIALIZER + + + + * _ENTRY + + + + + * _CLASS_ENTRY + + + + * _INIT + + + + * _EMPTY + + + + * _FIRST + + + + @@ -143,6 +145,15 @@ struct qm_trace { #define TRASHIT(x) #endif /* QUEUE_MACRO_DEBUG */ +#ifdef __cplusplus +/* + * In C++ there can be structure lists and class lists: + */ +#define QUEUE_TYPEOF(type) type +#else +#define QUEUE_TYPEOF(type) struct type +#endif + /* * Singly-linked List declarations. */ @@ -151,6 +162,11 @@ struct name { \ struct type *slh_first; /* first element */ \ } +#define SLIST_CLASS_HEAD(name, type) \ +struct name { \ + class type *slh_first; /* first element */ \ +} + #define SLIST_HEAD_INITIALIZER(head) \ { NULL } @@ -159,6 +175,11 @@ struct { \ struct type *sle_next; /* next element */ \ } +#define SLIST_CLASS_ENTRY(type) \ +struct { \ + class type *sle_next; /* next element */ \ +} + /* * Singly-linked List functions. */ @@ -213,7 +234,7 @@ struct { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ - struct type *curelm = SLIST_FIRST((head)); \ + QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head); \ while (SLIST_NEXT(curelm, field) != (elm)) \ curelm = SLIST_NEXT(curelm, field); \ SLIST_REMOVE_AFTER(curelm, field); \ @@ -231,7 +252,7 @@ struct { \ } while (0) #define SLIST_SWAP(head1, head2, type) do { \ - struct type *swap_first = SLIST_FIRST(head1); \ + QUEUE_TYPEOF(type) *swap_first = SLIST_FIRST(head1); \ SLIST_FIRST(head1) = SLIST_FIRST(head2); \ SLIST_FIRST(head2) = swap_first; \ } while (0) @@ -245,6 +266,12 @@ struct name { \ struct type **stqh_last;/* addr of last next element */ \ } +#define STAILQ_CLASS_HEAD(name, type) \ +struct name { \ + class type *stqh_first; /* first element */ \ + class type **stqh_last; /* addr of last next element */ \ +} + #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } @@ -253,6 +280,11 @@ struct { \ struct type *stqe_next; /* next element */ \ } +#define STAILQ_CLASS_ENTRY(type) \ +struct { \ + class type *stqe_next; /* next element */ \ +} + /* * Singly-linked Tail queue functions. */ @@ -311,9 +343,10 @@ struct { \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) -#define STAILQ_LAST(head, type, field) \ - (STAILQ_EMPTY((head)) ? NULL : \ - __containerof((head)->stqh_last, struct type, field.stqe_next)) +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) ? NULL : \ + __containerof((head)->stqh_last, \ + QUEUE_TYPEOF(type), field.stqe_next)) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) @@ -323,7 +356,7 @@ struct { \ STAILQ_REMOVE_HEAD((head), field); \ } \ else { \ - struct type *curelm = STAILQ_FIRST((head)); \ + QUEUE_TYPEOF(type) *curelm = STAILQ_FIRST(head); \ while (STAILQ_NEXT(curelm, field) != (elm)) \ curelm = STAILQ_NEXT(curelm, field); \ STAILQ_REMOVE_AFTER(head, curelm, field); \ @@ -344,8 +377,8 @@ struct { \ } while (0) #define STAILQ_SWAP(head1, head2, type) do { \ - struct type *swap_first = STAILQ_FIRST(head1); \ - struct type **swap_last = (head1)->stqh_last; \ + QUEUE_TYPEOF(type) *swap_first = STAILQ_FIRST(head1); \ + QUEUE_TYPEOF(type) **swap_last = (head1)->stqh_last; \ STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_FIRST(head2) = swap_first; \ @@ -365,6 +398,11 @@ struct name { \ struct type *lh_first; /* first element */ \ } +#define LIST_CLASS_HEAD(name, type) \ +struct name { \ + class type *lh_first; /* first element */ \ +} + #define LIST_HEAD_INITIALIZER(head) \ { NULL } @@ -374,6 +412,12 @@ struct { \ struct type **le_prev; /* address of previous next element */ \ } +#define LIST_CLASS_ENTRY(type) \ +struct { \ + class type *le_next; /* next element */ \ + class type **le_prev; /* address of previous next element */ \ +} + /* * List functions. */ @@ -458,9 +502,10 @@ struct { \ #define LIST_NEXT(elm, field) ((elm)->field.le_next) -#define LIST_PREV(elm, head, type, field) \ - ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \ - __containerof((elm)->field.le_prev, struct type, field.le_next)) +#define LIST_PREV(elm, head, type, field) \ + ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \ + __containerof((elm)->field.le_prev, \ + QUEUE_TYPEOF(type), field.le_next)) #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ @@ -476,7 +521,7 @@ struct { \ } while (0) #define LIST_SWAP(head1, head2, type, field) do { \ - struct type *swap_tmp = LIST_FIRST((head1)); \ + QUEUE_TYPEOF(type) *swap_tmp = LIST_FIRST(head1); \ LIST_FIRST((head1)) = LIST_FIRST((head2)); \ LIST_FIRST((head2)) = swap_tmp; \ if ((swap_tmp = LIST_FIRST((head1))) != NULL) \ @@ -495,6 +540,13 @@ struct name { \ TRACEBUF \ } +#define TAILQ_CLASS_HEAD(name, type) \ +struct name { \ + class type *tqh_first; /* first element */ \ + class type **tqh_last; /* addr of last next element */ \ + TRACEBUF \ +} + #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first, TRACEBUF_INITIALIZER } @@ -505,6 +557,13 @@ struct { \ TRACEBUF \ } +#define TAILQ_CLASS_ENTRY(type) \ +struct { \ + class type *tqe_next; /* next element */ \ + class type **tqe_prev; /* address of previous next element */ \ + TRACEBUF \ +} + /* * Tail queue functions. */ @@ -675,8 +734,8 @@ struct { \ } while (0) #define TAILQ_SWAP(head1, head2, type, field) do { \ - struct type *swap_first = (head1)->tqh_first; \ - struct type **swap_last = (head1)->tqh_last; \ + QUEUE_TYPEOF(type) *swap_first = (head1)->tqh_first; \ + QUEUE_TYPEOF(type) **swap_last = (head1)->tqh_last; \ (head1)->tqh_first = (head2)->tqh_first; \ (head1)->tqh_last = (head2)->tqh_last; \ (head2)->tqh_first = swap_first; \ From owner-svn-src-all@freebsd.org Thu Oct 8 08:06:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35AF99D11E9; Thu, 8 Oct 2015 08:06:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3517BE; Thu, 8 Oct 2015 08:06:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9886OvE063633; Thu, 8 Oct 2015 08:06:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9886NKM063630; Thu, 8 Oct 2015 08:06:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080806.t9886NKM063630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 08:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289019 - in stable/9: share/man/man3 sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 08:06:25 -0000 Author: hselasky Date: Thu Oct 8 08:06:23 2015 New Revision: 289019 URL: https://svnweb.freebsd.org/changeset/base/289019 Log: MFC r284915: Make the system queue header file fully usable within C++ programs by adding macros to define class lists. This change is backwards compatible for all use within C and C++ programs. Only C++ programs will have added support to use the queue macros within classes. Previously the queue macros could only be used within structures. The queue.3 manual page has been updated to describe the new functionality and some alphabetic sorting has been done while at it. Differential Revision: https://reviews.freebsd.org/D2745 PR: 200827 (exp-run) Modified: stable/9/share/man/man3/Makefile stable/9/share/man/man3/queue.3 stable/9/sys/sys/queue.h Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man3/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/share/man/man3/Makefile ============================================================================== --- stable/9/share/man/man3/Makefile Thu Oct 8 07:50:50 2015 (r289018) +++ stable/9/share/man/man3/Makefile Thu Oct 8 08:06:23 2015 (r289019) @@ -40,10 +40,13 @@ MLINKS+= fpgetround.3 fpgetmask.3 \ MLINKS+= makedev.3 major.3 \ makedev.3 minor.3 MLINKS+= ${PTHREAD_MLINKS} -MLINKS+= queue.3 LIST_EMPTY.3 \ +MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ + queue.3 LIST_CLASS_HEAD.3 \ + queue.3 LIST_EMPTY.3 \ queue.3 LIST_ENTRY.3 \ queue.3 LIST_FIRST.3 \ queue.3 LIST_FOREACH.3 \ + queue.3 LIST_FOREACH_FROM_SAFE.3 \ queue.3 LIST_FOREACH_SAFE.3 \ queue.3 LIST_HEAD.3 \ queue.3 LIST_HEAD_INITIALIZER.3 \ @@ -55,10 +58,13 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ queue.3 LIST_SWAP.3 \ + queue.3 SLIST_CLASS_ENTRY.3 \ + queue.3 SLIST_CLASS_HEAD.3 \ queue.3 SLIST_EMPTY.3 \ queue.3 SLIST_ENTRY.3 \ queue.3 SLIST_FIRST.3 \ queue.3 SLIST_FOREACH.3 \ + queue.3 SLIST_FOREACH_FROM_SAFE.3 \ queue.3 SLIST_FOREACH_SAFE.3 \ queue.3 SLIST_HEAD.3 \ queue.3 SLIST_HEAD_INITIALIZER.3 \ @@ -70,11 +76,14 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 SLIST_SWAP.3 \ + queue.3 STAILQ_CLASS_ENTRY.3 \ + queue.3 STAILQ_CLASS_HEAD.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ queue.3 STAILQ_ENTRY.3 \ queue.3 STAILQ_FIRST.3 \ queue.3 STAILQ_FOREACH.3 \ + queue.3 STAILQ_FOREACH_FROM_SAFE.3 \ queue.3 STAILQ_FOREACH_SAFE.3 \ queue.3 STAILQ_HEAD.3 \ queue.3 STAILQ_HEAD_INITIALIZER.3 \ @@ -88,12 +97,16 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ queue.3 STAILQ_SWAP.3 \ + queue.3 TAILQ_CLASS_ENTRY.3 \ + queue.3 TAILQ_CLASS_HEAD.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ queue.3 TAILQ_ENTRY.3 \ queue.3 TAILQ_FIRST.3 \ queue.3 TAILQ_FOREACH.3 \ + queue.3 TAILQ_FOREACH_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE.3 \ + queue.3 TAILQ_FOREACH_REVERSE_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE_SAFE.3 \ queue.3 TAILQ_FOREACH_SAFE.3 \ queue.3 TAILQ_HEAD.3 \ Modified: stable/9/share/man/man3/queue.3 ============================================================================== --- stable/9/share/man/man3/queue.3 Thu Oct 8 07:50:50 2015 (r289018) +++ stable/9/share/man/man3/queue.3 Thu Oct 8 08:06:23 2015 (r289019) @@ -32,35 +32,39 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd April 16, 2015 +.Dd June 24, 2015 .Dt QUEUE 3 .Os .Sh NAME +.Nm SLIST_CLASS_ENTRY , +.Nm SLIST_CLASS_HEAD , .Nm SLIST_EMPTY , .Nm SLIST_ENTRY , .Nm SLIST_FIRST , .Nm SLIST_FOREACH , .Nm SLIST_FOREACH_FROM , -.Nm SLIST_FOREACH_SAFE , .Nm SLIST_FOREACH_FROM_SAFE , +.Nm SLIST_FOREACH_SAFE , .Nm SLIST_HEAD , .Nm SLIST_HEAD_INITIALIZER , .Nm SLIST_INIT , .Nm SLIST_INSERT_AFTER , .Nm SLIST_INSERT_HEAD , .Nm SLIST_NEXT , +.Nm SLIST_REMOVE , .Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , -.Nm SLIST_REMOVE , .Nm SLIST_SWAP , +.Nm STAILQ_CLASS_ENTRY , +.Nm STAILQ_CLASS_HEAD , .Nm STAILQ_CONCAT , .Nm STAILQ_EMPTY , .Nm STAILQ_ENTRY , .Nm STAILQ_FIRST , .Nm STAILQ_FOREACH , .Nm STAILQ_FOREACH_FROM , -.Nm STAILQ_FOREACH_SAFE , .Nm STAILQ_FOREACH_FROM_SAFE , +.Nm STAILQ_FOREACH_SAFE , .Nm STAILQ_HEAD , .Nm STAILQ_HEAD_INITIALIZER , .Nm STAILQ_INIT , @@ -69,17 +73,19 @@ .Nm STAILQ_INSERT_TAIL , .Nm STAILQ_LAST , .Nm STAILQ_NEXT , +.Nm STAILQ_REMOVE , .Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , -.Nm STAILQ_REMOVE , .Nm STAILQ_SWAP , +.Nm LIST_CLASS_ENTRY , +.Nm LIST_CLASS_HEAD , .Nm LIST_EMPTY , .Nm LIST_ENTRY , .Nm LIST_FIRST , .Nm LIST_FOREACH , .Nm LIST_FOREACH_FROM , -.Nm LIST_FOREACH_SAFE , .Nm LIST_FOREACH_FROM_SAFE , +.Nm LIST_FOREACH_SAFE , .Nm LIST_HEAD , .Nm LIST_HEAD_INITIALIZER , .Nm LIST_INIT , @@ -90,18 +96,20 @@ .Nm LIST_PREV , .Nm LIST_REMOVE , .Nm LIST_SWAP , +.Nm TAILQ_CLASS_ENTRY , +.Nm TAILQ_CLASS_HEAD , .Nm TAILQ_CONCAT , .Nm TAILQ_EMPTY , .Nm TAILQ_ENTRY , .Nm TAILQ_FIRST , .Nm TAILQ_FOREACH , .Nm TAILQ_FOREACH_FROM , -.Nm TAILQ_FOREACH_SAFE , .Nm TAILQ_FOREACH_FROM_SAFE , .Nm TAILQ_FOREACH_REVERSE , .Nm TAILQ_FOREACH_REVERSE_FROM , -.Nm TAILQ_FOREACH_REVERSE_SAFE , .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE , +.Nm TAILQ_FOREACH_REVERSE_SAFE , +.Nm TAILQ_FOREACH_SAFE , .Nm TAILQ_HEAD , .Nm TAILQ_HEAD_INITIALIZER , .Nm TAILQ_INIT , @@ -119,32 +127,36 @@ lists and tail queues .Sh SYNOPSIS .In sys/queue.h .\" +.Fn SLIST_CLASS_ENTRY "CLASSTYPE" +.Fn SLIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn SLIST_EMPTY "SLIST_HEAD *head" .Fn SLIST_ENTRY "TYPE" .Fn SLIST_FIRST "SLIST_HEAD *head" .Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" +.Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" .Fn SLIST_HEAD "HEADNAME" "TYPE" .Fn SLIST_HEAD_INITIALIZER "SLIST_HEAD head" .Fn SLIST_INIT "SLIST_HEAD *head" .Fn SLIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_INSERT_HEAD "SLIST_HEAD *head" "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_NEXT "TYPE *elm" "SLIST_ENTRY NAME" +.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" -.Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" .\" +.Fn STAILQ_CLASS_ENTRY "CLASSTYPE" +.Fn STAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" .Fn STAILQ_EMPTY "STAILQ_HEAD *head" .Fn STAILQ_ENTRY "TYPE" .Fn STAILQ_FIRST "STAILQ_HEAD *head" .Fn STAILQ_FOREACH "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" .Fn STAILQ_FOREACH_FROM "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" -.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" .Fn STAILQ_FOREACH_FROM_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" .Fn STAILQ_HEAD "HEADNAME" "TYPE" .Fn STAILQ_HEAD_INITIALIZER "STAILQ_HEAD head" .Fn STAILQ_INIT "STAILQ_HEAD *head" @@ -153,18 +165,20 @@ lists and tail queues .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" +.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" -.Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "STAILQ_ENTRY NAME" .\" +.Fn LIST_CLASS_ENTRY "CLASSTYPE" +.Fn LIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn LIST_EMPTY "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" .Fn LIST_FIRST "LIST_HEAD *head" .Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" +.Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" .Fn LIST_HEAD "HEADNAME" "TYPE" .Fn LIST_HEAD_INITIALIZER "LIST_HEAD head" .Fn LIST_INIT "LIST_HEAD *head" @@ -176,18 +190,20 @@ lists and tail queues .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" +.Fn TAILQ_CLASS_ENTRY "CLASSTYPE" +.Fn TAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME" .Fn TAILQ_EMPTY "TAILQ_HEAD *head" .Fn TAILQ_ENTRY "TYPE" .Fn TAILQ_FIRST "TAILQ_HEAD *head" .Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_REVERSE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" -.Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" +.Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" .Fn TAILQ_HEAD "HEADNAME" "TYPE" .Fn TAILQ_HEAD_INITIALIZER "TAILQ_HEAD head" .Fn TAILQ_INIT "TAILQ_HEAD *head" @@ -202,8 +218,18 @@ lists and tail queues .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME" .\" .Sh DESCRIPTION -These macros define and operate on four types of data structures: -singly-linked lists, singly-linked tail queues, lists, and tail queues. +These macros define and operate on four types of data structures which +can be used in both C and C++ source code: +.Bl -enum -compact -offset indent +.It +Lists +.It +Singly-linked lists +.It +Singly-linked tail queues +.It +Tail queues +.El All four structures support the following functionality: .Bl -enum -compact -offset indent .It @@ -305,24 +331,39 @@ than singly-linked lists. .Pp In the macro definitions, .Fa TYPE -is the name of a user defined structure, -that must contain a field of type +is the name of a user defined structure. +The structure must contain a field called +.Fa NAME +which is of type .Li SLIST_ENTRY , .Li STAILQ_ENTRY , .Li LIST_ENTRY , or -.Li TAILQ_ENTRY , -named -.Fa NAME . +.Li TAILQ_ENTRY . +In the macro definitions, +.Fa CLASSTYPE +is the name of a user defined class. +The class must contain a field called +.Fa NAME +which is of type +.Li SLIST_CLASS_ENTRY , +.Li STAILQ_CLASS_ENTRY , +.Li LIST_CLASS_ENTRY , +or +.Li TAILQ_CLASS_ENTRY . The argument .Fa HEADNAME is the name of a user defined structure that must be declared using the macros .Li SLIST_HEAD , +.Li SLIST_CLASS_HEAD , .Li STAILQ_HEAD , +.Li STAILQ_CLASS_HEAD , .Li LIST_HEAD , +.Li LIST_CLASS_HEAD , +.Li TAILQ_HEAD , or -.Li TAILQ_HEAD . +.Li TAILQ_CLASS_HEAD . See the examples below for further explanation of how these macros are used. .Sh SINGLY-LINKED LISTS Modified: stable/9/sys/sys/queue.h ============================================================================== --- stable/9/sys/sys/queue.h Thu Oct 8 07:50:50 2015 (r289018) +++ stable/9/sys/sys/queue.h Thu Oct 8 08:06:23 2015 (r289019) @@ -79,8 +79,10 @@ * * SLIST LIST STAILQ TAILQ * _HEAD + + + + + * _CLASS_HEAD + + + + * _HEAD_INITIALIZER + + + + * _ENTRY + + + + + * _CLASS_ENTRY + + + + * _INIT + + + + * _EMPTY + + + + * _FIRST + + + + @@ -141,6 +143,15 @@ struct qm_trace { #define TRASHIT(x) #endif /* QUEUE_MACRO_DEBUG */ +#ifdef __cplusplus +/* + * In C++ there can be structure lists and class lists: + */ +#define QUEUE_TYPEOF(type) type +#else +#define QUEUE_TYPEOF(type) struct type +#endif + /* * Singly-linked List declarations. */ @@ -149,6 +160,11 @@ struct name { \ struct type *slh_first; /* first element */ \ } +#define SLIST_CLASS_HEAD(name, type) \ +struct name { \ + class type *slh_first; /* first element */ \ +} + #define SLIST_HEAD_INITIALIZER(head) \ { NULL } @@ -157,6 +173,11 @@ struct { \ struct type *sle_next; /* next element */ \ } +#define SLIST_CLASS_ENTRY(type) \ +struct { \ + class type *sle_next; /* next element */ \ +} + /* * Singly-linked List functions. */ @@ -211,7 +232,7 @@ struct { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ - struct type *curelm = SLIST_FIRST((head)); \ + QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head); \ while (SLIST_NEXT(curelm, field) != (elm)) \ curelm = SLIST_NEXT(curelm, field); \ SLIST_REMOVE_AFTER(curelm, field); \ @@ -229,7 +250,7 @@ struct { \ } while (0) #define SLIST_SWAP(head1, head2, type) do { \ - struct type *swap_first = SLIST_FIRST(head1); \ + QUEUE_TYPEOF(type) *swap_first = SLIST_FIRST(head1); \ SLIST_FIRST(head1) = SLIST_FIRST(head2); \ SLIST_FIRST(head2) = swap_first; \ } while (0) @@ -243,6 +264,12 @@ struct name { \ struct type **stqh_last;/* addr of last next element */ \ } +#define STAILQ_CLASS_HEAD(name, type) \ +struct name { \ + class type *stqh_first; /* first element */ \ + class type **stqh_last; /* addr of last next element */ \ +} + #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } @@ -251,6 +278,11 @@ struct { \ struct type *stqe_next; /* next element */ \ } +#define STAILQ_CLASS_ENTRY(type) \ +struct { \ + class type *stqe_next; /* next element */ \ +} + /* * Singly-linked Tail queue functions. */ @@ -309,9 +341,10 @@ struct { \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) -#define STAILQ_LAST(head, type, field) \ - (STAILQ_EMPTY((head)) ? NULL : \ - __containerof((head)->stqh_last, struct type, field.stqe_next)) +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) ? NULL : \ + __containerof((head)->stqh_last, \ + QUEUE_TYPEOF(type), field.stqe_next)) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) @@ -321,7 +354,7 @@ struct { \ STAILQ_REMOVE_HEAD((head), field); \ } \ else { \ - struct type *curelm = STAILQ_FIRST((head)); \ + QUEUE_TYPEOF(type) *curelm = STAILQ_FIRST(head); \ while (STAILQ_NEXT(curelm, field) != (elm)) \ curelm = STAILQ_NEXT(curelm, field); \ STAILQ_REMOVE_AFTER(head, curelm, field); \ @@ -342,8 +375,8 @@ struct { \ } while (0) #define STAILQ_SWAP(head1, head2, type) do { \ - struct type *swap_first = STAILQ_FIRST(head1); \ - struct type **swap_last = (head1)->stqh_last; \ + QUEUE_TYPEOF(type) *swap_first = STAILQ_FIRST(head1); \ + QUEUE_TYPEOF(type) **swap_last = (head1)->stqh_last; \ STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_FIRST(head2) = swap_first; \ @@ -363,6 +396,11 @@ struct name { \ struct type *lh_first; /* first element */ \ } +#define LIST_CLASS_HEAD(name, type) \ +struct name { \ + class type *lh_first; /* first element */ \ +} + #define LIST_HEAD_INITIALIZER(head) \ { NULL } @@ -372,6 +410,12 @@ struct { \ struct type **le_prev; /* address of previous next element */ \ } +#define LIST_CLASS_ENTRY(type) \ +struct { \ + class type *le_next; /* next element */ \ + class type **le_prev; /* address of previous next element */ \ +} + /* * List functions. */ @@ -456,9 +500,10 @@ struct { \ #define LIST_NEXT(elm, field) ((elm)->field.le_next) -#define LIST_PREV(elm, head, type, field) \ - ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \ - __containerof((elm)->field.le_prev, struct type, field.le_next)) +#define LIST_PREV(elm, head, type, field) \ + ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \ + __containerof((elm)->field.le_prev, \ + QUEUE_TYPEOF(type), field.le_next)) #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ @@ -474,7 +519,7 @@ struct { \ } while (0) #define LIST_SWAP(head1, head2, type, field) do { \ - struct type *swap_tmp = LIST_FIRST((head1)); \ + QUEUE_TYPEOF(type) *swap_tmp = LIST_FIRST(head1); \ LIST_FIRST((head1)) = LIST_FIRST((head2)); \ LIST_FIRST((head2)) = swap_tmp; \ if ((swap_tmp = LIST_FIRST((head1))) != NULL) \ @@ -493,6 +538,13 @@ struct name { \ TRACEBUF \ } +#define TAILQ_CLASS_HEAD(name, type) \ +struct name { \ + class type *tqh_first; /* first element */ \ + class type **tqh_last; /* addr of last next element */ \ + TRACEBUF \ +} + #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } @@ -503,6 +555,13 @@ struct { \ TRACEBUF \ } +#define TAILQ_CLASS_ENTRY(type) \ +struct { \ + class type *tqe_next; /* next element */ \ + class type **tqe_prev; /* address of previous next element */ \ + TRACEBUF \ +} + /* * Tail queue functions. */ @@ -673,8 +732,8 @@ struct { \ } while (0) #define TAILQ_SWAP(head1, head2, type, field) do { \ - struct type *swap_first = (head1)->tqh_first; \ - struct type **swap_last = (head1)->tqh_last; \ + QUEUE_TYPEOF(type) *swap_first = (head1)->tqh_first; \ + QUEUE_TYPEOF(type) **swap_last = (head1)->tqh_last; \ (head1)->tqh_first = (head2)->tqh_first; \ (head1)->tqh_last = (head2)->tqh_last; \ (head2)->tqh_first = swap_first; \ From owner-svn-src-all@freebsd.org Thu Oct 8 08:30:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4D79D0781; Thu, 8 Oct 2015 08:30:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58EBBB05; Thu, 8 Oct 2015 08:30:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t988UfW9069584; Thu, 8 Oct 2015 08:30:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t988UfUb069581; Thu, 8 Oct 2015 08:30:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080830.t988UfUb069581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 08:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289020 - in stable/10/sys: net netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 08:30:42 -0000 Author: hselasky Date: Thu Oct 8 08:30:40 2015 New Revision: 289020 URL: https://svnweb.freebsd.org/changeset/base/289020 Log: MFC r287775: Update TSO limits to include all headers. To make driver programming easier the TSO limits are changed to reflect the values used in the BUSDMA tag a network adapter driver is using. The TCP/IP network stack will subtract space for all linklevel and protocol level headers and ensure that the full mbuf chain passed to the network adapter fits within the given limits. See r287775 for a more detailed description. Differential Revision: https://reviews.freebsd.org/D3477 Reviewed by: rmacklem Modified: stable/10/sys/net/if_var.h stable/10/sys/netinet/tcp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Thu Oct 8 08:06:23 2015 (r289019) +++ stable/10/sys/net/if_var.h Thu Oct 8 08:30:40 2015 (r289020) @@ -236,11 +236,12 @@ struct ifnet { * count limit does not apply. If all three fields are zero, * there is no TSO limit. * - * NOTE: The TSO limits only apply to the data payload part of - * a TCP/IP packet. That means there is no need to subtract - * space for ethernet-, vlan-, IP- or TCP- headers from the - * TSO limits unless the hardware driver in question requires - * so. + * NOTE: The TSO limits should reflect the values used in the + * BUSDMA tag a network adapter is using to load a mbuf chain + * for transmission. The TCP/IP network stack will subtract + * space for all linklevel and protocol level headers and + * ensure that the full mbuf chain passed to the network + * adapter fits within the given limits. */ u_int if_hw_tsomax; Modified: stable/10/sys/netinet/tcp_output.c ============================================================================== --- stable/10/sys/netinet/tcp_output.c Thu Oct 8 08:06:23 2015 (r289019) +++ stable/10/sys/netinet/tcp_output.c Thu Oct 8 08:30:40 2015 (r289020) @@ -807,7 +807,8 @@ send: */ if (if_hw_tsomax != 0) { /* compute maximum TSO length */ - max_len = (if_hw_tsomax - hdrlen); + max_len = (if_hw_tsomax - hdrlen - + max_linkhdr); if (max_len <= 0) { len = 0; } else if (len > max_len) { @@ -822,6 +823,15 @@ send: */ if (if_hw_tsomaxsegcount != 0 && if_hw_tsomaxsegsize != 0) { + /* + * Subtract one segment for the LINK + * and TCP/IP headers mbuf that will + * be prepended to this mbuf chain + * after the code in this section + * limits the number of mbufs in the + * chain to if_hw_tsomaxsegcount. + */ + if_hw_tsomaxsegcount -= 1; max_len = 0; mb = sbsndmbuf(&so->so_snd, off, &moff); From owner-svn-src-all@freebsd.org Thu Oct 8 08:55:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 996189D1A1A; Thu, 8 Oct 2015 08:55:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654DBDAA; Thu, 8 Oct 2015 08:55:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t988t8At078045; Thu, 8 Oct 2015 08:55:08 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t988t8EM078044; Thu, 8 Oct 2015 08:55:08 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510080855.t988t8EM078044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 8 Oct 2015 08:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289021 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 08:55:09 -0000 Author: des Date: Thu Oct 8 08:55:08 2015 New Revision: 289021 URL: https://svnweb.freebsd.org/changeset/base/289021 Log: Add -n to the ntpq command line so it will show IP addresses instead of host names, which rarely fit in the available space. MFC after: 1 week Modified: head/etc/periodic/daily/480.status-ntpd Modified: head/etc/periodic/daily/480.status-ntpd ============================================================================== --- head/etc/periodic/daily/480.status-ntpd Thu Oct 8 08:30:40 2015 (r289020) +++ head/etc/periodic/daily/480.status-ntpd Thu Oct 8 08:55:08 2015 (r289021) @@ -18,7 +18,7 @@ case "$daily_status_ntpd_enable" in echo "" echo "NTP status:" - synchronized=$(ntpq -p | tee /dev/stderr | grep '^\*') + synchronized=$(ntpq -pn | tee /dev/stderr | grep '^\*') if [ -z "$synchronized" ]; then rc=1 fi From owner-svn-src-all@freebsd.org Thu Oct 8 08:55:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C3F9D1A5A; Thu, 8 Oct 2015 08:55:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2748CEEF; Thu, 8 Oct 2015 08:55:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t988tZwv078102; Thu, 8 Oct 2015 08:55:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t988tZxs078100; Thu, 8 Oct 2015 08:55:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510080855.t988tZxs078100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 08:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289022 - in stable/9/sys: net netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 08:55:36 -0000 Author: hselasky Date: Thu Oct 8 08:55:34 2015 New Revision: 289022 URL: https://svnweb.freebsd.org/changeset/base/289022 Log: MFC r287775: Update TSO limits to include all headers. To make driver programming easier the TSO limits are changed to reflect the values used in the BUSDMA tag a network adapter driver is using. The TCP/IP network stack will subtract space for all linklevel and protocol level headers and ensure that the full mbuf chain passed to the network adapter fits within the given limits. See r287775 for a more detailed description. Differential Revision: https://reviews.freebsd.org/D3477 Reviewed by: rmacklem Modified: stable/9/sys/net/if_var.h stable/9/sys/netinet/tcp_output.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_var.h ============================================================================== --- stable/9/sys/net/if_var.h Thu Oct 8 08:55:08 2015 (r289021) +++ stable/9/sys/net/if_var.h Thu Oct 8 08:55:34 2015 (r289022) @@ -222,11 +222,12 @@ struct ifnet { * count limit does not apply. If all three fields are zero, * there is no TSO limit. * - * NOTE: The TSO limits only apply to the data payload part of - * a TCP/IP packet. That means there is no need to subtract - * space for ethernet-, vlan-, IP- or TCP- headers from the - * TSO limits unless the hardware driver in question requires - * so. + * NOTE: The TSO limits should reflect the values used in the + * BUSDMA tag a network adapter is using to load a mbuf chain + * for transmission. The TCP/IP network stack will subtract + * space for all linklevel and protocol level headers and + * ensure that the full mbuf chain passed to the network + * adapter fits within the given limits. */ u_int if_hw_tsomax; int if_ispare[1]; Modified: stable/9/sys/netinet/tcp_output.c ============================================================================== --- stable/9/sys/netinet/tcp_output.c Thu Oct 8 08:55:08 2015 (r289021) +++ stable/9/sys/netinet/tcp_output.c Thu Oct 8 08:55:34 2015 (r289022) @@ -798,7 +798,8 @@ send: */ if (if_hw_tsomax != 0) { /* compute maximum TSO length */ - max_len = (if_hw_tsomax - hdrlen); + max_len = (if_hw_tsomax - hdrlen - + max_linkhdr); if (max_len <= 0) { len = 0; } else if (len > max_len) { @@ -813,6 +814,15 @@ send: */ if (if_hw_tsomaxsegcount != 0 && if_hw_tsomaxsegsize != 0) { + /* + * Subtract one segment for the LINK + * and TCP/IP headers mbuf that will + * be prepended to this mbuf chain + * after the code in this section + * limits the number of mbufs in the + * chain to if_hw_tsomaxsegcount. + */ + if_hw_tsomaxsegcount -= 1; max_len = 0; mb = sbsndmbuf(&so->so_snd, off, &moff); From owner-svn-src-all@freebsd.org Thu Oct 8 09:46:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDB59D161A; Thu, 8 Oct 2015 09:46:36 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5340EB6E; Thu, 8 Oct 2015 09:46:36 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t989kZer092699; Thu, 8 Oct 2015 09:46:35 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t989kZpO092698; Thu, 8 Oct 2015 09:46:35 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201510080946.t989kZpO092698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Thu, 8 Oct 2015 09:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289023 - head/usr.sbin/pmcstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 09:46:36 -0000 Author: fabient Date: Thu Oct 8 09:46:35 2015 New Revision: 289023 URL: https://svnweb.freebsd.org/changeset/base/289023 Log: Fix for r288176 changes related to debug symbols move. Reviewed by: emaste Sponsored by: Stormshield Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Thu Oct 8 08:55:34 2015 (r289022) +++ head/usr.sbin/pmcstat/pmcstat_log.c Thu Oct 8 09:46:35 2015 (r289023) @@ -966,21 +966,32 @@ pmcstat_image_addr2line(struct pmcstat_i char *funcname, size_t funcname_len) { static int addr2line_warn = 0; - unsigned l; char *sep, cmdline[PATH_MAX], imagepath[PATH_MAX]; + unsigned l; int fd; if (image->pi_addr2line == NULL) { - snprintf(imagepath, sizeof(imagepath), "%s%s.symbols", + /* Try default debug file location. */ + snprintf(imagepath, sizeof(imagepath), + "/usr/lib/debug/%s%s.debug", args.pa_fsroot, pmcstat_string_unintern(image->pi_fullpath)); fd = open(imagepath, O_RDONLY); if (fd < 0) { - snprintf(imagepath, sizeof(imagepath), "%s%s", + /* Old kernel symbol path. */ + snprintf(imagepath, sizeof(imagepath), "%s%s.symbols", args.pa_fsroot, pmcstat_string_unintern(image->pi_fullpath)); - } else + fd = open(imagepath, O_RDONLY); + if (fd < 0) { + snprintf(imagepath, sizeof(imagepath), "%s%s", + args.pa_fsroot, + pmcstat_string_unintern( + image->pi_fullpath)); + } + } + if (fd >= 0) close(fd); /* * New addr2line support recursive inline function with -i From owner-svn-src-all@freebsd.org Thu Oct 8 09:54:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1357D9D1CCD; Thu, 8 Oct 2015 09:54:35 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D250A1356; Thu, 8 Oct 2015 09:54:34 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t989sX3v095654; Thu, 8 Oct 2015 09:54:33 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t989sXAx095653; Thu, 8 Oct 2015 09:54:33 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201510080954.t989sXAx095653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Thu, 8 Oct 2015 09:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289024 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 09:54:35 -0000 Author: fabient Date: Thu Oct 8 09:54:33 2015 New Revision: 289024 URL: https://svnweb.freebsd.org/changeset/base/289024 Log: Fix r283998 that broke mapin events for hwpmc. Reviewed by: jhb Sponsored by: Stormshield Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Oct 8 09:46:35 2015 (r289023) +++ head/sys/kern/vfs_vnops.c Thu Oct 8 09:54:33 2015 (r289024) @@ -43,6 +43,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_hwpmc_hooks.h" + #include #include #include @@ -84,6 +86,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef HWPMC_HOOKS +#include +#endif + static fo_rdwr_t vn_read; static fo_rdwr_t vn_write; static fo_rdwr_t vn_io_fault; @@ -2461,7 +2467,7 @@ vn_mmap(struct file *fp, vm_map_t map, v /* Inform hwpmc(4) if an executable is being mapped. */ if (error == 0 && (prot & VM_PROT_EXECUTE) != 0) { pkm.pm_file = vp; - pkm.pm_address = (uintptr_t) addr; + pkm.pm_address = (uintptr_t) *addr; PMC_CALL_HOOK(td, PMC_FN_MMAP, (void *) &pkm); } #endif From owner-svn-src-all@freebsd.org Thu Oct 8 10:00:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72E6D9D011F; Thu, 8 Oct 2015 10:00:42 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 307DF1878; Thu, 8 Oct 2015 10:00:42 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98A0fCq096035; Thu, 8 Oct 2015 10:00:41 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98A0ffp096034; Thu, 8 Oct 2015 10:00:41 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201510081000.t98A0ffp096034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Thu, 8 Oct 2015 10:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289025 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 10:00:42 -0000 Author: fabient Date: Thu Oct 8 10:00:41 2015 New Revision: 289025 URL: https://svnweb.freebsd.org/changeset/base/289025 Log: Fix r283120 which use class size larger than 8bits. The new mapping will restore binary compatibility with stable_10 but file generated since r283120 are broken. Reviewed by: jhb Sponsored by: Stormshield Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Thu Oct 8 09:54:33 2015 (r289024) +++ head/sys/sys/pmc.h Thu Oct 8 10:00:41 2015 (r289025) @@ -128,26 +128,26 @@ enum pmc_cputype { */ #define __PMC_CLASSES() \ - __PMC_CLASS(TSC, 0x000, "CPU Timestamp counter") \ - __PMC_CLASS(K7, 0x100, "AMD K7 performance counters") \ - __PMC_CLASS(K8, 0x101, "AMD K8 performance counters") \ - __PMC_CLASS(P5, 0x102, "Intel Pentium counters") \ - __PMC_CLASS(P6, 0x103, "Intel Pentium Pro counters") \ - __PMC_CLASS(P4, 0x104, "Intel Pentium-IV counters") \ - __PMC_CLASS(IAF, 0x105, "Intel Core2/Atom, fixed function") \ - __PMC_CLASS(IAP, 0x106, "Intel Core...Atom, programmable") \ - __PMC_CLASS(UCF, 0x107, "Intel Uncore fixed function") \ - __PMC_CLASS(UCP, 0x108, "Intel Uncore programmable") \ - __PMC_CLASS(XSCALE, 0x200, "Intel XScale counters") \ - __PMC_CLASS(ARMV7, 0x201, "ARMv7") \ - __PMC_CLASS(ARMV8, 0x202, "ARMv8") \ - __PMC_CLASS(MIPS24K, 0x300, "MIPS 24K") \ - __PMC_CLASS(OCTEON, 0x301, "Cavium Octeon") \ - __PMC_CLASS(MIPS74K, 0x302, "MIPS 74K") \ - __PMC_CLASS(PPC7450, 0x400, "Motorola MPC7450 class") \ - __PMC_CLASS(PPC970, 0x401, "IBM PowerPC 970 class") \ - __PMC_CLASS(E500, 0x402, "Freescale e500 class") \ - __PMC_CLASS(SOFT, 0x8000, "Software events") + __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ + __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ + __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ + __PMC_CLASS(P5, 0x03, "Intel Pentium counters") \ + __PMC_CLASS(P6, 0x04, "Intel Pentium Pro counters") \ + __PMC_CLASS(P4, 0x05, "Intel Pentium-IV counters") \ + __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ + __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ + __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ + __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ + __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ + __PMC_CLASS(MIPS24K, 0x0B, "MIPS 24K") \ + __PMC_CLASS(OCTEON, 0x0C, "Cavium Octeon") \ + __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ + __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ + __PMC_CLASS(SOFT, 0x0F, "Software events") \ + __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ + __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ + __PMC_CLASS(MIPS74K, 0x12, "MIPS 74K") \ + __PMC_CLASS(E500, 0x13, "Freescale e500 class") enum pmc_class { #undef __PMC_CLASS @@ -156,7 +156,7 @@ enum pmc_class { }; #define PMC_CLASS_FIRST PMC_CLASS_TSC -#define PMC_CLASS_LAST PMC_CLASS_SOFT +#define PMC_CLASS_LAST PMC_CLASS_E500 /* * A PMC can be in the following states: From owner-svn-src-all@freebsd.org Thu Oct 8 11:07:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C7249D0052; Thu, 8 Oct 2015 11:07:11 +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 07CF91D04; Thu, 8 Oct 2015 11:07:10 +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 t98B7ApA017146; Thu, 8 Oct 2015 11:07:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98B791W017144; Thu, 8 Oct 2015 11:07:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081107.t98B791W017144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 11:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289026 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 11:07:11 -0000 Author: kib Date: Thu Oct 8 11:07:09 2015 New Revision: 289026 URL: https://svnweb.freebsd.org/changeset/base/289026 Log: Enforce the maxproc limitation before allocating struct proc, initial struct thread and kernel stack for the thread. Otherwise, a load similar to a fork bomb would exhaust KVA and possibly kmem, mostly due to the struct proc being type-stable. The nprocs counter is changed from being protected by allproc_lock sx to be an atomic variable. Note that ddb/db_ps.c:db_ps() use of nprocs was unsafe before, and is still unsafe, but it seems that the only possible undesired consequence is the harmless warning printed when allproc linked list length does not match nprocs. Diagnosed by: Svatopluk Kraus Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Oct 8 10:00:41 2015 (r289025) +++ head/sys/kern/kern_exit.c Thu Oct 8 11:07:09 2015 (r289026) @@ -963,9 +963,7 @@ proc_reap(struct thread *td, struct proc KASSERT(FIRST_THREAD_IN_PROC(p), ("proc_reap: no residual thread!")); uma_zfree(proc_zone, p); - sx_xlock(&allproc_lock); - nprocs--; - sx_xunlock(&allproc_lock); + atomic_add_int(&nprocs, -1); } static int Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Oct 8 10:00:41 2015 (r289025) +++ head/sys/kern/kern_fork.c Thu Oct 8 11:07:09 2015 (r289026) @@ -382,12 +382,6 @@ do_fork(struct thread *td, int flags, st p2_held = 0; p1 = td->td_proc; - /* - * Increment the nprocs resource before blocking can occur. There - * are hard-limits as to the number of processes that can run. - */ - nprocs++; - trypid = fork_findpid(flags); sx_sunlock(&proctree_lock); @@ -771,16 +765,14 @@ int fork1(struct thread *td, int flags, int pages, struct proc **procp, int *procdescp, int pdflags, struct filecaps *fcaps) { - struct proc *p1; - struct proc *newproc; - int ok; + struct proc *p1, *newproc; struct thread *td2; struct vmspace *vm2; + struct file *fp_procdesc; vm_ooffset_t mem_charged; - int error; + int error, nprocs_new, ok; static int curfail; static struct timeval lastfail; - struct file *fp_procdesc = NULL; /* Check for the undefined or unimplemented flags. */ if ((flags & ~(RFFLAGS | RFTSIGFLAGS(RFTSIGMASK))) != 0) @@ -819,6 +811,35 @@ fork1(struct thread *td, int flags, int return (fork_norfproc(td, flags)); } + fp_procdesc = NULL; + newproc = NULL; + vm2 = NULL; + + /* + * Increment the nprocs resource before allocations occur. + * Although process entries are dynamically created, we still + * keep a global limit on the maximum number we will + * create. There are hard-limits as to the number of processes + * that can run, established by the KVA and memory usage for + * the process data. + * + * Don't allow a nonprivileged user to use the last ten + * processes; don't let root exceed the limit. + */ + nprocs_new = atomic_fetchadd_int(&nprocs, 1) + 1; + if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, + PRIV_MAXPROC, 0) != 0) || nprocs_new >= maxproc) { + error = EAGAIN; + sx_xlock(&allproc_lock); + if (ppsratecheck(&lastfail, &curfail, 1)) { + printf("maxproc limit exceeded by uid %u (pid %d); " + "see tuning(7) and login.conf(5)\n", + td->td_ucred->cr_ruid, p1->p_pid); + } + sx_xunlock(&allproc_lock); + goto fail2; + } + /* * If required, create a process descriptor in the parent first; we * will abandon it if something goes wrong. We don't finit() until @@ -831,7 +852,6 @@ fork1(struct thread *td, int flags, int } mem_charged = 0; - vm2 = NULL; if (pages == 0) pages = kstack_pages; /* Allocate new proc. */ @@ -898,20 +918,7 @@ fork1(struct thread *td, int flags, int /* We have to lock the process tree while we look for a pid. */ sx_slock(&proctree_lock); - - /* - * Although process entries are dynamically created, we still keep - * a global limit on the maximum number we will create. Don't allow - * a nonprivileged user to use the last ten processes; don't let root - * exceed the limit. The variable nprocs is the current number of - * processes, maxproc is the limit. - */ sx_xlock(&allproc_lock); - if ((nprocs >= maxproc - 10 && priv_check_cred(td->td_ucred, - PRIV_MAXPROC, 0) != 0) || nprocs >= maxproc) { - error = EAGAIN; - goto fail; - } /* * Increment the count of procs running with this uid. Don't allow @@ -942,11 +949,7 @@ fork1(struct thread *td, int flags, int } error = EAGAIN; -fail: sx_sunlock(&proctree_lock); - if (ppsratecheck(&lastfail, &curfail, 1)) - printf("maxproc limit exceeded by uid %u (pid %d); see tuning(7) and login.conf(5)\n", - td->td_ucred->cr_ruid, p1->p_pid); sx_xunlock(&allproc_lock); #ifdef MAC mac_proc_destroy(newproc); @@ -963,6 +966,7 @@ fail2: fdclose(td, fp_procdesc, *procdescp); fdrop(fp_procdesc, td); } + atomic_add_int(&nprocs, -1); pause("fork", hz / 2); return (error); } From owner-svn-src-all@freebsd.org Thu Oct 8 04:29:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1FA49D10D6; Thu, 8 Oct 2015 04:29: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 95360355; Thu, 8 Oct 2015 04:29: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 t984Tdip098262; Thu, 8 Oct 2015 04:29:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t984TdrM098260; Thu, 8 Oct 2015 04:29:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201510080429.t984TdrM098260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 8 Oct 2015 04:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289003 - vendor-sys/illumos/dist/uts/common/dtrace vendor-sys/illumos/dist/uts/common/sys vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 08 Oct 2015 11:13:16 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 04:29:41 -0000 Author: markj Date: Thu Oct 8 04:29:39 2015 New Revision: 289003 URL: https://svnweb.freebsd.org/changeset/base/289003 Log: 6271 dtrace caused excessive fork time Author: Bryan Cantrill Reviewed by: Adam Leventhal Reviewed by: Dan McDonald Reviewed by: Richard Lowe Approved by: Gordon Ross illumos/illumos-gate@7bd3c1d12d0c764e1517c3aca62c634409356764 Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh.out Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c vendor-sys/illumos/dist/uts/common/sys/dtrace.h Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh Thu Oct 8 04:29:39 2015 (r289003) @@ -0,0 +1,99 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2015, Joyent, Inc. All rights reserved. +# + +# +# This test assures that we can have the same provider name across multiple +# probe definitions, and that the result will be the union of those +# definitions. In particular, libusdt depends on this when (for example) +# node modules that create a provider are loaded multiple times due to +# being included by different modules. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < + +void +main() +{ +EOF + +objs= + +for oogle in bagnoogle stalloogle cockoogle; do + cat > $oogle.c < + +void +$oogle() +{ + DTRACE_PROBE(doogle, $oogle); +} +EOF + + cat > $oogle.d <> test.c +done + +echo "}" >> test.c + +gcc -m32 -o test test.c $objs + +if [ $? -ne 0 ]; then + print -u2 "failed to compile test.c" + exit 1 +fi + +$dtrace -n 'doogle$target:::{@[probename] = count()}' \ + -n 'END{printa("%-10s %@d\n", @)}' -x quiet -x aggsortkey -Zc ./test + +if [ $? -ne 0 ]; then + print -u2 "failed to execute test" + exit 1 +fi + +cd / +/usr/bin/rm -rf $DIR +exit 0 Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.sameprovmulti.ksh.out Thu Oct 8 04:29:39 2015 (r289003) @@ -0,0 +1,4 @@ +bagnoogle 1 +cockoogle 1 +stalloogle 1 + From owner-svn-src-all@freebsd.org Thu Oct 8 11:42:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0A199D1BAD; Thu, 8 Oct 2015 11:42:16 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9891569E; Thu, 8 Oct 2015 11:42:16 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98BgFOE028824; Thu, 8 Oct 2015 11:42:15 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98BgFJd028821; Thu, 8 Oct 2015 11:42:15 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201510081142.t98BgFJd028821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 8 Oct 2015 11:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289027 - head/contrib/tzcode/stdtime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 11:42:17 -0000 Author: rodrigc Date: Thu Oct 8 11:42:15 2015 New Revision: 289027 URL: https://svnweb.freebsd.org/changeset/base/289027 Log: Merge: commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd Author: Paul Eggert Date: Fri Oct 12 07:53:12 2012 -0700 Assume C89. https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd Modified: head/contrib/tzcode/stdtime/difftime.c head/contrib/tzcode/stdtime/localtime.c head/contrib/tzcode/stdtime/private.h Modified: head/contrib/tzcode/stdtime/difftime.c ============================================================================== --- head/contrib/tzcode/stdtime/difftime.c Thu Oct 8 11:07:09 2015 (r289026) +++ head/contrib/tzcode/stdtime/difftime.c Thu Oct 8 11:42:15 2015 (r289027) @@ -18,9 +18,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" double -difftime(time1, time0) -const time_t time1; -const time_t time0; +difftime(const time_t time1, const time_t time0) { /* ** If (sizeof (double) > sizeof (time_t)) simply convert and subtract Modified: head/contrib/tzcode/stdtime/localtime.c ============================================================================== --- head/contrib/tzcode/stdtime/localtime.c Thu Oct 8 11:07:09 2015 (r289026) +++ head/contrib/tzcode/stdtime/localtime.c Thu Oct 8 11:42:15 2015 (r289027) @@ -173,8 +173,9 @@ struct rule { static long detzcode(const char * codep); static time_t detzcode64(const char * codep); static int differ_by_repeat(time_t t1, time_t t0); -static const char * getzname(const char * strp); -static const char * getqzname(const char * strp, const int delim); +static const char * getzname(const char * strp) ATTRIBUTE_PURE; +static const char * getqzname(const char * strp, const int delim) + ATTRIBUTE_PURE; static const char * getnum(const char * strp, int * nump, int min, int max); static const char * getsecs(const char * strp, long * secsp); @@ -186,7 +187,7 @@ static struct tm * gmtsub(const time_t * static struct tm * localsub(const time_t * timep, long offset, struct tm * tmp); static int increment_overflow(int * number, int delta); -static int leaps_thru_end_of(int y); +static int leaps_thru_end_of(int y) ATTRIBUTE_PURE; static int long_increment_overflow(long * number, int delta); static int long_normalize_overflow(long * tensptr, int * unitsptr, int base); @@ -210,7 +211,8 @@ static struct tm * timesub(const time_t static int tmcomp(const struct tm * atmp, const struct tm * btmp); static time_t transtime(time_t janfirst, int year, - const struct rule * rulep, long offset); + const struct rule * rulep, long offset) + ATTRIBUTE_PURE; static int typesequiv(const struct state * sp, int a, int b); static int tzload(const char * name, struct state * sp, int doextend); @@ -269,8 +271,7 @@ time_t altzone = 0; #endif /* defined ALTZONE */ static long -detzcode(codep) -const char * const codep; +detzcode(const char *const codep) { long result; int i; @@ -282,8 +283,7 @@ const char * const codep; } static time_t -detzcode64(codep) -const char * const codep; +detzcode64(const char *const codep) { register time_t result; register int i; @@ -355,9 +355,7 @@ settzname(void) } static int -differ_by_repeat(t1, t0) -const time_t t1; -const time_t t0; +differ_by_repeat(const time_t t1, const time_t t0) { int_fast64_t _t0 = t0; int_fast64_t _t1 = t1; @@ -1217,8 +1215,7 @@ const int lastditch; } static void -gmtload(sp) -struct state * const sp; +gmtload(struct state *const sp) { if (tzload(gmt, sp, TRUE) != 0) (void) tzparse(gmt, sp, TRUE); @@ -1241,7 +1238,7 @@ tzsetwall_basic(int rdlocked) #ifdef ALL_STATE if (lclptr == NULL) { - lclptr = (struct state *) calloc(1, sizeof *lclptr); + lclptr = calloc(1, sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ _RWLOCK_UNLOCK(&lcl_rwlock); @@ -1341,10 +1338,7 @@ tzset(void) /*ARGSUSED*/ static struct tm * -localsub(timep, offset, tmp) -const time_t * const timep; -const long offset; -struct tm * const tmp; +localsub(const time_t *const timep, const long offset, struct tm *const tmp) { struct state * sp; const struct ttinfo * ttisp; @@ -1440,8 +1434,7 @@ localtime_key_init(void) } struct tm * -localtime(timep) -const time_t * const timep; +localtime(const time_t *const timep) { struct tm *p_tm; @@ -1475,9 +1468,7 @@ const time_t * const timep; */ struct tm * -localtime_r(timep, tmp) -const time_t * const timep; -struct tm * tmp; +localtime_r(const time_t *const timep, struct tm *tmp) { _RWLOCK_RDLOCK(&lcl_rwlock); tzset_basic(1); @@ -1541,8 +1532,7 @@ gmtime_key_init(void) } struct tm * -gmtime(timep) -const time_t * const timep; +gmtime(const time_t *const timep) { struct tm *p_tm; @@ -1577,9 +1567,7 @@ const time_t * const timep; */ struct tm * -gmtime_r(timep, tmp) -const time_t * const timep; -struct tm * tmp; +gmtime_r(const time_t *const timep, struct tm *tmp) { return gmtsub(timep, 0L, tmp); } @@ -1587,9 +1575,7 @@ struct tm * tmp; #ifdef STD_INSPIRED struct tm * -offtime(timep, offset) -const time_t * const timep; -const long offset; +offtime(const time_t *const timep, const long offset) { return gmtsub(timep, offset, &tm); } @@ -1744,8 +1730,7 @@ struct tm * const tmp; } char * -ctime(timep) -const time_t * const timep; +ctime(const time_t *const timep) { /* ** Section 4.12.3.2 of X3.159-1989 requires that @@ -1757,9 +1742,7 @@ const time_t * const timep; } char * -ctime_r(timep, buf) -const time_t * const timep; -char * buf; +ctime_r(const time_t *const timep, char *buf) { struct tm mytm; @@ -1808,10 +1791,7 @@ int delta; } static int -normalize_overflow(tensptr, unitsptr, base) -int * const tensptr; -int * const unitsptr; -const int base; +normalize_overflow(int *const tensptr, int *const unitsptr, const int base) { int tensdelta; @@ -1823,10 +1803,7 @@ const int base; } static int -long_normalize_overflow(tensptr, unitsptr, base) -long * const tensptr; -int * const unitsptr; -const int base; +long_normalize_overflow(long *const tensptr, int *const unitsptr, const int base) { register int tensdelta; @@ -1854,12 +1831,11 @@ const struct tm * const btmp; } static time_t -time2sub(tmp, funcp, offset, okayp, do_norm_secs) -struct tm * const tmp; -struct tm * (* const funcp)(const time_t*, long, struct tm*); -const long offset; -int * const okayp; -const int do_norm_secs; +time2sub(struct tm *const tmp, + struct tm *(*const funcp)(const time_t *, long, struct tm *), + const long offset, + int *const okayp, + const int do_norm_secs) { const struct state * sp; int dir; @@ -2041,11 +2017,10 @@ label: } static time_t -time2(tmp, funcp, offset, okayp) -struct tm * const tmp; -struct tm * (* const funcp)(const time_t*, long, struct tm*); -const long offset; -int * const okayp; +time2(struct tm * const tmp, + struct tm * (*const funcp)(const time_t *, long, struct tm *), + const long offset, + int *const okayp) { time_t t; @@ -2137,8 +2112,7 @@ const long offset; } time_t -mktime(tmp) -struct tm * const tmp; +mktime(struct tm *const tmp) { time_t mktime_return_value; _RWLOCK_RDLOCK(&lcl_rwlock); @@ -2151,8 +2125,7 @@ struct tm * const tmp; #ifdef STD_INSPIRED time_t -timelocal(tmp) -struct tm * const tmp; +timelocal(struct tm *const tmp) { if (tmp != NULL) tmp->tm_isdst = -1; /* in case it wasn't initialized */ @@ -2160,8 +2133,7 @@ struct tm * const tmp; } time_t -timegm(tmp) -struct tm * const tmp; +timegm(struct tm *const tmp) { if (tmp != NULL) tmp->tm_isdst = 0; @@ -2169,9 +2141,7 @@ struct tm * const tmp; } time_t -timeoff(tmp, offset) -struct tm * const tmp; -const long offset; +timeoff(struct tm *const tmp, const long offset) { if (tmp != NULL) tmp->tm_isdst = 0; @@ -2188,8 +2158,7 @@ const long offset; */ long -gtime(tmp) -struct tm * const tmp; +gtime(struct tm *const tmp) { const time_t t = mktime(tmp); @@ -2215,8 +2184,7 @@ struct tm * const tmp; */ static long -leapcorr(timep) -time_t * timep; +leapcorr(time_t *timep) { struct state * sp; struct lsinfo * lp; @@ -2233,16 +2201,14 @@ time_t * timep; } time_t -time2posix(t) -time_t t; +time2posix(time_t t) { tzset(); return t - leapcorr(&t); } time_t -posix2time(t) -time_t t; +posix2time(time_t t) { time_t x; time_t y; Modified: head/contrib/tzcode/stdtime/private.h ============================================================================== --- head/contrib/tzcode/stdtime/private.h Thu Oct 8 11:07:09 2015 (r289026) +++ head/contrib/tzcode/stdtime/private.h Thu Oct 8 11:42:15 2015 (r289027) @@ -173,6 +173,12 @@ typedef long int_fast64_t; #define INT32_MIN (-1 - INT32_MAX) #endif /* !defined INT32_MIN */ +#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define ATTRIBUTE_PURE /* empty */ +#endif + /* ** Workarounds for compilers/systems. */ @@ -191,13 +197,8 @@ extern char * asctime_r(struct tm const ** Private function declarations. */ -char * icalloc(int nelem, int elsize); char * icatalloc(char * old, const char * new); char * icpyalloc(const char * string); -char * imalloc(int n); -void * irealloc(void * pointer, int size); -void icfree(char * pointer); -void ifree(char * pointer); const char * scheck(const char * string, const char * format); /* From owner-svn-src-all@freebsd.org Thu Oct 8 12:55:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB2869D178A; Thu, 8 Oct 2015 12:55:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 718A7F8E; Thu, 8 Oct 2015 12:55:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98CtLB8050120; Thu, 8 Oct 2015 12:55:21 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98CtLpa050118; Thu, 8 Oct 2015 12:55:21 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201510081255.t98CtLpa050118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 8 Oct 2015 12:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289028 - in head/sys/dev/usb: . wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 12:55:22 -0000 Author: gavin Date: Thu Oct 8 12:55:21 2015 New Revision: 289028 URL: https://svnweb.freebsd.org/changeset/base/289028 Log: Recognise the Netgear WNDA4100 (N900) 3x3 device in run(4). Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Oct 8 11:42:15 2015 (r289027) +++ head/sys/dev/usb/usbdevs Thu Oct 8 12:55:21 2015 (r289028) @@ -3261,6 +3261,7 @@ product NETGEAR WG111U_NF 0x4301 WG111U product NETGEAR WG111V2 0x6a00 WG111V2 product NETGEAR WN111V2 0x9001 WN111V2 product NETGEAR WNDA3100 0x9010 WNDA3100 +product NETGEAR WNDA4100 0x9012 WNDA4100 product NETGEAR WNDA3200 0x9018 WNDA3200 product NETGEAR RTL8192CU 0x9021 RTL8192CU product NETGEAR WNA1000 0x9040 WNA1000 Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Thu Oct 8 11:42:15 2015 (r289027) +++ head/sys/dev/usb/wlan/if_run.c Thu Oct 8 12:55:21 2015 (r289028) @@ -246,6 +246,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(MSI, RT3070_9), RUN_DEV(MSI, RT3070_10), RUN_DEV(MSI, RT3070_11), + RUN_DEV(NETGEAR, WNDA4100), RUN_DEV(OVISLINK, RT3072), RUN_DEV(PARA, RT3070), RUN_DEV(PEGATRON, RT2870), From owner-svn-src-all@freebsd.org Thu Oct 8 13:00:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9DB59D1A6B; Thu, 8 Oct 2015 13:00:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 90D39360; Thu, 8 Oct 2015 13:00:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA00880; Thu, 08 Oct 2015 15:52:03 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZkAfz-000AK0-9V; Thu, 08 Oct 2015 15:52:03 +0300 Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime To: Craig Rodrigues , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510081142.t98BgFJd028821@repo.freebsd.org> From: Andriy Gapon Message-ID: <561666CE.1050608@FreeBSD.org> Date: Thu, 8 Oct 2015 15:51:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510081142.t98BgFJd028821@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 13:00:06 -0000 On 08/10/2015 14:42, Craig Rodrigues wrote: > Author: rodrigc > Date: Thu Oct 8 11:42:15 2015 > New Revision: 289027 > URL: https://svnweb.freebsd.org/changeset/base/289027 > > Log: > Merge: > commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd > Author: Paul Eggert > Date: Fri Oct 12 07:53:12 2012 -0700 > > Assume C89. > > https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd What if one day github disappears but FreeBSD is still going? The full commit message would be lost. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Oct 8 13:08:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D6BA9D0270; Thu, 8 Oct 2015 13:08:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FDC9DFD; Thu, 8 Oct 2015 13:08:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicfx3 with SMTP id fx3so24349865wic.0; Thu, 08 Oct 2015 06:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=WFWdw6Xe82uiHtZshxfjqpzuYCyOb8zDDC24dLaENbE=; b=XMZgklREUV5DqBOAEY1MmYnK91Lm5ix0radBzZFBNsm3iLTmz2dBtLsXP+Gbwfr3AF ynQbgBFRRXvSWyDMGS/Gr/tcegECLnGUJs8whsSMkH5r/m56HZ/ZK5uTnHRcEv3wFiRm W67jtJFB/jtRgYcisN++UIJE1BpXfCznmd4DTJnvALqgAdzA893l/dfNNCitJxgq6Jsd fGath0k1IRFb6CS8idop6L5/osxaL6vdel001ggegQdkbecKPGiDiLgsnfk92CFMwvR9 SCnZafg2OkbwM8TpPAnLeFcCIQh9I4//AxjnY82vlQRJ6eVLNsyX/0cSefNV9cYdcGIA 5qVQ== X-Received: by 10.180.35.199 with SMTP id k7mr4341246wij.13.1444309723571; Thu, 08 Oct 2015 06:08:43 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id bu19sm46077648wjb.45.2015.10.08.06.08.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Oct 2015 06:08:42 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 8 Oct 2015 15:08:41 +0200 From: Baptiste Daroussin To: Andriy Gapon Cc: Craig Rodrigues , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime Message-ID: <20151008130840.GI91729@ivaldir.etoilebsd.net> References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X0cz4bGbQuRbxrVl" Content-Disposition: inline In-Reply-To: <561666CE.1050608@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 13:08:45 -0000 --X0cz4bGbQuRbxrVl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 08, 2015 at 03:51:26PM +0300, Andriy Gapon wrote: > On 08/10/2015 14:42, Craig Rodrigues wrote: > > Author: rodrigc > > Date: Thu Oct 8 11:42:15 2015 > > New Revision: 289027 > > URL: https://svnweb.freebsd.org/changeset/base/289027 > >=20 > > Log: > > Merge: > > commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd > > Author: Paul Eggert > > Date: Fri Oct 12 07:53:12 2012 -0700 > > =20 > > Assume C89. > > =20 > > https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb= 91a5cfd >=20 > What if one day github disappears but FreeBSD is still going? > The full commit message would be lost. >=20 Same if someone edit history Bapt --X0cz4bGbQuRbxrVl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYWatgACgkQ8kTtMUmk6EwIgACbB7Tc7u0/CGYVoP5i4q+WC8VI EjwAoIs9epItdPWAj38lbsIo0QiPLaZL =jPku -----END PGP SIGNATURE----- --X0cz4bGbQuRbxrVl-- From owner-svn-src-all@freebsd.org Thu Oct 8 13:39:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DE879B4B8D; Thu, 8 Oct 2015 13:39:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9988BFE; Thu, 8 Oct 2015 13:39:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98DdRBo062321; Thu, 8 Oct 2015 13:39:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98DdROi062320; Thu, 8 Oct 2015 13:39:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510081339.t98DdROi062320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Oct 2015 13:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289029 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 13:39:29 -0000 Author: hselasky Date: Thu Oct 8 13:39:27 2015 New Revision: 289029 URL: https://svnweb.freebsd.org/changeset/base/289029 Log: Add quirk for USB 3.0 PCI device. Submitted by: Gary Jennejohn MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 12:55:21 2015 (r289028) +++ head/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 13:39:27 2015 (r289029) @@ -199,6 +199,7 @@ xhci_pci_attach(device_t self) switch (pci_get_devid(self)) { case 0x01941033: /* NEC uPD720200 USB 3.0 controller */ + case 0x00141912: /* NEC uPD720201 USB 3.0 controller */ /* Don't use 64-bit DMA on these controllers. */ usedma32 = 1; break; From owner-svn-src-all@freebsd.org Thu Oct 8 15:13:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F1399D2DA1; Thu, 8 Oct 2015 15:13:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B310C6AE; Thu, 8 Oct 2015 15:13:58 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98FDv28095766; Thu, 8 Oct 2015 15:13:57 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98FDvqJ095765; Thu, 8 Oct 2015 15:13:57 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510081513.t98FDvqJ095765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 8 Oct 2015 15:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289030 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 15:13:59 -0000 Author: kevlo Date: Thu Oct 8 15:13:57 2015 New Revision: 289030 URL: https://svnweb.freebsd.org/changeset/base/289030 Log: Add support for Fresco Logic USB 3.0 host controller. Fresco Logic hosts advertise MSI, but fail to actually generate MSI interrupts. We have to disable MSI use. Reviewed by: hselasky Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 13:39:27 2015 (r289029) +++ head/sys/dev/usb/controller/xhci_pci.c Thu Oct 8 15:13:57 2015 (r289030) @@ -98,13 +98,16 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x10001b73: + return ("Fresco Logic FL1000G USB 3.0 controller"); + case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); case 0x11421b21: return ("ASMedia ASM1042A USB 3.0 controller"); case 0x0f358086: - return ("Intel Intel BayTrail USB 3.0 controller"); + return ("Intel BayTrail USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -184,7 +187,8 @@ xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); int count, err, rid; - uint8_t usedma32; + uint8_t usemsi = 1; + uint8_t usedma32 = 0; rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, @@ -203,6 +207,10 @@ xhci_pci_attach(device_t self) /* Don't use 64-bit DMA on these controllers. */ usedma32 = 1; break; + case 0x10001b73: /* FL1000G */ + /* Fresco Logic host doesn't support MSI. */ + usemsi = 0; + break; case 0x0f358086: /* BayTrail */ case 0x9c318086: /* Panther Point */ case 0x1e318086: /* Panther Point */ @@ -214,9 +222,6 @@ xhci_pci_attach(device_t self) */ sc->sc_port_route = &xhci_pci_port_route; sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; - /* FALLTHROUGH */ - default: - usedma32 = 0; break; } @@ -232,7 +237,7 @@ xhci_pci_attach(device_t self) usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); rid = 0; - if (xhci_use_msi) { + if (xhci_use_msi && usemsi) { count = 1; if (pci_alloc_msi(self, &count) == 0) { if (bootverbose) From owner-svn-src-all@freebsd.org Thu Oct 8 15:26:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0560E9D06A1; Thu, 8 Oct 2015 15:26:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBA03D6E; Thu, 8 Oct 2015 15:26:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykec126 with SMTP id c126so14827802yke.2; Thu, 08 Oct 2015 08:26:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=fo5DehhMm0stb4mhyAm9hngUGgfgZK4XozdAZ2vwDvE=; b=DGPG5dTDblm3LDF2WawTsKB3yCnbY9+4H/IVHEA6U/ubv+2yjsdr5FgWcwfb8glVoM mdsLTJ38XvvkZ2Dn9I09po885TWWsYGGL0KolE5E16xh6lV6o9jRlHjwwQ6vM6z/t1Tf j5zwdgjyeGR1EjnhwwaTnhzPx5tNv6alMPJfwQ4Se5TzVIG4mAlNhNW5TTR5Y4gc3n2s h6fexR0+hnKPjOFyA5NF/9S/MXLo/bcF5GNYx9cuTSJdY0mnMkORNXryhD0EG5TbcmAo 7KvyjOW0GSsutYuWBpmNRDoyuzltTpEIgt/W0GN4M911BdJIdRgdp4tREt9UKdHjVrnn MOJA== X-Received: by 10.129.78.67 with SMTP id c64mr6328533ywb.218.1444317963145; Thu, 08 Oct 2015 08:26:03 -0700 (PDT) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id t83sm30761158ywa.46.2015.10.08.08.26.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Oct 2015 08:26:03 -0700 (PDT) Received: by ykft14 with SMTP id t14so52092519ykf.0; Thu, 08 Oct 2015 08:26:02 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.217.85 with SMTP id b82mr5589670ywe.338.1444317962693; Thu, 08 Oct 2015 08:26:02 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Thu, 8 Oct 2015 08:26:02 -0700 (PDT) In-Reply-To: <561666CE.1050608@FreeBSD.org> References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> Date: Thu, 8 Oct 2015 08:26:02 -0700 Message-ID: Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime From: Conrad Meyer To: Andriy Gapon Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 15:26:10 -0000 On Thu, Oct 8, 2015 at 5:51 AM, Andriy Gapon wrote: > On 08/10/2015 14:42, Craig Rodrigues wrote: >> Assume C89. >> >> https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd > > What if one day github disappears but FreeBSD is still going? > The full commit message would be lost. Looking at the full commit message on Github, nothing of value was lost. Conrad From owner-svn-src-all@freebsd.org Thu Oct 8 15:28:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E42AF9D090A; Thu, 8 Oct 2015 15:28:28 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7423DEFD; Thu, 8 Oct 2015 15:28:28 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by wiclk2 with SMTP id lk2so33918458wic.0; Thu, 08 Oct 2015 08:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7NcHE+6q4JnBBKfgxzcNX2ObfeRj8kyx8qSvvIh6vI4=; b=ednY9mLuj+4DhSyWokfs2HyujTOl7ULY0KOWJGJhfgi5DNUWAsmwLXK79hgXqCHbw/ TieTSDRFI810safU9gNKR+1Wyrw0xL8OOeirNoypYoif5aZZ9b94u1KSEd5px/NeInn7 FdE2p2VZLnhe5sxKfCuScIJn7YYvotwcQnJ4Dy5PL3kIa24axhqw6fPpyOWQSWdAEdNx d6qyY8XDQldr7rjl26aSw9JJ0NBKPJ1708Sj8ZeCp8PiROgCqZ/rPL8mSESGRhZiuwwd goz4K+8eUMh/Jmh6cpfkR7peYnN8ZafbPx6VYYxuyALLw8xx3M+etxp1WR0tGqEeARzL JWmg== MIME-Version: 1.0 X-Received: by 10.180.10.101 with SMTP id h5mr5009268wib.27.1444318106785; Thu, 08 Oct 2015 08:28:26 -0700 (PDT) Received: by 10.27.87.216 with HTTP; Thu, 8 Oct 2015 08:28:26 -0700 (PDT) In-Reply-To: References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> Date: Thu, 8 Oct 2015 10:28:26 -0500 Message-ID: Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime From: Benjamin Kaduk To: cem@freebsd.org Cc: Craig Rodrigues , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 15:28:29 -0000 On Thu, Oct 8, 2015 at 10:26 AM, Conrad Meyer wrote: > On Thu, Oct 8, 2015 at 5:51 AM, Andriy Gapon wrote: > > On 08/10/2015 14:42, Craig Rodrigues wrote: > >> Assume C89. > >> > >> > https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd > > > > What if one day github disappears but FreeBSD is still going? > > The full commit message would be lost. > > Looking at the full commit message on Github, nothing of value was lost. > Would have been nice to know if it was "Assume C89, because K&R is dead" or "Assume C89, because we still have to work on crippled platforms even though C99 has been out for 15 years", though. (The code makes it clear it's the former.) -Ben From owner-svn-src-all@freebsd.org Thu Oct 8 15:38:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B2809D1031; Thu, 8 Oct 2015 15:38:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58C127AB; Thu, 8 Oct 2015 15:38:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98FcY3L002093; Thu, 8 Oct 2015 15:38:34 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98FcYaO002092; Thu, 8 Oct 2015 15:38:34 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510081538.t98FcYaO002092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 8 Oct 2015 15:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289031 - head/sys/boot/i386/gptboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 15:38:35 -0000 Author: cperciva Date: Thu Oct 8 15:38:34 2015 New Revision: 289031 URL: https://svnweb.freebsd.org/changeset/base/289031 Log: Change gptldr from relocating 0xfff1 bytes of boot2 to relocating 0x20000 bytes of boot2. Since we're in 16-bit mode, we can't copy all 128kB at once; instead we loop four times and copy 32 kB each time. This change was made necessary by an upcoming increase in the size of the boot2 binary; should it increase further, the COPY_BLKS value can be adjusted without anyone needing to remember 8086 assembly language again. Requested by: allanjude Tested by: allanjude MFC after: 1 week Modified: head/sys/boot/i386/gptboot/gptldr.S Modified: head/sys/boot/i386/gptboot/gptldr.S ============================================================================== --- head/sys/boot/i386/gptboot/gptldr.S Thu Oct 8 15:13:57 2015 (r289030) +++ head/sys/boot/i386/gptboot/gptldr.S Thu Oct 8 15:38:34 2015 (r289031) @@ -45,6 +45,10 @@ /* Misc. Constants */ .set SIZ_PAG,0x1000 # Page size .set SIZ_SEC,0x200 # Sector size + .set COPY_BLKS,0x4 # Number of blocks + # to copy for boot2 + .set COPY_BLK_SZ,0x8000 # Copy in 32k blocks; must be + # a multiple of 16 bytes .globl start .code16 @@ -68,26 +72,39 @@ start: xor %cx,%cx # Zero * its header to find boot2. We need to copy boot2 to MEM_USR and BTX * to MEM_BTX. Since those might overlap, we have to copy boot2 * backwards first and then copy BTX. We aren't sure exactly how long - * boot2 is, but we assume it can't be longer than 64k, so we just always - * copy 64k. + * boot2 is, but it's currently under 128kB so we'll copy 4 blocks of 32kB + * each; this can be adjusted via COPY_BLK and COPY_BLK_SZ above. */ mov $end,%bx # BTX mov 0xa(%bx),%si # Get BTX length and set add %bx,%si # %si to start of boot2 - mov %si,%ax # Align %ds:%si on a - shr $4,%ax # paragraph boundary - and $0xf,%si # with the smallest - mov %ax,%ds # possible %si - add $(64 * 1024 - 16),%si - mov $MEM_USR/16,%ax # Point %es:%di at end of - mov $(64 * 1024 - 16),%di # largest boot2 range + dec %si # Set %ds:%si to point at the + mov %si,%ax # last byte we want to copy + shr $4,%ax # from boot2, with %si made as + add $(COPY_BLKS*COPY_BLK_SZ/16),%ax # small as possible. + and $0xf,%si # + mov %ax,%ds # + mov $MEM_USR/16,%ax # Set %es:(-1) to point at + add $(COPY_BLKS*COPY_BLK_SZ/16),%ax # the last byte we + mov %ax,%es # want to copy boot2 into. + mov $COPY_BLKS,%bx # Copy COPY_BLKS 32k blocks +copyloop: + add $COPY_BLK_SZ,%si # Adjust %ds:%si to point at + mov %ds,%ax # the end of the next 32k to + sub $COPY_BLK_SZ/16,%ax # copy from boot2 + mov %ax,%ds + mov $COPY_BLK_SZ-1,%di # Adjust %es:%di to point at + mov %es,%ax # the end of the next 32k into + sub $COPY_BLK_SZ/16,%ax # which we want boot2 copied mov %ax,%es + mov $COPY_BLK_SZ,%cx # Copy 32k std - mov %di,%cx # Copy 64k - paragraph + 1 - inc %cx # bytes rep movsb + dec %bx + jnz copyloop mov %cx,%ds # Reset %ds and %es mov %cx,%es + mov $end,%bx # BTX mov 0xa(%bx),%cx # Get BTX length and set mov %bx,%si # %si to end of BTX mov $MEM_BTX,%di # %di -> end of BTX at From owner-svn-src-all@freebsd.org Thu Oct 8 15:48:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C5E39D16BD; Thu, 8 Oct 2015 15:48:45 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777C9D91; Thu, 8 Oct 2015 15:48:45 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98Fmi76005105; Thu, 8 Oct 2015 15:48:44 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Fmi2V005101; Thu, 8 Oct 2015 15:48:44 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510081548.t98Fmi2V005101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 8 Oct 2015 15:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289032 - in stable/10: sbin/init sys/dev/acpica sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 15:48:45 -0000 Author: cperciva Date: Thu Oct 8 15:48:44 2015 New Revision: 289032 URL: https://svnweb.freebsd.org/changeset/base/289032 Log: MFC r288446: Disable suspend during shutdown. Modified: stable/10/sbin/init/init.c stable/10/sys/dev/acpica/acpi.c stable/10/sys/kern/kern_shutdown.c stable/10/sys/sys/systm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/init/init.c ============================================================================== --- stable/10/sbin/init/init.c Thu Oct 8 15:38:34 2015 (r289031) +++ stable/10/sbin/init/init.c Thu Oct 8 15:48:44 2015 (r289032) @@ -1499,6 +1499,15 @@ static state_func_t death(void) { session_t *sp; + int block, blocked; + size_t len; + + /* Temporarily block suspend. */ + len = sizeof(blocked); + block = 1; + if (sysctlbyname("kern.suspend_blocked", &blocked, &len, + &block, sizeof(block)) == -1) + blocked = 0; /* * Also revoke the TTY here. Because runshutdown() may reopen @@ -1515,6 +1524,11 @@ death(void) /* Try to run the rc.shutdown script within a period of time */ runshutdown(); + /* Unblock suspend if we blocked it. */ + if (!blocked) + sysctlbyname("kern.suspend_blocked", NULL, NULL, + &blocked, sizeof(blocked)); + return (state_func_t) death_single; } Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Thu Oct 8 15:38:34 2015 (r289031) +++ stable/10/sys/dev/acpica/acpi.c Thu Oct 8 15:48:44 2015 (r289032) @@ -2546,8 +2546,11 @@ acpi_ReqSleepState(struct acpi_softc *sc if (!acpi_sleep_states[state]) return (EOPNOTSUPP); - /* If a suspend request is already in progress, just return. */ - if (sc->acpi_next_sstate != 0) { + /* + * If a reboot/shutdown/suspend request is already in progress or + * suspend is blocked due to an upcoming shutdown, just return. + */ + if (rebooting || sc->acpi_next_sstate != 0 || suspend_blocked) { return (0); } Modified: stable/10/sys/kern/kern_shutdown.c ============================================================================== --- stable/10/sys/kern/kern_shutdown.c Thu Oct 8 15:38:34 2015 (r289031) +++ stable/10/sys/kern/kern_shutdown.c Thu Oct 8 15:48:44 2015 (r289032) @@ -139,6 +139,10 @@ static int show_busybufs = 1; SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW, &show_busybufs, 0, ""); +int suspend_blocked = 0; +SYSCTL_INT(_kern, OID_AUTO, suspend_blocked, CTLFLAG_RW, + &suspend_blocked, 0, "Block suspend due to a pending shutdown"); + /* * Variable panicstr contains argument to first call to panic; used as flag * to indicate that the kernel has already called panic. Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Thu Oct 8 15:38:34 2015 (r289031) +++ stable/10/sys/sys/systm.h Thu Oct 8 15:48:44 2015 (r289032) @@ -46,6 +46,7 @@ #include /* for people using printf mainly */ extern int cold; /* nonzero if we are doing a cold boot */ +extern int suspend_blocked; /* block suspend due to pending shutdown */ extern int rebooting; /* kern_reboot() has been called. */ extern const char *panicstr; /* panic message */ extern char version[]; /* system version */ From owner-svn-src-all@freebsd.org Thu Oct 8 16:00:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 834329D1EDC for ; Thu, 8 Oct 2015 16:00:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44C3B7F9 for ; Thu, 8 Oct 2015 16:00:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qkht68 with SMTP id t68so21009547qkh.3 for ; Thu, 08 Oct 2015 09:00:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=EU9iM7Fe7xWJ8uDXCxRDTxjFXDasCVF5LjlvygLU9ng=; b=THpmy8VyJfAS0/KD6bwY/LPJ6rHU60tvFMg4qd3CnXGHzRpjwsDruY6BrUFATdW8QE qlg15bpNYznZ/LMT+UwjK/iya0JtJ0LtwzMaqulqcs2L7bX65bpOD3ZakUxXsJNDFFZX 6LmBrZgt3JwAna1i49i6yv4Nw0h039nBlwQjmrtVD2EoM1qamanZVggH+VWa/1wHWhtD DVCalcw/hQUk/qsdTG+jqKP1gDoDf9HkLqMuNUCVxq2FtNWV5hEMilVgBcZXdxLxqCLr sTqyT+GZAU458RkDR966nz6lmw2XBI02JrdDhWHlDBvXUeKoP4QN9+/xUSSWYUHeDer3 jWRQ== X-Gm-Message-State: ALoCoQmVVPzo+ufgCluFAbEi9Byz3Ba2Gc8rS4KNtUwpltO1BFQLPbUKYduRLqYl/mm2HoEQ8rOu MIME-Version: 1.0 X-Received: by 10.55.21.90 with SMTP id f87mr9304801qkh.46.1444320030243; Thu, 08 Oct 2015 09:00:30 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.167 with HTTP; Thu, 8 Oct 2015 09:00:30 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <5615C935.2060204@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <5615C935.2060204@FreeBSD.org> Date: Thu, 8 Oct 2015 10:00:30 -0600 X-Google-Sender-Auth: 3n_f5w-nkkR4ucqhm6dpXCxGQYs Message-ID: Subject: Re: svn commit: r288911 - head/share/mk From: Warner Losh To: Bryan Drewery Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:00:37 -0000 On Wed, Oct 7, 2015 at 7:39 PM, Bryan Drewery wrote: > On 10/6/2015 1:24 PM, Warner Losh wrote: > >> With the META_MODE changes, sjg introduced this /etc/src-env.conf file > >> that is included from sys.mk early, that can be used for overriding > >> things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be set > >> extremely early for AUTO_OBJ support, among other things). > >> > >> As far as I can tell, the sys.mk change to include src.conf early was > >> done out of convenience. Meaning, we could remove that and just add > >> back a .include or similar at the top of all src > Makefiles. > > All src makefiles? Yea, I=E2=80=99d rather hoped to avoid that, though = it is > easily > > scripted. I=E2=80=99d thought of this solution at the time I did the MA= KESYSPATH > > hack, and rejected it as being too unwieldy. And having that at the top > > of all the files would still require MAKESYSPATH need to be =E2=80=A6/s= hare/mk > > to work out. I was rather hoping we could find some good way around > > doing that. > > r289000 confuses me. Clearly src.opts.mk is still needed in Makefiles. > So why are we including src.conf in sys.mk and not src.opts.mk? > We're including it there because Simon wanted it included there so meta-mode settings were visible in sys.mk. I thought it lame at the time, but had no better solution. Warner From owner-svn-src-all@freebsd.org Thu Oct 8 16:04:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BBC19D2218; Thu, 8 Oct 2015 16:04:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0569CB6B; Thu, 8 Oct 2015 16:04:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id F19991F6F; Thu, 8 Oct 2015 16:04:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 896B413CF1; Thu, 8 Oct 2015 16:04:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id qhSZXQIay-S5; Thu, 8 Oct 2015 16:04:03 +0000 (UTC) Subject: Re: svn commit: r288911 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 949CF13CE3 To: Warner Losh References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <5615C935.2060204@FreeBSD.org> Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <561693EF.50808@FreeBSD.org> Date: Thu, 8 Oct 2015 09:03:59 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:04:10 -0000 On 10/8/15 9:00 AM, Warner Losh wrote: >=20 > On Wed, Oct 7, 2015 at 7:39 PM, Bryan Drewery > wrote: >=20 > On 10/6/2015 1:24 PM, Warner Losh wrote: > >> With the META_MODE changes, sjg introduced this /etc/src-env.con= f file > >> that is included from sys.mk early, that can be = used for overriding > >> things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be= set > >> extremely early for AUTO_OBJ support, among other things). > >> > >> As far as I can tell, the sys.mk change to inclu= de src.conf early was > >> done out of convenience. Meaning, we could remove that and just= add > >> back a .include > or similar at= the top of all src > Makefiles. > > All src makefiles? Yea, I=E2=80=99d rather hoped to avoid that, t= hough it is easily > > scripted. I=E2=80=99d thought of this solution at the time I did = the MAKESYSPATH > > hack, and rejected it as being too unwieldy. And having that at t= he top > > of all the files would still require MAKESYSPATH need to be =E2=80= =A6/share/mk > > to work out. I was rather hoping we could find some good way arou= nd > > doing that. >=20 > r289000 confuses me. Clearly src.opts.mk is > still needed in Makefiles. > So why are we including src.conf in sys.mk and not > src.opts.mk ? >=20 >=20 > We're including it there because Simon wanted it included there so > meta-mode settings were visible in sys.mk . I thought it > lame at the > time, but had no better solution. >=20 Ah! So the /etc/src-env.conf thing I referenced does replace it. So we can remove src.conf from sys.mk now. It came in via r284598, and I documented it and added it to src.conf.5/makeman later on. I'll go ahead and do that since there's no impact to meta mode now. That at least resolves my issues with nested port builds - ignoring that src.*.mk still gets included which I haven't had a problem with and is my own fault and intention given I want the MAKESYSPATH from local checko= ut! --=20 Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 8 16:07:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 672DD9D2436; Thu, 8 Oct 2015 16:07:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C9AC1D71; Thu, 8 Oct 2015 16:07:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA03298; Thu, 08 Oct 2015 19:07:38 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZkDjF-000AXT-05; Thu, 08 Oct 2015 19:07:37 +0300 Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime To: cem@FreeBSD.org References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> Cc: Craig Rodrigues , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Andriy Gapon Message-ID: <56169485.9040608@FreeBSD.org> Date: Thu, 8 Oct 2015 19:06:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:07:42 -0000 On 08/10/2015 18:26, Conrad Meyer wrote: > On Thu, Oct 8, 2015 at 5:51 AM, Andriy Gapon wrote: >> On 08/10/2015 14:42, Craig Rodrigues wrote: >>> Assume C89. >>> >>> https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd >> >> What if one day github disappears but FreeBSD is still going? >> The full commit message would be lost. > > Looking at the full commit message on Github, nothing of value was lost. This commit seems to set a precedent of "merging" a github pull request into the tree. That's why I decided to comment. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Oct 8 16:17:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C7429D2A29; Thu, 8 Oct 2015 16:17:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 622436B8; Thu, 8 Oct 2015 16:17:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdg206 with SMTP id g206so53430529ykd.1; Thu, 08 Oct 2015 09:17:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=vCx8KylY+QMey2a8VHS8PErXKZDPJeTlG0IPhwe9hoc=; b=XOJJTLonxsAOZUlZrLT2ETFD0Ld7mY1JnQbDUhikQsOn/0Evc4tYAxTLbZrdwo5i4E ILDeZRQozAyxTaJoAlKx05IpqzBnoynB+KFyP3PB28zmAtvhauCd/igGalVp2380BnXS GyOv0AsvP2dQGNiKbYifOOetuMPmviNz3HNVa0Y5LSCqZiAvQsuwDxwlHcPEpvzTAwdN 7UIK8BcuZElsnqEO2XTgwBgUmC84tHix5y0S3joeReG/esX4SMgqziUA/dLMZL9oqX5v f+vfe7n8n6Bs2grx7VY+UJ8K2mCEXg5fim1mhfQ2gs+UgDRZgMrDZ6laqEA8LAHDglsY 8CaA== X-Received: by 10.13.233.197 with SMTP id s188mr1540977ywe.316.1444321059021; Thu, 08 Oct 2015 09:17:39 -0700 (PDT) Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com. [209.85.160.176]) by smtp.gmail.com with ESMTPSA id h205sm30947542ywc.2.2015.10.08.09.17.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Oct 2015 09:17:38 -0700 (PDT) Received: by ykdg206 with SMTP id g206so53430265ykd.1; Thu, 08 Oct 2015 09:17:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.96.9 with SMTP id u9mr5760521ywb.13.1444321058618; Thu, 08 Oct 2015 09:17:38 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Thu, 8 Oct 2015 09:17:38 -0700 (PDT) In-Reply-To: <56169485.9040608@FreeBSD.org> References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> <56169485.9040608@FreeBSD.org> Date: Thu, 8 Oct 2015 09:17:38 -0700 Message-ID: Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime From: Conrad Meyer To: Andriy Gapon Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:17:40 -0000 On Thu, Oct 8, 2015 at 9:06 AM, Andriy Gapon wrote: > This commit seems to set a precedent of "merging" a github pull request into the > tree. That's why I decided to comment. I did so as well in r288238, for example. :-) Upstreams (for tz or libcxxrt), hosted at Github or elsewhere, may disappear. Best, Conrad From owner-svn-src-all@freebsd.org Thu Oct 8 16:24:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C62E39D2E50; Thu, 8 Oct 2015 16:24:33 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A60CC90; Thu, 8 Oct 2015 16:24:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from c124.sec.cl.cam.ac.uk (c124.sec.cl.cam.ac.uk [128.232.18.124]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id t98GOUi1006482 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Oct 2015 16:24:30 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime From: David Chisnall In-Reply-To: <561666CE.1050608@FreeBSD.org> Date: Thu, 8 Oct 2015 17:24:29 +0100 Cc: Craig Rodrigues , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <51F19592-19C7-4444-81BC-9F7DCE74F919@FreeBSD.org> References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:24:33 -0000 On 8 Oct 2015, at 13:51, Andriy Gapon wrote: >=20 > What if one day github disappears but FreeBSD is still going? > The full commit message would be lost. That=E2=80=99s not the only thing that is bad about this commit message. = Why =E2=80=98Assume C89?=E2=80=99 We compile libc as C99 + GNU = extensions and are likely to default to C11 + GNU extensions soon. = Reading the actual commit, it looks as if it=E2=80=99s changing K&R = declarations to ISO C declarations. =20 It=E2=80=99s also introducing an ATTRIBUTE_PURE macro in private.h, = which does exactly the same as __pure declared in sys/cdefs.h (which is = included by *every single FreeBSD header*. Why this extra spelling? No = idea. Is this contrib code (it looks like it)? If so, it should come = in via the vendor area (not be directly committed to head), if not then = it should have been code reviewed and not include redundant and = confusing macro declarations. When merging stuff from GitHub, Alfred has written some good = documentation about how to handle them in such a way that we preserve = the prior commit history (effectively, checkout the pr branch, rebase it = on head, git svn dcommit the result). Please follow this procedure. David From owner-svn-src-all@freebsd.org Thu Oct 8 16:36:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89CD99D0774; Thu, 8 Oct 2015 16:36:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7649F86D; Thu, 8 Oct 2015 16:36:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 6F8101CE5; Thu, 8 Oct 2015 16:36:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 1795213E12; Thu, 8 Oct 2015 16:36:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id PyGiMQ_QLcyd; Thu, 8 Oct 2015 16:36:53 +0000 (UTC) Subject: Re: svn commit: r289027 - head/contrib/tzcode/stdtime DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7CC6B13E0A To: Andriy Gapon , Craig Rodrigues , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510081142.t98BgFJd028821@repo.freebsd.org> <561666CE.1050608@FreeBSD.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <56169BA5.7080408@FreeBSD.org> Date: Thu, 8 Oct 2015 09:36:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <561666CE.1050608@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:36:56 -0000 On 10/8/15 5:51 AM, Andriy Gapon wrote: > On 08/10/2015 14:42, Craig Rodrigues wrote: >> Author: rodrigc >> Date: Thu Oct 8 11:42:15 2015 >> New Revision: 289027 >> URL: https://svnweb.freebsd.org/changeset/base/289027 >> >> Log: >> Merge: >> commit 400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd >> Author: Paul Eggert >> Date: Fri Oct 12 07:53:12 2012 -0700 >> >> Assume C89. >> >> https://github.com/eggert/tz/commit/400ecf36bb0b73f6390f9641e6cb8bbfb91a5cfd > > What if one day github disappears but FreeBSD is still going? > The full commit message would be lost. > The same could be said for _every_ "Obtained from" commit. We reference NetBSD CVS revisions for example. We even have FreeBSD CVS revision references in our SVN logs that are useless now. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 8 16:46:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55C7F9D0F79; Thu, 8 Oct 2015 16:46:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 150EEFB6; Thu, 8 Oct 2015 16:46:13 +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 t98GkCC4022509; Thu, 8 Oct 2015 16:46:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98GkCwu022508; Thu, 8 Oct 2015 16:46:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081646.t98GkCwu022508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 16:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289034 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:46:13 -0000 Author: kib Date: Thu Oct 8 16:46:11 2015 New Revision: 289034 URL: https://svnweb.freebsd.org/changeset/base/289034 Log: Make the copyright notice in the file to match reality. Use the recommended FreeBSD license text. Approved by: andrew Discussed with: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3846 Modified: head/sys/arm64/arm64/elf_machdep.c Modified: head/sys/arm64/arm64/elf_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf_machdep.c Thu Oct 8 16:39:43 2015 (r289033) +++ head/sys/arm64/arm64/elf_machdep.c Thu Oct 8 16:46:11 2015 (r289034) @@ -1,14 +1,8 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation. * Copyright (c) 2014 Andrew Turner. - * Copyright (c) 2001 Jake Burkholder. - * Copyright (c) 2000 Eduardo Horvath. - * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. * @@ -21,19 +15,17 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * from: NetBSD: mdreloc.c,v 1.42 2008/04/28 20:23:04 martin Exp + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include From owner-svn-src-all@freebsd.org Thu Oct 8 16:58:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 477DC9D1926; Thu, 8 Oct 2015 16:58:03 +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 1C62FC07; Thu, 8 Oct 2015 16:58:03 +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 t98Gw2fp025757; Thu, 8 Oct 2015 16:58:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Gw2Tc025756; Thu, 8 Oct 2015 16:58:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081658.t98Gw2Tc025756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 16:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289035 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:58:03 -0000 Author: kib Date: Thu Oct 8 16:58:01 2015 New Revision: 289035 URL: https://svnweb.freebsd.org/changeset/base/289035 Log: Implement in-kernel relocator for the arm64 module linker. It is decided to go with the shared object file format for modules on arm64, due to the Aarch64 instruction set details. Combination of the signed 28-bit offset in the branch instructions encoding together with the supported memory model of compilers makes the relocatable object support impossible or at least too hard. Reviewed by: andrew, emaste Tested by: andrew (on real hardware) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3796 Modified: head/sys/arm64/arm64/elf_machdep.c Modified: head/sys/arm64/arm64/elf_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf_machdep.c Thu Oct 8 16:46:11 2015 (r289034) +++ head/sys/arm64/arm64/elf_machdep.c Thu Oct 8 16:58:01 2015 (r289035) @@ -1,11 +1,14 @@ /*- - * Copyright (c) 2014 The FreeBSD Foundation. + * Copyright (c) 2014, 2015 The FreeBSD Foundation. * Copyright (c) 2014 Andrew Turner. * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -124,12 +127,66 @@ elf64_dump_thread(struct thread *td __un } +static int +elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, int local, elf_lookup_fn lookup) +{ + Elf_Addr *where, addr, addend; + Elf_Word rtype, symidx; + const Elf_Rel *rel; + const Elf_Rela *rela; + int error; + + switch (type) { + case ELF_RELOC_REL: + rel = (const Elf_Rel *)data; + where = (Elf_Addr *) (relocbase + rel->r_offset); + addend = *where; + rtype = ELF_R_TYPE(rel->r_info); + symidx = ELF_R_SYM(rel->r_info); + break; + case ELF_RELOC_RELA: + rela = (const Elf_Rela *)data; + where = (Elf_Addr *) (relocbase + rela->r_offset); + addend = rela->r_addend; + rtype = ELF_R_TYPE(rela->r_info); + symidx = ELF_R_SYM(rela->r_info); + break; + default: + panic("unknown reloc type %d\n", type); + } + + if (local) { + if (rtype == R_AARCH64_RELATIVE) + *where = elf_relocaddr(lf, relocbase + addend); + return (0); + } + + switch (rtype) { + case R_AARCH64_NONE: + case R_AARCH64_RELATIVE: + break; + case R_AARCH64_ABS64: + case R_AARCH64_GLOB_DAT: + case R_AARCH64_JUMP_SLOT: + error = lookup(lf, symidx, 1, &addr); + if (error != 0) + return (-1); + *where = addr + addend; + break; + default: + printf("kldload: unexpected relocation type %d\n", rtype); + return (-1); + } + return (0); +} + int elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, elf_lookup_fn lookup __unused) + int type, elf_lookup_fn lookup) { - panic("ARM64TODO: elf_reloc_local"); + return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); } /* Process one elf relocation with addend. */ @@ -138,13 +195,15 @@ elf_reloc(linker_file_t lf, Elf_Addr rel elf_lookup_fn lookup) { - panic("ARM64TODO: elf_reloc"); + return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); } int -elf_cpu_load_file(linker_file_t lf __unused) +elf_cpu_load_file(linker_file_t lf) { + if (lf->id != 1) + cpu_icache_sync_range((vm_offset_t)lf->address, lf->size); return (0); } From owner-svn-src-all@freebsd.org Thu Oct 8 16:39:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686769D0928; Thu, 8 Oct 2015 16:39:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2644EA1A; Thu, 8 Oct 2015 16:39:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98GdiXg019695; Thu, 8 Oct 2015 16:39:44 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98GdhZl019690; Thu, 8 Oct 2015 16:39:43 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510081639.t98GdhZl019690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 8 Oct 2015 16:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289033 - in head/sys: amd64/include/xen conf dev/xen/console i386/include/xen xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 08 Oct 2015 17:01:23 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 16:39:45 -0000 Author: royger Date: Thu Oct 8 16:39:43 2015 New Revision: 289033 URL: https://svnweb.freebsd.org/changeset/base/289033 Log: xen/console: Introduce a new console driver for Xen guest The current Xen console driver is crashing very quickly when using it on an ARM guest. This is because the console lock is recursive and it may lead to recursion on the tty lock and/or corrupt the ring pointer. Furthermore, the console lock is not always taken where it should be and has to be released too early because of the way the console has been designed. Over the years, code has been modified to support various new features but the driver has not been reworked. This new driver has been rewritten with the idea of only having a small set of specific function to write either via the shared ring or the hypercall interface. Note that HVM support has been left aside for now because it requires additional features which are not yet supported. A follow-up patch will be sent with HVM guest support. List of items that may be good to have but not mandatory: - Avoid to flush for each character written when using the tty - Support multiple consoles Submitted by: Julien Grall Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3698 Sponsored by: Citrix Systems R&D Added: head/sys/dev/xen/console/xen_console.c (contents, props changed) Deleted: head/sys/dev/xen/console/console.c head/sys/dev/xen/console/xencons_ring.c head/sys/dev/xen/console/xencons_ring.h Modified: head/sys/amd64/include/xen/hypercall.h head/sys/conf/files head/sys/i386/include/xen/hypercall.h head/sys/xen/hypervisor.h Modified: head/sys/amd64/include/xen/hypercall.h ============================================================================== --- head/sys/amd64/include/xen/hypercall.h Thu Oct 8 15:48:44 2015 (r289032) +++ head/sys/amd64/include/xen/hypercall.h Thu Oct 8 16:39:43 2015 (r289033) @@ -308,7 +308,7 @@ HYPERVISOR_xen_version( static inline int __must_check HYPERVISOR_console_io( - int cmd, unsigned int count, char *str) + int cmd, unsigned int count, const char *str) { return _hypercall3(int, console_io, cmd, count, str); } Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 8 15:48:44 2015 (r289032) +++ head/sys/conf/files Thu Oct 8 16:39:43 2015 (r289033) @@ -2853,8 +2853,7 @@ dev/xe/if_xe_pccard.c optional xe pccar dev/xen/balloon/balloon.c optional xenhvm dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm -dev/xen/console/console.c optional xenhvm -dev/xen/console/xencons_ring.c optional xenhvm +dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm Added: head/sys/dev/xen/console/xen_console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/console/xen_console.c Thu Oct 8 16:39:43 2015 (r289033) @@ -0,0 +1,797 @@ +/* + * Copyright (c) 2015 Julien Grall + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "opt_ddb.h" +#include "opt_printf.h" + +#ifdef DDB +#include +#endif + +static char driver_name[] = "xc"; + +struct xencons_priv; + +typedef void xencons_early_init_t(struct xencons_priv *cons); +typedef int xencons_init_t(device_t dev, struct tty *tp, + driver_intr_t intr_handler); +typedef int xencons_read_t(struct xencons_priv *cons, char *buffer, + unsigned int size); +typedef int xencons_write_t(struct xencons_priv *cons, const char *buffer, + unsigned int size); + +struct xencons_ops { + /* + * Called by the low-level driver during early boot. + * Only the minimal set up to get a console should be done here. + */ + xencons_early_init_t *early_init; + /* Prepare the console to be fully use */ + xencons_init_t *init; + /* Read/write helpers */ + xencons_read_t *read; + xencons_write_t *write; +}; + +struct xencons_priv { + /* Mutex to protect the shared ring and the internal buffers */ + struct mtx mtx; + /* Interrupt handler used for notify the backend */ + xen_intr_handle_t intr_handle; + /* KDB internal state */ +#ifdef KDB + int altbrk; +#endif + /* Status of the tty */ + bool opened; + /* Callout used when the write buffer is full */ + struct callout callout; + + /* Internal buffers must be used with mtx locked */ +#define WBUF_SIZE 4096 +#define WBUF_MASK(_i) ((_i)&(WBUF_SIZE-1)) + char wbuf[WBUF_SIZE]; + unsigned int wc, wp; /* Consumer/producer wbuf */ + +#define RBUF_SIZE 1024 +#define RBUF_MASK(_i) ((_i)&(RBUF_SIZE-1)) + char rbuf[RBUF_SIZE]; + unsigned int rc, rp; /* Consumer/producer rbuf */ + + /* Pointer to the console operations */ + const struct xencons_ops *ops; + + /* + * Ring specific fields + * XXX: make an union? + */ + /* Event channel number for early notification (PV only) */ + uint32_t evtchn; + /* Console shared page */ + struct xencons_interface *intf; +}; + +/* + * Data for the main console + * Necessary to support low-level console driver + */ +static struct xencons_priv main_cons; + +#define XC_POLLTIME (hz/10) + +/* + * Virtual address of the shared console page (only for PV guest) + * TODO: Introduce a function to set it + */ +char *console_page; + +/*----------------------------- Debug function ------------------------------*/ +struct putchar_arg { + char *buf; + size_t size; + size_t n_next; +}; + +static void +putchar(int c, void *arg) +{ + struct putchar_arg *pca; + + pca = (struct putchar_arg *)arg; + + if (pca->buf == NULL) { + /* + * We have no buffer, output directly to the + * console char by char. + */ + HYPERVISOR_console_write((char *)&c, 1); + } else { + pca->buf[pca->n_next++] = c; + if ((pca->size == pca->n_next) || (c = '\0')) { + /* Flush the buffer */ + HYPERVISOR_console_write(pca->buf, pca->n_next); + pca->n_next = 0; + } + } +} + +void +xc_printf(const char *fmt, ...) +{ + va_list ap; + struct putchar_arg pca; +#ifdef PRINTF_BUFR_SIZE + char buf[PRINTF_BUFR_SIZE]; + + pca.buf = buf; + pca.size = sizeof(buf); + pca.n_next = 0; +#else + pca.buf = NULL; + pca.size = 0; +#endif + + KASSERT((xen_domain()), ("call to xc_printf from non Xen guest")); + + va_start(ap, fmt); + kvprintf(fmt, putchar, &pca, 10, ap); + va_end(ap); + +#ifdef PRINTF_BUFR_SIZE + if (pca.n_next != 0) + HYPERVISOR_console_write(buf, pca.n_next); +#endif +} + +/*---------------------- Helpers for the console lock -----------------------*/ +/* + * The lock is not used when the kernel is panicing as it will never recover + * and we want to output no matter what it costs. + */ +static inline void xencons_lock(struct xencons_priv *cons) +{ + + if (panicstr == NULL) + mtx_lock_spin(&cons->mtx); + +} + +static inline void xencons_unlock(struct xencons_priv *cons) +{ + + if (panicstr == NULL) + mtx_unlock_spin(&cons->mtx); +} + +#define xencons_lock_assert(cons) mtx_assert(&(cons)->mtx, MA_OWNED) + +/*------------------ Helpers for the hypervisor console ---------------------*/ +static void +xencons_early_init_hypervisor(struct xencons_priv *cons) +{ + /* + * Nothing to setup for the low-level console when using + * the hypervisor console. + */ +} + +static int +xencons_init_hypervisor(device_t dev, struct tty *tp, + driver_intr_t intr_handler) +{ + struct xencons_priv *cons; + int err; + + cons = tty_softc(tp); + + err = xen_intr_bind_virq(dev, VIRQ_CONSOLE, 0, NULL, + intr_handler, tp, INTR_TYPE_TTY | INTR_MPSAFE, &cons->intr_handle); + if (err != 0) + device_printf(dev, "Can't register console interrupt\n"); + + return (err); +} + +static int +xencons_write_hypervisor(struct xencons_priv *cons, const char *buffer, + unsigned int size) +{ + + HYPERVISOR_console_io(CONSOLEIO_write, size, buffer); + + return (size); +} + +static int +xencons_read_hypervisor(struct xencons_priv *cons, char *buffer, + unsigned int size) +{ + + xencons_lock_assert(cons); + + return (HYPERVISOR_console_io(CONSOLEIO_read, size, buffer)); +} + +static const struct xencons_ops xencons_hypervisor_ops = { + .early_init = xencons_early_init_hypervisor, + .init = xencons_init_hypervisor, + .read = xencons_read_hypervisor, + .write = xencons_write_hypervisor, +}; + +/*------------------ Helpers for the ring console ---------------------------*/ +static void +xencons_early_init_ring(struct xencons_priv *cons) +{ + /* The shared page for PV is already mapped by the boot code */ + cons->intf = (struct xencons_interface *)console_page; + cons->evtchn = HYPERVISOR_start_info->console.domU.evtchn; +} + +static int +xencons_init_ring(device_t dev, struct tty *tp, driver_intr_t intr_handler) +{ + struct xencons_priv *cons; + int err; + + cons = tty_softc(tp); + + if (cons->evtchn == 0) + return (ENODEV); + + err = xen_intr_bind_local_port(dev, cons->evtchn, NULL, + intr_handler, tp, INTR_TYPE_TTY | INTR_MPSAFE, &cons->intr_handle); + if (err != 0) + return (err); + + return (0); +} + +static void +xencons_notify_ring(struct xencons_priv *cons) +{ + /* + * The console may be used before the ring interrupt is properly + * initialized. + * If so, fallback to directly use the event channel hypercall. + */ + if (__predict_true(cons->intr_handle != NULL)) + xen_intr_signal(cons->intr_handle); + else { + struct evtchn_send send = { + .port = cons->evtchn + }; + + HYPERVISOR_event_channel_op(EVTCHNOP_send, &send); + } +} + +static int +xencons_write_ring(struct xencons_priv *cons, const char *buffer, + unsigned int size) +{ + struct xencons_interface *intf; + XENCONS_RING_IDX wcons, wprod; + int sent; + + intf = cons->intf; + + xencons_lock_assert(cons); + + wcons = intf->out_cons; + wprod = intf->out_prod; + + mb(); + KASSERT((wprod - wcons) <= sizeof(intf->out), + ("console send ring inconsistent")); + + for (sent = 0; sent < size; sent++, wprod++) { + if ((wprod - wcons) >= sizeof(intf->out)) + break; + intf->out[MASK_XENCONS_IDX(wprod, intf->out)] = buffer[sent]; + } + + wmb(); + intf->out_prod = wprod; + + xencons_notify_ring(cons); + + return (sent); +} + +static int +xencons_read_ring(struct xencons_priv *cons, char *buffer, unsigned int size) +{ + struct xencons_interface *intf; + XENCONS_RING_IDX rcons, rprod; + unsigned int rsz; + + intf = cons->intf; + + xencons_lock_assert(cons); + + rcons = intf->in_cons; + rprod = intf->in_prod; + rmb(); + + for (rsz = 0; rsz < size; rsz++, rcons++) { + if (rprod == rcons) + break; + buffer[rsz] = intf->in[MASK_XENCONS_IDX(rcons, intf->in)]; + } + + wmb(); + intf->in_cons = rcons; + + /* No need to notify the backend if nothing has been read */ + if (rsz != 0) + xencons_notify_ring(cons); + + return (rsz); +} + +static const struct xencons_ops xencons_ring_ops = { + .early_init = xencons_early_init_ring, + .init = xencons_init_ring, + .read = xencons_read_ring, + .write = xencons_write_ring, +}; + +/*------------------ Common implementation of the console -------------------*/ + +/* + * Called by the low-level driver during early boot to initialize the + * main console driver. + * Only the minimal set up to get a console should be done here. + */ +static void +xencons_early_init(void) +{ + + mtx_init(&main_cons.mtx, "XCONS LOCK", NULL, MTX_SPIN); + + if (xen_initial_domain()) + main_cons.ops = &xencons_hypervisor_ops; + else + main_cons.ops = &xencons_ring_ops; + + main_cons.ops->early_init(&main_cons); +} + +/* + * Receive character from the console and put them in the internal buffer + * XXX: Handle overflow of the internal buffer + */ +static void +xencons_rx(struct xencons_priv *cons) +{ + char buf[16]; + int sz; + + xencons_lock(cons); + while ((sz = cons->ops->read(cons, buf, sizeof(buf))) > 0) { + int i; + + for (i = 0; i < sz; i++) + cons->rbuf[RBUF_MASK(cons->rp++)] = buf[i]; + } + xencons_unlock(cons); +} + +/* Return true if the write buffer is full */ +static bool +xencons_tx_full(struct xencons_priv *cons) +{ + unsigned int used; + + xencons_lock(cons); + used = cons->wp - cons->wc; + xencons_unlock(cons); + + return (used >= WBUF_SIZE); +} + +static void +xencons_tx_flush(struct xencons_priv *cons, int force) +{ + int sz; + + xencons_lock(cons); + while (cons->wc != cons->wp) { + int sent; + sz = cons->wp - cons->wc; + if (sz > (WBUF_SIZE - WBUF_MASK(cons->wc))) + sz = WBUF_SIZE - WBUF_MASK(cons->wc); + sent = cons->ops->write(cons, &cons->wbuf[WBUF_MASK(cons->wc)], + sz); + + /* + * The other end may not have been initialized. Ignore + * the force. + */ + if (__predict_false(sent < 0)) + break; + + /* + * If force is set, spin until the console data is + * flushed through the domain controller. + */ + if (sent == 0 && __predict_true(!force)) + break; + + cons->wc += sent; + } + xencons_unlock(cons); +} + +static bool +xencons_putc(struct xencons_priv *cons, int c, bool force_flush) +{ + + xencons_lock(cons); + if ((cons->wp - cons->wc) < WBUF_SIZE) + cons->wbuf[WBUF_MASK(cons->wp++)] = c; + xencons_unlock(cons); + + xencons_tx_flush(cons, force_flush); + + return (xencons_tx_full(cons)); +} + +static int +xencons_getc(struct xencons_priv *cons) +{ + int ret; + + xencons_lock(cons); + if (cons->rp != cons->rc) { + /* We need to return only one char */ + ret = (int)cons->rbuf[RBUF_MASK(cons->rc)]; + cons->rc++; + } else { + ret = -1; + } + + xencons_unlock(cons); + + return (ret); +} + +static bool +xencons_tx(struct tty *tp) +{ + bool cons_full; + char c; + struct xencons_priv *cons; + + cons = tty_softc(tp); + + tty_lock_assert(tp, MA_OWNED); + + /* + * Don't transmit any character if the buffer is full. Otherwise, + * characters may be lost + */ + if (xencons_tx_full(cons)) + return (false); + + cons_full = false; + while (!cons_full && ttydisc_getc(tp, &c, 1) == 1) + cons_full = xencons_putc(cons, c, false); + + return (!cons_full); +} + +static void +xencons_intr(void *arg) +{ + struct tty *tp; + struct xencons_priv *cons; + int ret; + + tp = arg; + cons = tty_softc(tp); + + /* + * The input will be used by the low-level console when KDB is active + */ + if (kdb_active) + return; + + /* + * It's not necessary to retrieve input when the tty is not opened + */ + if (!cons->opened) + return; + + xencons_rx(cons); + + tty_lock(tp); + while ((ret = xencons_getc(cons)) != -1) { +#ifdef KDB + kdb_alt_break(ret, &cons->altbrk); +#endif + ttydisc_rint(tp, ret, 0); + } + ttydisc_rint_done(tp); + tty_unlock(tp); + + /* Try to flush remaining characters if necessary */ + xencons_tx_flush(cons, 0); +} + +/* + * Helpers to call while shutting down: + * - Force flush all output + */ +static void +xencons_shutdown(void *arg, int howto) +{ + struct tty *tp; + + tp = arg; + + xencons_tx_flush(tty_softc(tp), 1); +} + +/*---------------------- Low-level console driver ---------------------------*/ +static void +xencons_cnprobe(struct consdev *cp) +{ + + if (!xen_pv_domain()) + return; + + cp->cn_pri = CN_REMOTE; + sprintf(cp->cn_name, "%s0", driver_name); +} + +static void +xencons_cninit(struct consdev *cp) +{ + + xencons_early_init(); +} + +static void +xencons_cnterm(struct consdev *cp) +{ +} + +static void +xencons_cngrab(struct consdev *cp) +{ +} + +static void +xencons_cnungrab(struct consdev *cp) +{ +} + +static int +xencons_cngetc(struct consdev *dev) +{ + + xencons_rx(&main_cons); + + return (xencons_getc(&main_cons)); +} + +static void +xencons_cnputc(struct consdev *dev, int c) +{ + /* + * The low-level console is used by KDB and panic. We have to ensure + * that any character sent will be seen by the backend. + */ + xencons_putc(&main_cons, c, true); +} + +CONSOLE_DRIVER(xencons); + +/*----------------------------- TTY driver ---------------------------------*/ + +static int +xencons_tty_open(struct tty *tp) +{ + struct xencons_priv *cons; + + cons = tty_softc(tp); + + cons->opened = true; + + return (0); +} + +static void +xencons_tty_close(struct tty *tp) +{ + struct xencons_priv *cons; + + cons = tty_softc(tp); + + cons->opened = false; +} + +static void +xencons_timeout(void *v) +{ + struct tty *tp; + struct xencons_priv *cons; + + tp = v; + cons = tty_softc(tp); + + if (!xencons_tx(tp)) + callout_reset(&cons->callout, XC_POLLTIME, + xencons_timeout, tp); +} + +static void +xencons_tty_outwakeup(struct tty *tp) +{ + struct xencons_priv *cons; + + cons = tty_softc(tp); + + callout_stop(&cons->callout); + + if (!xencons_tx(tp)) + callout_reset(&cons->callout, XC_POLLTIME, + xencons_timeout, tp); +} + +static struct ttydevsw xencons_ttydevsw = { + .tsw_flags = TF_NOPREFIX, + .tsw_open = xencons_tty_open, + .tsw_close = xencons_tty_close, + .tsw_outwakeup = xencons_tty_outwakeup, +}; + +/*------------------------ Main console driver ------------------------------*/ +static void +xencons_identify(driver_t *driver, device_t parent) +{ + device_t child; + +#if defined(__arm__) || defined(__aarch64__) + if (!xen_domain()) + return; +#else + if (!xen_pv_domain()) + return; +#endif + + child = BUS_ADD_CHILD(parent, 0, driver_name, 0); +} + +static int +xencons_probe(device_t dev) +{ + + device_set_desc(dev, "Xen Console"); + return (BUS_PROBE_NOWILDCARD); +} + +static int +xencons_attach(device_t dev) +{ + struct tty *tp; + /* + * The main console is already allocated statically in order to + * support low-level console + */ + struct xencons_priv *cons; + int err; + + cons = &main_cons; + + tp = tty_alloc(&xencons_ttydevsw, cons); + tty_makedev(tp, NULL, "%s%r", driver_name, 0); + device_set_softc(dev, tp); + + callout_init_mtx(&cons->callout, tty_getlock(tp), 0); + + err = cons->ops->init(dev, tp, xencons_intr); + if (err != 0) { + device_printf(dev, "Unable to initialize the console (%d)\n", + err); + return (err); + } + + /* register handler to flush console on shutdown */ + if ((EVENTHANDLER_REGISTER(shutdown_post_sync, xencons_shutdown, + tp, SHUTDOWN_PRI_DEFAULT)) == NULL) + device_printf(dev, "shutdown event registration failed!\n"); + + return (0); +} + +static int +xencons_resume(device_t dev) +{ + struct xencons_priv *cons; + struct tty *tp; + int err; + + tp = device_get_softc(dev); + cons = tty_softc(tp); + xen_intr_unbind(&cons->intr_handle); + + err = cons->ops->init(dev, tp, xencons_intr); + if (err != 0) { + device_printf(dev, "Unable to resume the console (%d)\n", err); + return (err); + } + + return (0); +} + +static devclass_t xencons_devclass; + +static device_method_t xencons_methods[] = { + DEVMETHOD(device_identify, xencons_identify), + DEVMETHOD(device_probe, xencons_probe), + DEVMETHOD(device_attach, xencons_attach), + DEVMETHOD(device_resume, xencons_resume), + + DEVMETHOD_END +}; + +static driver_t xencons_driver = { + driver_name, + xencons_methods, + 0, +}; + +DRIVER_MODULE(xc, xenpv, xencons_driver, xencons_devclass, 0, 0); Modified: head/sys/i386/include/xen/hypercall.h ============================================================================== --- head/sys/i386/include/xen/hypercall.h Thu Oct 8 15:48:44 2015 (r289032) +++ head/sys/i386/include/xen/hypercall.h Thu Oct 8 16:39:43 2015 (r289033) @@ -293,7 +293,7 @@ HYPERVISOR_xen_version( static inline int HYPERVISOR_console_io( - int cmd, int count, char *str) + int cmd, int count, const char *str) { return _hypercall3(int, console_io, cmd, count, str); } Modified: head/sys/xen/hypervisor.h ============================================================================== --- head/sys/xen/hypervisor.h Thu Oct 8 15:48:44 2015 (r289032) +++ head/sys/xen/hypervisor.h Thu Oct 8 16:39:43 2015 (r289033) @@ -57,7 +57,7 @@ extern start_info_t *xen_start_info; extern uint64_t get_system_time(int ticks); static inline int -HYPERVISOR_console_write(char *str, int count) +HYPERVISOR_console_write(const char *str, int count) { return HYPERVISOR_console_io(CONSOLEIO_write, count, str); } From owner-svn-src-all@freebsd.org Thu Oct 8 17:32:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF7799D2BA7; Thu, 8 Oct 2015 17:32:18 +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 7E73FA29; Thu, 8 Oct 2015 17:32:18 +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 t98HWH7R037177; Thu, 8 Oct 2015 17:32:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98HWHqS037176; Thu, 8 Oct 2015 17:32:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081732.t98HWHqS037176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 17:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289036 - head/sys/dev/sym X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:32:18 -0000 Author: kib Date: Thu Oct 8 17:32:17 2015 New Revision: 289036 URL: https://svnweb.freebsd.org/changeset/base/289036 Log: Add the arm64 define. Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3796 Modified: head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Thu Oct 8 16:58:01 2015 (r289035) +++ head/sys/dev/sym/sym_hipd.c Thu Oct 8 17:32:17 2015 (r289036) @@ -136,6 +136,8 @@ typedef u_int32_t u32; #define MEMORY_BARRIER() __asm__ volatile("membar #Sync" : : : "memory") #elif defined __arm__ #define MEMORY_BARRIER() dmb() +#elif defined __aarch64__ +#define MEMORY_BARRIER() dmb(sy) #else #error "Not supported platform" #endif From owner-svn-src-all@freebsd.org Thu Oct 8 17:32:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AE09D2BF3; Thu, 8 Oct 2015 17:32:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7AD4B8B; Thu, 8 Oct 2015 17:32:46 +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 t98HWjZJ037236; Thu, 8 Oct 2015 17:32:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98HWjcD037235; Thu, 8 Oct 2015 17:32:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081732.t98HWjcD037235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 17:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289037 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:32:47 -0000 Author: kib Date: Thu Oct 8 17:32:45 2015 New Revision: 289037 URL: https://svnweb.freebsd.org/changeset/base/289037 Log: Disable syscons and vpo modules for arm64. Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3796 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Oct 8 17:32:17 2015 (r289036) +++ head/sys/modules/Makefile Thu Oct 8 17:32:45 2015 (r289037) @@ -479,8 +479,8 @@ _txp= txp _cxgbe= cxgbe .endif -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \ - ${MACHINE_CPUARCH} != "powerpc" +.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" _syscons= syscons _vpo= vpo .endif From owner-svn-src-all@freebsd.org Thu Oct 8 17:41:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FCD09D01D2; Thu, 8 Oct 2015 17:41:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B011B6; Thu, 8 Oct 2015 17:41:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98HfHOK040162; Thu, 8 Oct 2015 17:41:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98HfHQe040161; Thu, 8 Oct 2015 17:41:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510081741.t98HfHQe040161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 8 Oct 2015 17:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289038 - head/share/timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:41:18 -0000 Author: delphij Date: Thu Oct 8 17:41:17 2015 New Revision: 289038 URL: https://svnweb.freebsd.org/changeset/base/289038 Log: Add encoding for mime-types. MFC after: 2 weeks Modified: Directory Properties: head/share/timedef/zh_CN.GB18030.src (props changed) head/share/timedef/zh_CN.GB2312.src (props changed) head/share/timedef/zh_CN.UTF-8.src (props changed) head/share/timedef/zh_CN.eucCN.src (props changed) head/share/timedef/zh_TW.Big5.src (props changed) head/share/timedef/zh_TW.UTF-8.src (props changed) From owner-svn-src-all@freebsd.org Thu Oct 8 17:42:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C116C9D02D1; Thu, 8 Oct 2015 17:42:10 +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 7B8C53CF; Thu, 8 Oct 2015 17:42:10 +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 t98Hg9s2040264; Thu, 8 Oct 2015 17:42:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Hg9pr040259; Thu, 8 Oct 2015 17:42:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510081742.t98Hg9pr040259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Oct 2015 17:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289039 - in head/sys: arm64/conf conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:42:10 -0000 Author: kib Date: Thu Oct 8 17:42:08 2015 New Revision: 289039 URL: https://svnweb.freebsd.org/changeset/base/289039 Log: Build changes that allow the modules on arm64. - Move the required kernel compiler flags from Makefile.arm64 to kern.mk. - Build arm64 modules as PIC; non-PIC relocations in .o for shared object output cannot be handled. - Do not try to install aarch64 symlink. - A hack for arm64 to avoid ld -r stage. See the comment for the explanation. Some functionality is lost, like ctf handling, but hopefully will be restored after newer linker is available. Reviewed by: andrew, emaste Tested by: andrew (on real hardware) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3796 Modified: head/sys/arm64/conf/GENERIC head/sys/conf/Makefile.arm64 head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Oct 8 17:41:17 2015 (r289038) +++ head/sys/arm64/conf/GENERIC Thu Oct 8 17:42:08 2015 (r289039) @@ -22,7 +22,6 @@ cpu ARM64 ident GENERIC makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions NO_MODULES=1 # We don't yet support modules on arm64 options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: head/sys/conf/Makefile.arm64 ============================================================================== --- head/sys/conf/Makefile.arm64 Thu Oct 8 17:41:17 2015 (r289038) +++ head/sys/conf/Makefile.arm64 Thu Oct 8 17:42:08 2015 (r289039) @@ -27,12 +27,6 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt -# We generally don't want fpu instructions in the kernel. -CFLAGS += -mgeneral-regs-only - -# Reserve x18 for pcpu data -CFLAGS += -ffixed-x18 - .if !empty(DDB_ENABLED) CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Oct 8 17:41:17 2015 (r289038) +++ head/sys/conf/kern.mk Thu Oct 8 17:42:08 2015 (r289039) @@ -97,6 +97,13 @@ INLINE_LIMIT?= 8000 INLINE_LIMIT?= 8000 .endif +.if ${MACHINE_CPUARCH} == "aarch64" +# We generally don't want fpu instructions in the kernel. +CFLAGS += -mgeneral-regs-only +# Reserve x18 for pcpu data +CFLAGS += -ffixed-x18 +.endif + # # For sparc64 we want the medany code model so modules may be located # anywhere in the 64-bit address space. We also tell GCC to use floating Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Thu Oct 8 17:41:17 2015 (r289038) +++ head/sys/conf/kern.post.mk Thu Oct 8 17:42:08 2015 (r289039) @@ -212,7 +212,7 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND mv .newdep .depend _ILINKS= machine -.if ${MACHINE} != ${MACHINE_CPUARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" _ILINKS+= ${MACHINE_CPUARCH} .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Oct 8 17:41:17 2015 (r289038) +++ head/sys/conf/kmod.mk Thu Oct 8 17:42:08 2015 (r289039) @@ -113,6 +113,10 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +.if ${MACHINE_CPUARCH} == "aarch64" +CFLAGS+= -fPIC +.endif + # Temporary workaround for PR 196407, which contains the fascinating details. # Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm @@ -182,7 +186,17 @@ ${PROG}.debug: ${FULLPROG} .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld +.if ${MACHINE_CPUARCH} != "aarch64" ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld +.else +#XXXKIB Relocatable linking in aarch64 ld from binutils 2.25.1 does +# not work. The linker corrupts the references to the external +# symbols which are defined by other object in the linking set +# and should therefore loose the GOT entry. The problem seems +# to be fixed in the binutils-gdb git HEAD as of 2015-10-04. Hack +# below allows to get partially functioning modules for now. + ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${OBJS} +.endif .if !defined(DEBUG_FLAGS) ${OBJCOPY} --strip-debug ${.TARGET} .endif @@ -220,7 +234,7 @@ ${FULLPROG}: ${OBJS} .endif _ILINKS=machine -.if ${MACHINE} != ${MACHINE_CPUARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" _ILINKS+=${MACHINE_CPUARCH} .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-all@freebsd.org Thu Oct 8 17:45:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A00E9D04BB; Thu, 8 Oct 2015 17:45:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11F1B8DA; Thu, 8 Oct 2015 17:45:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98Hj4VG040430; Thu, 8 Oct 2015 17:45:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Hj40g040429; Thu, 8 Oct 2015 17:45:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081745.t98Hj40g040429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 17:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289040 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:45:05 -0000 Author: bdrewery Date: Thu Oct 8 17:45:03 2015 New Revision: 289040 URL: https://svnweb.freebsd.org/changeset/base/289040 Log: MFC r288179: Fix running make in src directories without a Makefile giving confusing errors. Modified: stable/10/share/mk/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Thu Oct 8 17:42:08 2015 (r289039) +++ stable/10/share/mk/Makefile Thu Oct 8 17:45:03 2015 (r289040) @@ -1,6 +1,12 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/8/93 +# Only parse this if executing make in this directory, not in other places +# in src that lack a Makefile, such as sys/dev/*. Otherwise the MAKESYSPATH +# will read this Makefile since it auto includes it into -I. +# Note that this guard only works for bmake. +.if !defined(.PARSEDIR) || ${.CURDIR} == ${.PARSEDIR} + .include FILES= \ @@ -51,3 +57,4 @@ FILES+= tap.test.mk .endif .include +.endif # CURDIR == PARSEDIR From owner-svn-src-all@freebsd.org Thu Oct 8 17:48:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 457AF9D087C; Thu, 8 Oct 2015 17:48:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0078EB0A; Thu, 8 Oct 2015 17:48:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98HmnqL040642; Thu, 8 Oct 2015 17:48:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Hmnq0040636; Thu, 8 Oct 2015 17:48:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510081748.t98Hmnq0040636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 8 Oct 2015 17:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289041 - head/share/timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:48:51 -0000 Author: delphij Date: Thu Oct 8 17:48:49 2015 New Revision: 289041 URL: https://svnweb.freebsd.org/changeset/base/289041 Log: Fix short month names and replace %b with %_m in date_fmt for Chinese locales. When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returned numbers. For instance, nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414æ—¥' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '月' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, and this matches the en_US.ISO8859-1 behavior, which returns 'Oct'. The GNU C Library also returns values with '月' appended. PR: 199441 Submitted by: Ting-Wei Lan MFC after: 2 weeks Modified: head/share/timedef/zh_CN.GB18030.src head/share/timedef/zh_CN.GB2312.src head/share/timedef/zh_CN.UTF-8.src (contents, props changed) head/share/timedef/zh_CN.eucCN.src head/share/timedef/zh_TW.Big5.src head/share/timedef/zh_TW.UTF-8.src Modified: head/share/timedef/zh_CN.GB18030.src ============================================================================== --- head/share/timedef/zh_CN.GB18030.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_CN.GB18030.src Thu Oct 8 17:48:49 2015 (r289041) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: head/share/timedef/zh_CN.GB2312.src ============================================================================== --- head/share/timedef/zh_CN.GB2312.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_CN.GB2312.src Thu Oct 8 17:48:49 2015 (r289041) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: head/share/timedef/zh_CN.UTF-8.src ============================================================================== --- head/share/timedef/zh_CN.UTF-8.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_CN.UTF-8.src Thu Oct 8 17:48:49 2015 (r289041) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%Yå¹´%b月%eæ—¥ %A %X %Z +%Yå¹´%_m月%eæ—¥ %A %X %Z # # Long month names (without case ending) # Modified: head/share/timedef/zh_CN.eucCN.src ============================================================================== --- head/share/timedef/zh_CN.eucCN.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_CN.eucCN.src Thu Oct 8 17:48:49 2015 (r289041) @@ -5,18 +5,18 @@ # # Short month names # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) # @@ -75,7 +75,7 @@ # # date_fmt # -%YÄê%bÔÂ%eÈÕ %A %X %Z +%YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) # Modified: head/share/timedef/zh_TW.Big5.src ============================================================================== --- head/share/timedef/zh_TW.Big5.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_TW.Big5.src Thu Oct 8 17:48:49 2015 (r289041) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1¤ë + 2¤ë + 3¤ë + 4¤ë + 5¤ë + 6¤ë + 7¤ë + 8¤ë + 9¤ë +10¤ë +11¤ë +12¤ë # # Long month names (as in a date) # @@ -74,7 +74,7 @@ # # date_fmt # -%Y¦~%b¤ë%e¤é %A %X %Z +%Y¦~%_m¤ë%e¤é %A %X %Z # # Long month names (without case ending) # Modified: head/share/timedef/zh_TW.UTF-8.src ============================================================================== --- head/share/timedef/zh_TW.UTF-8.src Thu Oct 8 17:45:03 2015 (r289040) +++ head/share/timedef/zh_TW.UTF-8.src Thu Oct 8 17:48:49 2015 (r289041) @@ -4,18 +4,18 @@ # WARNING: empty lines are essential too # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) # @@ -74,7 +74,7 @@ # # date_fmt # -%Yå¹´%b月%eæ—¥ %A %X %Z +%Yå¹´%_m月%eæ—¥ %A %X %Z # # Long month names (without case ending) # From owner-svn-src-all@freebsd.org Thu Oct 8 17:49:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C019D091D; Thu, 8 Oct 2015 17:49:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D40F8E65; Thu, 8 Oct 2015 17:49:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98HnEC0040717; Thu, 8 Oct 2015 17:49:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98HnEVN040711; Thu, 8 Oct 2015 17:49:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081749.t98HnEVN040711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 17:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289042 - in stable/10/kerberos5: libexec/kdigest usr.bin/hxtool usr.bin/kadmin usr.bin/kcc usr.sbin/iprop-log usr.sbin/ktutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:49:16 -0000 Author: bdrewery Date: Thu Oct 8 17:49:14 2015 New Revision: 289042 URL: https://svnweb.freebsd.org/changeset/base/289042 Log: MFC r288198,r288200: r288198: Remove unneeded dependency line. r288200: Remove unneeded dependency of '.o: .h' that bsd.prog.mk already handles. Modified: stable/10/kerberos5/libexec/kdigest/Makefile stable/10/kerberos5/usr.bin/hxtool/Makefile stable/10/kerberos5/usr.bin/kadmin/Makefile stable/10/kerberos5/usr.bin/kcc/Makefile stable/10/kerberos5/usr.sbin/iprop-log/Makefile stable/10/kerberos5/usr.sbin/ktutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/kerberos5/libexec/kdigest/Makefile ============================================================================== --- stable/10/kerberos5/libexec/kdigest/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/libexec/kdigest/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -18,9 +18,7 @@ CLEANFILES= kdigest-commands.h kdigest-c kdigest-commands.h: kdigest-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in c o -kdigest-commands.${ext}: kdigest-commands.h -.endfor +kdigest-commands.c: kdigest-commands.h .include Modified: stable/10/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- stable/10/kerberos5/usr.bin/hxtool/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/usr.bin/hxtool/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -15,9 +15,7 @@ CLEANFILES= hxtool-commands.h hxtool-com hxtool-commands.h: hxtool-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in c o -hxtool-commands.${ext}: hxtool-commands.h -.endfor +hxtool-commands.c: hxtool-commands.h .include Modified: stable/10/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- stable/10/kerberos5/usr.bin/kadmin/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/usr.bin/kadmin/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -43,9 +43,7 @@ CLEANFILES= kadmin-commands.h kadmin-com kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in o c -kadmin-commands.${ext}: kadmin-commands.h -.endfor +kadmin-commands.c: kadmin-commands.h .PATH: ${KRB5DIR}/kadmin Modified: stable/10/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- stable/10/kerberos5/usr.bin/kcc/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/usr.bin/kcc/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -24,9 +24,7 @@ CLEANFILES= kcc-commands.h kcc-commands. kcc-commands.h: kcc-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in c o -kcc-commands.${ext}: kcc-commands.h -.endfor +kcc-commands.c: kcc-commands.h .include Modified: stable/10/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- stable/10/kerberos5/usr.sbin/iprop-log/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/usr.sbin/iprop-log/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -19,9 +19,7 @@ CLEANFILES= iprop-commands.h iprop-comma iprop-commands.h: iprop-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in c o -iprop-commands.${ext}: iprop-commands.h -.endfor +iprop-commands.c: iprop-commands.h .include Modified: stable/10/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- stable/10/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 8 17:48:49 2015 (r289041) +++ stable/10/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 8 17:49:14 2015 (r289042) @@ -29,8 +29,6 @@ CLEANFILES= ktutil-commands.h ktutil-com ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in ${SLC} ${.ALLSRC:M*.in} -.for ext in c o -ktutil-commands.${ext}: ktutil-commands.h -.endfor +ktutil-commands.c: ktutil-commands.h .PATH: ${KRB5DIR}/admin From owner-svn-src-all@freebsd.org Thu Oct 8 17:55:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 164BA9D0ED2; Thu, 8 Oct 2015 17:55:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D67866; Thu, 8 Oct 2015 17:55:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98Htrm9043574; Thu, 8 Oct 2015 17:55:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98HtrrP043573; Thu, 8 Oct 2015 17:55:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081755.t98HtrrP043573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 17:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289043 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:55:55 -0000 Author: bdrewery Date: Thu Oct 8 17:55:53 2015 New Revision: 289043 URL: https://svnweb.freebsd.org/changeset/base/289043 Log: MFC r284408: Ensure TESTSDIR is defined before bsd.test.mk is .include'd Modified: stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Thu Oct 8 17:49:14 2015 (r289042) +++ stable/10/share/mk/bsd.test.mk Thu Oct 8 17:55:53 2015 (r289043) @@ -10,6 +10,10 @@ ____: +.ifndef TESTSDIR +.error "Please define TESTSDIR when including bsd.test.mk" +.endif + # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here # get registered into the run-time test suite definitions so that the test From owner-svn-src-all@freebsd.org Thu Oct 8 17:59:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155469D1110; Thu, 8 Oct 2015 17:59:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D08BCA4F; Thu, 8 Oct 2015 17:59:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98Hx5ET043724; Thu, 8 Oct 2015 17:59:05 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98Hx5KE043723; Thu, 8 Oct 2015 17:59:05 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201510081759.t98Hx5KE043723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 8 Oct 2015 17:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289044 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:59:07 -0000 Author: marcel Date: Thu Oct 8 17:59:05 2015 New Revision: 289044 URL: https://svnweb.freebsd.org/changeset/base/289044 Log: If we can't open the file, skip devclose() for the exclusive_file_system case. We never called devopen(), so we know there's nothing to close. Modified: head/lib/libstand/open.c Modified: head/lib/libstand/open.c ============================================================================== --- head/lib/libstand/open.c Thu Oct 8 17:55:53 2015 (r289043) +++ head/lib/libstand/open.c Thu Oct 8 17:59:05 2015 (r289044) @@ -114,7 +114,7 @@ open(const char *fname, int mode) error = (fs->fo_open)(fname, f); if (error == 0) goto ok; - goto fail; + goto err; } error = devopen(f, fname, &file); From owner-svn-src-all@freebsd.org Thu Oct 8 18:01:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D5499D12B0; Thu, 8 Oct 2015 18:01:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD240E74; Thu, 8 Oct 2015 18:01:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98I1EpU045814; Thu, 8 Oct 2015 18:01:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98I1Eeh045812; Thu, 8 Oct 2015 18:01:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081801.t98I1Eeh045812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289045 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:01:16 -0000 Author: bdrewery Date: Thu Oct 8 18:01:14 2015 New Revision: 289045 URL: https://svnweb.freebsd.org/changeset/base/289045 Log: MFC r288271: Document bus_get_resource(9). Added: stable/10/share/man/man9/bus_get_resource.9 - copied unchanged from r288271, head/share/man/man9/bus_get_resource.9 Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Thu Oct 8 17:59:05 2015 (r289044) +++ stable/10/share/man/man9/Makefile Thu Oct 8 18:01:14 2015 (r289045) @@ -39,6 +39,7 @@ MAN= accept_filter.9 \ bus_generic_print_child.9 \ bus_generic_read_ivar.9 \ bus_generic_shutdown.9 \ + bus_get_resource.9 \ BUS_NEW_PASS.9 \ BUS_PRINT_CHILD.9 \ BUS_READ_IVAR.9 \ Copied: stable/10/share/man/man9/bus_get_resource.9 (from r288271, head/share/man/man9/bus_get_resource.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man9/bus_get_resource.9 Thu Oct 8 18:01:14 2015 (r289045, copy of r288271, head/share/man/man9/bus_get_resource.9) @@ -0,0 +1,94 @@ +.\" +.\" Copyright (c) 2008 +.\" The DragonFly Project. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $DragonFly: src/share/man/man9/bus_get_resource.9,v 1.1 2008/11/09 09:48:41 swildner Exp $ +.\" $FreeBSD$ +.\" +.Dd September 26, 2015 +.Dt BUS_GET_RESOURCE 9 +.Os +.Sh NAME +.Nm bus_get_resource +.Nd "read a resource range/value with a given resource ID" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.In sys/rman.h +.Ft int +.Fo bus_get_resource +.Fa "device_t dev" "int type" "int rid" "u_long *startp" "u_long *countp" +.Fc +.Sh DESCRIPTION +The +.Fn bus_get_resource +function reads the range or value of the resource +.Fa type , rid +pair and stores it in the +.Fa startp +and +.Fa countp +arguments. +.Pp +The arguments are as follows: +.Bl -tag -width ".Fa startp" +.It Fa dev +The device to read the resource from. +.It Fa type +The type of resource you want to read. +It is one of: +.Pp +.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact +.It Dv SYS_RES_IRQ +for IRQs +.It Dv SYS_RES_DRQ +for ISA DMA lines +.It Dv SYS_RES_MEMORY +for I/O memory +.It Dv SYS_RES_IOPORT +for I/O ports +.El +.It Fa rid +A bus-specific handle that identifies the resource being read. +.It Fa startp +A pointer to the start address of this resource. +.It Fa countp +A pointer to the length of the resource. +For example, the size of the memory in bytes. +.El +.Sh RETURN VALUES +Zero is returned on success, otherwise an error is returned. +.Sh SEE ALSO +.Xr bus_set_resource 9 , +.Xr device 9 , +.Xr driver 9 +.Sh AUTHORS +This manual page was written by +.An Sascha Wildner . From owner-svn-src-all@freebsd.org Thu Oct 8 18:01:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12E459D1463; Thu, 8 Oct 2015 18:01:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBF72321; Thu, 8 Oct 2015 18:01:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98I1us5046501; Thu, 8 Oct 2015 18:01:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98I1ujk046499; Thu, 8 Oct 2015 18:01:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081801.t98I1ujk046499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289046 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:01:58 -0000 Author: bdrewery Date: Thu Oct 8 18:01:56 2015 New Revision: 289046 URL: https://svnweb.freebsd.org/changeset/base/289046 Log: MFC r288271: Document bus_get_resource(9). Added: stable/9/share/man/man9/bus_get_resource.9 - copied unchanged from r288271, head/share/man/man9/bus_get_resource.9 Modified: stable/9/share/man/man9/Makefile Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Thu Oct 8 18:01:14 2015 (r289045) +++ stable/9/share/man/man9/Makefile Thu Oct 8 18:01:56 2015 (r289046) @@ -38,6 +38,7 @@ MAN= accept_filter.9 \ bus_generic_print_child.9 \ bus_generic_read_ivar.9 \ bus_generic_shutdown.9 \ + bus_get_resource.9 \ BUS_NEW_PASS.9 \ BUS_PRINT_CHILD.9 \ BUS_READ_IVAR.9 \ Copied: stable/9/share/man/man9/bus_get_resource.9 (from r288271, head/share/man/man9/bus_get_resource.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man9/bus_get_resource.9 Thu Oct 8 18:01:56 2015 (r289046, copy of r288271, head/share/man/man9/bus_get_resource.9) @@ -0,0 +1,94 @@ +.\" +.\" Copyright (c) 2008 +.\" The DragonFly Project. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $DragonFly: src/share/man/man9/bus_get_resource.9,v 1.1 2008/11/09 09:48:41 swildner Exp $ +.\" $FreeBSD$ +.\" +.Dd September 26, 2015 +.Dt BUS_GET_RESOURCE 9 +.Os +.Sh NAME +.Nm bus_get_resource +.Nd "read a resource range/value with a given resource ID" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.In sys/rman.h +.Ft int +.Fo bus_get_resource +.Fa "device_t dev" "int type" "int rid" "u_long *startp" "u_long *countp" +.Fc +.Sh DESCRIPTION +The +.Fn bus_get_resource +function reads the range or value of the resource +.Fa type , rid +pair and stores it in the +.Fa startp +and +.Fa countp +arguments. +.Pp +The arguments are as follows: +.Bl -tag -width ".Fa startp" +.It Fa dev +The device to read the resource from. +.It Fa type +The type of resource you want to read. +It is one of: +.Pp +.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact +.It Dv SYS_RES_IRQ +for IRQs +.It Dv SYS_RES_DRQ +for ISA DMA lines +.It Dv SYS_RES_MEMORY +for I/O memory +.It Dv SYS_RES_IOPORT +for I/O ports +.El +.It Fa rid +A bus-specific handle that identifies the resource being read. +.It Fa startp +A pointer to the start address of this resource. +.It Fa countp +A pointer to the length of the resource. +For example, the size of the memory in bytes. +.El +.Sh RETURN VALUES +Zero is returned on success, otherwise an error is returned. +.Sh SEE ALSO +.Xr bus_set_resource 9 , +.Xr device 9 , +.Xr driver 9 +.Sh AUTHORS +This manual page was written by +.An Sascha Wildner . From owner-svn-src-all@freebsd.org Thu Oct 8 18:02:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E0C29D1525; Thu, 8 Oct 2015 18:02:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 557C16C0; Thu, 8 Oct 2015 18:02:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98I2h31046580; Thu, 8 Oct 2015 18:02:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98I2hpm046579; Thu, 8 Oct 2015 18:02:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081802.t98I2hpm046579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289047 - stable/10/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:02:44 -0000 Author: bdrewery Date: Thu Oct 8 18:02:43 2015 New Revision: 289047 URL: https://svnweb.freebsd.org/changeset/base/289047 Log: MFC r288238: MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer Modified: stable/10/contrib/libcxxrt/exception.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libcxxrt/exception.cc ============================================================================== --- stable/10/contrib/libcxxrt/exception.cc Thu Oct 8 18:01:56 2015 (r289046) +++ stable/10/contrib/libcxxrt/exception.cc Thu Oct 8 18:02:43 2015 (r289047) @@ -516,7 +516,7 @@ static void emergency_malloc_free(char * break; } } - assert(buffer > 0 && + assert(buffer >= 0 && "Trying to free something that is not an emergency buffer!"); // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will @@ -556,7 +556,7 @@ static void free_exception(char *e) { // If this allocation is within the address range of the emergency buffer, // don't call free() because it was not allocated with malloc() - if ((e > emergency_buffer) && + if ((e >= emergency_buffer) && (e < (emergency_buffer + sizeof(emergency_buffer)))) { emergency_malloc_free(e); From owner-svn-src-all@freebsd.org Thu Oct 8 18:02:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B75DB9D1541; Thu, 8 Oct 2015 18:02:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4255081B; Thu, 8 Oct 2015 18:02:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98I2pCA046627; Thu, 8 Oct 2015 18:02:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98I2pI9046626; Thu, 8 Oct 2015 18:02:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081802.t98I2pI9046626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289048 - stable/9/contrib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:02:52 -0000 Author: bdrewery Date: Thu Oct 8 18:02:50 2015 New Revision: 289048 URL: https://svnweb.freebsd.org/changeset/base/289048 Log: MFC r288238: MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer Modified: stable/9/contrib/libcxxrt/exception.cc Directory Properties: stable/9/contrib/libcxxrt/ (props changed) Modified: stable/9/contrib/libcxxrt/exception.cc ============================================================================== --- stable/9/contrib/libcxxrt/exception.cc Thu Oct 8 18:02:43 2015 (r289047) +++ stable/9/contrib/libcxxrt/exception.cc Thu Oct 8 18:02:50 2015 (r289048) @@ -516,7 +516,7 @@ static void emergency_malloc_free(char * break; } } - assert(buffer > 0 && + assert(buffer >= 0 && "Trying to free something that is not an emergency buffer!"); // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will @@ -556,7 +556,7 @@ static void free_exception(char *e) { // If this allocation is within the address range of the emergency buffer, // don't call free() because it was not allocated with malloc() - if ((e > emergency_buffer) && + if ((e >= emergency_buffer) && (e < (emergency_buffer + sizeof(emergency_buffer)))) { emergency_malloc_free(e); From owner-svn-src-all@freebsd.org Thu Oct 8 18:33:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FC529D26A4; Thu, 8 Oct 2015 18:33:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1704BB4; Thu, 8 Oct 2015 18:33:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98IXlR1055317; Thu, 8 Oct 2015 18:33:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98IXlBf055316; Thu, 8 Oct 2015 18:33:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081833.t98IXlBf055316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289049 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:33:49 -0000 Author: bdrewery Date: Thu Oct 8 18:33:47 2015 New Revision: 289049 URL: https://svnweb.freebsd.org/changeset/base/289049 Log: Direct commit to fix warnings with fmake when building from top-level. The top-level Makefile.inc1 uses 'make -C release -V' to lookup revision information, which causes Makefile.vm and Makefile.vagrant to be included. fmake has 2 issues here: 1. It doesn't like the empty result of .if ${VAR:Mfoo} 2. It doesn't like .if ${loop_item} == Modified: stable/10/release/Makefile.vagrant Modified: stable/10/release/Makefile.vagrant ============================================================================== --- stable/10/release/Makefile.vagrant Thu Oct 8 18:02:50 2015 (r289048) +++ stable/10/release/Makefile.vagrant Thu Oct 8 18:33:47 2015 (r289049) @@ -24,7 +24,7 @@ VAGRANT_VERSION!= date +%Y.%m.%d VAGRANT_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} .if !empty(CLOUDWARE) . for _PROVIDER in ${CLOUDWARE} -. if ${_PROVIDER:MVAGRANT*} +. if !empty(${_PROVIDER:MVAGRANT*}) VAGRANT_PROVIDERS+= ${_PROVIDER:S/VAGRANT-//:tl} . endif . endfor @@ -61,19 +61,19 @@ ${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box: ${PROVIDER} cw-vagrant-${PROVIDER} vagrant-create-${PROVIDER}-metadata @echo "==> PACKAGING: ${VAGRANT_TARGET}.${PROVIDER}.box in `pwd`" @cp vagrant-${PROVIDER}.vmdk ${PROVIDER}/vagrant.vmdk -. if ${PROVIDER} == "virtualbox" +. if !empty(${PROVIDER:Mvirtualbox}) @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}"}' > metadata.json) @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json box.ovf vagrant.vmdk) -. elif ${PROVIDER} == "vmware" +. elif !empty(${PROVIDER:Mvmware}) @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}_desktop"}' > metadata.json) @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json vagrant.vmx vagrant.vmdk) . endif CLEANFILES+= vagrant-do-upload-${PROVIDER} vagrant-do-upload-${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box -. if ${PROVIDER} == "virtualbox" +. if !empty(${PROVIDER:Mvirtualbox}) ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER} -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} -. elif ${PROVIDER} == "vmware" +. elif !empty(${PROVIDER:Mvmware}) ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER}_desktop -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} . endif touch ${.OBJDIR}/${.TARGET} From owner-svn-src-all@freebsd.org Thu Oct 8 18:40:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7D9A9D2A4E for ; Thu, 8 Oct 2015 18:40:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DB10E43 for ; Thu, 8 Oct 2015 18:40:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgx61 with SMTP id 61so49813080qgx.3 for ; Thu, 08 Oct 2015 11:40:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=G9l/G+l2aMgIsGcKlUOKAV1SdR80RUYcp8M/a6FJGzE=; b=hPErZSPjig7mAAd56DCQrWVdZKGD8wmTRa/8BuH9deAw/gPrNTftxGFMWWSzViiVxb Dyt+Jktu+/Lgm8CZ81Ni6BHT5gXqkyPwwtGgqz+B5d+2oi/TokZZOBvhL8Gmy19yDJvM qmdxC02l95nAKB8bORNQBGESqAuGASn8XGlqeu1JXAH4hmTP07V5+I5QtA14rO4OxAx4 7kKOz1PjgLj89lDKJLrs0p4ZTMpJUAQFk+wLYapjtErUuGzcDXzfy4+JrRoqEv0aFI4H BROp8pldetL3XarcFcxWdbNUoxdn5EP7kOTy5ROsCnlHrZn3z8fv/+vu1+QxlO5TvuNU tP4g== X-Gm-Message-State: ALoCoQn7s5la/bdHheUdDxInQDMIvkdkoyiD1QpvHi/O9UC4kFy1ZjuVInuuQI9O5ivFwW5tVD4T MIME-Version: 1.0 X-Received: by 10.140.234.78 with SMTP id f75mr11025197qhc.20.1444329609786; Thu, 08 Oct 2015 11:40:09 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.167 with HTTP; Thu, 8 Oct 2015 11:40:09 -0700 (PDT) X-Originating-IP: [69.53.245.8] In-Reply-To: <561693EF.50808@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <5615C935.2060204@FreeBSD.org> <561693EF.50808@FreeBSD.org> Date: Thu, 8 Oct 2015 12:40:09 -0600 X-Google-Sender-Auth: zXj2fLKLbTzVnPKkQ9jekTM8BmY Message-ID: Subject: Re: svn commit: r288911 - head/share/mk From: Warner Losh To: Bryan Drewery Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:40:18 -0000 On Thu, Oct 8, 2015 at 10:03 AM, Bryan Drewery wrote= : > On 10/8/15 9:00 AM, Warner Losh wrote: > > > > On Wed, Oct 7, 2015 at 7:39 PM, Bryan Drewery > > wrote: > > > > On 10/6/2015 1:24 PM, Warner Losh wrote: > > >> With the META_MODE changes, sjg introduced this /etc/src-env.con= f > file > > >> that is included from sys.mk early, that can be > used for overriding > > >> things like MAKEOBJDIRPREFIX, enabling META_MODE (it needs to be > set > > >> extremely early for AUTO_OBJ support, among other things). > > >> > > >> As far as I can tell, the sys.mk change to > include src.conf early was > > >> done out of convenience. Meaning, we could remove that and just > add > > >> back a .include > or similar at > the top of all src > > Makefiles. > > > All src makefiles? Yea, I=E2=80=99d rather hoped to avoid that, t= hough it > is easily > > > scripted. I=E2=80=99d thought of this solution at the time I did = the > MAKESYSPATH > > > hack, and rejected it as being too unwieldy. And having that at > the top > > > of all the files would still require MAKESYSPATH need to be > =E2=80=A6/share/mk > > > to work out. I was rather hoping we could find some good way arou= nd > > > doing that. > > > > r289000 confuses me. Clearly src.opts.mk is > > still needed in Makefiles. > > So why are we including src.conf in sys.mk and not > > src.opts.mk ? > > > > > > We're including it there because Simon wanted it included there so > > meta-mode settings were visible in sys.mk . I thought it > > lame at the > > time, but had no better solution. > > > > Ah! So the /etc/src-env.conf thing I referenced does replace it. So we > can remove src.conf from sys.mk now. It came in via r284598, and I > documented it and added it to src.conf.5/makeman later on. > > I'll go ahead and do that since there's no impact to meta mode now. > > That at least resolves my issues with nested port builds - ignoring that > src.*.mk still gets included which I haven't had a problem with and is > my own fault and intention given I want the MAKESYSPATH from local > checkout! > If you haven't made a commit yet, I'd be keen on reviewing the change. Warner From owner-svn-src-all@freebsd.org Thu Oct 8 19:10:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F12899D29DA; Thu, 8 Oct 2015 19:10:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A339511D3; Thu, 8 Oct 2015 19:10:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98JAp60073367; Thu, 8 Oct 2015 19:10:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98JApW5073365; Thu, 8 Oct 2015 19:10:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081910.t98JApW5073365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 19:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289050 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 19:10:53 -0000 Author: bdrewery Date: Thu Oct 8 19:10:51 2015 New Revision: 289050 URL: https://svnweb.freebsd.org/changeset/base/289050 Log: Direct commit to fix usage with fmake. fmake does not have :tW, so use some clever :Q tricks to achieve the same result. This won't work if PATH actually contains spaces, but it's better than not working at all. Modified: stable/10/share/mk/bsd.test.mk stable/10/share/mk/suite.test.mk Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Thu Oct 8 18:33:47 2015 (r289049) +++ stable/10/share/mk/bsd.test.mk Thu Oct 8 19:10:51 2015 (r289050) @@ -43,11 +43,19 @@ DISTRIBUTION:= tests # Ordered list of directories to construct the PATH for the tests. TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \ ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin +.if defined(.PARSEDIR) TESTS_ENV+= PATH=${TESTS_PATH:tW:C/ +/:/g} +.else +TESTS_ENV+= PATH=${TESTS_PATH:N :Q:S,\\ ,:,g} +.endif # Ordered list of directories to construct the LD_LIBRARY_PATH for the tests. TESTS_LD_LIBRARY_PATH+= ${DESTDIR}/lib ${DESTDIR}/usr/lib +.if defined(.PARSEDIR) TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:C/ +/:/g} +.else +TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:N :Q:S,\\ ,:,g} +.endif # List of all tests being built. The various *.test.mk modules extend this # variable as needed. Modified: stable/10/share/mk/suite.test.mk ============================================================================== --- stable/10/share/mk/suite.test.mk Thu Oct 8 18:33:47 2015 (r289049) +++ stable/10/share/mk/suite.test.mk Thu Oct 8 19:10:51 2015 (r289050) @@ -72,8 +72,13 @@ Kyuafile.auto: Makefile echo; \ } >Kyuafile.auto.tmp .for _T in ${_TESTS} +.if defined(.PARSEDIR) @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ >>Kyuafile.auto.tmp +.else + @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/^/, /:Q:S/\\ ,/,/g:S,\\,,g}}' \ + >>Kyuafile.auto.tmp +.endif .endfor .for _T in ${TESTS_SUBDIRS:N.WAIT} @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp From owner-svn-src-all@freebsd.org Thu Oct 8 19:13:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EA1F9D2CE8; Thu, 8 Oct 2015 19:13:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1485117B6; Thu, 8 Oct 2015 19:13:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98JDbUI073746; Thu, 8 Oct 2015 19:13:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98JDaCj073743; Thu, 8 Oct 2015 19:13:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081913.t98JDaCj073743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 19:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289051 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 19:13:38 -0000 Author: bdrewery Date: Thu Oct 8 19:13:36 2015 New Revision: 289051 URL: https://svnweb.freebsd.org/changeset/base/289051 Log: MFC r288158: Fix most cases of bsd.progs.mk running duplicate or missing commands. Modified: stable/10/share/mk/bsd.prog.mk stable/10/share/mk/bsd.progs.mk stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.prog.mk ============================================================================== --- stable/10/share/mk/bsd.prog.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.prog.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -252,7 +252,7 @@ realinstall: _maninstall .ORDER: beforeinstall _maninstall .endif -.endif +.endif # !target(install) .if !target(lint) lint: ${SRCS:M*.c} Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -66,25 +66,27 @@ UPDATE_DEPENDFILE ?= NO DEPENDFILE?= .depend.${PROG} # prog.mk will do the rest .else -all: ${FILES} ${PROGS} ${SCRIPTS} +all: ${PROGS} # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO # nor can we safely run in parallel. .NOTPARALLEL: .endif -.endif +.endif # PROGS || PROGS_CXX -# The non-recursive call to bsd.progs.mk will handle FILES; NUL out -# FILESGROUPS so recursive calls don't duplicate the work +# These are handled by the main make process. .ifdef _RECURSING_PROGS -FILESGROUPS= +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS +.for v in ${_PROGS_GLOBAL_VARS} +$v = +.endfor .endif # handle being called [bsd.]progs.mk .include -.ifndef _RECURSING_PROGS +.if !empty(PROGS) && !defined(_RECURSING_PROGS) # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir cleanobj depend install @@ -94,12 +96,14 @@ PROGS_TARGETS+= checkdpadd clean cleande x.$p= PROG_CXX=$p .endif +# Main PROG target $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ SUBDIR= PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p}) +# Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ @@ -109,21 +113,8 @@ $p.$t: .PHONY .MAKE .endfor .endfor -.if !empty(PROGS) +# Depend main pseudo targets on all PROG.pseudo targets too. .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor .endif - -.if empty(PROGS) && !empty(SCRIPTS) - -.for t in ${PROGS_TARGETS:O:u} -scripts.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} SUBDIR= _RECURSING_PROGS= \ - $t) -$t: scripts.$t -.endfor - -.endif - -.endif Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Thu Oct 8 19:10:51 2015 (r289050) +++ stable/10/share/mk/bsd.test.mk Thu Oct 8 19:13:36 2015 (r289051) @@ -99,10 +99,6 @@ test: beforetest realtest test: aftertest .endif -.if !empty(SUBDIR) -.include -.endif - .if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) .include .endif From owner-svn-src-all@freebsd.org Thu Oct 8 19:19:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8135E9D2FA2; Thu, 8 Oct 2015 19:19:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 339A01B79; Thu, 8 Oct 2015 19:19:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98JJutl073998; Thu, 8 Oct 2015 19:19:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98JJu1f073996; Thu, 8 Oct 2015 19:19:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081919.t98JJu1f073996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 19:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289052 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 19:19:57 -0000 Author: bdrewery Date: Thu Oct 8 19:19:56 2015 New Revision: 289052 URL: https://svnweb.freebsd.org/changeset/base/289052 Log: MFC r288160: Document bsd.progs.mk and add more variables overrides. Modified: stable/10/share/mk/bsd.README stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Thu Oct 8 19:13:36 2015 (r289051) +++ stable/10/share/mk/bsd.README Thu Oct 8 19:19:56 2015 (r289052) @@ -251,6 +251,20 @@ PROG_CXX If defined, the name of the pro standard C++ library. PROG_CXX overrides the value of PROG if PROG is also set. +PROGS When used with , allow building multiple +PROGS_CXX PROG and PROGS_CXX in one Makefile. To define + individual variables for each program the VAR.prog + syntax should be used. For example: + + PROGS= foo bar + SRCS.foo= foo_src.c + LDADD.foo= -lutil + SRCS.bar= bar_src.c + + The supported variables are BINDIR BINGRP BINMODE BINOWN + CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS DPSRCS LDADD + LDFLAGS MAN MLINKS PROGNAME SRCS. + PROGNAME The name that the above program will be installed as, if different from ${PROG}. Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:13:36 2015 (r289051) +++ stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:19:56 2015 (r289052) @@ -42,8 +42,10 @@ PROG ?= $t .if defined(PROG) # just one of many -PROG_OVERRIDE_VARS += BINDIR DPSRCS MAN SRCS -PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LDFLAGS ${PROG_OVERRIDE_VARS} +PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN PROGNAME \ + SRCS +PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LINKS \ + LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} .if empty(${PROG_OVERRIDE_VARS:M$v}) .if defined(${v}.${PROG}) From owner-svn-src-all@freebsd.org Thu Oct 8 19:21:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223CC9D109A; Thu, 8 Oct 2015 19:21:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0FE61E62; Thu, 8 Oct 2015 19:21:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98JLFpq076631; Thu, 8 Oct 2015 19:21:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98JLEkT076630; Thu, 8 Oct 2015 19:21:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081921.t98JLEkT076630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 19:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289053 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 19:21:16 -0000 Author: bdrewery Date: Thu Oct 8 19:21:14 2015 New Revision: 289053 URL: https://svnweb.freebsd.org/changeset/base/289053 Log: MFC r288201: Don't recurse with cleanobj. Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:19:56 2015 (r289052) +++ stable/10/share/mk/bsd.progs.mk Thu Oct 8 19:21:14 2015 (r289053) @@ -90,7 +90,7 @@ $v = .if !empty(PROGS) && !defined(_RECURSING_PROGS) # tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir cleanobj depend install +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) From owner-svn-src-all@freebsd.org Thu Oct 8 19:21:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A52F9D11F6; Thu, 8 Oct 2015 19:21:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBB473; Thu, 8 Oct 2015 19:21:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 67927182C; Thu, 8 Oct 2015 19:21:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 1B11414544; Thu, 8 Oct 2015 19:21:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id TmTbl6E7J3nL; Thu, 8 Oct 2015 19:21:56 +0000 (UTC) Subject: Re: svn commit: r288911 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8C2A71453E To: Warner Losh References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <5615C935.2060204@FreeBSD.org> <561693EF.50808@FreeBSD.org> Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5616C252.4010001@FreeBSD.org> Date: Thu, 8 Oct 2015 12:21:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PLm1tUN7buPSbVsgm7eQecEQ3PevBTvSp" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 19:21:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PLm1tUN7buPSbVsgm7eQecEQ3PevBTvSp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/8/2015 11:40 AM, Warner Losh wrote: > > We're including it there because Simon wanted it included there s= o > > meta-mode settings were visible in sys.mk > . I thought it > > lame at the > > time, but had no better solution. > > >=20 > Ah! So the /etc/src-env.conf thing I referenced does replace it. So= we > can remove src.conf from sys.mk now. It came in via= > r284598, and I > documented it and added it to src.conf.5/makeman later on. >=20 > I'll go ahead and do that since there's no impact to meta mode now.= >=20 > That at least resolves my issues with nested port builds - ignoring= that > src.*.mk still gets included which I haven't had a problem with and= is > my own fault and intention given I want the MAKESYSPATH from local > checkout! >=20 >=20 > If you haven't made a commit yet, I'd be keen on reviewing the change. Will do. --=20 Regards, Bryan Drewery --PLm1tUN7buPSbVsgm7eQecEQ3PevBTvSp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWFsJSAAoJEDXXcbtuRpfPlu8IAL1DBFB6wB3Ivz8qkXc7BV01 7+5HzcJAgGwn6VYo8blGlgfSD89bhx+IfaPoc2KNwSCmwXGJTHyr0yqw+zL4vPeo h8DQ+MQU+jkijFFGL7I4Qwh09QUlRwQksROVEU68qsVMeEifS8UfuexfkxM8Eknh zuosD6MUSOAljhFiaIZSXyYr8dQipknB8DKkTx6eXM5NphTu0tqSFca0Uz4hHgP2 pGzRAI4j3EGJGTlmR8Hfih8UxMrgMZVeIWZHGxv4AoTJBby0BrseF3wLcntefkKO 3l+AuDjI/15SbQXsLLccRKXmqjdZjpcu/u586v25hcyO+DstjW7NRFCLYypWU70= =zhcN -----END PGP SIGNATURE----- --PLm1tUN7buPSbVsgm7eQecEQ3PevBTvSp-- From owner-svn-src-all@freebsd.org Thu Oct 8 20:32:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E0829D17C7; Thu, 8 Oct 2015 20:32:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4417727B; Thu, 8 Oct 2015 20:32:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98KWiIR097912; Thu, 8 Oct 2015 20:32:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98KWi7L097911; Thu, 8 Oct 2015 20:32:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510082032.t98KWi7L097911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 20:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289054 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 20:32:45 -0000 Author: bdrewery Date: Thu Oct 8 20:32:44 2015 New Revision: 289054 URL: https://svnweb.freebsd.org/changeset/base/289054 Log: Revert r289043. r284408 was marked for MFC but is not safe for stable/10 yet due to failing in bin/sh/tests. Modified: stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Thu Oct 8 19:21:14 2015 (r289053) +++ stable/10/share/mk/bsd.test.mk Thu Oct 8 20:32:44 2015 (r289054) @@ -10,10 +10,6 @@ ____: -.ifndef TESTSDIR -.error "Please define TESTSDIR when including bsd.test.mk" -.endif - # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here # get registered into the run-time test suite definitions so that the test From owner-svn-src-all@freebsd.org Thu Oct 8 21:08:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC26F9D2CFF; Thu, 8 Oct 2015 21:08:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D37CA44; Thu, 8 Oct 2015 21:08:36 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98L8Zj4007467; Thu, 8 Oct 2015 21:08:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98L8ZFH007464; Thu, 8 Oct 2015 21:08:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201510082108.t98L8ZFH007464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 8 Oct 2015 21:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289055 - in head/sys: amd64/linux i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 21:08:36 -0000 Author: mjg Date: Thu Oct 8 21:08:35 2015 New Revision: 289055 URL: https://svnweb.freebsd.org/changeset/base/289055 Log: linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler. Reported by: Pawel Biernacki Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Thu Oct 8 20:32:44 2015 (r289054) +++ head/sys/amd64/linux/linux_sysvec.c Thu Oct 8 21:08:35 2015 (r289055) @@ -234,7 +234,7 @@ linux_fetch_syscall_args(struct thread * if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL]; + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Thu Oct 8 20:32:44 2015 (r289054) +++ head/sys/i386/linux/linux_sysvec.c Thu Oct 8 21:08:35 2015 (r289055) @@ -866,7 +866,7 @@ linux_fetch_syscall_args(struct thread * if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL]; + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1] else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; From owner-svn-src-all@freebsd.org Thu Oct 8 21:28:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BB7A9D1B72; Thu, 8 Oct 2015 21:28:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5DB994; Thu, 8 Oct 2015 21:28:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98LS7MU014275; Thu, 8 Oct 2015 21:28:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98LS77x014274; Thu, 8 Oct 2015 21:28:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510082128.t98LS77x014274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 8 Oct 2015 21:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289056 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 21:28:08 -0000 Author: trasz Date: Thu Oct 8 21:28:06 2015 New Revision: 289056 URL: https://svnweb.freebsd.org/changeset/base/289056 Log: Remove unused SI_SUB_* #defines. Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3708 Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Thu Oct 8 21:08:35 2015 (r289055) +++ head/sys/sys/kernel.h Thu Oct 8 21:28:06 2015 (r289056) @@ -90,8 +90,6 @@ enum sysinit_sub_id { SI_SUB_DONE = 0x0000001, /* processed*/ SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */ SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/ - SI_SUB_SETTINGS = 0x0880000, /* check and recheck settings */ - SI_SUB_MTX_POOL_STATIC = 0x0900000, /* static mutex pool */ SI_SUB_VM = 0x1000000, /* virtual memory system init*/ SI_SUB_KMEM = 0x1800000, /* kernel memory*/ SI_SUB_HYPERVISOR = 0x1A40000, /* @@ -119,14 +117,12 @@ enum sysinit_sub_id { SI_SUB_RUN_QUEUE = 0x2400000, /* set up run queue*/ SI_SUB_KTRACE = 0x2480000, /* ktrace */ SI_SUB_OPENSOLARIS = 0x2490000, /* OpenSolaris compatibility */ - SI_SUB_CYCLIC = 0x24A0000, /* Cyclic timers */ SI_SUB_AUDIT = 0x24C0000, /* audit */ SI_SUB_CREATE_INIT = 0x2500000, /* create init process*/ SI_SUB_SCHED_IDLE = 0x2600000, /* required idle procs */ SI_SUB_MBUF = 0x2700000, /* mbuf subsystem */ SI_SUB_INTR = 0x2800000, /* interrupt threads */ SI_SUB_SOFTINTR = 0x2800001, /* start soft interrupt thread */ - SI_SUB_ACL = 0x2900000, /* start for filesystem ACLs */ SI_SUB_DEVFS = 0x2F00000, /* devfs ready for devices */ SI_SUB_INIT_IF = 0x3000000, /* prep for net interfaces */ SI_SUB_NETGRAPH = 0x3010000, /* Let Netgraph initialize */ @@ -153,9 +149,6 @@ enum sysinit_sub_id { SI_SUB_KICK_SCHEDULER = 0xa000000, /* start the timeout events*/ SI_SUB_INT_CONFIG_HOOKS = 0xa800000, /* Interrupts enabled config */ SI_SUB_ROOT_CONF = 0xb000000, /* Find root devices */ - SI_SUB_DUMP_CONF = 0xb200000, /* Find dump devices */ - SI_SUB_RAID = 0xb380000, /* Configure GEOM classes */ - SI_SUB_SWAP = 0xc000000, /* swap */ SI_SUB_INTRINSIC_POST = 0xd000000, /* proc 0 cleanup*/ SI_SUB_SYSCALLS = 0xd800000, /* register system calls */ SI_SUB_VNET_DONE = 0xdc00000, /* vnet registration complete */ From owner-svn-src-all@freebsd.org Thu Oct 8 21:52:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 981A69D2EE4; Thu, 8 Oct 2015 21:52:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FF71D18; Thu, 8 Oct 2015 21:52:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98LqK6u022783; Thu, 8 Oct 2015 21:52:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98LqKSZ022782; Thu, 8 Oct 2015 21:52:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510082152.t98LqKSZ022782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 8 Oct 2015 21:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289057 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 21:52:21 -0000 Author: trasz Date: Thu Oct 8 21:52:20 2015 New Revision: 289057 URL: https://svnweb.freebsd.org/changeset/base/289057 Log: Remove comment obsoleted by r289056. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Thu Oct 8 21:28:06 2015 (r289056) +++ head/sys/sys/kernel.h Thu Oct 8 21:52:20 2015 (r289057) @@ -80,10 +80,6 @@ extern volatile int ticks; * for binary compatibility with inserted elements. * * The SI_SUB_LAST value must have the highest lexical value. - * - * The SI_SUB_SWAP values represent a value used by - * the BSD 4.4Lite but not by FreeBSD; it is maintained in dependent - * order to support porting. */ enum sysinit_sub_id { SI_SUB_DUMMY = 0x0000000, /* not executed; for linker*/ From owner-svn-src-all@freebsd.org Thu Oct 8 23:18:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93149D270C; Thu, 8 Oct 2015 23:18:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x235.google.com (mail-qg0-x235.google.com [IPv6:2607:f8b0:400d:c04::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87B2910AC; Thu, 8 Oct 2015 23:18:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgez77 with SMTP id z77so55940147qge.1; Thu, 08 Oct 2015 16:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qk6gDfzPJ99qDK0pxjyAv/jk0GYsyHPRq7WFOJanO0M=; b=nVkZE4rIiJndfzxwB92tzXpXAkPUIsk1LlaCu+/gBjUvzaJYjKY8kF/8HzDa/Xp9As Cj7smqH/vTIvr9OilAyu6YFTCwhU7cXE7ZHaZ0DaqySbnPWnCvOJXyrSR22hYMi64OeF IB8DbHwM3Wcwg0Sl+nk2JYDVbY20ddutEEeWoVjSmaMqmnK2zon2TA+xrmenqy4d+lFL 6d3HZe72AjeNWzj5Z0dYhJqMUkDH0le5q6l3ELcJchUq0y5A1A9qSGrpqaXn7BJdIpws PBHwYchQeouBYA5i9z4parNx3MmWjEZbI5+qXV5fUBh0t6rCXbCEUBgQFGo/M/z0Jbc8 dHJw== MIME-Version: 1.0 X-Received: by 10.140.106.180 with SMTP id e49mr11929163qgf.45.1444346332531; Thu, 08 Oct 2015 16:18:52 -0700 (PDT) Received: by 10.140.104.198 with HTTP; Thu, 8 Oct 2015 16:18:52 -0700 (PDT) In-Reply-To: <201510082108.t98L8ZFH007464@repo.freebsd.org> References: <201510082108.t98L8ZFH007464@repo.freebsd.org> Date: Thu, 8 Oct 2015 16:18:52 -0700 Message-ID: Subject: Re: svn commit: r289055 - in head/sys: amd64/linux i386/linux From: NGie Cooper To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 23:18:53 -0000 On Thu, Oct 8, 2015 at 2:08 PM, Mateusz Guzik wrote: > Author: mjg > Date: Thu Oct 8 21:08:35 2015 > New Revision: 289055 > URL: https://svnweb.freebsd.org/changeset/base/289055 ... > Modified: head/sys/i386/linux/linux_sysvec.c > ============================================================================== > --- head/sys/i386/linux/linux_sysvec.c Thu Oct 8 20:32:44 2015 (r289054) > +++ head/sys/i386/linux/linux_sysvec.c Thu Oct 8 21:08:35 2015 (r289055) > @@ -866,7 +866,7 @@ linux_fetch_syscall_args(struct thread * > > if (sa->code >= p->p_sysent->sv_size) > /* nosys */ > - sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL]; > + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1] > else > sa->callp = &p->p_sysent->sv_table[sa->code]; > sa->narg = sa->callp->sy_narg; Semicolon missing here. This broke the i386 build. From owner-svn-src-all@freebsd.org Thu Oct 8 23:27:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC5F9D2D07; Thu, 8 Oct 2015 23:27:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB4671815; Thu, 8 Oct 2015 23:27:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98NRjhK049200; Thu, 8 Oct 2015 23:27:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98NRjeE049199; Thu, 8 Oct 2015 23:27:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510082327.t98NRjeE049199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 8 Oct 2015 23:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289058 - head/sys/i386/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 23:27:47 -0000 Author: cem Date: Thu Oct 8 23:27:45 2015 New Revision: 289058 URL: https://svnweb.freebsd.org/changeset/base/289058 Log: Fix missing semi-colon from r289055. Obtained from: mjg Sponsored by: EMC / Isilon Storage Division Modified: head/sys/i386/linux/linux_sysvec.c Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Thu Oct 8 21:52:20 2015 (r289057) +++ head/sys/i386/linux/linux_sysvec.c Thu Oct 8 23:27:45 2015 (r289058) @@ -866,7 +866,7 @@ linux_fetch_syscall_args(struct thread * if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1] + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; From owner-svn-src-all@freebsd.org Thu Oct 8 23:30:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 391B99D2F7E; Thu, 8 Oct 2015 23:30:38 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7D291A32; Thu, 8 Oct 2015 23:30:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wicge5 with SMTP id ge5so46243489wic.0; Thu, 08 Oct 2015 16:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vSbeEq2XGYVPr9b71Eq4OVZLndvAY3z6QwGWal1/5z4=; b=cDFZQkX48lHg0fjgp5MWdFdbAl+Bk3ySsorbuadsPn857s0iB1IGjX/8rXNwGsxytF 6xpFCp0+f/XqVmfk64oCSzMmDsWef1jNW6jvV/I9k0HBlNZNGFe3/d3KmwmMskuXiIBC k1QhyLsgTWZ/B6bjzDbAx4fdXpsv7em6UkvdNY0ADaycWn7tMKpcVN+nkbuwivYNFNJa JzXM1CnFp3v/s/Bw0QzKSl2Z2HWhvKX7evUZV2IzyfQU8E0mfht58KkHGMg69LwSFibD uK78YQk6bEt0Lj2zQpj4dLH3B9JI82OVI3I1Mhm1jdMaeDf9M040+IdmNHn7bseyjYUk Fjfg== X-Received: by 10.180.91.12 with SMTP id ca12mr6968607wib.4.1444347036047; Thu, 08 Oct 2015 16:30:36 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id t7sm9140025wib.1.2015.10.08.16.30.34 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Oct 2015 16:30:35 -0700 (PDT) Date: Fri, 9 Oct 2015 01:30:33 +0200 From: Mateusz Guzik To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289058 - head/sys/i386/linux Message-ID: <20151008233033.GA31205@dft-labs.eu> References: <201510082327.t98NRjeE049199@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201510082327.t98NRjeE049199@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 23:30:38 -0000 On Thu, Oct 08, 2015 at 11:27:45PM +0000, Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 8 23:27:45 2015 > New Revision: 289058 > URL: https://svnweb.freebsd.org/changeset/base/289058 > > Log: > Fix missing semi-colon from r289055. > > Obtained from: mjg > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/i386/linux/linux_sysvec.c > > Modified: head/sys/i386/linux/linux_sysvec.c > ============================================================================== > --- head/sys/i386/linux/linux_sysvec.c Thu Oct 8 21:52:20 2015 (r289057) > +++ head/sys/i386/linux/linux_sysvec.c Thu Oct 8 23:27:45 2015 (r289058) > @@ -866,7 +866,7 @@ linux_fetch_syscall_args(struct thread * > > if (sa->code >= p->p_sysent->sv_size) > /* nosys */ > - sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1] > + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; > else > sa->callp = &p->p_sysent->sv_table[sa->code]; > sa->narg = sa->callp->sy_narg; Reported by: NGie Cooper -- Mateusz Guzik From owner-svn-src-all@freebsd.org Fri Oct 9 03:38:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC71F9D2B9C; Fri, 9 Oct 2015 03:38:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA08C1CF4; Fri, 9 Oct 2015 03:38:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t993cw1Q023248; Fri, 9 Oct 2015 03:38:58 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t993cwpX023247; Fri, 9 Oct 2015 03:38:58 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201510090338.t993cwpX023247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 9 Oct 2015 03:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289059 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 03:39:00 -0000 Author: alc Date: Fri Oct 9 03:38:58 2015 New Revision: 289059 URL: https://svnweb.freebsd.org/changeset/base/289059 Log: Exploit r288122 to avoid pointlessly enqueueing a page that is about to be freed. Submitted by: kmacy Differential Revision: https://reviews.freebsd.org/D1674 Modified: head/sys/vm/vm_glue.c Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Thu Oct 8 23:27:45 2015 (r289058) +++ head/sys/vm/vm_glue.c Fri Oct 9 03:38:58 2015 (r289059) @@ -418,7 +418,7 @@ vm_thread_stack_dispose(vm_object_t ksob if (m == NULL) panic("vm_thread_dispose: kstack already missing?"); vm_page_lock(m); - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_NONE); vm_page_free(m); vm_page_unlock(m); } From owner-svn-src-all@freebsd.org Fri Oct 9 04:31:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDDEA9D14E1; Fri, 9 Oct 2015 04:31:01 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AF464D4E; Fri, 9 Oct 2015 04:31:01 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t994V0EJ096304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Oct 2015 21:31:00 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t994UxmQ096303; Thu, 8 Oct 2015 21:30:59 -0700 (PDT) (envelope-from jmg) Date: Thu, 8 Oct 2015 21:30:59 -0700 From: John-Mark Gurney To: Alan Cox Cc: John Baldwin , Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288431 - in head/sys: kern sys vm Message-ID: <20151009043059.GK67524@funkthat.com> References: <201509302306.t8UN6UwX043736@repo.freebsd.org> <1837187.vUDrWYExQX@ralph.baldwin.cx> <20151002045842.GA18421@raichu> <4276391.z2UvhhORjP@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Thu, 08 Oct 2015 21:31:00 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 04:31:02 -0000 Alan Cox wrote this message on Fri, Oct 02, 2015 at 18:50 -0500: > On Oct 2, 2015, at 10:59 AM, John Baldwin wrote: >=20 > > I think it is not unreasonble to expect that fadvise() incurs system-wi= de > > affects. A properly implemented WILLNEED that does read-ahead cannot w= ork > > without incurring system-wide effects. I had always assumed that fadvi= se() > > operated on a file, not a given process' view of a file (unlike, say, > > madvise which only operates on mappings and only indirectly affects > > file-backed data). >=20 >=20 > Can you elaborate on what you mean by ?I had always assumed that fadvise(= ) operated on a file, ??? >=20 > Under the previous implementation, if you did an fadvise(DONTNEED) on a f= ile, in order to cache the file?s pages, those pages first had to be unmapp= ed from any address space. (You can find this unmapping performed by vm_pa= ge_try_to_cache().) In other words, there was never any code that said, ?I= s this a mapped page, and if it is, don?t cache it because we?re actually p= erforming an fadvise().? So, to pick an extreme example, if you did an fad= vise(?libc.so?, DONTNEED), unless some process had libc.so wired, then ever= y single mapping to every single page of libc.so was going to be destroyed = and the pages moved to the cache. However, because we moved the pages to t= he cache (rather than freeing them), and libc.so is frequently accessed, a = subsequent instruction fetch would have faulted and been able to reactivate= the cached page, avoiding an I/O operation. In other words, that we were = caching the pages targeted by fadvise() rather than simply freeing them mat= tered in cases where the pages were in use/accessed by multiple processes. This would be a very nasty DoS if someone just ran fadvise('libc.so', DONTNEED) in loop, and forced any future accesses of libc.so to pull =66rom disk, over and over and over again... --=20 John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Fri Oct 9 08:14:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 130A29D01CF; Fri, 9 Oct 2015 08:14:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B95E9198A; Fri, 9 Oct 2015 08:14:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t998DxmL022523; Fri, 9 Oct 2015 08:13:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t998DxN2022522; Fri, 9 Oct 2015 08:13:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510090813.t998DxN2022522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 9 Oct 2015 08:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289060 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 08:14:01 -0000 Author: trasz Date: Fri Oct 9 08:13:59 2015 New Revision: 289060 URL: https://svnweb.freebsd.org/changeset/base/289060 Log: Document iSCSI and autofs(5) variables in rc.conf(5). PR: 203119 Reviewed by: bjk@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3671 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Fri Oct 9 03:38:58 2015 (r289059) +++ head/share/man/man5/rc.conf.5 Fri Oct 9 08:13:59 2015 (r289060) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2015 +.Dd October 9, 2015 .Dt RC.CONF 5 .Os .Sh NAME @@ -4465,6 +4465,82 @@ ruleset to load for A space-separated list of configuration files used by .Xr iovctl 8 . The default value is an empty string. +.It Va autofs_enable +.Pq Vt bool +If set to +.Dq Li YES , +start the +.Xr automount 8 +utility and the +.Xr automountd 8 +and +.Xr autounmountd 8 +daemons at boot time. +.It Va automount_flags +.Pq Vt str +If +.Va autofs_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr automount 8 +program. +By default no flags are passed. +.It Va automountd_flags +.Pq Vt str +If +.Va autofs_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr automountd 8 +daemon. +By default no flags are passed. +.It Va autounmountd_flags +.Pq Vt str +If +.Va autofs_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr autounmountd 8 +daemon. +By default no flags are passed. +.It Va ctld_enable +.Pq Vt bool +If set to +.Dq Li YES , +start the +.Xr ctld 8 +daemon at boot time. +.It Va iscsid_enable +.Pq Vt bool +If set to +.Dq Li YES , +start the +.Xr iscsid 8 +daemon at boot time. +.It Va iscsictl_enable +.Pq Vt bool +If set to +.Dq Li YES , +start the +.Xr iscsictl 8 +utility at boot time. +.It Va iscsictl_flags +.Pq Vt str +If +.Va iscsictl_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr iscsictl 8 +program. +The default is +.Dq Li -Aa , +which configures sessions based on the +.Pa /etc/iscsi.conf +configuration file. .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact From owner-svn-src-all@freebsd.org Fri Oct 9 11:29:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2E1D9D1529; Fri, 9 Oct 2015 11:29:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35D876AE; Fri, 9 Oct 2015 11:29:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99BTqnj027095; Fri, 9 Oct 2015 11:29:52 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99BTnmI027066; Fri, 9 Oct 2015 11:29:49 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510091129.t99BTnmI027066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 9 Oct 2015 11:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289061 - in vendor/unbound/dist: . daemon doc iterator libunbound sldns smallapp testcode testdata util util/data validator winrc X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 11:29:53 -0000 Author: des Date: Fri Oct 9 11:29:49 2015 New Revision: 289061 URL: https://svnweb.freebsd.org/changeset/base/289061 Log: import unbound 1.5.5 Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/acx_nlnetlabs.m4 vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iterator.h vendor/unbound/dist/libunbound/libunbound.c vendor/unbound/dist/sldns/rrdef.h vendor/unbound/dist/smallapp/unbound-anchor.c vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/testcode/petal.c vendor/unbound/dist/testcode/replay.c vendor/unbound/dist/testcode/testbound.c vendor/unbound/dist/testdata/val_ta_algo_missing.rpl vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/data/msgencode.c vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/net_help.c vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/val_sigcrypt.c vendor/unbound/dist/validator/validator.c vendor/unbound/dist/winrc/setup.nsi Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/Makefile.in Fri Oct 9 11:29:49 2015 (r289061) @@ -168,7 +168,7 @@ HOST_OBJ=unbound-host.lo HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@ UBANCHOR_SRC=smallapp/unbound-anchor.c UBANCHOR_OBJ=unbound-anchor.lo -UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) parseutil.lo \ $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \ daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ @@ -1175,7 +1175,7 @@ delayer.lo delayer.o: $(srcdir)/testcode unbound-control.lo unbound-control.o: $(srcdir)/smallapp/unbound-control.c config.h \ $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h \ petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ Modified: vendor/unbound/dist/acx_nlnetlabs.m4 ============================================================================== --- vendor/unbound/dist/acx_nlnetlabs.m4 Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/acx_nlnetlabs.m4 Fri Oct 9 11:29:49 2015 (r289061) @@ -2,7 +2,8 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 27 +# Version 28 +# 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added. # 2015-03-17 AHX_CONFIG_REALLOCARRAY added # 2013-09-19 FLTO help text improved. # 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes @@ -94,6 +95,8 @@ # ACX_CHECK_MEMCMP_SIGNED - check if memcmp uses signed characters. # AHX_MEMCMP_BROKEN - replace memcmp func for CHECK_MEMCMP_SIGNED. # ACX_CHECK_SS_FAMILY - check for sockaddr_storage.ss_family +# ACX_CHECK_PIE - add --enable-pie option and check if works +# ACX_CHECK_RELRO_NOW - add --enable-relro-now option and check it # dnl Escape backslashes as \\, for C:\ paths, for the C preprocessor defines. @@ -1386,4 +1389,46 @@ AC_DEFUN([ACX_CHECK_SS_FAMILY], #endif ]) ]) +dnl Check if CC and linker support -fPIE and -pie. +dnl If so, sets them in CFLAGS / LDFLAGS. +AC_DEFUN([ACX_CHECK_PIE], [ + AC_ARG_ENABLE([pie], AS_HELP_STRING([--enable-pie], [Enable Position-Independent Executable (eg. to fully benefit from ASLR, small performance penalty)])) + AS_IF([test "x$enable_pie" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports PIE]) + BAKLDFLAGS="$LDFLAGS" + BAKCFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS -pie" + CFLAGS="$CFLAGS -fPIE" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + +dnl Check if linker supports -Wl,-z,relro,-z,now. +dnl If so, adds it to LDFLAGS. +AC_DEFUN([ACX_CHECK_RELRO_NOW], [ + AC_ARG_ENABLE([relro_now], AS_HELP_STRING([--enable-relro-now], [Enable full relocation binding at load-time (RELRO NOW, to protect GOT and .dtor areas)])) + AS_IF([test "x$enable_relro_now" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports -Wl,-z,relro,-z,now]) + BAKLDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + dnl End of file Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/config.h.in Fri Oct 9 11:29:49 2015 (r289061) @@ -82,6 +82,10 @@ `SSL_COMP_get_compression_methods', and to 0 if you don't. */ #undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS +/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to + 0 if you don't. */ +#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO + /* Define to 1 if you have the declaration of `strlcat', and to 0 if you don't. */ #undef HAVE_DECL_STRLCAT Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/configure Fri Oct 9 11:29:49 2015 (r289061) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.4. +# Generated by GNU Autoconf 2.69 for unbound 1.5.5. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.4' -PACKAGE_STRING='unbound 1.5.4' +PACKAGE_VERSION='1.5.5' +PACKAGE_STRING='unbound 1.5.5' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -804,6 +804,8 @@ with_username enable_checking enable_debug enable_flto +enable_pie +enable_relro_now enable_shared enable_static with_pic @@ -1389,7 +1391,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.4 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1456,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.4:";; + short | recursive ) echo "Configuration of unbound 1.5.5:";; esac cat <<\_ACEOF @@ -1465,6 +1467,10 @@ Optional Features: --enable-checking Enable warnings, asserts, makefile-dependencies --enable-debug same as enable-checking --disable-flto Disable link-time optimization (gcc specific option) + --enable-pie Enable Position-Independent Executable (eg. to fully + benefit from ASLR, small performance penalty) + --enable-relro-now Enable full relocation binding at load-time (RELRO + NOW, to protect GOT and .dtor areas) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1629,7 +1635,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.4 +unbound configure 1.5.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2338,7 +2344,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.4, which was +It was created by unbound $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2690,11 +2696,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=4 +UNBOUND_VERSION_MICRO=5 LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=7 +LIBUNBOUND_REVISION=8 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2738,6 +2744,7 @@ LIBUNBOUND_AGE=3 # 1.5.2 had 5:5:3 # 1.5.3 had 5:6:3 # 1.5.4 had 5:7:3 +# 1.5.5 had 5:8:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -5879,6 +5886,96 @@ rm -f core conftest.err conftest.$ac_obj fi + # Check whether --enable-pie was given. +if test "${enable_pie+set}" = set; then : + enableval=$enable_pie; +fi + + if test "x$enable_pie" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5 +$as_echo_n "checking if $CC supports PIE... " >&6; } + BAKLDFLAGS="$LDFLAGS" + BAKCFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS -pie" + CFLAGS="$CFLAGS -fPIE" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + rm -f conftest conftest.c conftest.o + +else + LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + + # Check whether --enable-relro_now was given. +if test "${enable_relro_now+set}" = set; then : + enableval=$enable_relro_now; +fi + + if test "x$enable_relro_now" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5 +$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; } + BAKLDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + rm -f conftest conftest.c conftest.o + +else + LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : @@ -16101,7 +16198,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5 fi - PY_MAJOR_VERSION="`$PYTHON -c "import sys; print(sys.version_info.major)"`" + PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`" # Have Python @@ -16684,7 +16781,7 @@ rm -f core conftest.err conftest.$ac_obj conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } -if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then +if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -16845,6 +16942,36 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" " +$ac_includes_default +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include +#include + +" +if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl +_ACEOF fi @@ -18890,7 +19017,7 @@ _ACEOF -version=1.5.4 +version=1.5.5 date=`date +'%b %e, %Y'` @@ -19405,7 +19532,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.4, which was +This file was extended by unbound $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19471,7 +19598,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.4 +unbound config.status 1.5.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/configure.ac Fri Oct 9 11:29:49 2015 (r289061) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[4]) +m4_define([VERSION_MICRO],[5]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=7 +LIBUNBOUND_REVISION=8 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -61,6 +61,7 @@ LIBUNBOUND_AGE=3 # 1.5.2 had 5:5:3 # 1.5.3 had 5:6:3 # 1.5.4 had 5:7:3 +# 1.5.5 had 5:8:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -246,6 +247,8 @@ case "$debug_enabled" in ;; esac ACX_CHECK_FLTO +ACX_CHECK_PIE +ACX_CHECK_RELRO_NOW AC_C_INLINE ACX_CHECK_FORMAT_ATTRIBUTE @@ -475,7 +478,7 @@ if test x_$ub_test_python != x_no; then AC_ERROR([Python version >= 2.4.0 is required]) fi - PY_MAJOR_VERSION="`$PYTHON -c "import sys; print(sys.version_info.major)"`" + [PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"] AC_SUBST(PY_MAJOR_VERSION) # Have Python AC_DEFINE(HAVE_PYTHON,1,[Define if you have Python libraries and header files.]) @@ -566,7 +569,7 @@ if test $USE_NSS = "no"; then ACX_WITH_SSL ACX_LIB_SSL AC_MSG_CHECKING([for LibreSSL]) -if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then +if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_LIBRESSL], [1], [Define if we have LibreSSL]) # libressl provides these compat functions, but they may also be @@ -578,7 +581,7 @@ fi AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode]) -AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free], [], [], [ +AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ AC_INCLUDES_DEFAULT #ifdef HAVE_OPENSSL_ERR_H #include Modified: vendor/unbound/dist/daemon/daemon.c ============================================================================== --- vendor/unbound/dist/daemon/daemon.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/daemon/daemon.c Fri Oct 9 11:29:49 2015 (r289061) @@ -399,6 +399,12 @@ daemon_create_workers(struct daemon* dae verbose(VERB_ALGO, "total of %d outgoing ports available", numport); daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1); + if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) { + log_warn("cannot reduce num-threads to %d because so-reuseport " + "so continuing with %d threads.", (int)daemon->num, + (int)daemon->num_ports); + daemon->num = (int)daemon->num_ports; + } daemon->workers = (struct worker**)calloc((size_t)daemon->num, sizeof(struct worker*)); if(daemon->cfg->dnstap) { @@ -464,7 +470,7 @@ thread_start(void* arg) #endif #ifdef SO_REUSEPORT if(worker->daemon->cfg->so_reuseport) - port_num = worker->thread_num; + port_num = worker->thread_num % worker->daemon->num_ports; else port_num = 0; #endif Modified: vendor/unbound/dist/daemon/remote.c ============================================================================== --- vendor/unbound/dist/daemon/remote.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/daemon/remote.c Fri Oct 9 11:29:49 2015 (r289061) @@ -243,9 +243,9 @@ daemon_remote_create(struct config_file* goto setup_error; } verbose(VERB_ALGO, "setup SSL certificates"); - if (!SSL_CTX_use_certificate_file(rc->ctx,s_cert,SSL_FILETYPE_PEM)) { + if (!SSL_CTX_use_certificate_chain_file(rc->ctx,s_cert)) { log_err("Error for server-cert-file: %s", s_cert); - log_crypto_err("Error in SSL_CTX use_certificate_file"); + log_crypto_err("Error in SSL_CTX use_certificate_chain_file"); goto setup_error; } if(!SSL_CTX_use_PrivateKey_file(rc->ctx,s_key,SSL_FILETYPE_PEM)) { @@ -258,6 +258,23 @@ daemon_remote_create(struct config_file* log_crypto_err("Error in SSL_CTX check_private_key"); goto setup_error; } +#if HAVE_DECL_SSL_CTX_SET_ECDH_AUTO + if(!SSL_CTX_set_ecdh_auto(rc->ctx,1)) { + log_crypto_err("Error in SSL_CTX_ecdh_auto, not enabling ECDHE"); + } +#elif defined(USE_ECDSA) + if(1) { + EC_KEY *ecdh = EC_KEY_new_by_curve_name (NID_X9_62_prime256v1); + if (!ecdh) { + log_crypto_err("could not find p256, not enabling ECDHE"); + } else { + if (1 != SSL_CTX_set_tmp_ecdh (rc->ctx, ecdh)) { + log_crypto_err("Error in SSL_CTX_set_tmp_ecdh, not enabling ECDHE"); + } + EC_KEY_free (ecdh); + } + } +#endif if(!SSL_CTX_load_verify_locations(rc->ctx, s_cert, NULL)) { log_crypto_err("Error setting up SSL_CTX verify locations"); setup_error: @@ -1242,8 +1259,6 @@ struct del_info { size_t len; /** labels */ int labs; - /** now */ - time_t now; /** time to invalidate to */ time_t expired; /** number of rrsets removed */ @@ -1272,7 +1287,7 @@ infra_del_host(struct lruhash_entry* e, d->timeout_AAAA = 0; d->timeout_other = 0; rtt_init(&d->rtt); - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_keys++; } @@ -1301,7 +1316,6 @@ do_flush_infra(SSL* ssl, struct worker* inf.name = 0; inf.len = 0; inf.labs = 0; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1332,7 +1346,7 @@ zone_del_rrset(struct lruhash_entry* e, if(dname_subdomain_c(k->rk.dname, inf->name)) { struct packed_rrset_data* d = (struct packed_rrset_data*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_rrsets++; } @@ -1348,7 +1362,7 @@ zone_del_msg(struct lruhash_entry* e, vo struct msgreply_entry* k = (struct msgreply_entry*)e->key; if(dname_subdomain_c(k->key.qname, inf->name)) { struct reply_info* d = (struct reply_info*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_msgs++; } @@ -1364,7 +1378,7 @@ zone_del_kcache(struct lruhash_entry* e, struct key_entry_key* k = (struct key_entry_key*)e->key; if(dname_subdomain_c(k->name, inf->name)) { struct key_entry_data* d = (struct key_entry_data*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_keys++; } @@ -1387,7 +1401,6 @@ do_flush_zone(SSL* ssl, struct worker* w inf.name = nm; inf.len = nmlen; inf.labs = nmlabs; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1457,7 +1470,6 @@ do_flush_bogus(SSL* ssl, struct worker* struct del_info inf; /* what we do is to set them all expired */ inf.worker = worker; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1533,7 +1545,6 @@ do_flush_negative(SSL* ssl, struct worke struct del_info inf; /* what we do is to set them all expired */ inf.worker = worker; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1683,6 +1694,7 @@ parse_delegpt(SSL* ssl, char* args, uint } } } + dp->has_parent_side_NS = 1; return dp; } @@ -2265,11 +2277,17 @@ do_list_local_data(SSL* ssl, struct work for(i=0; icount + d->rrsig_count; i++) { if(!packed_rr_to_string(p->rrset, i, 0, s, slen)) { - if(!ssl_printf(ssl, "BADRR\n")) + if(!ssl_printf(ssl, "BADRR\n")) { + lock_rw_unlock(&z->lock); + lock_rw_unlock(&zones->lock); return; + } } - if(!ssl_printf(ssl, "%s\n", s)) + if(!ssl_printf(ssl, "%s\n", s)) { + lock_rw_unlock(&z->lock); + lock_rw_unlock(&zones->lock); return; + } } } } Modified: vendor/unbound/dist/doc/Changelog ============================================================================== --- vendor/unbound/dist/doc/Changelog Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/Changelog Fri Oct 9 11:29:49 2015 (r289061) @@ -1,3 +1,92 @@ +28 September 2015: Wouter + - MAX_TARGET_COUNT increased to 64, to fix up sporadic resolution + failures. + - tag for 1.5.5rc1 release. + - makedist.sh: pgp sig echo commands. + +25 September 2015: Wouter + - Fix unbound-control flush that does not succeed in removing data. + +22 September 2015: Wouter + - Fix config globbed include chroot treatment, this fixes reload of + globs (patch from Dag-Erling Smørgrav). + - iana portlist update. + - Fix #702: New IPs for for h.root-servers.net. + - Remove confusion comment from canonical_compare() function. + - Fix #705: ub_ctx_set_fwd() return value mishandled on windows. + - testbound selftest also works in non-debug mode. + - Fix minor error in unbound.conf.5.in + - Fix unbound.conf(5) access-control description for precedence + and default. + +31 August 2015: Wouter + - changed windows setup compression to be more transparent. + +28 August 2015: Wouter + - Fix #697: Get PY_MAJOR_VERSION failure at configure for python + 2.4 to 2.6. + - Feature #699: --enable-pie option to that builds PIE binary. + - Feature #700: --enable-relro-now option that enables full read-only + relocation. + +24 August 2015: Wouter + - Fix deadlock for local data add and zone add when unbound-control + list_local_data printout is interrupted. + - iana portlist update. + - Change default of harden-algo-downgrade to off. This is lenient + for algorithm rollover. + +13 August 2015: Wouter + - 5011 implementation does not insist on all algorithms, when + harden-algo-downgrade is turned off. + - Reap the child process that libunbound spawns. + +11 August 2015: Wouter + - Fix #694: configure script does not detect LibreSSL 2.2.2 + +4 August 2015: Wouter + - Document that local-zone nodefault matches exactly and transparent + can be used to release a subzone. + +3 August 2015: Wouter + - Document in the manual more text about configuring locally served + zones. + - Fix 5011 anchor update timer after reload. + - Fix mktime in unbound-anchor not using UTC. + +30 July 2015: Wouter + - please afl-gcc (llvm) for uninitialised variable warning. + - Added permit-small-holddown config to debug fast 5011 rollover. + +24 July 2015: Wouter + - Fix #690: Reload fails when so-reuseport is yes after changing + num-threads. + - iana portlist update. + +21 July 2015: Wouter + - Fix configure to detect SSL_CTX_set_ecdh_auto. + - iana portlist update. + +20 July 2015: Wouter + - Enable ECDHE for servers. Where available, use + SSL_CTX_set_ecdh_auto() for TLS-wrapped server configurations to + enable ECDHE. Otherwise, manually offer curve p256. + Client connections should automatically use ECDHE when available. + (thanks Daniel Kahn Gillmor) + +18 July 2015: Willem + - Allow certificate chain files to allow for intermediate certificates. + (thanks Daniel Kahn Gillmor) + +13 July 2015: Wouter + - makedist produces sha1 and sha256 files for created binaries too. + +9 July 2015: Wouter + - 1.5.4 release tag + - trunk has 1.5.5 in development. + - Fix #681: Setting forwarders with unbound-control forward + implicitly turns on forward-first. + 29 June 2015: Wouter - iana portlist update. - Fix alloc with log for allocation size checks. Modified: vendor/unbound/dist/doc/README ============================================================================== --- vendor/unbound/dist/doc/README Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/README Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -README for Unbound 1.5.4 +README for Unbound 1.5.5 Copyright 2007 NLnet Labs http://unbound.net Modified: vendor/unbound/dist/doc/example.conf.in ============================================================================== --- vendor/unbound/dist/doc/example.conf.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/example.conf.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.5.4. +# See unbound.conf(5) man page, version 1.5.5. # # this is a comment. @@ -294,7 +294,7 @@ server: # Harden against algorithm downgrade when multiple algorithms are # advertised in the DS record. If no, allows the weakest algorithm # to validate the zone. - # harden-algo-downgrade: yes + # harden-algo-downgrade: no # Use 0x20-encoded random bits in the query to foil spoof attempts. # This feature is an experimental implementation of draft dns-0x20. @@ -444,6 +444,9 @@ server: # If the value 0 is given, missing anchors are not removed. # keep-missing: 31622400 # 366 days + # debug option that allows very small holddown times for key rollover + # permit-small-holddown: no + # the amount of memory to use for the key cache. # plain value in bytes or you can append k, m or G. default is "4Mb". # key-cache-size: 4m @@ -623,6 +626,8 @@ remote-control: # nameservers by hostname or by ipaddress. If you set stub-prime to yes, # the list is treated as priming hints (default is no). # With stub-first yes, it attempts without the stub if it fails. +# Consider adding domain-insecure: name and local-zone: name nodefault +# to the server: section if the stub is a locally served zone. # stub-zone: # name: "example.com" # stub-addr: 192.0.2.68 Modified: vendor/unbound/dist/doc/libunbound.3.in ============================================================================== --- vendor/unbound/dist/doc/libunbound.3.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/libunbound.3.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "libunbound" "3" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -42,7 +42,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.5.4 functions. +\- Unbound DNS validating resolver 1.5.5 functions. .SH "SYNOPSIS" .B #include .LP Modified: vendor/unbound/dist/doc/unbound-anchor.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-anchor.8.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound-anchor.8.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-anchor" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" Modified: vendor/unbound/dist/doc/unbound-checkconf.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-checkconf.8.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound-checkconf.8.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-checkconf" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" Modified: vendor/unbound/dist/doc/unbound-control.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-control.8.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound-control.8.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-control" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-control.8 -- unbound remote control manual .\" Modified: vendor/unbound/dist/doc/unbound-host.1.in ============================================================================== --- vendor/unbound/dist/doc/unbound-host.1.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound-host.1.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound\-host" "1" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" Modified: vendor/unbound/dist/doc/unbound.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound.8.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound.8.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.5.4. +\- Unbound DNS validating resolver 1.5.5. .SH "SYNOPSIS" .B unbound .RB [ \-h ] Modified: vendor/unbound/dist/doc/unbound.conf.5.in ============================================================================== --- vendor/unbound/dist/doc/unbound.conf.5.in Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/doc/unbound.conf.5.in Fri Oct 9 11:29:49 2015 (r289061) @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound.conf" "5" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -296,7 +296,7 @@ trust (very large) TTL values. .TP .B cache\-min\-ttl: \fI Time to live minimum for RRsets and messages in the cache. Default is 0. -If the the minimum kicks in, the data is cached for longer than the domain +If the minimum kicks in, the data is cached for longer than the domain owner intended, and thus less queries are made to look up the data. Zero makes sure the data in the cache is as the domain owner intended, higher values, especially more than an hour or so, can lead to trouble as @@ -373,6 +373,7 @@ a daemon. Default is yes. The netblock is given as an IP4 or IP6 address with /size appended for a classless network block. The action can be \fIdeny\fR, \fIrefuse\fR, \fIallow\fR, \fIallow_snoop\fR, \fIdeny_non_local\fR or \fIrefuse_non_local\fR. +The most specific netblock match is used, if none match \fIdeny\fR is used. .IP The action \fIdeny\fR stops queries from hosts from that netblock. .IP @@ -567,7 +568,7 @@ to increase the max depth that is checke .B harden\-algo\-downgrade: \fI Harden against algorithm downgrade when multiple algorithms are advertised in the DS record. If no, allows the weakest algorithm to -validate the zone. Default is yes. Zone signers must produce zones +validate the zone. Default is no. Zone signers must produce zones that allow this feature to work, but sometimes they do not, and turning this option off avoids that validation failure. .TP @@ -801,6 +802,10 @@ mechanism work with zones that perform r The default is 366 days. The value 0 does not remove missing anchors, as per the RFC. .TP +.B permit\-small\-holddown: \fI +Debug option that allows the autotrust 5011 rollover timers to assume +very small values. Default is no. +.TP .B key\-cache\-size: \fI Number of bytes size of the key cache. Default is 4 megabytes. A plain number is in bytes, append 'k', 'm' or 'g' for kilobytes, megabytes @@ -895,7 +900,8 @@ infected machines without answering the Used to turn off default contents for AS112 zones. The other types also turn off default contents for the zone. The 'nodefault' option has no other effect than turning off default contents for the -given zone. +given zone. Use \fInodefault\fR if you use exactly that zone, if you want to +use a subzone, use \fItransparent\fR. .P The default zones are localhost, reverse 127.0.0.1 and ::1, and the AS112 zones. The AS112 zones are reverse DNS zones for private use and reserved @@ -1124,6 +1130,12 @@ bit on replies for the private zone (aut AD bit). This setup makes unbound capable of answering queries for the private zone, and can even set the AD bit ('authentic'), but the AA ('authoritative') bit is not set on these replies. +.P +Consider adding \fBserver:\fR statements for \fBdomain\-insecure:\fR and +for \fBlocal\-zone:\fI name nodefault\fR for the zone if it is a locally +served zone. The insecure clause stops DNSSEC from invalidating the +zone. The local zone nodefault (or \fItransparent\fR) clause makes the +(reverse\-) zone bypass unbound's filtering of RFC1918 zones. .TP .B name: \fI Name of the stub zone. Modified: vendor/unbound/dist/iterator/iter_hints.c ============================================================================== --- vendor/unbound/dist/iterator/iter_hints.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/iterator/iter_hints.c Fri Oct 9 11:29:49 2015 (r289061) @@ -135,7 +135,7 @@ compile_time_root_prime(int do_ip4, int if(!ah(dp, "E.ROOT-SERVERS.NET.", "192.203.230.10")) goto failed; if(!ah(dp, "F.ROOT-SERVERS.NET.", "192.5.5.241")) goto failed; if(!ah(dp, "G.ROOT-SERVERS.NET.", "192.112.36.4")) goto failed; - if(!ah(dp, "H.ROOT-SERVERS.NET.", "128.63.2.53")) goto failed; + if(!ah(dp, "H.ROOT-SERVERS.NET.", "198.97.190.53")) goto failed; if(!ah(dp, "I.ROOT-SERVERS.NET.", "192.36.148.17")) goto failed; if(!ah(dp, "J.ROOT-SERVERS.NET.", "192.58.128.30")) goto failed; if(!ah(dp, "K.ROOT-SERVERS.NET.", "193.0.14.129")) goto failed; @@ -148,7 +148,7 @@ compile_time_root_prime(int do_ip4, int if(!ah(dp, "C.ROOT-SERVERS.NET.", "2001:500:2::c")) goto failed; if(!ah(dp, "D.ROOT-SERVERS.NET.", "2001:500:2d::d")) goto failed; if(!ah(dp, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) goto failed; - if(!ah(dp, "H.ROOT-SERVERS.NET.", "2001:500:1::803f:235")) goto failed; + if(!ah(dp, "H.ROOT-SERVERS.NET.", "2001:500:1::53")) goto failed; if(!ah(dp, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) goto failed; if(!ah(dp, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) goto failed; if(!ah(dp, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) goto failed; Modified: vendor/unbound/dist/iterator/iterator.h ============================================================================== --- vendor/unbound/dist/iterator/iterator.h Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/iterator/iterator.h Fri Oct 9 11:29:49 2015 (r289061) @@ -54,7 +54,7 @@ struct iter_priv; struct rbtree_t; /** max number of targets spawned for a query and its subqueries */ -#define MAX_TARGET_COUNT 32 +#define MAX_TARGET_COUNT 64 /** max number of query restarts. Determines max number of CNAME chain. */ #define MAX_RESTART_COUNT 8 /** max number of referrals. Makes sure resolver does not run away */ Modified: vendor/unbound/dist/libunbound/libunbound.c ============================================================================== --- vendor/unbound/dist/libunbound/libunbound.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/libunbound/libunbound.c Fri Oct 9 11:29:49 2015 (r289061) @@ -65,6 +65,9 @@ #ifdef HAVE_PTHREAD #include #endif +#ifdef HAVE_SYS_WAIT_H +#include +#endif #if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H) #include @@ -218,6 +221,12 @@ static void ub_stop_bg(struct ub_ctx* ct ub_thread_join(ctx->bg_tid); } else { lock_basic_unlock(&ctx->cfglock); +#ifndef UB_ON_WINDOWS + if(waitpid(ctx->bg_pid, NULL, 0) == -1) { + if(verbosity > 2) + log_err("waitpid: %s", strerror(errno)); + } +#endif } } else { @@ -946,7 +955,7 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, co while (ptr) { numserv++; if((retval=ub_ctx_set_fwd(ctx, - ptr->IpAddress.String)!=0)) { + ptr->IpAddress.String))!=0) { free(info); return retval; } Modified: vendor/unbound/dist/sldns/rrdef.h ============================================================================== --- vendor/unbound/dist/sldns/rrdef.h Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/sldns/rrdef.h Fri Oct 9 11:29:49 2015 (r289061) @@ -342,7 +342,7 @@ enum sldns_enum_rdf_type /** A encoding of the value field as specified * [RFC1035], Section 5.1., encoded as remaining rdata. - * For CAA. + * For CAA, URI. */ LDNS_RDF_TYPE_LONG_STR, Modified: vendor/unbound/dist/smallapp/unbound-anchor.c ============================================================================== --- vendor/unbound/dist/smallapp/unbound-anchor.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/smallapp/unbound-anchor.c Fri Oct 9 11:29:49 2015 (r289061) @@ -117,6 +117,7 @@ #include "config.h" #include "libunbound/unbound.h" #include "sldns/rrdef.h" +#include "sldns/parseutil.h" #include #ifndef HAVE_EXPAT_H #error "need libexpat to parse root-anchors.xml file." @@ -1328,7 +1329,7 @@ xml_convertdate(const char* str) /* but ignore, (lenient) */ } - t = mktime(&tm); + t = sldns_mktime_from_utc(&tm); if(t == (time_t)-1) { if(verb) printf("xml_convertdate mktime failure\n"); return 0; Modified: vendor/unbound/dist/smallapp/unbound-control.c ============================================================================== --- vendor/unbound/dist/smallapp/unbound-control.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/smallapp/unbound-control.c Fri Oct 9 11:29:49 2015 (r289061) @@ -161,7 +161,7 @@ setup_ctx(struct config_file* cfg) if(cfg->remote_control_use_cert) { if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)) ssl_err("could not set SSL_OP_NO_SSLv3"); - if(!SSL_CTX_use_certificate_file(ctx,c_cert,SSL_FILETYPE_PEM) || + if(!SSL_CTX_use_certificate_chain_file(ctx,c_cert) || !SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM) || !SSL_CTX_check_private_key(ctx)) ssl_err("Error setting up SSL_CTX client key and cert"); Modified: vendor/unbound/dist/testcode/petal.c ============================================================================== --- vendor/unbound/dist/testcode/petal.c Fri Oct 9 08:13:59 2015 (r289060) +++ vendor/unbound/dist/testcode/petal.c Fri Oct 9 11:29:49 2015 (r289061) @@ -236,12 +236,28 @@ setup_ctx(char* key, char* cert) if(!ctx) print_exit("out of memory"); (void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2); (void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3); - if(!SSL_CTX_use_certificate_file(ctx, cert, SSL_FILETYPE_PEM)) + if(!SSL_CTX_use_certificate_chain_file(ctx, cert)) print_exit("cannot read cert"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 9 11:30:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5555F9D16AC; Fri, 9 Oct 2015 11:30:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D45988; Fri, 9 Oct 2015 11:30:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99BUS7X027218; Fri, 9 Oct 2015 11:30:28 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99BUSrW027217; Fri, 9 Oct 2015 11:30:28 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510091130.t99BUSrW027217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 9 Oct 2015 11:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289062 - vendor/unbound/1.5.5 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 11:30:29 -0000 Author: des Date: Fri Oct 9 11:30:27 2015 New Revision: 289062 URL: https://svnweb.freebsd.org/changeset/base/289062 Log: tag unbound 1.5.5 Added: - copied from r289061, vendor/unbound/dist/ Directory Properties: vendor/unbound/1.5.5/ (props changed) From owner-svn-src-all@freebsd.org Fri Oct 9 11:46:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE6779D0185; Fri, 9 Oct 2015 11:46:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9781A26C; Fri, 9 Oct 2015 11:46:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99BkTIr033909; Fri, 9 Oct 2015 11:46:29 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99BkRJB033881; Fri, 9 Oct 2015 11:46:27 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510091146.t99BkRJB033881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 9 Oct 2015 11:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289063 - in head/contrib/unbound: . daemon doc iterator libunbound sldns smallapp util util/data validator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 11:46:31 -0000 Author: des Date: Fri Oct 9 11:46:27 2015 New Revision: 289063 URL: https://svnweb.freebsd.org/changeset/base/289063 Log: Upgrade to Unbound 1.5.5. Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/acx_nlnetlabs.m4 head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/sldns/rrdef.h head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/data/msgencode.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/net_help.c head/contrib/unbound/validator/autotrust.c head/contrib/unbound/validator/val_sigcrypt.c head/contrib/unbound/validator/validator.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/Makefile.in Fri Oct 9 11:46:27 2015 (r289063) @@ -168,7 +168,7 @@ HOST_OBJ=unbound-host.lo HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@ UBANCHOR_SRC=smallapp/unbound-anchor.c UBANCHOR_OBJ=unbound-anchor.lo -UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) parseutil.lo \ $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \ daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ @@ -1175,7 +1175,7 @@ delayer.lo delayer.o: $(srcdir)/testcode unbound-control.lo unbound-control.o: $(srcdir)/smallapp/unbound-control.c config.h \ $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h \ petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ Modified: head/contrib/unbound/acx_nlnetlabs.m4 ============================================================================== --- head/contrib/unbound/acx_nlnetlabs.m4 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/acx_nlnetlabs.m4 Fri Oct 9 11:46:27 2015 (r289063) @@ -2,7 +2,8 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 27 +# Version 28 +# 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added. # 2015-03-17 AHX_CONFIG_REALLOCARRAY added # 2013-09-19 FLTO help text improved. # 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes @@ -94,6 +95,8 @@ # ACX_CHECK_MEMCMP_SIGNED - check if memcmp uses signed characters. # AHX_MEMCMP_BROKEN - replace memcmp func for CHECK_MEMCMP_SIGNED. # ACX_CHECK_SS_FAMILY - check for sockaddr_storage.ss_family +# ACX_CHECK_PIE - add --enable-pie option and check if works +# ACX_CHECK_RELRO_NOW - add --enable-relro-now option and check it # dnl Escape backslashes as \\, for C:\ paths, for the C preprocessor defines. @@ -1386,4 +1389,46 @@ AC_DEFUN([ACX_CHECK_SS_FAMILY], #endif ]) ]) +dnl Check if CC and linker support -fPIE and -pie. +dnl If so, sets them in CFLAGS / LDFLAGS. +AC_DEFUN([ACX_CHECK_PIE], [ + AC_ARG_ENABLE([pie], AS_HELP_STRING([--enable-pie], [Enable Position-Independent Executable (eg. to fully benefit from ASLR, small performance penalty)])) + AS_IF([test "x$enable_pie" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports PIE]) + BAKLDFLAGS="$LDFLAGS" + BAKCFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS -pie" + CFLAGS="$CFLAGS -fPIE" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + +dnl Check if linker supports -Wl,-z,relro,-z,now. +dnl If so, adds it to LDFLAGS. +AC_DEFUN([ACX_CHECK_RELRO_NOW], [ + AC_ARG_ENABLE([relro_now], AS_HELP_STRING([--enable-relro-now], [Enable full relocation binding at load-time (RELRO NOW, to protect GOT and .dtor areas)])) + AS_IF([test "x$enable_relro_now" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports -Wl,-z,relro,-z,now]) + BAKLDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + dnl End of file Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/config.h Fri Oct 9 11:46:27 2015 (r289063) @@ -83,6 +83,10 @@ `SSL_COMP_get_compression_methods', and to 0 if you don't. */ #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 +/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to + 0 if you don't. */ +#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 0 + /* Define to 1 if you have the declaration of `strlcat', and to 0 if you don't. */ /* #undef HAVE_DECL_STRLCAT */ @@ -493,7 +497,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.5.4" +#define PACKAGE_STRING "unbound 1.5.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -502,7 +506,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.4" +#define PACKAGE_VERSION "1.5.5" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -521,7 +525,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,5,4,0 +#define RSRC_PACKAGE_VERSION 1,5,5,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/config.h.in Fri Oct 9 11:46:27 2015 (r289063) @@ -82,6 +82,10 @@ `SSL_COMP_get_compression_methods', and to 0 if you don't. */ #undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS +/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to + 0 if you don't. */ +#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO + /* Define to 1 if you have the declaration of `strlcat', and to 0 if you don't. */ #undef HAVE_DECL_STRLCAT Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/configure Fri Oct 9 11:46:27 2015 (r289063) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.4. +# Generated by GNU Autoconf 2.69 for unbound 1.5.5. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.4' -PACKAGE_STRING='unbound 1.5.4' +PACKAGE_VERSION='1.5.5' +PACKAGE_STRING='unbound 1.5.5' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -804,6 +804,8 @@ with_username enable_checking enable_debug enable_flto +enable_pie +enable_relro_now enable_shared enable_static with_pic @@ -1389,7 +1391,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.4 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1456,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.4:";; + short | recursive ) echo "Configuration of unbound 1.5.5:";; esac cat <<\_ACEOF @@ -1465,6 +1467,10 @@ Optional Features: --enable-checking Enable warnings, asserts, makefile-dependencies --enable-debug same as enable-checking --disable-flto Disable link-time optimization (gcc specific option) + --enable-pie Enable Position-Independent Executable (eg. to fully + benefit from ASLR, small performance penalty) + --enable-relro-now Enable full relocation binding at load-time (RELRO + NOW, to protect GOT and .dtor areas) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1629,7 +1635,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.4 +unbound configure 1.5.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2338,7 +2344,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.4, which was +It was created by unbound $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2690,11 +2696,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=4 +UNBOUND_VERSION_MICRO=5 LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=7 +LIBUNBOUND_REVISION=8 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2738,6 +2744,7 @@ LIBUNBOUND_AGE=3 # 1.5.2 had 5:5:3 # 1.5.3 had 5:6:3 # 1.5.4 had 5:7:3 +# 1.5.5 had 5:8:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -5879,6 +5886,96 @@ rm -f core conftest.err conftest.$ac_obj fi + # Check whether --enable-pie was given. +if test "${enable_pie+set}" = set; then : + enableval=$enable_pie; +fi + + if test "x$enable_pie" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5 +$as_echo_n "checking if $CC supports PIE... " >&6; } + BAKLDFLAGS="$LDFLAGS" + BAKCFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS -pie" + CFLAGS="$CFLAGS -fPIE" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + rm -f conftest conftest.c conftest.o + +else + LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + + # Check whether --enable-relro_now was given. +if test "${enable_relro_now+set}" = set; then : + enableval=$enable_relro_now; +fi + + if test "x$enable_relro_now" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5 +$as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; } + BAKLDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + rm -f conftest conftest.c conftest.o + +else + LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : @@ -16101,7 +16198,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5 fi - PY_MAJOR_VERSION="`$PYTHON -c "import sys; print(sys.version_info.major)"`" + PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`" # Have Python @@ -16684,7 +16781,7 @@ rm -f core conftest.err conftest.$ac_obj conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } -if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then +if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -16845,6 +16942,36 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" " +$ac_includes_default +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include +#include + +" +if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl +_ACEOF fi @@ -18890,7 +19017,7 @@ _ACEOF -version=1.5.4 +version=1.5.5 date=`date +'%b %e, %Y'` @@ -19405,7 +19532,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.4, which was +This file was extended by unbound $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19471,7 +19598,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.4 +unbound config.status 1.5.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/configure.ac Fri Oct 9 11:46:27 2015 (r289063) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[4]) +m4_define([VERSION_MICRO],[5]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=7 +LIBUNBOUND_REVISION=8 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -61,6 +61,7 @@ LIBUNBOUND_AGE=3 # 1.5.2 had 5:5:3 # 1.5.3 had 5:6:3 # 1.5.4 had 5:7:3 +# 1.5.5 had 5:8:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -246,6 +247,8 @@ case "$debug_enabled" in ;; esac ACX_CHECK_FLTO +ACX_CHECK_PIE +ACX_CHECK_RELRO_NOW AC_C_INLINE ACX_CHECK_FORMAT_ATTRIBUTE @@ -475,7 +478,7 @@ if test x_$ub_test_python != x_no; then AC_ERROR([Python version >= 2.4.0 is required]) fi - PY_MAJOR_VERSION="`$PYTHON -c "import sys; print(sys.version_info.major)"`" + [PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"] AC_SUBST(PY_MAJOR_VERSION) # Have Python AC_DEFINE(HAVE_PYTHON,1,[Define if you have Python libraries and header files.]) @@ -566,7 +569,7 @@ if test $USE_NSS = "no"; then ACX_WITH_SSL ACX_LIB_SSL AC_MSG_CHECKING([for LibreSSL]) -if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then +if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_LIBRESSL], [1], [Define if we have LibreSSL]) # libressl provides these compat functions, but they may also be @@ -578,7 +581,7 @@ fi AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode]) -AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free], [], [], [ +AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ AC_INCLUDES_DEFAULT #ifdef HAVE_OPENSSL_ERR_H #include Modified: head/contrib/unbound/daemon/daemon.c ============================================================================== --- head/contrib/unbound/daemon/daemon.c Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/daemon/daemon.c Fri Oct 9 11:46:27 2015 (r289063) @@ -399,6 +399,12 @@ daemon_create_workers(struct daemon* dae verbose(VERB_ALGO, "total of %d outgoing ports available", numport); daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1); + if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) { + log_warn("cannot reduce num-threads to %d because so-reuseport " + "so continuing with %d threads.", (int)daemon->num, + (int)daemon->num_ports); + daemon->num = (int)daemon->num_ports; + } daemon->workers = (struct worker**)calloc((size_t)daemon->num, sizeof(struct worker*)); if(daemon->cfg->dnstap) { @@ -464,7 +470,7 @@ thread_start(void* arg) #endif #ifdef SO_REUSEPORT if(worker->daemon->cfg->so_reuseport) - port_num = worker->thread_num; + port_num = worker->thread_num % worker->daemon->num_ports; else port_num = 0; #endif Modified: head/contrib/unbound/daemon/remote.c ============================================================================== --- head/contrib/unbound/daemon/remote.c Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/daemon/remote.c Fri Oct 9 11:46:27 2015 (r289063) @@ -243,9 +243,9 @@ daemon_remote_create(struct config_file* goto setup_error; } verbose(VERB_ALGO, "setup SSL certificates"); - if (!SSL_CTX_use_certificate_file(rc->ctx,s_cert,SSL_FILETYPE_PEM)) { + if (!SSL_CTX_use_certificate_chain_file(rc->ctx,s_cert)) { log_err("Error for server-cert-file: %s", s_cert); - log_crypto_err("Error in SSL_CTX use_certificate_file"); + log_crypto_err("Error in SSL_CTX use_certificate_chain_file"); goto setup_error; } if(!SSL_CTX_use_PrivateKey_file(rc->ctx,s_key,SSL_FILETYPE_PEM)) { @@ -258,6 +258,23 @@ daemon_remote_create(struct config_file* log_crypto_err("Error in SSL_CTX check_private_key"); goto setup_error; } +#if HAVE_DECL_SSL_CTX_SET_ECDH_AUTO + if(!SSL_CTX_set_ecdh_auto(rc->ctx,1)) { + log_crypto_err("Error in SSL_CTX_ecdh_auto, not enabling ECDHE"); + } +#elif defined(USE_ECDSA) + if(1) { + EC_KEY *ecdh = EC_KEY_new_by_curve_name (NID_X9_62_prime256v1); + if (!ecdh) { + log_crypto_err("could not find p256, not enabling ECDHE"); + } else { + if (1 != SSL_CTX_set_tmp_ecdh (rc->ctx, ecdh)) { + log_crypto_err("Error in SSL_CTX_set_tmp_ecdh, not enabling ECDHE"); + } + EC_KEY_free (ecdh); + } + } +#endif if(!SSL_CTX_load_verify_locations(rc->ctx, s_cert, NULL)) { log_crypto_err("Error setting up SSL_CTX verify locations"); setup_error: @@ -1242,8 +1259,6 @@ struct del_info { size_t len; /** labels */ int labs; - /** now */ - time_t now; /** time to invalidate to */ time_t expired; /** number of rrsets removed */ @@ -1272,7 +1287,7 @@ infra_del_host(struct lruhash_entry* e, d->timeout_AAAA = 0; d->timeout_other = 0; rtt_init(&d->rtt); - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_keys++; } @@ -1301,7 +1316,6 @@ do_flush_infra(SSL* ssl, struct worker* inf.name = 0; inf.len = 0; inf.labs = 0; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1332,7 +1346,7 @@ zone_del_rrset(struct lruhash_entry* e, if(dname_subdomain_c(k->rk.dname, inf->name)) { struct packed_rrset_data* d = (struct packed_rrset_data*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_rrsets++; } @@ -1348,7 +1362,7 @@ zone_del_msg(struct lruhash_entry* e, vo struct msgreply_entry* k = (struct msgreply_entry*)e->key; if(dname_subdomain_c(k->key.qname, inf->name)) { struct reply_info* d = (struct reply_info*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_msgs++; } @@ -1364,7 +1378,7 @@ zone_del_kcache(struct lruhash_entry* e, struct key_entry_key* k = (struct key_entry_key*)e->key; if(dname_subdomain_c(k->name, inf->name)) { struct key_entry_data* d = (struct key_entry_data*)e->data; - if(d->ttl >= inf->now) { + if(d->ttl > inf->expired) { d->ttl = inf->expired; inf->num_keys++; } @@ -1387,7 +1401,6 @@ do_flush_zone(SSL* ssl, struct worker* w inf.name = nm; inf.len = nmlen; inf.labs = nmlabs; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1457,7 +1470,6 @@ do_flush_bogus(SSL* ssl, struct worker* struct del_info inf; /* what we do is to set them all expired */ inf.worker = worker; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1533,7 +1545,6 @@ do_flush_negative(SSL* ssl, struct worke struct del_info inf; /* what we do is to set them all expired */ inf.worker = worker; - inf.now = *worker->env.now; inf.expired = *worker->env.now; inf.expired -= 3; /* handle 3 seconds skew between threads */ inf.num_rrsets = 0; @@ -1683,6 +1694,7 @@ parse_delegpt(SSL* ssl, char* args, uint } } } + dp->has_parent_side_NS = 1; return dp; } @@ -2265,11 +2277,17 @@ do_list_local_data(SSL* ssl, struct work for(i=0; icount + d->rrsig_count; i++) { if(!packed_rr_to_string(p->rrset, i, 0, s, slen)) { - if(!ssl_printf(ssl, "BADRR\n")) + if(!ssl_printf(ssl, "BADRR\n")) { + lock_rw_unlock(&z->lock); + lock_rw_unlock(&zones->lock); return; + } } - if(!ssl_printf(ssl, "%s\n", s)) + if(!ssl_printf(ssl, "%s\n", s)) { + lock_rw_unlock(&z->lock); + lock_rw_unlock(&zones->lock); return; + } } } } Modified: head/contrib/unbound/doc/Changelog ============================================================================== --- head/contrib/unbound/doc/Changelog Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/Changelog Fri Oct 9 11:46:27 2015 (r289063) @@ -1,3 +1,92 @@ +28 September 2015: Wouter + - MAX_TARGET_COUNT increased to 64, to fix up sporadic resolution + failures. + - tag for 1.5.5rc1 release. + - makedist.sh: pgp sig echo commands. + +25 September 2015: Wouter + - Fix unbound-control flush that does not succeed in removing data. + +22 September 2015: Wouter + - Fix config globbed include chroot treatment, this fixes reload of + globs (patch from Dag-Erling Smørgrav). + - iana portlist update. + - Fix #702: New IPs for for h.root-servers.net. + - Remove confusion comment from canonical_compare() function. + - Fix #705: ub_ctx_set_fwd() return value mishandled on windows. + - testbound selftest also works in non-debug mode. + - Fix minor error in unbound.conf.5.in + - Fix unbound.conf(5) access-control description for precedence + and default. + +31 August 2015: Wouter + - changed windows setup compression to be more transparent. + +28 August 2015: Wouter + - Fix #697: Get PY_MAJOR_VERSION failure at configure for python + 2.4 to 2.6. + - Feature #699: --enable-pie option to that builds PIE binary. + - Feature #700: --enable-relro-now option that enables full read-only + relocation. + +24 August 2015: Wouter + - Fix deadlock for local data add and zone add when unbound-control + list_local_data printout is interrupted. + - iana portlist update. + - Change default of harden-algo-downgrade to off. This is lenient + for algorithm rollover. + +13 August 2015: Wouter + - 5011 implementation does not insist on all algorithms, when + harden-algo-downgrade is turned off. + - Reap the child process that libunbound spawns. + +11 August 2015: Wouter + - Fix #694: configure script does not detect LibreSSL 2.2.2 + +4 August 2015: Wouter + - Document that local-zone nodefault matches exactly and transparent + can be used to release a subzone. + +3 August 2015: Wouter + - Document in the manual more text about configuring locally served + zones. + - Fix 5011 anchor update timer after reload. + - Fix mktime in unbound-anchor not using UTC. + +30 July 2015: Wouter + - please afl-gcc (llvm) for uninitialised variable warning. + - Added permit-small-holddown config to debug fast 5011 rollover. + +24 July 2015: Wouter + - Fix #690: Reload fails when so-reuseport is yes after changing + num-threads. + - iana portlist update. + +21 July 2015: Wouter + - Fix configure to detect SSL_CTX_set_ecdh_auto. + - iana portlist update. + +20 July 2015: Wouter + - Enable ECDHE for servers. Where available, use + SSL_CTX_set_ecdh_auto() for TLS-wrapped server configurations to + enable ECDHE. Otherwise, manually offer curve p256. + Client connections should automatically use ECDHE when available. + (thanks Daniel Kahn Gillmor) + +18 July 2015: Willem + - Allow certificate chain files to allow for intermediate certificates. + (thanks Daniel Kahn Gillmor) + +13 July 2015: Wouter + - makedist produces sha1 and sha256 files for created binaries too. + +9 July 2015: Wouter + - 1.5.4 release tag + - trunk has 1.5.5 in development. + - Fix #681: Setting forwarders with unbound-control forward + implicitly turns on forward-first. + 29 June 2015: Wouter - iana portlist update. - Fix alloc with log for allocation size checks. Modified: head/contrib/unbound/doc/README ============================================================================== --- head/contrib/unbound/doc/README Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/README Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -README for Unbound 1.5.4 +README for Unbound 1.5.5 Copyright 2007 NLnet Labs http://unbound.net Modified: head/contrib/unbound/doc/example.conf ============================================================================== --- head/contrib/unbound/doc/example.conf Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/example.conf Fri Oct 9 11:46:27 2015 (r289063) @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.5.4. +# See unbound.conf(5) man page, version 1.5.5. # # this is a comment. @@ -294,7 +294,7 @@ server: # Harden against algorithm downgrade when multiple algorithms are # advertised in the DS record. If no, allows the weakest algorithm # to validate the zone. - # harden-algo-downgrade: yes + # harden-algo-downgrade: no # Use 0x20-encoded random bits in the query to foil spoof attempts. # This feature is an experimental implementation of draft dns-0x20. @@ -444,6 +444,9 @@ server: # If the value 0 is given, missing anchors are not removed. # keep-missing: 31622400 # 366 days + # debug option that allows very small holddown times for key rollover + # permit-small-holddown: no + # the amount of memory to use for the key cache. # plain value in bytes or you can append k, m or G. default is "4Mb". # key-cache-size: 4m @@ -623,6 +626,8 @@ remote-control: # nameservers by hostname or by ipaddress. If you set stub-prime to yes, # the list is treated as priming hints (default is no). # With stub-first yes, it attempts without the stub if it fails. +# Consider adding domain-insecure: name and local-zone: name nodefault +# to the server: section if the stub is a locally served zone. # stub-zone: # name: "example.com" # stub-addr: 192.0.2.68 Modified: head/contrib/unbound/doc/example.conf.in ============================================================================== --- head/contrib/unbound/doc/example.conf.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/example.conf.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.5.4. +# See unbound.conf(5) man page, version 1.5.5. # # this is a comment. @@ -294,7 +294,7 @@ server: # Harden against algorithm downgrade when multiple algorithms are # advertised in the DS record. If no, allows the weakest algorithm # to validate the zone. - # harden-algo-downgrade: yes + # harden-algo-downgrade: no # Use 0x20-encoded random bits in the query to foil spoof attempts. # This feature is an experimental implementation of draft dns-0x20. @@ -444,6 +444,9 @@ server: # If the value 0 is given, missing anchors are not removed. # keep-missing: 31622400 # 366 days + # debug option that allows very small holddown times for key rollover + # permit-small-holddown: no + # the amount of memory to use for the key cache. # plain value in bytes or you can append k, m or G. default is "4Mb". # key-cache-size: 4m @@ -623,6 +626,8 @@ remote-control: # nameservers by hostname or by ipaddress. If you set stub-prime to yes, # the list is treated as priming hints (default is no). # With stub-first yes, it attempts without the stub if it fails. +# Consider adding domain-insecure: name and local-zone: name nodefault +# to the server: section if the stub is a locally served zone. # stub-zone: # name: "example.com" # stub-addr: 192.0.2.68 Modified: head/contrib/unbound/doc/libunbound.3 ============================================================================== --- head/contrib/unbound/doc/libunbound.3 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/libunbound.3 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "libunbound" "3" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -42,7 +42,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.5.4 functions. +\- Unbound DNS validating resolver 1.5.5 functions. .SH "SYNOPSIS" .B #include .LP Modified: head/contrib/unbound/doc/libunbound.3.in ============================================================================== --- head/contrib/unbound/doc/libunbound.3.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/libunbound.3.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "libunbound" "3" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -42,7 +42,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.5.4 functions. +\- Unbound DNS validating resolver 1.5.5 functions. .SH "SYNOPSIS" .B #include .LP Modified: head/contrib/unbound/doc/unbound-anchor.8 ============================================================================== --- head/contrib/unbound/doc/unbound-anchor.8 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-anchor.8 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-anchor" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" Modified: head/contrib/unbound/doc/unbound-anchor.8.in ============================================================================== --- head/contrib/unbound/doc/unbound-anchor.8.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-anchor.8.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-anchor" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" Modified: head/contrib/unbound/doc/unbound-checkconf.8 ============================================================================== --- head/contrib/unbound/doc/unbound-checkconf.8 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-checkconf.8 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-checkconf" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" Modified: head/contrib/unbound/doc/unbound-checkconf.8.in ============================================================================== --- head/contrib/unbound/doc/unbound-checkconf.8.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-checkconf.8.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-checkconf" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" Modified: head/contrib/unbound/doc/unbound-control.8 ============================================================================== --- head/contrib/unbound/doc/unbound-control.8 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-control.8 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-control" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-control.8 -- unbound remote control manual .\" Modified: head/contrib/unbound/doc/unbound-control.8.in ============================================================================== --- head/contrib/unbound/doc/unbound-control.8.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-control.8.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound-control" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-control.8 -- unbound remote control manual .\" Modified: head/contrib/unbound/doc/unbound-host.1 ============================================================================== --- head/contrib/unbound/doc/unbound-host.1 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-host.1 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound\-host" "1" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" Modified: head/contrib/unbound/doc/unbound-host.1.in ============================================================================== --- head/contrib/unbound/doc/unbound-host.1.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound-host.1.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound\-host" "1" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" Modified: head/contrib/unbound/doc/unbound.8 ============================================================================== --- head/contrib/unbound/doc/unbound.8 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound.8 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.5.4. +\- Unbound DNS validating resolver 1.5.5. .SH "SYNOPSIS" .B unbound .RB [ \-h ] Modified: head/contrib/unbound/doc/unbound.8.in ============================================================================== --- head/contrib/unbound/doc/unbound.8.in Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound.8.in Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound" "8" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.5.4. +\- Unbound DNS validating resolver 1.5.5. .SH "SYNOPSIS" .B unbound .RB [ \-h ] Modified: head/contrib/unbound/doc/unbound.conf.5 ============================================================================== --- head/contrib/unbound/doc/unbound.conf.5 Fri Oct 9 11:30:27 2015 (r289062) +++ head/contrib/unbound/doc/unbound.conf.5 Fri Oct 9 11:46:27 2015 (r289063) @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Jul 9, 2015" "NLnet Labs" "unbound 1.5.4" +.TH "unbound.conf" "5" "Oct 6, 2015" "NLnet Labs" "unbound 1.5.5" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -296,7 +296,7 @@ trust (very large) TTL values. .TP .B cache\-min\-ttl: \fI Time to live minimum for RRsets and messages in the cache. Default is 0. -If the the minimum kicks in, the data is cached for longer than the domain +If the minimum kicks in, the data is cached for longer than the domain owner intended, and thus less queries are made to look up the data. Zero makes sure the data in the cache is as the domain owner intended, higher values, especially more than an hour or so, can lead to trouble as @@ -373,6 +373,7 @@ a daemon. Default is yes. The netblock is given as an IP4 or IP6 address with /size appended for a classless network block. The action can be \fIdeny\fR, \fIrefuse\fR, \fIallow\fR, \fIallow_snoop\fR, \fIdeny_non_local\fR or \fIrefuse_non_local\fR. +The most specific netblock match is used, if none match \fIdeny\fR is used. .IP The action \fIdeny\fR stops queries from hosts from that netblock. .IP @@ -567,7 +568,7 @@ to increase the max depth that is checke .B harden\-algo\-downgrade: \fI Harden against algorithm downgrade when multiple algorithms are advertised in the DS record. If no, allows the weakest algorithm to -validate the zone. Default is yes. Zone signers must produce zones +validate the zone. Default is no. Zone signers must produce zones that allow this feature to work, but sometimes they do not, and turning this option off avoids that validation failure. .TP @@ -801,6 +802,10 @@ mechanism work with zones that perform r The default is 366 days. The value 0 does not remove missing anchors, as per the RFC. .TP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 9 12:11:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 757219D1852; Fri, 9 Oct 2015 12:11:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42D7D811; Fri, 9 Oct 2015 12:11:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99CBbcs043189; Fri, 9 Oct 2015 12:11:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99CBbwZ043187; Fri, 9 Oct 2015 12:11:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510091211.t99CBbwZ043187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 9 Oct 2015 12:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289064 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 12:11:38 -0000 Author: trasz Date: Fri Oct 9 12:11:37 2015 New Revision: 289064 URL: https://svnweb.freebsd.org/changeset/base/289064 Log: Remove root_mount_wait(). It's not used anywhere. Reviewed by: bapt@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3787 Modified: head/sys/kern/vfs_mountroot.c head/sys/sys/systm.h Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Fri Oct 9 11:46:27 2015 (r289063) +++ head/sys/kern/vfs_mountroot.c Fri Oct 9 12:11:37 2015 (r289064) @@ -166,24 +166,6 @@ root_mounted(void) return (root_mount_complete); } -void -root_mount_wait(void) -{ - - /* - * Panic on an obvious deadlock - the function can't be called from - * a thread which is doing the whole SYSINIT stuff. - */ - KASSERT(curthread->td_proc->p_pid != 0, - ("root_mount_wait: cannot be called from the swapper thread")); - mtx_lock(&root_holds_mtx); - while (!root_mount_complete) { - msleep(&root_mount_complete, &root_holds_mtx, PZERO, "rootwait", - hz); - } - mtx_unlock(&root_holds_mtx); -} - static void set_rootvnode(void) { Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Oct 9 11:46:27 2015 (r289063) +++ head/sys/sys/systm.h Fri Oct 9 12:11:37 2015 (r289064) @@ -412,7 +412,6 @@ struct root_hold_token; struct root_hold_token *root_mount_hold(const char *identifier); void root_mount_rel(struct root_hold_token *h); -void root_mount_wait(void); int root_mounted(void); From owner-svn-src-all@freebsd.org Fri Oct 9 12:34:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC3AC9D29E4; Fri, 9 Oct 2015 12:34:34 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F19DB3E; Fri, 9 Oct 2015 12:34:34 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99CYX7E049981; Fri, 9 Oct 2015 12:34:33 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99CYX3F049979; Fri, 9 Oct 2015 12:34:33 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510091234.t99CYX3F049979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 9 Oct 2015 12:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289065 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 12:34:35 -0000 Author: cperciva Date: Fri Oct 9 12:34:33 2015 New Revision: 289065 URL: https://svnweb.freebsd.org/changeset/base/289065 Log: Add --currently-running option to freebsd-update. This option tells freebsd-update to act as if it is running a specific release instead of querying the kernel. In particular, this can be useful when upgrading jails. Requested by: EuroBSDCon devsummit jails session Tested by: allanjude MFC after: 1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.8 head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 9 12:11:37 2015 (r289064) +++ head/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 9 12:34:33 2015 (r289065) @@ -113,6 +113,11 @@ Please do not run .Nm Cm fetch from crontab or similar using this flag, see: .Nm Cm cron +.It Fl -currently-running Ar release +Don't detect the currently-running release; instead, assume that the +system is running the specified +.Ar release . +This is most likely to be useful when upgrading jails. .El .Sh COMMANDS The Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 9 12:11:37 2015 (r289064) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 9 12:34:33 2015 (r289065) @@ -52,6 +52,8 @@ Options: (default: root) --not-running-from-cron -- Run without a tty, for use by automated tools + --currently-running release + -- Update as if currently running this release Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -434,6 +436,9 @@ parse_cmdline () { --not-running-from-cron) NOTTYOK=1 ;; + --currently-running) + shift; export UNAME_r="$1" + ;; # Configuration file equivalents -b) From owner-svn-src-all@freebsd.org Fri Oct 9 14:31:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C947A9D15D5; Fri, 9 Oct 2015 14:31:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82EA55F9; Fri, 9 Oct 2015 14:31:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99EVWbG087443; Fri, 9 Oct 2015 14:31:32 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99EVWCl087410; Fri, 9 Oct 2015 14:31:32 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510091431.t99EVWCl087410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 9 Oct 2015 14:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289066 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 14:31:34 -0000 Author: kevlo Date: Fri Oct 9 14:31:32 2015 New Revision: 289066 URL: https://svnweb.freebsd.org/changeset/base/289066 Log: Sort function prototypes and add missing 'static' keywords. Submitted by: Andriy Voskoboinyk Differential Revision: https://reviews.freebsd.org/D3847 Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 9 12:34:33 2015 (r289065) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 9 14:31:32 2015 (r289066) @@ -188,10 +188,10 @@ static int urtwn_alloc_list(struct urtw struct urtwn_data[], int, int); static int urtwn_alloc_rx_list(struct urtwn_softc *); static int urtwn_alloc_tx_list(struct urtwn_softc *); -static void urtwn_free_tx_list(struct urtwn_softc *); -static void urtwn_free_rx_list(struct urtwn_softc *); static void urtwn_free_list(struct urtwn_softc *, struct urtwn_data data[], int); +static void urtwn_free_rx_list(struct urtwn_softc *); +static void urtwn_free_tx_list(struct urtwn_softc *); static struct urtwn_data * _urtwn_getbuf(struct urtwn_softc *); static struct urtwn_data * urtwn_getbuf(struct urtwn_softc *); static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, @@ -265,10 +265,10 @@ static void urtwn_set_txpower(struct ur static void urtwn_scan_start(struct ieee80211com *); static void urtwn_scan_end(struct ieee80211com *); static void urtwn_set_channel(struct ieee80211com *); +static void urtwn_update_mcast(struct ieee80211com *); static void urtwn_set_chan(struct urtwn_softc *, struct ieee80211_channel *, struct ieee80211_channel *); -static void urtwn_update_mcast(struct ieee80211com *); static void urtwn_iq_calib(struct urtwn_softc *); static void urtwn_lc_calib(struct urtwn_softc *); static void urtwn_init(struct urtwn_softc *); @@ -470,20 +470,6 @@ detach: return (ENXIO); /* failure */ } -static void -urtwn_drain_mbufq(struct urtwn_softc *sc) -{ - struct mbuf *m; - struct ieee80211_node *ni; - URTWN_ASSERT_LOCKED(sc); - while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) { - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; - ieee80211_free_node(ni); - m_freem(m); - } -} - static int urtwn_detach(device_t self) { @@ -529,33 +515,16 @@ urtwn_detach(device_t self) } static void -urtwn_free_tx_list(struct urtwn_softc *sc) -{ - urtwn_free_list(sc, sc->sc_tx, URTWN_TX_LIST_COUNT); -} - -static void -urtwn_free_rx_list(struct urtwn_softc *sc) -{ - urtwn_free_list(sc, sc->sc_rx, URTWN_RX_LIST_COUNT); -} - -static void -urtwn_free_list(struct urtwn_softc *sc, struct urtwn_data data[], int ndata) +urtwn_drain_mbufq(struct urtwn_softc *sc) { - int i; - - for (i = 0; i < ndata; i++) { - struct urtwn_data *dp = &data[i]; - - if (dp->buf != NULL) { - free(dp->buf, M_USBDEV); - dp->buf = NULL; - } - if (dp->ni != NULL) { - ieee80211_free_node(dp->ni); - dp->ni = NULL; - } + struct mbuf *m; + struct ieee80211_node *ni; + URTWN_ASSERT_LOCKED(sc); + while ((m = mbufq_dequeue(&sc->sc_snd)) != NULL) { + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + m->m_pkthdr.rcvif = NULL; + ieee80211_free_node(ni); + m_freem(m); } } @@ -874,6 +843,102 @@ urtwn_txeof(struct usb_xfer *xfer, struc sc->sc_txtimer = 0; } +static int +urtwn_alloc_list(struct urtwn_softc *sc, struct urtwn_data data[], + int ndata, int maxsz) +{ + int i, error; + + for (i = 0; i < ndata; i++) { + struct urtwn_data *dp = &data[i]; + dp->sc = sc; + dp->m = NULL; + dp->buf = malloc(maxsz, M_USBDEV, M_NOWAIT); + if (dp->buf == NULL) { + device_printf(sc->sc_dev, + "could not allocate buffer\n"); + error = ENOMEM; + goto fail; + } + dp->ni = NULL; + } + + return (0); +fail: + urtwn_free_list(sc, data, ndata); + return (error); +} + +static int +urtwn_alloc_rx_list(struct urtwn_softc *sc) +{ + int error, i; + + error = urtwn_alloc_list(sc, sc->sc_rx, URTWN_RX_LIST_COUNT, + URTWN_RXBUFSZ); + if (error != 0) + return (error); + + STAILQ_INIT(&sc->sc_rx_active); + STAILQ_INIT(&sc->sc_rx_inactive); + + for (i = 0; i < URTWN_RX_LIST_COUNT; i++) + STAILQ_INSERT_HEAD(&sc->sc_rx_inactive, &sc->sc_rx[i], next); + + return (0); +} + +static int +urtwn_alloc_tx_list(struct urtwn_softc *sc) +{ + int error, i; + + error = urtwn_alloc_list(sc, sc->sc_tx, URTWN_TX_LIST_COUNT, + URTWN_TXBUFSZ); + if (error != 0) + return (error); + + STAILQ_INIT(&sc->sc_tx_active); + STAILQ_INIT(&sc->sc_tx_inactive); + STAILQ_INIT(&sc->sc_tx_pending); + + for (i = 0; i < URTWN_TX_LIST_COUNT; i++) + STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, &sc->sc_tx[i], next); + + return (0); +} + +static void +urtwn_free_list(struct urtwn_softc *sc, struct urtwn_data data[], int ndata) +{ + int i; + + for (i = 0; i < ndata; i++) { + struct urtwn_data *dp = &data[i]; + + if (dp->buf != NULL) { + free(dp->buf, M_USBDEV); + dp->buf = NULL; + } + if (dp->ni != NULL) { + ieee80211_free_node(dp->ni); + dp->ni = NULL; + } + } +} + +static void +urtwn_free_rx_list(struct urtwn_softc *sc) +{ + urtwn_free_list(sc, sc->sc_rx, URTWN_RX_LIST_COUNT); +} + +static void +urtwn_free_tx_list(struct urtwn_softc *sc) +{ + urtwn_free_list(sc, sc->sc_tx, URTWN_TX_LIST_COUNT); +} + static void urtwn_bulk_tx_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -1762,7 +1827,6 @@ urtwn_r88e_get_rssi(struct urtwn_softc * return (rssi); } - static int urtwn_tx_start(struct urtwn_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct urtwn_data *data) @@ -1980,71 +2044,6 @@ urtwn_parent(struct ieee80211com *ic) ieee80211_start_all(ic); } -static int -urtwn_alloc_list(struct urtwn_softc *sc, struct urtwn_data data[], - int ndata, int maxsz) -{ - int i, error; - - for (i = 0; i < ndata; i++) { - struct urtwn_data *dp = &data[i]; - dp->sc = sc; - dp->m = NULL; - dp->buf = malloc(maxsz, M_USBDEV, M_NOWAIT); - if (dp->buf == NULL) { - device_printf(sc->sc_dev, - "could not allocate buffer\n"); - error = ENOMEM; - goto fail; - } - dp->ni = NULL; - } - - return (0); -fail: - urtwn_free_list(sc, data, ndata); - return (error); -} - -static int -urtwn_alloc_rx_list(struct urtwn_softc *sc) -{ - int error, i; - - error = urtwn_alloc_list(sc, sc->sc_rx, URTWN_RX_LIST_COUNT, - URTWN_RXBUFSZ); - if (error != 0) - return (error); - - STAILQ_INIT(&sc->sc_rx_active); - STAILQ_INIT(&sc->sc_rx_inactive); - - for (i = 0; i < URTWN_RX_LIST_COUNT; i++) - STAILQ_INSERT_HEAD(&sc->sc_rx_inactive, &sc->sc_rx[i], next); - - return (0); -} - -static int -urtwn_alloc_tx_list(struct urtwn_softc *sc) -{ - int error, i; - - error = urtwn_alloc_list(sc, sc->sc_tx, URTWN_TX_LIST_COUNT, - URTWN_TXBUFSZ); - if (error != 0) - return (error); - - STAILQ_INIT(&sc->sc_tx_active); - STAILQ_INIT(&sc->sc_tx_inactive); - STAILQ_INIT(&sc->sc_tx_pending); - - for (i = 0; i < URTWN_TX_LIST_COUNT; i++) - STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, &sc->sc_tx[i], next); - - return (0); -} - static __inline int urtwn_power_on(struct urtwn_softc *sc) { @@ -2685,7 +2684,7 @@ urtwn_bb_init(struct urtwn_softc *sc) } } -void +static void urtwn_rf_init(struct urtwn_softc *sc) { const struct urtwn_rf_prog *prog; @@ -2826,7 +2825,7 @@ urtwn_edca_init(struct urtwn_softc *sc) urtwn_write_4(sc, R92C_EDCA_VO_PARAM, 0x002fa226); } -void +static void urtwn_write_txpower(struct urtwn_softc *sc, int chain, uint16_t power[URTWN_RIDX_COUNT]) { @@ -2886,7 +2885,7 @@ urtwn_write_txpower(struct urtwn_softc * SM(R92C_TXAGC_MCS15, power[27])); } -void +static void urtwn_get_txpower(struct urtwn_softc *sc, int chain, struct ieee80211_channel *c, struct ieee80211_channel *extc, uint16_t power[URTWN_RIDX_COUNT]) @@ -2985,7 +2984,7 @@ urtwn_get_txpower(struct urtwn_softc *sc #endif } -void +static void urtwn_r88e_get_txpower(struct urtwn_softc *sc, int chain, struct ieee80211_channel *c, struct ieee80211_channel *extc, uint16_t power[URTWN_RIDX_COUNT]) @@ -3054,7 +3053,7 @@ urtwn_r88e_get_txpower(struct urtwn_soft } } -void +static void urtwn_set_txpower(struct urtwn_softc *sc, struct ieee80211_channel *c, struct ieee80211_channel *extc) { From owner-svn-src-all@freebsd.org Fri Oct 9 14:55:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 521079D2536; Fri, 9 Oct 2015 14:55:57 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9746651; Fri, 9 Oct 2015 14:55:56 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99EttdR093748; Fri, 9 Oct 2015 14:55:55 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99EttvC093747; Fri, 9 Oct 2015 14:55:55 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201510091455.t99EttvC093747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 9 Oct 2015 14:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289067 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 14:55:57 -0000 Author: wblock (doc committer) Date: Fri Oct 9 14:55:55 2015 New Revision: 289067 URL: https://svnweb.freebsd.org/changeset/base/289067 Log: Fix a repeated typo: rootir -> rootdir. Approved by: bapt MFC after: 1 week Modified: head/usr.sbin/pw/pw.c Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Fri Oct 9 14:31:32 2015 (r289066) +++ head/usr.sbin/pw/pw.c Fri Oct 9 14:55:55 2015 (r289067) @@ -233,7 +233,7 @@ cmdhelp(int mode, int which) { "usage: pw useradd [name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" " Adding users:\n" @@ -256,7 +256,7 @@ cmdhelp(int mode, int which) "\t-N no update\n" " Setting defaults:\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-D set user defaults\n" "\t-b dir default home root dir\n" "\t-e period default expiry period\n" @@ -273,7 +273,7 @@ cmdhelp(int mode, int which) "\t-y path set NIS passwd file path\n", "usage: pw userdel [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-Y update NIS maps\n" @@ -281,7 +281,7 @@ cmdhelp(int mode, int which) "\t-r remove home & contents\n", "usage: pw usermod [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if no user\n" @@ -306,7 +306,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw usershow [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-F force print\n" @@ -315,7 +315,7 @@ cmdhelp(int mode, int which) "\t-7 print in v7 format\n", "usage: pw usernext [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n", "usage pw: lock [switches]\n" @@ -330,7 +330,7 @@ cmdhelp(int mode, int which) { "usage: pw groupadd [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-n group group name\n" @@ -341,13 +341,13 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupdel [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-Y update NIS maps\n", "usage: pw groupmod [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if not exists\n" @@ -361,7 +361,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupshow [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-F force print\n" @@ -369,7 +369,7 @@ cmdhelp(int mode, int which) "\t-a print all accounting groups\n", "usage: pw groupnext [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" } From owner-svn-src-all@freebsd.org Fri Oct 9 16:44:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59FED9D27A8; Fri, 9 Oct 2015 16:44:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 093ECE43; Fri, 9 Oct 2015 16:44:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99GijoE026601; Fri, 9 Oct 2015 16:44:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Gijcw026600; Fri, 9 Oct 2015 16:44:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510091644.t99Gijcw026600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Oct 2015 16:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289069 - vendor/elftoolchain/elftoolchain-r3250 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 09 Oct 2015 17:05:19 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 16:44:46 -0000 Author: emaste Date: Fri Oct 9 16:44:44 2015 New Revision: 289069 URL: https://svnweb.freebsd.org/changeset/base/289069 Log: Tag elftoolchain-r3250 Added: - copied from r289068, vendor/elftoolchain/dist/ Directory Properties: vendor/elftoolchain/elftoolchain-r3250/ (props changed) From owner-svn-src-all@freebsd.org Fri Oct 9 17:23:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F04D79D21EA; Fri, 9 Oct 2015 17:23:53 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0146.outbound.protection.outlook.com [157.56.111.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 297FE9F0; Fri, 9 Oct 2015 17:23:52 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from BY1PR0501CA0036.namprd05.prod.outlook.com (10.162.139.46) by BLUPR05MB054.namprd05.prod.outlook.com (10.255.210.149) with Microsoft SMTP Server (TLS) id 15.1.286.20; Fri, 9 Oct 2015 17:23:44 +0000 Received: from BY2FFO11FD003.protection.gbl (2a01:111:f400:7c0c::140) by BY1PR0501CA0036.outlook.office365.com (2a01:111:e400:4821::46) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Fri, 9 Oct 2015 17:23:44 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.18) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.18 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.18) by BY2FFO11FD003.mail.protection.outlook.com (10.1.14.125) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Fri, 9 Oct 2015 17:23:44 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 9 Oct 2015 10:23:44 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t99HNhD62431; Fri, 9 Oct 2015 10:23:43 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [IPv6:::1]) by chaos.jnpr.net (Postfix) with ESMTP id F27F8580A9; Fri, 9 Oct 2015 10:23:42 -0700 (PDT) To: Bryan Drewery CC: Warner Losh , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Subject: Re: svn commit: r288911 - head/share/mk In-Reply-To: <561693EF.50808@FreeBSD.org> References: <201510060418.t964Innu071170@repo.freebsd.org> <56140CAD.8080200@FreeBSD.org> <8D5D1CE5-BC57-464D-9C47-63EFF4C1CF2F@bsdimp.com> <5615C935.2060204@FreeBSD.org> <561693EF.50808@FreeBSD.org> Comments: In-reply-to: Bryan Drewery message dated "Thu, 08 Oct 2015 09:03:59 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15521.1444411422.1@chaos> Date: Fri, 9 Oct 2015 10:23:42 -0700 Message-ID: <15686.1444411422@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD003; 1:fyV8hJQLc9IuVCelUPFEFZqDbfL6gbJoNaQOdc3ozM7pJcYCHKxIpVKPbbmDeHyb7aC+F3XjyUYb9hsuSgmADilYBQ+jj9wOwX51u+/+l27j7DuK04/KSONI2qS4Z5GFcwBo1nsIPrYgZyCZDJrW7hwrEHQgr8+4zgDwE27+BknsZ7ptJwg/zSqSIZGdoxrDrtu8R5KPWoORYWJW9ks3J0zIfyhb9cnt4lOIGwyptTiR6y2L8oPPszBtEfH0015ZGdtrLtEz2/JcgXWAJAX78uqpNk5v0piXKDGCcrUpeu2JEglZ6dQtaJ5Lq9mB4o9cAfAAHu4jO8lklazSv9W2xg== X-Forefront-Antispam-Report: CIP:66.129.239.18; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(199003)(24454002)(189002)(76176999)(5007970100001)(106466001)(47776003)(46102003)(64706001)(50226001)(93886004)(76506005)(105596002)(57986006)(50466002)(92566002)(19580395003)(6806005)(19580405001)(11100500001)(117636001)(69596002)(50986999)(5008740100001)(107886002)(5001960100002)(189998001)(110136002)(5001920100001)(86362001)(23726002)(33716001)(87936001)(97756001)(2950100001)(15975445007)(97736004)(81156007)(77096005)(46406003)(42262002)(4001430100001)(62816006); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB054; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB054; 2:Wxwwq5XGeEtKJ/youVTeDnF5df+s8xiJ8EWMiDuEug+9e/RwORB56vn+sqUizgCSstsjH13exrxTgVHbCsF+tUKK+kYwhIiVRGXM4NDbuTPPeyKIzSxD2tjGT3y1XDZA1grB5ze8m7BdGyWX8xcHcQ1qYTnsC2lIl5FS5IQG8Mc=; 3:urMOEw6R2R99cM1vjNq84LKJOIQsR6v+49Jg/y+SgP10LCLhQVYHvx5CHxbOFSjBJ79iwwMvJ8DTluhwcHNsNErSxDrCGye756Uwz28mrdWHWZatvW9b3CzqugLlLOUIolpL0y0XmEMsT3ce6cfUfIE7MyNM0OSu69+DVbTcHpyqgwHJREeusr0r7V32o5nX23EdLwWWvjzotDEQ5qdrMrUlz/BeA9CH4WNbqtGsCIs=; 25:hHuoYzZsNXPjXcvgxZyVZtA0zhoIoG5pqsYmrmT5KxHLjt2WhowuMVsu8O7Aj7ku3b9b6JZY2Mt9XqzESiJr0pGlo+cbTN9Ko4bBS0ki8sSOAuCQ8TKmF/dpIiBU8Hpz+Eo+xvawJpaicyPPvlyNR5cLXlXqt9cx2zmH9YUayEPqTHK95UqctIaYgfpW75YRpoMoWnIH56YCtxaRuIJRIGZYy1DOphpkYNc+I2UqVzSYFgoViJNbalqdDA9Hx5llmMu79PUPBZjvCO0r8lCIQw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB054; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB054; 20:QvJCuplyprPi9SgY2fFY0TxWm1KLIYQFs5rAUrv95zWV2/XZ8nLPB+i+NrLKYIbD2BGQ8GXVvkkc742RAlzInmDaifX153eNR4C22QkeKzh3DrgYNaHtWxFD/U2koIpbX7Z9c+VwAugZKTPVMimOQQ6EplEeummA8ldNxPBn2/OeaNajJnODJU3h3YxFV1e8V2vcUW2hu43uOYgI8fvqBeQmgJlPL1CxqvSCZTuZP2Y1JYQVWn9A/Ue4ClH6K1eICTOTPXth6WpN/4zjd0gUZBfm0nAZM35oO9ELC6ycEGxDd5mUiCeKyb0Kf1PBCmO335jCeyfditW3yxvPi3ViG2Db4xj0F1xBkg3sJlkoWiVE4lGaUHAclgUbGGxtvu1FW//0VNeKoEK+FtGbppX9CBR2h8QNB5+ceKpoVJSYm9hUDMn8iwJsT3xVoHgemLEoVpcdyFcTlRTm/BW/Gm5zNHOH/gitzW+ZkZm2kAXl/NZsvInI10SY6RMnzPsOna0X; 4:GpYQT7n5kj/5NFa71vaIRTUf9aQWmCBNNnZshKn4LP6jCmB4h+JijQufsKZpbr96IcbuphXitdjosNBV94oBoH2RrXheT5+uywJllwbTpsByPD7E5ZrrQELFcK4SfrJDwElOIyrIre89ZoOUuhv+KfTmP9kPcYJ/wvhoFZgfDW4XBr+fgoWnfzWqwxapbLMDWwRtUZ3YWVVAhRz3fOZyy2QHS1rpY1Rwu2hjHkwlZvDtj5QMIfrHXQ06sie/nMkyE8Qt4+HVedqoAvi/qK2iMxQFAD0VEhMliMmXCwZBgbSpEUFgbv4Mr+yB5rbzgMJG6C09Fji/9W5+H84da/tT0EESWiBIEcCXzGDyszZYW/0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001); SRVR:BLUPR05MB054; BCL:0; PCL:0; RULEID:; SRVR:BLUPR05MB054; X-Forefront-PRVS: 0724FCD4CD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR05MB054; 23:x8lHPqKIwf6k/n+DyMP8SuYdPUe+i2jjgQPhZe8dX8?= =?us-ascii?Q?aWrgZD0KVGEy8DmDOA7gpz61/wj1xgk/eZ1SHNd8BPcYtUBEanui79Agk3NF?= =?us-ascii?Q?//m0e/9VPo4GSRYgMUOeE2TTEWzOfKi01Er6eFwwLy0hfJkZUDyt/IDL0e/V?= =?us-ascii?Q?HPrQFb4zNcafGym2QJDNilqEze+SowQ2KtAF1OFhvyc3rjr22BE2PHsaWzAZ?= =?us-ascii?Q?XaQ0J+AckzzwepPwjOPAVAtPSA+wbFBNsY5frIaCHc+KU1bvNINbsxBiHY03?= =?us-ascii?Q?nNYFjJPRAwMNlPGyLQzJCRrfUFEeC8in9uE5+G9K7lNcZ5hWPqg1tRzzJ2wR?= =?us-ascii?Q?r34f/1VNKA9DI+3btV6j6Nv//rgl6xqKhNEmT1x7pdwaEdR4GyYDvasUKqEl?= =?us-ascii?Q?8rQcU4iyD13Y2HnlZRo/0/SlB5fr+ApsJnQvZ0RLTJvOHMuRL/16D9sczUQr?= =?us-ascii?Q?+AiQVa3H2EqC8qC8Wj3Iw1+c+qrieumthem/tfc5PfnZzLWCQ/cmJ5KqkGpH?= =?us-ascii?Q?AZcepbFkAvyTOflwzIrU6eLl0jDeOaw7HOuM/W9dy5K+GdyniRJRkPECUriu?= =?us-ascii?Q?f2IMSd57FhGPm0I4FOs1tRVrq7PDUcvW/IstWu8pDMQHIOe0ZLv2mmO5KeTS?= =?us-ascii?Q?CPBqs93fqTmb46i62Guy+4s8Xqm4umB/7BtELnaHbWsPR+m0o0YGalBdVjQ5?= =?us-ascii?Q?hski1dMQgGw7qD9KLy7kdO3jRNO7+uLUY4qV93K83PNkYZkZC5KLUsv/+bRD?= =?us-ascii?Q?tUtGObvPES1/Zt3puh0skCWNgLNLDEqMWT3XBx3ldSQOsyEYJWhu5Wj4DLSU?= =?us-ascii?Q?Nq/Y2guNyMdOKpFpH1egxdnXYPPY6eIhuqDhZZFGeQ+FL3uu7a3RwB33EHm6?= =?us-ascii?Q?66Jj419FB54V7M5Q/TZGJSwHxTt5paJHZcU1fRV7TYHUjvxoLdHh9yJfG3tg?= =?us-ascii?Q?tGlEvv5d2Qc3LDtCyydgRdoYt1RgWkk08QcvlMFU31kJgeQQ4D9Ci/21pD5V?= =?us-ascii?Q?Q5HmVapTzJcbQoSg6ZEO7cy+ZCEQMz9n68Lhv7+7dbA5oRk6e9u7eOJSa7Yy?= =?us-ascii?Q?0X6E9iwYI3CsQbY4BYA+SSrJzF3YKGn7hxuZdYys4JOLcCFn6WP44hwXW5sA?= =?us-ascii?Q?oGq9BClzV0Z2kdsDR+yhxJLKreDUBaXL58sLvX137C1ZdzMoqGm4Xeu+MVI4?= =?us-ascii?Q?VVtGBiQoyvedhyB68qHQbyBSfFv4WKZHcy?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB054; 5:daX4PGvN3gW5HJ+ohBzxGINJd0RKkj+tCLM1z+7J2XL7zzlONZ1od9oxcp7KqsYhpJjZK8yLe3M8ROH4vmsVyTPJx9a13pcIJ1Y6n1Mqeyz0f3o/nwNzq/vJ2YjHL8krUGUTdtriwkIFyqjokHO59w==; 24:UfnEm4/Is5lMAulnGNfW/K/0hwV+4rt9tERw/iZ7eoVrvIjkQYeYMm3oY8kTgdGg3i/P1vQ6JVzoQjoO93O0ZTzyOqSq7fV7FPYO2O8LPbA=; 20:dAoPVqS4/JUB4u38dy99I2Sf3+VJhlFLj1waXdmk52yXzFDjMVGMAPwjsMQvPSnQGyDpr+dsjxMXBYprn0wbMg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2015 17:23:44.5205 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.18]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB054 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 17:23:54 -0000 I seem to be getting mails out of order... Bryan Drewery wrote: > > So why are we including src.conf in sys.mk and not > > src.opts.mk ? > > > > We're including it there because Simon wanted it included there so > > meta-mode settings were visible in sys.mk . I thought it > > lame at the > > time, but had no better solution. My recollection is a little vague... there are options that sys.mk needs to be able to use (eg for auto.obj.mk - because .OBJDIR affects .PATH computaion in many cases), but src.conf should be largely orthogonal IIRC src.opts.mk cannot be included early due to it including bsd.own.mk which cases lots of problems when included too early. > Ah! So the /etc/src-env.conf thing I referenced does replace it. So we > can remove src.conf from sys.mk now. It came in via r284598, and I > documented it and added it to src.conf.5/makeman later on. Yes src-env.conf allows for separate conf stuff that is needed early vs late. From owner-svn-src-all@freebsd.org Fri Oct 9 17:33:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C5D09D27FC; Fri, 9 Oct 2015 17:33:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67B7AFB0; Fri, 9 Oct 2015 17:33:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99HX5Xr041372; Fri, 9 Oct 2015 17:33:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99HX5QN041371; Fri, 9 Oct 2015 17:33:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510091733.t99HX5QN041371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Oct 2015 17:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289070 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 09 Oct 2015 17:35:42 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 17:33:06 -0000 Author: emaste Date: Fri Oct 9 17:33:05 2015 New Revision: 289070 URL: https://svnweb.freebsd.org/changeset/base/289070 Log: Add .gnu.versym VERSYM_HIDDEN flag and related mask MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Fri Oct 9 16:44:44 2015 (r289069) +++ head/sys/sys/elf_common.h Fri Oct 9 17:33:05 2015 (r289070) @@ -478,6 +478,12 @@ typedef struct { /* Flags for section groups. */ #define GRP_COMDAT 0x1 /* COMDAT semantics. */ +/* + * Flags / mask for .gnu.versym sections. + */ +#define VERSYM_VERSION 0x7fff +#define VERSYM_HIDDEN 0x8000 + /* Values for p_type. */ #define PT_NULL 0 /* Unused entry. */ #define PT_LOAD 1 /* Loadable segment. */ From owner-svn-src-all@freebsd.org Fri Oct 9 17:59:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C37AA9D174D; Fri, 9 Oct 2015 17:59:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58483F02; Fri, 9 Oct 2015 17:59:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wiclk2 with SMTP id lk2so77302137wic.1; Fri, 09 Oct 2015 10:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Y/uRFa08mN561dBM/mnSh0ZjnsdN6i+RF3o9I5m3iEc=; b=PNT9gF2T8KuyCoPEBrRB062um3UkmRBkkw7a7SqrH8VEdWZOXdHTVMz7ML+gGjrIfQ 0k7hxqejDTJTA6P/Rriu9ITAgvOzWAvt3fmwcmQFd1JibCy29794WvnTn+JhfUiRFowQ Z8vijxHHtipkUeD0/JdAkzvGN0tT8u0yFLKqgl5uVR055ddVxaOLhnCiLNuRXqcS5lOl ua5VJWhZF6h/3GPw36P53t0G/eEGWAC+c0v1BtSIpkrVVEAYU4Aucp61XoIGPjO8dr7h 6QtIREr4cGlgDiG4o4I86LVJeWgOALx7kiTIaMYY4YMy12oC5ZsWjZWt+6IxWoRLivYd S1kQ== X-Received: by 10.194.248.165 with SMTP id yn5mr17253978wjc.97.1444413550453; Fri, 09 Oct 2015 10:59:10 -0700 (PDT) Received: from brick.home (esn33.neoplus.adsl.tpnet.pl. [83.20.133.33]) by smtp.gmail.com with ESMTPSA id t7sm12351825wib.1.2015.10.09.10.59.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Oct 2015 10:59:09 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 9 Oct 2015 19:59:06 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: John Baldwin Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287934 - head/sys/boot/efi/loader Message-ID: <20151009175906.GA4501@brick.home> Mail-Followup-To: John Baldwin , "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509172036.t8HKalKU088025@repo.freebsd.org> <5683583.PWsk0G3i3G@ralph.baldwin.cx> <1581085.vcsbvoROWY@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581085.vcsbvoROWY@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 17:59:13 -0000 On 0917T1630, John Baldwin wrote: > On Thursday, September 17, 2015 10:30:15 PM Bjoern A. Zeeb wrote: > > > > > On 17 Sep 2015, at 20:43 , John Baldwin wrote: > > > > > > On Thursday, September 17, 2015 08:36:47 PM John Baldwin wrote: > > >> Author: jhb > > >> Date: Thu Sep 17 20:36:46 2015 > > >> New Revision: 287934 > > >> URL: https://svnweb.freebsd.org/changeset/base/287934 > > >> > > >> Log: > > >> The EFI boot loader allocates a single chunk of contiguous memory to > > >> hold the kernel, modules, and any other loaded data. This memory block > > >> is relocated to the kernel's expected location during the transfer of > > >> control from the loader to the kernel. > > >> > > >> The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko > > >> no longer fits in the default staging size. Bump the default size from > > >> 32MB to 48MB to provide more breathing room. > > > > > > I believe that this should work fine for any system with 64MB of RAM. One > > > downside of the static size is that the loader fails if it can't allocate > > > a contiguous staging size (it isn't able to grow the staging area on > > > demand). > > > > how do md_images work in that case? > > The md_image has to fit into the same staging area (kernel plus any other > files loaded by the loader including modules and md_images all have to fit > in the staging area). That was the original motivation for making the > staging area a build-time tunable rather than always hardcoded at 32MB so > that people who wished to deploy a large md_image can use a make flag to > build a loader with a larger staging size (I tested this with a 200+MB > mfsroot). What would be required to get rid of that limitation altogether, ie make it dynamic? Right now it's quite a regression compared to the usual (non-UEFI) loader. From owner-svn-src-all@freebsd.org Fri Oct 9 18:21:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D3119D284C; Fri, 9 Oct 2015 18:21:47 +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 CED453DD; Fri, 9 Oct 2015 18:21:46 +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 t99ILjYj054213; Fri, 9 Oct 2015 18:21:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99ILjHI054211; Fri, 9 Oct 2015 18:21:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091821.t99ILjHI054211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 18:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 18:21:47 -0000 Author: dim Date: Fri Oct 9 18:21:45 2015 New Revision: 289072 URL: https://svnweb.freebsd.org/changeset/base/289072 Log: Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): [SLP] Vectorize for all-constant entries. This should fix libc++'s iostream initialization SIGBUSing on amd64, whenever the global cout symbol is not aligned to 16 bytes. Some further explanation: libc++'s iostream.cpp contains the definitions of std::cout, std::cerr and so on. These global objects are effectively declared with an alignment of 8 bytes. When an executable is linked against libc++.so, it can sometimes get a copy of the global object, which is then at the same alignment. However, with clang 3.7.0, the initialization of these global objects will incorrectly use SSE instructions (e.g. movdqa), whenever the optimization level is high enough, and SSE is enabled, such as on amd64. When any of these objects is not aligned to 16 bytes, this will result in a SIGBUS during iostream initialization. In contrast, clang 3.6.x and earlier took the 8 byte alignment into consideration, and avoided SSE for those particular operations. After bisecting of upstream changes, I found that the above revision caused the change of this behavior, so I am reverting it now as a workaround, while a discussion and test case is being prepared for upstream. Modified: head/contrib/libc++/src/iostream.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Modified: head/contrib/libc++/src/iostream.cpp ============================================================================== --- head/contrib/libc++/src/iostream.cpp Fri Oct 9 17:46:05 2015 (r289071) +++ head/contrib/libc++/src/iostream.cpp Fri Oct 9 18:21:45 2015 (r289072) @@ -86,3 +86,4 @@ ios_base::Init::~Init() } _LIBCPP_END_NAMESPACE_STD + Modified: head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Oct 9 17:46:05 2015 (r289071) +++ head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Oct 9 18:21:45 2015 (r289072) @@ -1642,10 +1642,8 @@ bool BoUpSLP::isFullyVectorizableTinyTre if (VectorizableTree.size() != 2) return false; - // Handle splat and all-constants stores. - if (!VectorizableTree[0].NeedToGather && - (allConstant(VectorizableTree[1].Scalars) || - isSplat(VectorizableTree[1].Scalars))) + // Handle splat stores. + if (!VectorizableTree[0].NeedToGather && isSplat(VectorizableTree[1].Scalars)) return true; // Gathering cost would be too much for tiny trees. From owner-svn-src-all@freebsd.org Fri Oct 9 18:23:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D76929D295C; Fri, 9 Oct 2015 18:23:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F7D683F; Fri, 9 Oct 2015 18:23:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99INAIA056237; Fri, 9 Oct 2015 18:23:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99INAdJ056236; Fri, 9 Oct 2015 18:23:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091823.t99INAdJ056236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 18:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289073 - head/contrib/libc++/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 18:23:11 -0000 Author: dim Date: Fri Oct 9 18:23:10 2015 New Revision: 289073 URL: https://svnweb.freebsd.org/changeset/base/289073 Log: Remove empty line again from libc++'s iostream.cpp. This was used to force updates to this file, so it will be rebuilt by the fixed clang from r289072. Modified: head/contrib/libc++/src/iostream.cpp Modified: head/contrib/libc++/src/iostream.cpp ============================================================================== --- head/contrib/libc++/src/iostream.cpp Fri Oct 9 18:21:45 2015 (r289072) +++ head/contrib/libc++/src/iostream.cpp Fri Oct 9 18:23:10 2015 (r289073) @@ -86,4 +86,3 @@ ios_base::Init::~Init() } _LIBCPP_END_NAMESPACE_STD - From owner-svn-src-all@freebsd.org Fri Oct 9 18:39:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EA4B9D1856; Fri, 9 Oct 2015 18:39:54 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF6D08E3; Fri, 9 Oct 2015 18:39:53 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Idqmi061660; Fri, 9 Oct 2015 18:39:52 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99IdqVK061659; Fri, 9 Oct 2015 18:39:52 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201510091839.t99IdqVK061659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Fri, 9 Oct 2015 18:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289075 - head/libexec/rtld-elf/powerpc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 18:39:54 -0000 Author: kan Date: Fri Oct 9 18:39:52 2015 New Revision: 289075 URL: https://svnweb.freebsd.org/changeset/base/289075 Log: Remove some trailing space. Modified: head/libexec/rtld-elf/powerpc64/reloc.c Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Fri Oct 9 18:26:24 2015 (r289074) +++ head/libexec/rtld-elf/powerpc64/reloc.c Fri Oct 9 18:39:52 2015 (r289075) @@ -250,11 +250,11 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, } *(Elf_Addr **)where = *where * sizeof(Elf_Addr) - + (Elf_Addr *)(def->st_value + rela->r_addend + + (Elf_Addr *)(def->st_value + rela->r_addend + defobj->tlsoffset - TLS_TP_OFFSET); - + break; - + case R_PPC64_DTPREL64: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, flags, cache, lockstate); @@ -262,11 +262,11 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, if (def == NULL) return (-1); - *where += (Elf_Addr)(def->st_value + rela->r_addend + *where += (Elf_Addr)(def->st_value + rela->r_addend - TLS_DTV_OFFSET); break; - + default: _rtld_error("%s: Unsupported relocation type %ld" " in non-PLT relocations\n", obj->path, From owner-svn-src-all@freebsd.org Fri Oct 9 18:26:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A3F59D2B75; Fri, 9 Oct 2015 18:26:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6644DA2D; Fri, 9 Oct 2015 18:26:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99IQOiC056384; Fri, 9 Oct 2015 18:26:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99IQOUj056383; Fri, 9 Oct 2015 18:26:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510091826.t99IQOUj056383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Oct 2015 18:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289074 - head/contrib/elftoolchain/addr2line X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 09 Oct 2015 19:11:56 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 18:26:25 -0000 Author: emaste Date: Fri Oct 9 18:26:24 2015 New Revision: 289074 URL: https://svnweb.freebsd.org/changeset/base/289074 Log: addr2line: initialize die to NULL GCC on MIPS produced a 'may be used uninitialized' warning after r289071. Reported by: sbruno Pointy hat to: emaste Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Fri Oct 9 18:23:10 2015 (r289073) +++ head/contrib/elftoolchain/addr2line/addr2line.c Fri Oct 9 18:26:24 2015 (r289074) @@ -228,6 +228,7 @@ translate(Dwarf_Debug dbg, const char* a addr += section_base; lineno = 0; file = unknown; + die = NULL; lbuf = NULL; lcount = 0; From owner-svn-src-all@freebsd.org Fri Oct 9 19:18:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1139D2129; Fri, 9 Oct 2015 19:18:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C7188EA; Fri, 9 Oct 2015 19:18:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99JI2hX073654; Fri, 9 Oct 2015 19:18:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99JI23t073653; Fri, 9 Oct 2015 19:18:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510091918.t99JI23t073653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 9 Oct 2015 19:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289077 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 19:18:03 -0000 Author: bdrewery Date: Fri Oct 9 19:18:02 2015 New Revision: 289077 URL: https://svnweb.freebsd.org/changeset/base/289077 Log: The fmake fix in r289049 was wrong. Need to use a real variable for .if checks rather than the iteration variable. Tested this pattern more (rather than just looking for error) and found the right behavior. Modified: stable/10/release/Makefile.vagrant Modified: stable/10/release/Makefile.vagrant ============================================================================== --- stable/10/release/Makefile.vagrant Fri Oct 9 18:39:55 2015 (r289076) +++ stable/10/release/Makefile.vagrant Fri Oct 9 19:18:02 2015 (r289077) @@ -24,7 +24,8 @@ VAGRANT_VERSION!= date +%Y.%m.%d VAGRANT_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} .if !empty(CLOUDWARE) . for _PROVIDER in ${CLOUDWARE} -. if !empty(${_PROVIDER:MVAGRANT*}) +_provider= ${_PROVIDER} +. if ${_provider:MVAGRANT*} VAGRANT_PROVIDERS+= ${_PROVIDER:S/VAGRANT-//:tl} . endif . endfor @@ -51,6 +52,7 @@ vagrant-check-depends: .endif .for PROVIDER in ${VAGRANT_PROVIDERS} +_provider= ${PROVIDER} CLEANFILES+= vagrant-do-package-${PROVIDER} ${VAGRANT_TARGET}.${PROVIDER}.box CLEANDIRS+= ${PROVIDER} VAGRANT_UPLOAD_TGTS+= vagrant-do-upload-${PROVIDER} @@ -61,19 +63,19 @@ ${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box: ${PROVIDER} cw-vagrant-${PROVIDER} vagrant-create-${PROVIDER}-metadata @echo "==> PACKAGING: ${VAGRANT_TARGET}.${PROVIDER}.box in `pwd`" @cp vagrant-${PROVIDER}.vmdk ${PROVIDER}/vagrant.vmdk -. if !empty(${PROVIDER:Mvirtualbox}) +. if ${_provider} == virtualbox @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}"}' > metadata.json) @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json box.ovf vagrant.vmdk) -. elif !empty(${PROVIDER:Mvmware}) +. elif ${_provider} == vmware @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}_desktop"}' > metadata.json) @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json vagrant.vmx vagrant.vmdk) . endif CLEANFILES+= vagrant-do-upload-${PROVIDER} vagrant-do-upload-${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box -. if !empty(${PROVIDER:Mvirtualbox}) +. if ${_provider} == virtualbox ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER} -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} -. elif !empty(${PROVIDER:Mvmware}) +. elif ${_provider} == vmware ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER}_desktop -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} . endif touch ${.OBJDIR}/${.TARGET} From owner-svn-src-all@freebsd.org Fri Oct 9 19:36:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EE7C9D2DBE; Fri, 9 Oct 2015 19:36:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCDF7923; Fri, 9 Oct 2015 19:36:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Ja6GD079462; Fri, 9 Oct 2015 19:36:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Ja69d079461; Fri, 9 Oct 2015 19:36:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091936.t99Ja69d079461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 19:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289078 - in stable: 10/contrib/binutils/opcodes 9/contrib/binutils/opcodes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 19:36:08 -0000 Author: dim Date: Fri Oct 9 19:36:06 2015 New Revision: 289078 URL: https://svnweb.freebsd.org/changeset/base/289078 Log: MFC r288099: In binutils' arm-dis.c, avoid left-shifting a negative number. Submitted by: dan.mcgregor_usask.ca (Dan McGregor) Differential Revision: https://reviews.freebsd.org/D3376 Modified: stable/9/contrib/binutils/opcodes/arm-dis.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/opcodes/arm-dis.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/binutils/opcodes/arm-dis.c ============================================================================== --- stable/9/contrib/binutils/opcodes/arm-dis.c Fri Oct 9 19:18:02 2015 (r289077) +++ stable/9/contrib/binutils/opcodes/arm-dis.c Fri Oct 9 19:36:06 2015 (r289078) @@ -1767,7 +1767,7 @@ print_insn_coprocessor (bfd_vma pc, stru /* Is ``imm'' a negative number? */ if (imm & 0x40) - imm |= (-1 << 7); + imm |= -(1 << 7); func (stream, "%d", imm); } From owner-svn-src-all@freebsd.org Fri Oct 9 19:36:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41AF29D2DC3; Fri, 9 Oct 2015 19:36:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E7D7924; Fri, 9 Oct 2015 19:36:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Ja7WK079468; Fri, 9 Oct 2015 19:36:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Ja7k9079467; Fri, 9 Oct 2015 19:36:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091936.t99Ja7k9079467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 19:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289078 - in stable: 10/contrib/binutils/opcodes 9/contrib/binutils/opcodes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 19:36:08 -0000 Author: dim Date: Fri Oct 9 19:36:06 2015 New Revision: 289078 URL: https://svnweb.freebsd.org/changeset/base/289078 Log: MFC r288099: In binutils' arm-dis.c, avoid left-shifting a negative number. Submitted by: dan.mcgregor_usask.ca (Dan McGregor) Differential Revision: https://reviews.freebsd.org/D3376 Modified: stable/10/contrib/binutils/opcodes/arm-dis.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/binutils/opcodes/arm-dis.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/10/contrib/binutils/opcodes/arm-dis.c ============================================================================== --- stable/10/contrib/binutils/opcodes/arm-dis.c Fri Oct 9 19:18:02 2015 (r289077) +++ stable/10/contrib/binutils/opcodes/arm-dis.c Fri Oct 9 19:36:06 2015 (r289078) @@ -1767,7 +1767,7 @@ print_insn_coprocessor (bfd_vma pc, stru /* Is ``imm'' a negative number? */ if (imm & 0x40) - imm |= (-1 << 7); + imm |= -(1 << 7); func (stream, "%d", imm); } From owner-svn-src-all@freebsd.org Fri Oct 9 19:38:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 309039D2FAF; Fri, 9 Oct 2015 19:38: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 EF0A2C85; Fri, 9 Oct 2015 19:38: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 t99Jcsk8079622; Fri, 9 Oct 2015 19:38:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99JcsCN079621; Fri, 9 Oct 2015 19:38:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091938.t99JcsCN079621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 19:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289079 - in stable: 10/lib/libc++ 9/lib/libc++ X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 19:38:55 -0000 Author: dim Date: Fri Oct 9 19:38:53 2015 New Revision: 289079 URL: https://svnweb.freebsd.org/changeset/base/289079 Log: MFC r288953: Stop linking libc++.so verbosely, there is no need to. Modified: stable/9/lib/libc++/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc++/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libc++/Makefile ============================================================================== --- stable/9/lib/libc++/Makefile Fri Oct 9 19:36:06 2015 (r289078) +++ stable/9/lib/libc++/Makefile Fri Oct 9 19:38:53 2015 (r289079) @@ -62,7 +62,6 @@ CXXFLAGS+= -std=c++11 DPADD= ${LIBCXXRT} LDADD= -lcxxrt -LDFLAGS+= --verbose INCSGROUPS= STD EXP EXT STD_HEADERS= __bit_reference\ From owner-svn-src-all@freebsd.org Fri Oct 9 19:38:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56EEB9D2FB4; Fri, 9 Oct 2015 19:38: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 255CCC86; Fri, 9 Oct 2015 19:38:55 +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 t99Jcs7x079628; Fri, 9 Oct 2015 19:38:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99JcseD079627; Fri, 9 Oct 2015 19:38:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510091938.t99JcseD079627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 19:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289079 - in stable: 10/lib/libc++ 9/lib/libc++ X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 19:38:55 -0000 Author: dim Date: Fri Oct 9 19:38:53 2015 New Revision: 289079 URL: https://svnweb.freebsd.org/changeset/base/289079 Log: MFC r288953: Stop linking libc++.so verbosely, there is no need to. Modified: stable/10/lib/libc++/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libc++/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc++/ (props changed) Modified: stable/10/lib/libc++/Makefile ============================================================================== --- stable/10/lib/libc++/Makefile Fri Oct 9 19:36:06 2015 (r289078) +++ stable/10/lib/libc++/Makefile Fri Oct 9 19:38:53 2015 (r289079) @@ -64,7 +64,6 @@ CXXFLAGS+= -std=c++11 DPADD= ${LIBCXXRT} LDADD= -lcxxrt -LDFLAGS+= --verbose INCSGROUPS= STD EXP EXT STD_HEADERS= __bit_reference\ From owner-svn-src-all@freebsd.org Fri Oct 9 18:39:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9D489D1889; Fri, 9 Oct 2015 18:39:56 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 911438F5; Fri, 9 Oct 2015 18:39:56 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Idt6o061706; Fri, 9 Oct 2015 18:39:55 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Idt4m061704; Fri, 9 Oct 2015 18:39:55 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201510091839.t99Idt4m061704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Fri, 9 Oct 2015 18:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289076 - in head/contrib/elftoolchain: common readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 09 Oct 2015 19:43:53 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 18:39:56 -0000 Author: kan Date: Fri Oct 9 18:39:55 2015 New Revision: 289076 URL: https://svnweb.freebsd.org/changeset/base/289076 Log: Add definitions for MIPS TLS relocations to elftoolchain. This makes our readelf more useful when looking for TLS-related issues. Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Fri Oct 9 18:39:52 2015 (r289075) +++ head/contrib/elftoolchain/common/elfdefinitions.h Fri Oct 9 18:39:55 2015 (r289076) @@ -1659,25 +1659,38 @@ _ELF_DEFINE_RELOC(R_IA_64_DTPREL64MSB, _ELF_DEFINE_RELOC(R_IA_64_DTPREL64LSB, 0xB7) \ _ELF_DEFINE_RELOC(R_IA_64_LTOFF_DTPREL22, 0xBA) -#define _ELF_DEFINE_MIPS_RELOCATIONS() \ -_ELF_DEFINE_RELOC(R_MIPS_NONE, 0) \ -_ELF_DEFINE_RELOC(R_MIPS_16, 1) \ -_ELF_DEFINE_RELOC(R_MIPS_32, 2) \ -_ELF_DEFINE_RELOC(R_MIPS_REL32, 3) \ -_ELF_DEFINE_RELOC(R_MIPS_26, 4) \ -_ELF_DEFINE_RELOC(R_MIPS_HI16, 5) \ -_ELF_DEFINE_RELOC(R_MIPS_LO16, 6) \ -_ELF_DEFINE_RELOC(R_MIPS_GPREL16, 7) \ -_ELF_DEFINE_RELOC(R_MIPS_LITERAL, 8) \ -_ELF_DEFINE_RELOC(R_MIPS_GOT16, 9) \ -_ELF_DEFINE_RELOC(R_MIPS_PC16, 10) \ -_ELF_DEFINE_RELOC(R_MIPS_CALL16, 11) \ -_ELF_DEFINE_RELOC(R_MIPS_GPREL32, 12) \ -_ELF_DEFINE_RELOC(R_MIPS_64, 18) \ -_ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \ -_ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \ -_ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \ -_ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31) +#define _ELF_DEFINE_MIPS_RELOCATIONS() \ +_ELF_DEFINE_RELOC(R_MIPS_NONE, 0) \ +_ELF_DEFINE_RELOC(R_MIPS_16, 1) \ +_ELF_DEFINE_RELOC(R_MIPS_32, 2) \ +_ELF_DEFINE_RELOC(R_MIPS_REL32, 3) \ +_ELF_DEFINE_RELOC(R_MIPS_26, 4) \ +_ELF_DEFINE_RELOC(R_MIPS_HI16, 5) \ +_ELF_DEFINE_RELOC(R_MIPS_LO16, 6) \ +_ELF_DEFINE_RELOC(R_MIPS_GPREL16, 7) \ +_ELF_DEFINE_RELOC(R_MIPS_LITERAL, 8) \ +_ELF_DEFINE_RELOC(R_MIPS_GOT16, 9) \ +_ELF_DEFINE_RELOC(R_MIPS_PC16, 10) \ +_ELF_DEFINE_RELOC(R_MIPS_CALL16, 11) \ +_ELF_DEFINE_RELOC(R_MIPS_GPREL32, 12) \ +_ELF_DEFINE_RELOC(R_MIPS_64, 18) \ +_ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \ +_ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \ +_ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \ +_ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32 38) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32 39) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64 40) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64 41) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_GD 42) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM 43) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16 44) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16 45) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL 46) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32 47) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64 48) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16 49) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16 50) #define _ELF_DEFINE_PPC32_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_PPC_NONE, 0) \ Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Oct 9 18:39:52 2015 (r289075) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Oct 9 18:39:55 2015 (r289076) @@ -1295,6 +1295,20 @@ r_type(unsigned int mach, unsigned int t case 22: return "R_MIPS_GOTLO16"; case 30: return "R_MIPS_CALLHI16"; case 31: return "R_MIPS_CALLLO16"; + case 38: return "R_MIPS_TLS_DTPMOD32"; + case 39: return "R_MIPS_TLS_DTPREL32"; + case 40: return "R_MIPS_TLS_DTPMOD64"; + case 41: return "R_MIPS_TLS_DTPREL64"; + case 42: return "R_MIPS_TLS_GD"; + case 43: return "R_MIPS_TLS_LDM"; + case 44: return "R_MIPS_TLS_DTPREL_HI16"; + case 45: return "R_MIPS_TLS_DTPREL_LO16"; + case 46: return "R_MIPS_TLS_GOTTPREL"; + case 47: return "R_MIPS_TLS_TPREL32"; + case 48: return "R_MIPS_TLS_TPREL64"; + case 49: return "R_MIPS_TLS_TPREL_HI16"; + case 50: return "R_MIPS_TLS_TPREL_LO16"; + default: return ""; } case EM_PPC: From owner-svn-src-all@freebsd.org Fri Oct 9 20:47:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BA0A9D3D65; Fri, 9 Oct 2015 20:47:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07DAEA2F; Fri, 9 Oct 2015 20:47:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99KlUiC000190; Fri, 9 Oct 2015 20:47:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99KlU2a000188; Fri, 9 Oct 2015 20:47:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510092047.t99KlU2a000188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 9 Oct 2015 20:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289080 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 20:47:31 -0000 Author: bdrewery Date: Fri Oct 9 20:47:29 2015 New Revision: 289080 URL: https://svnweb.freebsd.org/changeset/base/289080 Log: Let -c imply -S (hide signal output). Without this, the signals are shown seemingly randomly in the output before the final summary is shown. This is especially noticeable when there is not much output from the application being traced. Discussed with: jhb Relnotes: yes Modified: head/usr.bin/truss/main.c head/usr.bin/truss/truss.1 Modified: head/usr.bin/truss/main.c ============================================================================== --- head/usr.bin/truss/main.c Fri Oct 9 19:38:53 2015 (r289079) +++ head/usr.bin/truss/main.c Fri Oct 9 20:47:29 2015 (r289080) @@ -111,7 +111,7 @@ main(int ac, char **av) trussinfo->flags |= EXECVEARGS; break; case 'c': /* Count number of system calls and time. */ - trussinfo->flags |= COUNTONLY; + trussinfo->flags |= (COUNTONLY | NOSIGS); break; case 'e': /* Print execve() environment strings. */ trussinfo->flags |= EXECVEENVS; Modified: head/usr.bin/truss/truss.1 ============================================================================== --- head/usr.bin/truss/truss.1 Fri Oct 9 19:38:53 2015 (r289079) +++ head/usr.bin/truss/truss.1 Fri Oct 9 20:47:29 2015 (r289080) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd October 5, 2015 +.Dd October 9, 2015 .Dt TRUSS 1 .Os .Sh NAME @@ -37,7 +37,7 @@ Show the argument strings that are passe .Xr execve 2 system call. .It Fl c -Do not display individual system calls. +Do not display individual system calls or signals. Instead, before exiting, print a summary containing for each system call: the total system time used, the number of times the call was invoked, From owner-svn-src-all@freebsd.org Fri Oct 9 21:00:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B06B9D16F8; Fri, 9 Oct 2015 21:00:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B24651821; Fri, 9 Oct 2015 21:00:05 +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 t99L040G003769; Fri, 9 Oct 2015 21:00:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99L04WJ003768; Fri, 9 Oct 2015 21:00:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510092100.t99L04WJ003768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 21:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289081 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:00:06 -0000 Author: dim Date: Fri Oct 9 21:00:04 2015 New Revision: 289081 URL: https://svnweb.freebsd.org/changeset/base/289081 Log: Add llvm patch corresponding to r289072. Added: head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff Added: head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff Fri Oct 9 21:00:04 2015 (r289081) @@ -0,0 +1,50 @@ +Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): + + [SLP] Vectorize for all-constant entries. + +This should fix libc++'s iostream initialization SIGBUSing whenever the +global cout symbol is not aligned to 16 bytes. + +Introduced here: http://svnweb.freebsd.org/changeset/base/289072 + +Index: lib/Transforms/Vectorize/SLPVectorizer.cpp +=================================================================== +--- lib/Transforms/Vectorize/SLPVectorizer.cpp ++++ lib/Transforms/Vectorize/SLPVectorizer.cpp +@@ -1642,10 +1642,8 @@ bool BoUpSLP::isFullyVectorizableTinyTree() { + if (VectorizableTree.size() != 2) + return false; + +- // Handle splat and all-constants stores. +- if (!VectorizableTree[0].NeedToGather && +- (allConstant(VectorizableTree[1].Scalars) || +- isSplat(VectorizableTree[1].Scalars))) ++ // Handle splat stores. ++ if (!VectorizableTree[0].NeedToGather && isSplat(VectorizableTree[1].Scalars)) + return true; + + // Gathering cost would be too much for tiny trees. +Index: test/Transforms/SLPVectorizer/X86/tiny-tree.ll +=================================================================== +--- test/Transforms/SLPVectorizer/X86/tiny-tree.ll ++++ test/Transforms/SLPVectorizer/X86/tiny-tree.ll +@@ -153,19 +153,3 @@ define void @store_splat(float*, float) { + store float %1, float* %6, align 4 + ret void + } +- +- +-; CHECK-LABEL: store_const +-; CHECK: store <4 x i32> +-define void @store_const(i32* %a) { +-entry: +- %ptr0 = getelementptr inbounds i32, i32* %a, i64 0 +- store i32 10, i32* %ptr0, align 4 +- %ptr1 = getelementptr inbounds i32, i32* %a, i64 1 +- store i32 30, i32* %ptr1, align 4 +- %ptr2 = getelementptr inbounds i32, i32* %a, i64 2 +- store i32 20, i32* %ptr2, align 4 +- %ptr3 = getelementptr inbounds i32, i32* %a, i64 3 +- store i32 40, i32* %ptr3, align 4 +- ret void +-} From owner-svn-src-all@freebsd.org Fri Oct 9 21:04:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 984199D1AD9; Fri, 9 Oct 2015 21:04:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE531DC1; Fri, 9 Oct 2015 21:04:30 +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 t99L4Tsp006527; Fri, 9 Oct 2015 21:04:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99L4Sag006522; Fri, 9 Oct 2015 21:04:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510092104.t99L4Sag006522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 21:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289082 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:04:30 -0000 Author: dim Date: Fri Oct 9 21:04:28 2015 New Revision: 289082 URL: https://svnweb.freebsd.org/changeset/base/289082 Log: Pull in r242623 from upstream libc++ trunk (by Eric Fiselier): Enable and fix warnings during the build. Although CMake adds warning flags, they are ignored in the libc++ headers because the headers '#pragma system header' themselves. This patch disables the system header pragma when building libc++ and fixes the warnings that arose. The warnings fixed were: 1. - anonymous structs are a GNU extension 2. - anonymous structs are a GNU extension. 3. <__hash_table> - Embedded preprocessor directives have undefined behavior. 4. - Definition is missing noexcept from declaration. 5. <__std_stream> - Unused variable. This should fix building world (in particular libatf-c++) with -std=c++11. Reported by: Oliver Hartmann Modified: head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__std_stream head/contrib/libc++/include/functional head/contrib/libc++/include/memory head/contrib/libc++/include/string Modified: head/contrib/libc++/include/__hash_table ============================================================================== --- head/contrib/libc++/include/__hash_table Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__hash_table Fri Oct 9 21:04:28 2015 (r289082) @@ -984,15 +984,17 @@ public: __equal_range_multi(const _Key& __k) const; void swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ); +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value); +#endif _LIBCPP_INLINE_VISIBILITY size_type max_bucket_count() const _NOEXCEPT @@ -2351,15 +2353,17 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> template void __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ) +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) +#endif { { __node_pointer_pointer __npp = __bucket_list_.release(); Modified: head/contrib/libc++/include/__std_stream ============================================================================== --- head/contrib/libc++/include/__std_stream Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__std_stream Fri Oct 9 21:04:28 2015 (r289082) @@ -276,7 +276,6 @@ __stdoutbuf<_CharT>::overflow(int_type _ codecvt_base::result __r; char_type* pbase = &__1buf; char_type* pptr = pbase + 1; - char_type* epptr = pptr; do { const char_type* __e; Modified: head/contrib/libc++/include/functional ============================================================================== --- head/contrib/libc++/include/functional Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/functional Fri Oct 9 21:04:28 2015 (r289082) @@ -2402,14 +2402,14 @@ struct _LIBCPP_TYPE_VIS_ONLY hash::operator()(__v); #endif Modified: head/contrib/libc++/include/memory ============================================================================== --- head/contrib/libc++/include/memory Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/memory Fri Oct 9 21:04:28 2015 (r289082) @@ -3420,7 +3420,7 @@ struct __scalar_hash<_Tp, 2> { size_t __a; size_t __b; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3442,7 +3442,7 @@ struct __scalar_hash<_Tp, 3> size_t __a; size_t __b; size_t __c; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3465,7 +3465,7 @@ struct __scalar_hash<_Tp, 4> size_t __b; size_t __c; size_t __d; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); Modified: head/contrib/libc++/include/string ============================================================================== --- head/contrib/libc++/include/string Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/string Fri Oct 9 21:04:28 2015 (r289082) @@ -1936,7 +1936,12 @@ basic_string<_CharT, _Traits, _Allocator template inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) - : __r_(__a) +#if _LIBCPP_STD_VER <= 14 + _NOEXCEPT_(is_nothrow_copy_constructible::value) +#else + _NOEXCEPT +#endif +: __r_(__a) { #if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__insert_c(this); From owner-svn-src-all@freebsd.org Fri Oct 9 21:27:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6C909D28E5; Fri, 9 Oct 2015 21:27:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92DC5C9D; Fri, 9 Oct 2015 21:27:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99LRUdc012723; Fri, 9 Oct 2015 21:27:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99LRU06012722; Fri, 9 Oct 2015 21:27:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092127.t99LRU06012722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 21:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289083 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:27:31 -0000 Author: ian Date: Fri Oct 9 21:27:30 2015 New Revision: 289083 URL: https://svnweb.freebsd.org/changeset/base/289083 Log: Style and whitespace cleanups. The only functional change is removal of a printf that appears to be left over from development debugging. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Fri Oct 9 21:04:28 2015 (r289082) +++ head/sys/dev/iicbus/icee.c Fri Oct 9 21:27:30 2015 (r289083) @@ -84,7 +84,7 @@ static struct cdevsw icee_cdevsw = static int icee_probe(device_t dev) { - /* XXX really probe? -- not until we know the size... */ + device_set_desc(dev, "I2C EEPROM"); return (BUS_PROBE_NOWILDCARD); } @@ -118,7 +118,7 @@ icee_attach(device_t dev) } sc->cdev->si_drv1 = sc; ICEE_LOCK_INIT(sc); -out:; +out: return (err); } @@ -126,7 +126,7 @@ static int icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { - return (0); + return (0); } static int @@ -241,18 +241,14 @@ icee_write(struct cdev *dev, struct uio error = iicbus_transfer(sc->sc_dev, wr, 1); if (error) break; - // Now wait for the write to be done by trying to read - // the part. + /* Read after write to wait for write-done. */ waitlimit = 10000; rd[0].slave = slave; - do - { - error = iicbus_transfer(sc->sc_dev, rd, 1); + do { + error = iicbus_transfer(sc->sc_dev, rd, 1); } while (waitlimit-- > 0 && error != 0); - if (error) { - printf("waiting for write failed %d\n", error); - break; - } + if (error) + break; } ICEE_UNLOCK(sc); return error; From owner-svn-src-all@freebsd.org Fri Oct 9 21:34:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CFF49D2DED; Fri, 9 Oct 2015 21:34:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD4D1E2; Fri, 9 Oct 2015 21:34:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99LYkXe015617; Fri, 9 Oct 2015 21:34:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99LYkEd015616; Fri, 9 Oct 2015 21:34:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092134.t99LYkEd015616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 21:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289084 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:34:47 -0000 Author: ian Date: Fri Oct 9 21:34:46 2015 New Revision: 289084 URL: https://svnweb.freebsd.org/changeset/base/289084 Log: Bugfix: Exit the transfer loop if any read or write operation fails. Also, perform a stop operation on the bus if there was an error, otherwise the bus will remain hung forever. Consistantly use 'if (error != 0)' style in the function. Modified: head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Fri Oct 9 21:27:30 2015 (r289083) +++ head/sys/dev/iicbus/iiconf.c Fri Oct 9 21:34:46 2015 (r289084) @@ -397,8 +397,7 @@ iicbus_transfer_gen(device_t dev, struct else error = iicbus_start(bus, addr, 0); } - - if (error) + if (error != 0) break; if (msgs[i].flags & IIC_M_RD) @@ -407,6 +406,8 @@ iicbus_transfer_gen(device_t dev, struct else error = iicbus_write(bus, msgs[i].buf, msgs[i].len, &lenwrote, 0); + if (error != 0) + break; if ((msgs[i].flags & IIC_M_NOSTOP) != 0 || (nostop && i + 1 < nmsgs)) { @@ -416,5 +417,7 @@ iicbus_transfer_gen(device_t dev, struct iicbus_stop(bus); } } + if (error != 0 && !nostop) + iicbus_stop(bus); return (error); } From owner-svn-src-all@freebsd.org Fri Oct 9 21:57:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ACE89D3D2D; Fri, 9 Oct 2015 21:57:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46F2B127; Fri, 9 Oct 2015 21:57:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Lvh28022048; Fri, 9 Oct 2015 21:57:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Lvgfu022041; Fri, 9 Oct 2015 21:57:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092157.t99Lvgfu022041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 21:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289085 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:57:44 -0000 Author: bapt Date: Fri Oct 9 21:57:42 2015 New Revision: 289085 URL: https://svnweb.freebsd.org/changeset/base/289085 Log: Add a new bsd.confs.mk similar to bsd.files.mk or bsd.incs.mk It defines a CONFS variable for all files supposed to be installed as a configuration file and handle as such Added: head/share/mk/bsd.confs.mk (contents, props changed) Modified: head/share/mk/bsd.README head/share/mk/bsd.lib.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk head/share/mk/bsd.progs.mk head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.README Fri Oct 9 21:57:42 2015 (r289085) @@ -18,6 +18,7 @@ bsd.lib.mk. bsd.arch.inc.mk - includes arch-specific Makefile.$arch bsd.compiler.mk - defined based on current compiler +bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents Added: head/share/mk/bsd.confs.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.confs.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -0,0 +1,87 @@ +# $FreeBSD$ + +.if !target(____) +.error bsd.conf.mk cannot be included directly. +.endif + +.if ${MK_INCLUDES} != "no" +CONFGROUPS?= CONFS + +.if !target(buildconfig) +.for group in ${CONFSGROUPS} +buildconfig: ${${group}} +.endfor +.endif + +all: buildconfig + +.if !target(installconfig) +.for group in ${CONFGROUPS} +.if defined(${group}) && !empty(${group}) + +${group}OWN?= ${SHAREOWN} +${group}GRP?= ${SHAREGRP} +${group}MODE?= ${SHAREMODE} +${group}DIR?= ${ETCDIR}/ +STAGE_SETS+= ${group} +STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} +STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} + +_${group}CONFS= +.for cnf in ${${group}} +.if defined(${group}OWN_${cnf:T}) || defined(${group}GRP_${cnf:T}) || \ + defined(${group}MODE_${cnf:T}) || defined(${group}DIR_${cnf:T}) || \ + defined(${group}NAME_${cnf:T}) || defined(${group}NAME) +${group}OWN_${cnf:T}?= ${${group}OWN} +${group}GRP_${cnf:T}?= ${${group}GRP} +${group}MODE_${cnf:T}?= ${${group}MODE} +${group}DIR_${cnf:T}?= ${${group}DIR} +.if defined(${group}NAME) +${group}NAME_${cnf:T}?= ${${group}NAME} +.else +${group}NAME_${cnf:T}?= ${cnf:T} +.endif +STAGE_AS_SETS+= ${cnf:T} +STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} +# XXX {group}OWN,GRP,MODE +STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} +stage_as.${cnf:T}: ${cnf} +stage_config: stage_as.${cnf:T} + +installconfig: _${group}INS_${cnf:T} +_${group}INS_${cnf:T}: ${cnf} + ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ + -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ + ${.ALLSRC} \ + ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} +.else +_${group}CONFS+= ${cnf} +.endif +.endfor +.if !empty(_${group}CONFS) +stage_files.${group}: ${_${group}CONFS} +stage_config: stage_files.${group} + +installconfig: _${group}INS +_${group}INS: ${_${group}CONFS} +.if defined(${group}NAME) + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} +.else + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${.ALLSRC} ${DESTDIR}${${group}DIR} +.endif +.endif + +.endif # defined(${group}) && !empty(${group}) +.endfor + +.endif # !target(installconfig) + +.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) +.if !defined(NO_STAGE_CONFIG) +STAGE_TARGETS+= stage_config +.endif +.endif + +.endif # ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.lib.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -390,6 +390,7 @@ _libinstall: .include .include .include +.include .endif .include Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.own.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -213,6 +213,7 @@ NLSGRP?= ${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include +ETCDIR?= /etc # # install(1) parameters. Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.prog.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -249,6 +249,7 @@ _SCRIPTSINS_${script:T}: ${script} NLSNAME?= ${PROG} .include +.include .include .include .include Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.progs.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -71,7 +71,7 @@ UPDATE_DEPENDFILE = NO # These are handled by the main make process. .ifdef _RECURSING_PROGS -_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS CONFGROUPS .for v in ${_PROGS_GLOBAL_VARS} $v = .endfor Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Oct 9 21:34:46 2015 (r289084) +++ head/share/mk/bsd.subdir.mk Fri Oct 9 21:57:42 2015 (r289085) @@ -122,7 +122,7 @@ _sub.${__target}: _SUBDIR .endif .endfor -.for __target in files includes +.for __target in files includes config .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) From owner-svn-src-all@freebsd.org Fri Oct 9 22:02:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBD2C9D3FF3; Fri, 9 Oct 2015 22:02:17 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63DAD801; Fri, 9 Oct 2015 22:02:17 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so84002019wic.1; Fri, 09 Oct 2015 15:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=2K3CzXCBoiuWw4v6IbwV/YvhhhntqdgXNe2gE7jffkI=; b=An/zTO7+HXEMQU8MwfxgkFCeTykkV5gGfYqFMwCBmNzQyB3r77+rlhW4+7rANvcRFW dNKqhathstQ+OY/Ur6nzgg9j3ooIgsC9tMd+X+yAciMYPWLprJ3IgB0a8RHJQc9adJ1N +g5NhH3EVe9UEP/wUyxyQY/Ob340jYzPBs5zkmHwkFlmOhKc0T5UinYjCgH7nG+LY6lw jmeDCEGI1D4+wIfNrvANyqHvRXSZim2sk+LJXuJMASn2yw18V5Fo6ooyIw99C+DI0ph3 gsNRVpsDphu4vN2gFIT/S1YrZhvJddskY/UYweiWLNCBW1i6x3lws21fgHziCnMsvRFH WpKw== X-Received: by 10.194.80.71 with SMTP id p7mr16116242wjx.83.1444428135986; Fri, 09 Oct 2015 15:02:15 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id q1sm1763028wjy.31.2015.10.09.15.02.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Oct 2015 15:02:15 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 10 Oct 2015 00:02:13 +0200 From: Baptiste Daroussin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289085 - head/share/mk Message-ID: <20151009220213.GL91729@ivaldir.etoilebsd.net> References: <201510092157.t99Lvgfu022041@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OGLMwEELQbPC02lM" Content-Disposition: inline In-Reply-To: <201510092157.t99Lvgfu022041@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:02:17 -0000 --OGLMwEELQbPC02lM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 09, 2015 at 09:57:42PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Oct 9 21:57:42 2015 > New Revision: 289085 > URL: https://svnweb.freebsd.org/changeset/base/289085 >=20 > Log: > Add a new bsd.confs.mk similar to bsd.files.mk or bsd.incs.mk > =20 > It defines a CONFS variable for all files supposed to be installed as a > configuration file and handle as such >=20 Erg commit has gone too fast I forgot to mention: Needed to simplify packaging base and help marking (tags) files as configur= ation files (to be merged) Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D3850 --OGLMwEELQbPC02lM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYYOWUACgkQ8kTtMUmk6Ex86wCgssmCvmwLEdAPrwBx37OFf6yH YWsAn3zxBDMghhsNkqjnDqxrZUioefop =u3Xe -----END PGP SIGNATURE----- --OGLMwEELQbPC02lM-- From owner-svn-src-all@freebsd.org Fri Oct 9 22:05:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24CD9D11C0; Fri, 9 Oct 2015 22:05:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C131A58; Fri, 9 Oct 2015 22:05:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99M5VkK025030; Fri, 9 Oct 2015 22:05:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99M5Vq6025029; Fri, 9 Oct 2015 22:05:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092205.t99M5Vq6025029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 22:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289086 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:05:32 -0000 Author: bapt Date: Fri Oct 9 22:05:31 2015 New Revision: 289086 URL: https://svnweb.freebsd.org/changeset/base/289086 Log: Change make distribution so that it now call installconfig in all dirs along with the current behaviour of calling "distribution" in the etc target. This allows mergemaster/etcupdate to still work when some configuration will be moved to be handled in the same directories their source code lives in. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 9 21:57:42 2015 (r289085) +++ head/Makefile.inc1 Fri Oct 9 22:05:31 2015 (r289086) @@ -996,10 +996,15 @@ redistribute: .MAKE DISTRIBUTION=lib32 .endif -distrib-dirs distribution: .MAKE +distrib-dirs: .MAKE cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} +distribution: .MAKE + cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 installconfig + # # buildkernel and installkernel # From owner-svn-src-all@freebsd.org Fri Oct 9 22:09:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3A209D1435; Fri, 9 Oct 2015 22:09:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7501ACEB; Fri, 9 Oct 2015 22:09:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99M9jmj025409; Fri, 9 Oct 2015 22:09:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99M9iPx025401; Fri, 9 Oct 2015 22:09:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092209.t99M9iPx025401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 22:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:09:46 -0000 Author: bapt Date: Fri Oct 9 22:09:44 2015 New Revision: 289087 URL: https://svnweb.freebsd.org/changeset/base/289087 Log: Move all the dma(8) components into one single directory Simplifying maintainance and options (only one place to deal with MK_DMAGENT) This also makes packaging base less intrusive by getting a single point where to add tags. Added: head/libexec/dma/Makefile.inc (contents, props changed) head/libexec/dma/dma/ head/libexec/dma/dma-mbox-create/ - copied from r289057, head/libexec/dma-mbox-create/ head/libexec/dma/dma/Makefile - copied, changed from r289057, head/libexec/dma/Makefile head/libexec/dma/dma/dma.conf - copied unchanged from r289057, head/etc/dma/dma.conf head/libexec/dma/dma/mailer.conf - copied unchanged from r289057, head/share/examples/dma/mailer.conf Deleted: head/etc/dma/ head/libexec/dma-mbox-create/ head/libexec/dma/Makefile head/share/examples/dma/ Modified: head/etc/Makefile head/libexec/Makefile head/libexec/dma/dma-mbox-create/Makefile head/share/examples/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Oct 9 22:05:31 2015 (r289086) +++ head/etc/Makefile Fri Oct 9 22:09:44 2015 (r289087) @@ -239,9 +239,6 @@ distribution: .endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install -.if ${MK_DMAGENT} != "no" - ${_+_}cd ${.CURDIR}/dma; ${MAKE} install -.endif ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install .if ${MK_PKGBOOTSTRAP} != "no" Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Fri Oct 9 22:05:31 2015 (r289086) +++ head/libexec/Makefile Fri Oct 9 22:09:44 2015 (r289087) @@ -8,7 +8,6 @@ SUBDIR= ${_atf} \ ${_casper} \ ${_comsat} \ ${_dma} \ - ${_dma-mbox-create} \ getty \ ${_mail.local} \ ${_mknetid} \ @@ -56,7 +55,6 @@ _comsat= comsat .if ${MK_DMAGENT} != "no" _dma= dma -_dma-mbox-create= dma-mbox-create .endif .if ${MK_NIS} != "no" Added: head/libexec/dma/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/dma/Makefile.inc Fri Oct 9 22:09:44 2015 (r289087) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.sinclude "${.CURDIR}/../../Makefile.inc" +DMA_SOURCES= ${.CURDIR}/../../../contrib/dma +.PATH: ${DMA_SOURCES} + +CFLAGS= -I${DMA_SOURCES} \ + -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ + -DCONF_PATH='"/etc/dma"' \ + -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ + -DDMA_ROOT_USER='"mailnull"' \ + -DDMA_GROUP='"mail"' +BINGRP= mail Modified: head/libexec/dma/dma-mbox-create/Makefile ============================================================================== --- head/libexec/dma-mbox-create/Makefile Thu Oct 8 21:52:20 2015 (r289057) +++ head/libexec/dma/dma-mbox-create/Makefile Fri Oct 9 22:09:44 2015 (r289087) @@ -1,18 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/dma - -CFLAGS= -I${.CURDIR}/../../contrib/dma \ - -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ - -DCONF_PATH='"/etc/dma"' \ - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' - MAN= WARNS= 2 PROG= dma-mbox-create -BINGRP= mail BINMODE= 4554 .include Copied and modified: head/libexec/dma/dma/Makefile (from r289057, head/libexec/dma/Makefile) ============================================================================== --- head/libexec/dma/Makefile Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/libexec/dma/dma/Makefile Fri Oct 9 22:09:44 2015 (r289087) @@ -1,13 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/dma - -CFLAGS= -I${.CURDIR}/../../contrib/dma \ - -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ - -DCONF_PATH='"/etc/dma"' \ - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ - -DDMA_ROOT_USER='"mailnull"' \ - -DDMA_GROUP='"mail"' LIBADD= ssl crypto PROG= dma @@ -24,10 +16,13 @@ SRCS= aliases_parse.y \ spool.c \ util.c MAN8= dma.8 +CONFS= dma.conf +CONFSDIR= ${ETCDIR}/dma YFLAGS+= -i CLEANFILES= aliases_parse.i +FILES= mailer.conf +FILESDIR= ${SHAREDIR}/examples/dma -BINGRP= mail BINMODE= 2555 .include Copied: head/libexec/dma/dma/dma.conf (from r289057, head/etc/dma/dma.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/dma/dma/dma.conf Fri Oct 9 22:09:44 2015 (r289087, copy of r289057, head/etc/dma/dma.conf) @@ -0,0 +1,64 @@ +# $FreeBSD$ +# +# Your smarthost (also called relayhost). Leave blank if you don't want +# smarthost support. +#SMARTHOST + +# Use this SMTP port. Most users will be fine with the default (25) +#PORT 25 + +# Path to your alias file. Just stay with the default. +#ALIASES /etc/aliases + +# Path to your spooldir. Just stay with the default. +#SPOOLDIR /var/spool/dma + +# SMTP authentication +#AUTHPATH /etc/dma/auth.conf + +# Uncomment if yout want TLS/SSL support +#SECURETRANSFER + +# Uncomment if you want STARTTLS support (only used in combination with +# SECURETRANSFER) +#STARTTLS + +# Uncomment if you have specified STARTTLS above and it should be allowed +# to fail ("opportunistic TLS", use an encrypted connection when available +# but allow an unencrypted one to servers that do not support it) +#OPPORTUNISTIC_TLS + +# Path to your local SSL certificate +#CERTFILE + +# If you want to use plain text SMTP login without using encryption, change +# the SECURE entry below to INSECURE. Otherwise plain login will only work +# over a secure connection. Use this option with caution. +#SECURE + +# Uncomment if you want to defer your mails. This is useful if you are +# behind a dialup line. You have to submit your mails manually with dma -q +#DEFER + +# Uncomment if you want the bounce message to include the complete original +# message, not just the headers. +#FULLBOUNCE + +# The internet hostname dma uses to identify the host. +# If not set or empty, the result of gethostname(2) is used. +# If MAILNAME is an absolute path to a file, the first line of this file +# will be used as the hostname. +#MAILNAME mail.example.net + +# Masquerade envelope from addresses with this address/hostname. +# Use this if mails are not accepted by destination mail servers because +# your sender domain is invalid. +# By default, MASQUERADE is not set. +# Format: MASQUERADE [user@][host] +# Examples: +# MASQUERADE john@ on host "hamlet" will send all mails as john@hamlet +# MASQUERADE percolator will send mails as $username@percolator, e.g. fish@percolator +# MASQUERADE herb@ert will send all mails as herb@ert + +# Directly forward the mail to the SMARTHOST bypassing aliases and local delivery +#NULLCLIENT Copied: head/libexec/dma/dma/mailer.conf (from r289057, head/share/examples/dma/mailer.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/dma/dma/mailer.conf Fri Oct 9 22:09:44 2015 (r289087, copy of r289057, head/share/examples/dma/mailer.conf) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +sendmail /usr/libexec/dma +send-mail /usr/libexec/dma +mailq /usr/libexec/dma Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Fri Oct 9 22:05:31 2015 (r289086) +++ head/share/examples/Makefile Fri Oct 9 22:09:44 2015 (r289087) @@ -255,9 +255,6 @@ SUBDIR+=ipfilter .if ${MK_PF} != "no" SUBDIR+=pf .endif -.if ${MK_DMAGENT} != "no" -SUBDIR+=dma -.endif .endif .if ${MK_TESTS} != "no" From owner-svn-src-all@freebsd.org Fri Oct 9 22:10:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD8B9D14DF; Fri, 9 Oct 2015 22:10:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDC51EC5; Fri, 9 Oct 2015 22:10:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99MAs8J025517; Fri, 9 Oct 2015 22:10:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99MAssm025516; Fri, 9 Oct 2015 22:10:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092210.t99MAssm025516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 22:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289088 - head/libexec/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:10:56 -0000 Author: bapt Date: Fri Oct 9 22:10:54 2015 New Revision: 289088 URL: https://svnweb.freebsd.org/changeset/base/289088 Log: Add missing Makefile Added: head/libexec/dma/Makefile (contents, props changed) Added: head/libexec/dma/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/dma/Makefile Fri Oct 9 22:10:54 2015 (r289088) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +SUBDIR= dma \ + dma-mbox-create + +.include From owner-svn-src-all@freebsd.org Fri Oct 9 22:14:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADCCB9D179D; Fri, 9 Oct 2015 22:14:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70A8111E4; Fri, 9 Oct 2015 22:14:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99ME71l028209; Fri, 9 Oct 2015 22:14:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99ME7Ub028208; Fri, 9 Oct 2015 22:14:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092214.t99ME7Ub028208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 22:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289089 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:14:08 -0000 Author: bapt Date: Fri Oct 9 22:14:07 2015 New Revision: 289089 URL: https://svnweb.freebsd.org/changeset/base/289089 Log: Add installconfig as a top level target Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Oct 9 22:10:54 2015 (r289088) +++ head/Makefile Fri Oct 9 22:14:07 2015 (r289089) @@ -121,7 +121,7 @@ TGTS= all all-man buildenv buildenvvars _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend \ build32 builddtb distribute32 install32 xdev xdev-build xdev-install \ - xdev-links native-xtools \ + xdev-links native-xtools installconfig \ TGTS+= ${SUBDIR_TARGETS} From owner-svn-src-all@freebsd.org Fri Oct 9 22:15:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C1E59D18C6; Fri, 9 Oct 2015 22:15:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132981361; Fri, 9 Oct 2015 22:15:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99MFWsR028297; Fri, 9 Oct 2015 22:15:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99MFWIw028296; Fri, 9 Oct 2015 22:15:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092215.t99MFWIw028296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 22:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289090 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:15:33 -0000 Author: bapt Date: Fri Oct 9 22:15:31 2015 New Revision: 289090 URL: https://svnweb.freebsd.org/changeset/base/289090 Log: Install configuration files with CONFMODE instead of SHAREMODE Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Fri Oct 9 22:14:07 2015 (r289089) +++ head/share/mk/bsd.confs.mk Fri Oct 9 22:15:31 2015 (r289090) @@ -21,7 +21,7 @@ all: buildconfig ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} -${group}MODE?= ${SHAREMODE} +${group}MODE?= ${CONFMODE} ${group}DIR?= ${ETCDIR}/ STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} From owner-svn-src-all@freebsd.org Fri Oct 9 22:49:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3548E9D30B7; Fri, 9 Oct 2015 22:49:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1FD4E38; Fri, 9 Oct 2015 22:49:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99MnoaQ037230; Fri, 9 Oct 2015 22:49:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99MnoGt037223; Fri, 9 Oct 2015 22:49:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092249.t99MnoGt037223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 22:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289093 - in head/sys: arm/freescale/imx arm/freescale/vybrid arm/samsung/exynos dev/iicbus dev/pcf powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:49:52 -0000 Author: ian Date: Fri Oct 9 22:49:50 2015 New Revision: 289093 URL: https://svnweb.freebsd.org/changeset/base/289093 Log: Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. Make it clearer what each one means in the comments that define them. IIC_BUSBSY was used in many places to mean two different things, either "someone else has reserved the bus so you have to wait until they're done" or "the signal level on the bus was not in the state I expected before/after issuing some command". Now IIC_BUSERR is used consistantly to refer to protocol/signaling errors, and IIC_BUSBSY refers to ownership/reservation of the bus. Modified: head/sys/arm/freescale/imx/imx_i2c.c head/sys/arm/freescale/vybrid/vf_i2c.c head/sys/arm/samsung/exynos/exynos5_i2c.c head/sys/dev/iicbus/iicoc.c head/sys/dev/iicbus/iiconf.h head/sys/dev/pcf/pcf.c head/sys/powerpc/mpc85xx/i2c.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/arm/freescale/imx/imx_i2c.c Fri Oct 9 22:49:50 2015 (r289093) @@ -243,7 +243,7 @@ wait_for_xfer(struct i2c_softc *sc, int sr = i2c_read_reg(sc, I2C_STATUS_REG); if (sr & I2CSR_MIF) { if (sr & I2CSR_MAL) - return (IIC_EBUSBSY); + return (IIC_EBUSERR); else if (checkack && (sr & I2CSR_RXAK)) return (IIC_ENOACK); else @@ -350,7 +350,7 @@ i2c_start(device_t dev, u_char slave, in i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); DELAY(10); /* Delay for controller to sample bus state. */ if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) { - return (i2c_error_handler(sc, IIC_EBUSBSY)); + return (i2c_error_handler(sc, IIC_EBUSERR)); } i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX); if ((error = wait_for_busbusy(sc, true)) != IIC_NOERR) Modified: head/sys/arm/freescale/vybrid/vf_i2c.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_i2c.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/arm/freescale/vybrid/vf_i2c.c Fri Oct 9 22:49:50 2015 (r289093) @@ -232,7 +232,7 @@ i2c_repeated_start(device_t dev, u_char if ((READ1(sc, I2C_IBSR) & IBSR_IBB) == 0) { mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set repeated start condition */ @@ -275,7 +275,7 @@ i2c_start(device_t dev, u_char slave, in if (READ1(sc, I2C_IBSR) & IBSR_IBB) { mtx_unlock(&sc->mutex); vf_i2c_dbg(sc, "cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set start condition */ Modified: head/sys/arm/samsung/exynos/exynos5_i2c.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_i2c.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/arm/samsung/exynos/exynos5_i2c.c Fri Oct 9 22:49:50 2015 (r289093) @@ -263,8 +263,8 @@ i2c_start(device_t dev, u_char slave, in error = wait_for_nibb(sc); if (error) { mtx_unlock(&sc->mutex); - DPRINTF("cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + DPRINTF("cant i2c start: IIC_EBUSERR\n"); + return (IIC_EBUSERR); } reg = READ1(sc, I2CCON); Modified: head/sys/dev/iicbus/iicoc.c ============================================================================== --- head/sys/dev/iicbus/iicoc.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/dev/iicbus/iicoc.c Fri Oct 9 22:49:50 2015 (r289093) @@ -236,7 +236,7 @@ iicoc_detach(device_t dev) static int iicoc_start(device_t dev, u_char slave, int timeout) { - int error = IIC_EBUSBSY; + int error = IIC_EBUSERR; struct iicoc_softc *sc; sc = device_get_softc(dev); Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/dev/iicbus/iiconf.h Fri Oct 9 22:49:50 2015 (r289093) @@ -82,10 +82,10 @@ * adapter layer errors */ #define IIC_NOERR 0x0 /* no error occured */ -#define IIC_EBUSERR 0x1 /* bus error */ +#define IIC_EBUSERR 0x1 /* bus error (hardware not in expected state) */ #define IIC_ENOACK 0x2 /* ack not received until timeout */ #define IIC_ETIMEOUT 0x3 /* timeout */ -#define IIC_EBUSBSY 0x4 /* bus busy */ +#define IIC_EBUSBSY 0x4 /* bus busy (reserved by another client) */ #define IIC_ESTATUS 0x5 /* status error */ #define IIC_EUNDERFLOW 0x6 /* slave ready for more data */ #define IIC_EOVERFLOW 0x7 /* too much data */ Modified: head/sys/dev/pcf/pcf.c ============================================================================== --- head/sys/dev/pcf/pcf.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/dev/pcf/pcf.c Fri Oct 9 22:49:50 2015 (r289093) @@ -170,7 +170,7 @@ pcf_start(device_t dev, u_char slave, in printf("pcf: busy!\n"); #endif PCF_UNLOCK(sc); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* set slave address to PCF. Last bit (LSB) must be set correctly Modified: head/sys/powerpc/mpc85xx/i2c.c ============================================================================== --- head/sys/powerpc/mpc85xx/i2c.c Fri Oct 9 22:45:54 2015 (r289092) +++ head/sys/powerpc/mpc85xx/i2c.c Fri Oct 9 22:49:50 2015 (r289093) @@ -284,7 +284,7 @@ i2c_start(device_t dev, u_char slave, in debugf("bus busy"); mtx_unlock(&sc->mutex); i2c_stop(dev); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set start condition */ From owner-svn-src-all@freebsd.org Fri Oct 9 22:28:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE9E9D2252; Fri, 9 Oct 2015 22:28:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 388881C92; Fri, 9 Oct 2015 22:28:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99MSuO8031403; Fri, 9 Oct 2015 22:28:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99MSuRj031402; Fri, 9 Oct 2015 22:28:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092228.t99MSuRj031402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 22:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289091 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 09 Oct 2015 23:16:01 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 22:28:57 -0000 Author: ian Date: Fri Oct 9 22:28:56 2015 New Revision: 289091 URL: https://svnweb.freebsd.org/changeset/base/289091 Log: Mostly rewrite the imx i2c driver. This started out as an attempt to fix one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed. While working on that problem I discovered that the driver's handling of error conditions in general didn't match the state transition diagram in the reference manual, and making that right resulted in a lot of code reorganization. Along the way various other changes also happened... - Remove a mutex that wasn't protecting anything. - Remove some mystery DELAY()s, document the few that remain. - Use pause_sbt(9) to yield the processor for the bulk of the time it takes to transfer each byte rather than busy-polling the whole time. - Disable the controller when no transfers are in progress; since we don't operate in slave mode, there's no reason to run the hardware. - Remove a bunch of unecessary code from probe(). Modified: head/sys/arm/freescale/imx/imx_i2c.c Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Fri Oct 9 22:15:31 2015 (r289090) +++ head/sys/arm/freescale/imx/imx_i2c.c Fri Oct 9 22:28:56 2015 (r289091) @@ -1,6 +1,7 @@ /*- * Copyright (C) 2008-2009 Semihalf, Michal Hajduk * Copyright (c) 2012, 2013 The FreeBSD Foundation + * Copyright (c) 2015 Ian Lepore * All rights reserved. * * Portions of this software were developed by Oleksandr Rybalko @@ -28,6 +29,19 @@ * SUCH DAMAGE. */ +/* + * I2C driver for Freescale i.MX hardware. + * + * Note that the hardware is capable of running as both a master and a slave. + * This driver currently implements only master-mode operations. + * + * This driver supports multi-master i2c busses, by detecting bus arbitration + * loss and returning IIC_EBUSBSY status. Notably, it does not do any kind of + * retries if some other master jumps onto the bus and interrupts one of our + * transfer cycles resulting in arbitration loss in mid-transfer. The caller + * must handle retries in a way that makes sense for the slave being addressed. + */ + #include __FBSDID("$FreeBSD$"); @@ -43,9 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include #include @@ -108,13 +119,6 @@ static struct clkdiv clkdiv_table[] = { { 2560, 0x1d }, { 3072, 0x1e }, { 3840, 0x1f }, {UINT_MAX, 0x1f} }; -#ifdef DEBUG -#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ - printf(fmt,##args); } while (0) -#else -#define debugf(fmt, args...) -#endif - static struct ofw_compat_data compat_data[] = { {"fsl,imx6q-i2c", 1}, {"fsl,imx-i2c", 1}, @@ -125,10 +129,8 @@ struct i2c_softc { device_t dev; device_t iicbus; struct resource *res; - struct mtx mutex; int rid; - bus_space_handle_t bsh; - bus_space_tag_t bst; + sbintime_t byte_time_sbt; }; static phandle_t i2c_get_node(device_t, device_t); @@ -158,7 +160,7 @@ static device_method_t i2c_methods[] = { DEVMETHOD(iicbus_write, i2c_write), DEVMETHOD(iicbus_transfer, iicbus_transfer_gen), - { 0, 0 } + DEVMETHOD_END }; static driver_t i2c_driver = { @@ -184,14 +186,14 @@ static __inline void i2c_write_reg(struct i2c_softc *sc, bus_size_t off, uint8_t val) { - bus_space_write_1(sc->bst, sc->bsh, off, val); + bus_write_1(sc->res, off, val); } static __inline uint8_t i2c_read_reg(struct i2c_softc *sc, bus_size_t off) { - return (bus_space_read_1(sc->bst, sc->bsh, off)); + return (bus_read_1(sc->res, off)); } static __inline void @@ -204,60 +206,77 @@ i2c_flag_set(struct i2c_softc *sc, bus_s i2c_write_reg(sc, off, status); } -/* Wait for transfer interrupt flag */ +/* Wait for bus to become busy or not-busy. */ static int -wait_for_iif(struct i2c_softc *sc) +wait_for_busbusy(struct i2c_softc *sc, int wantbusy) { - int retry; + int retry, srb; retry = 1000; while (retry --) { - if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MIF) + srb = i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB; + if ((srb && wantbusy) || (!srb && !wantbusy)) return (IIC_NOERR); - DELAY(10); + DELAY(1); } - return (IIC_ETIMEOUT); } -/* Wait for free bus */ +/* Wait for transfer to complete, optionally check RXAK. */ static int -wait_for_nibb(struct i2c_softc *sc) +wait_for_xfer(struct i2c_softc *sc, int checkack) { - int retry; + int retry, sr; - retry = 1000; + /* + * Sleep for about the time it takes to transfer a byte (with precision + * set to tolerate 5% oversleep). We calculate the approximate byte + * transfer time when we set the bus speed divisor. Slaves are allowed + * to do clock-stretching so the actual transfer time can be larger, but + * this gets the bulk of the waiting out of the way without tying up the + * processor the whole time. + */ + pause_sbt("imxi2c", sc->byte_time_sbt, sc->byte_time_sbt / 20, 0); + + retry = 10000; while (retry --) { - if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0) - return (IIC_NOERR); - DELAY(10); + sr = i2c_read_reg(sc, I2C_STATUS_REG); + if (sr & I2CSR_MIF) { + if (sr & I2CSR_MAL) + return (IIC_EBUSBSY); + else if (checkack && (sr & I2CSR_RXAK)) + return (IIC_ENOACK); + else + return (IIC_NOERR); + } + DELAY(1); } - return (IIC_ETIMEOUT); } -/* Wait for transfer complete+interrupt flag */ +/* + * Implement the error handling shown in the state diagram of the imx6 reference + * manual. If there was an error, then: + * - Clear master mode (MSTA and MTX). + * - Wait for the bus to become free or for a timeout to happen. + * - Disable the controller. + */ static int -wait_for_icf(struct i2c_softc *sc) +i2c_error_handler(struct i2c_softc *sc, int error) { - int retry; - retry = 1000; - while (retry --) { - - if ((i2c_read_reg(sc, I2C_STATUS_REG) & - (I2CSR_MCF|I2CSR_MIF)) == (I2CSR_MCF|I2CSR_MIF)) - return (IIC_NOERR); - DELAY(10); + if (error != 0) { + i2c_write_reg(sc, I2C_STATUS_REG, 0); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + wait_for_busbusy(sc, false); + i2c_write_reg(sc, I2C_CONTROL_REG, 0); } - - return (IIC_ETIMEOUT); + return (error); } static int i2c_probe(device_t dev) { - struct i2c_softc *sc; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -265,23 +284,7 @@ i2c_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - sc = device_get_softc(dev); - sc->rid = 0; - - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, - RF_ACTIVE); - if (sc->res == NULL) { - device_printf(dev, "could not allocate resources\n"); - return (ENXIO); - } - - sc->bst = rman_get_bustag(sc->res); - sc->bsh = rman_get_bushandle(sc->res); - - /* Enable I2C */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); - bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); - device_set_desc(dev, "Freescale i.MX I2C bus controller"); + device_set_desc(dev, "Freescale i.MX I2C"); return (BUS_PROBE_DEFAULT); } @@ -295,28 +298,21 @@ i2c_attach(device_t dev) sc->dev = dev; sc->rid = 0; - mtx_init(&sc->mutex, device_get_nameunit(dev), "I2C", MTX_DEF); - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, RF_ACTIVE); if (sc->res == NULL) { device_printf(dev, "could not allocate resources"); - mtx_destroy(&sc->mutex); return (ENXIO); } - sc->bst = rman_get_bustag(sc->res); - sc->bsh = rman_get_bushandle(sc->res); - sc->iicbus = device_add_child(dev, "iicbus", -1); if (sc->iicbus == NULL) { device_printf(dev, "could not add iicbus child"); - mtx_destroy(&sc->mutex); return (ENXIO); } bus_generic_attach(dev); - return (IIC_NOERR); + return (0); } static int @@ -327,34 +323,20 @@ i2c_repeated_start(device_t dev, u_char sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - - i2c_write_reg(sc, I2C_ADDR_REG, slave); if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0) { - mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } - /* Set repeated start condition */ - DELAY(10); + /* + * Set repeated start condition, delay (per reference manual, min 156nS) + * before writing slave address, wait for ack after write. + */ i2c_flag_set(sc, I2C_CONTROL_REG, I2CCR_RSTA); - DELAY(10); - /* Clear status */ + DELAY(1); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - /* Write target address - LSB is R/W bit */ i2c_write_reg(sc, I2C_DATA_REG, slave); - - error = wait_for_iif(sc); - - /* Clear status */ - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - - mtx_unlock(&sc->mutex); - - if (error) - return (error); - - return (IIC_NOERR); + error = wait_for_xfer(sc, true); + return (i2c_error_handler(sc, error)); } static int @@ -365,53 +347,30 @@ i2c_start(device_t dev, u_char slave, in sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_ADDR_REG, slave); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + DELAY(10); /* Delay for controller to sample bus state. */ if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) { - mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (i2c_error_handler(sc, IIC_EBUSBSY)); } - - /* Set start condition */ - i2c_write_reg(sc, I2C_CONTROL_REG, - I2CCR_MEN | I2CCR_MSTA | I2CCR_TXAK); - DELAY(100); - i2c_write_reg(sc, I2C_CONTROL_REG, - I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX | I2CCR_TXAK); - /* Clear status */ - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - /* Write target address - LSB is R/W bit */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX); + if ((error = wait_for_busbusy(sc, true)) != IIC_NOERR) + return (i2c_error_handler(sc, error)); + i2c_write_reg(sc, I2C_STATUS_REG, 0); i2c_write_reg(sc, I2C_DATA_REG, slave); - - error = wait_for_iif(sc); - - mtx_unlock(&sc->mutex); - if (error) - return (error); - - return (IIC_NOERR); + error = wait_for_xfer(sc, true); + return (i2c_error_handler(sc, error)); } - static int i2c_stop(device_t dev) { struct i2c_softc *sc; sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK); - DELAY(100); - /* Reset controller if bus still busy after STOP */ - if (wait_for_nibb(sc) == IIC_ETIMEOUT) { - i2c_write_reg(sc, I2C_CONTROL_REG, 0); - DELAY(1000); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK); - - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - } - mtx_unlock(&sc->mutex); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + wait_for_busbusy(sc, false); + i2c_write_reg(sc, I2C_CONTROL_REG, 0); return (IIC_NOERR); } @@ -434,19 +393,23 @@ i2c_reset(device_t dev, u_char speed, u_ if (clkdiv_table[i].divisor >= div) break; } - div = clkdiv_table[i].regcode; - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - DELAY(1000); + /* + * Calculate roughly how long it will take to transfer a byte (which + * requires 9 clock cycles) at the new bus speed. This value is used to + * pause() while waiting for transfer-complete. With a 66MHz IPG clock + * and the actual i2c bus speeds that leads to, for nominal 100KHz and + * 400KHz bus speeds the transfer times are roughly 104uS and 22uS. + */ + busfreq = ipgfreq / clkdiv_table[i].divisor; + sc->byte_time_sbt = SBT_1US * (9000000 / busfreq); - i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)div); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); - DELAY(1000); + /* + * Disable the controller (do the reset), and set the new clock divisor. + */ i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - mtx_unlock(&sc->mutex); - + i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); + i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)clkdiv_table[i].regcode); return (IIC_NOERR); } @@ -459,48 +422,42 @@ i2c_read(device_t dev, char *buf, int le sc = device_get_softc(dev); *read = 0; - mtx_lock(&sc->mutex); - if (len) { if (len == 1) i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_TXAK); - else i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA); - - /* dummy read */ + /* Dummy read to prime the receiver. */ + i2c_write_reg(sc, I2C_STATUS_REG, 0x0); i2c_read_reg(sc, I2C_DATA_REG); - DELAY(1000); } + error = 0; + *read = 0; while (*read < len) { - error = wait_for_icf(sc); - if (error) { - mtx_unlock(&sc->mutex); - return (error); - } + if ((error = wait_for_xfer(sc, false)) != IIC_NOERR) + break; i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - if ((*read == len - 2) && last) { - /* NO ACK on last byte */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | - I2CCR_MSTA | I2CCR_TXAK); + if (last) { + if (*read == len - 2) { + /* NO ACK on last byte */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | + I2CCR_MSTA | I2CCR_TXAK); + } else if (*read == len - 1) { + /* Transfer done, signal stop. */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | + I2CCR_TXAK); + wait_for_busbusy(sc, false); + } } - - if ((*read == len - 1) && last) { - /* Transfer done, remove master bit */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | - I2CCR_TXAK); - } - reg = i2c_read_reg(sc, I2C_DATA_REG); *buf++ = reg; (*read)++; } - mtx_unlock(&sc->mutex); - return (IIC_NOERR); + return (i2c_error_handler(sc, error)); } static int @@ -510,22 +467,16 @@ i2c_write(device_t dev, const char *buf, int error; sc = device_get_softc(dev); - *sent = 0; - mtx_lock(&sc->mutex); + error = 0; + *sent = 0; while (*sent < len) { i2c_write_reg(sc, I2C_STATUS_REG, 0x0); i2c_write_reg(sc, I2C_DATA_REG, *buf++); - - error = wait_for_iif(sc); - if (error) { - mtx_unlock(&sc->mutex); - return (error); - } - + if ((error = wait_for_xfer(sc, true)) != IIC_NOERR) + break; (*sent)++; } - mtx_unlock(&sc->mutex); - return (IIC_NOERR); + return (i2c_error_handler(sc, error)); } From owner-svn-src-all@freebsd.org Fri Oct 9 23:19:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAFF59D237D; Fri, 9 Oct 2015 23:19:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92164FD2; Fri, 9 Oct 2015 23:19:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99NJT5b045988; Fri, 9 Oct 2015 23:19:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99NJTKO045987; Fri, 9 Oct 2015 23:19:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092319.t99NJTKO045987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 23:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289094 - in head/libexec/dma: . dma dmagent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 23:19:30 -0000 Author: bapt Date: Fri Oct 9 23:19:29 2015 New Revision: 289094 URL: https://svnweb.freebsd.org/changeset/base/289094 Log: Rename the dma directory into dmagent to avoid collision on unclean oject directory where an old dma binary can remain Added: head/libexec/dma/dmagent/ - copied from r289087, head/libexec/dma/dma/ Deleted: head/libexec/dma/dma/ Modified: head/libexec/dma/Makefile Modified: head/libexec/dma/Makefile ============================================================================== --- head/libexec/dma/Makefile Fri Oct 9 22:49:50 2015 (r289093) +++ head/libexec/dma/Makefile Fri Oct 9 23:19:29 2015 (r289094) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= dma \ +SUBDIR= dmagent \ dma-mbox-create .include From owner-svn-src-all@freebsd.org Fri Oct 9 23:20:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5EFF9D240E; Fri, 9 Oct 2015 23:20:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78B701268; Fri, 9 Oct 2015 23:20:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99NK8Da046072; Fri, 9 Oct 2015 23:20:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99NK8FA046070; Fri, 9 Oct 2015 23:20:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092320.t99NK8FA046070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 23:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289095 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 23:20:09 -0000 Author: ian Date: Fri Oct 9 23:20:08 2015 New Revision: 289095 URL: https://svnweb.freebsd.org/changeset/base/289095 Log: Add iic2errno(), a helper function to translate IIC_Exxxxx status values to errno values that are at least vaguely equivelent. Also add a new status value, IIC_ERESOURCE, to indicate a failure to acquire memory or other required resources to complete a transaction. The IIC_Exxxxxx values are supposed to communicate low-level details of the i2c transaction status between the lowest-layer hardware driver and higher-layer bus protocol and device drivers for slave devices on the bus. Most of those slave drivers just return all status values from the lower layers directly to their callers, resulting in crazy error reporting from a user's point of view (things like timeouts being reported as "no such process"). Now there's a helper function to make it easier to start cleaning up all those drivers. Modified: head/sys/dev/iicbus/iiconf.c head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Fri Oct 9 23:19:29 2015 (r289094) +++ head/sys/dev/iicbus/iiconf.c Fri Oct 9 23:20:08 2015 (r289095) @@ -40,6 +40,28 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" /* + * Translate IIC_Exxxxx status values to vaguely-equivelent errno values. + */ +int +iic2errno(int iic_status) +{ + switch (iic_status) { + case IIC_NOERR: return (0); + case IIC_EBUSERR: return (EALREADY); + case IIC_ENOACK: return (EIO); + case IIC_ETIMEOUT: return (ETIMEDOUT); + case IIC_EBUSBSY: return (EWOULDBLOCK); + case IIC_ESTATUS: return (EPROTO); + case IIC_EUNDERFLOW: return (EIO); + case IIC_EOVERFLOW: return (EOVERFLOW); + case IIC_ENOTSUPP: return (EOPNOTSUPP); + case IIC_ENOADDR: return (EADDRNOTAVAIL); + case IIC_ERESOURCE: return (ENOMEM); + default: return (EIO); + } +} + +/* * iicbus_intr() */ void Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Fri Oct 9 23:19:29 2015 (r289094) +++ head/sys/dev/iicbus/iiconf.h Fri Oct 9 23:20:08 2015 (r289095) @@ -91,7 +91,9 @@ #define IIC_EOVERFLOW 0x7 /* too much data */ #define IIC_ENOTSUPP 0x8 /* request not supported */ #define IIC_ENOADDR 0x9 /* no address assigned to the interface */ +#define IIC_ERESOURCE 0xa /* resources (memory, whatever) unavailable */ +extern int iic2errno(int); extern int iicbus_request_bus(device_t, device_t, int); extern int iicbus_release_bus(device_t, device_t); extern device_t iicbus_alloc_bus(device_t); From owner-svn-src-all@freebsd.org Fri Oct 9 23:57:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFF919D3CEB; Fri, 9 Oct 2015 23:57:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F7CE391; Fri, 9 Oct 2015 23:57:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99Nv7GZ057490; Fri, 9 Oct 2015 23:57:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99Nv7lL057487; Fri, 9 Oct 2015 23:57:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510092357.t99Nv7lL057487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Oct 2015 23:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289096 - in head: etc etc/ppp usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 23:57:09 -0000 Author: bapt Date: Fri Oct 9 23:57:07 2015 New Revision: 289096 URL: https://svnweb.freebsd.org/changeset/base/289096 Log: Move ppp.conf into the ppp sources Added: head/usr.sbin/ppp/ppp.conf - copied unchanged from r289057, head/etc/ppp/ppp.conf Deleted: head/etc/ppp/ Modified: head/etc/Makefile head/usr.sbin/ppp/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Oct 9 23:20:08 2015 (r289095) +++ head/etc/Makefile Fri Oct 9 23:57:07 2015 (r289096) @@ -291,10 +291,6 @@ distribution: .endif cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree -.if ${MK_PPP} != "no" - cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - ${PPPCNF} ${DESTDIR}/etc/ppp -.endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Fri Oct 9 23:20:08 2015 (r289095) +++ head/usr.sbin/ppp/Makefile Fri Oct 9 23:57:07 2015 (r289096) @@ -21,6 +21,9 @@ PPP_NO_PAM= PPP_NO_RADIUS= PPP_NO_SUID= .endif +CONFS= ppp.conf +CONFSDIR= ${ETCDIR}/ppp +CONFSMODE= 600 .if ${MK_ATM} == "no" PPP_NO_ATM= Copied: head/usr.sbin/ppp/ppp.conf (from r289057, head/etc/ppp/ppp.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/ppp/ppp.conf Fri Oct 9 23:57:07 2015 (r289096, copy of r289057, head/etc/ppp/ppp.conf) @@ -0,0 +1,37 @@ +################################################################# +# PPP Sample Configuration File +# Originally written by Toshiharu OHNO +# Simplified 5/14/1999 by wself@cdrom.com +# +# See /usr/share/examples/ppp/ for some examples +# +# $FreeBSD$ +################################################################# + +default: + set log Phase Chat LCP IPCP CCP tun command + ident user-ppp VERSION + + # Ensure that "device" references the correct serial port + # for your modem. (cuau0 = COM1, cuau1 = COM2) + # + set device /dev/cuau1 + + set speed 115200 + set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ + \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" + set timeout 180 # 3 minute idle timer (the default) + enable dns # request DNS info (for resolv.conf) + +papchap: + # + # edit the next three lines and replace the items in caps with + # the values which have been assigned by your ISP. + # + + set phone PHONE_NUM + set authname USERNAME + set authkey PASSWORD + + set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 + add default HISADDR # Add a (sticky) default route From owner-svn-src-all@freebsd.org Fri Oct 9 23:58:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B10E9D3D97; Fri, 9 Oct 2015 23:58:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 016E47B6; Fri, 9 Oct 2015 23:58:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99NwKif057574; Fri, 9 Oct 2015 23:58:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99NwJnm057572; Fri, 9 Oct 2015 23:58:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510092358.t99NwJnm057572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 9 Oct 2015 23:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289097 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 23:58:21 -0000 Author: ian Date: Fri Oct 9 23:58:19 2015 New Revision: 289097 URL: https://svnweb.freebsd.org/changeset/base/289097 Log: Return only IIC_Exxxx status values from iicbus-layer functions. Most of these functions are thin wrappers around calling the hardware-layer driver, but some of them do sanity checks and return an error. Since the hardware layer can only return IIC_Exxxxx status values, the iicbus helper functions must also adhere to that, so that drivers at higher layers can assume that any non-zero status value is an IIC_Exxxx value that provides details about what happened at the hardware layer (sometimes those details are important for certain slave drivers). Modified: head/sys/dev/iicbus/iiconf.c head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Fri Oct 9 23:57:07 2015 (r289096) +++ head/sys/dev/iicbus/iiconf.c Fri Oct 9 23:58:19 2015 (r289097) @@ -207,7 +207,7 @@ iicbus_start(device_t bus, u_char slave, int error = 0; if (sc->started) - return (EINVAL); /* bus already started */ + return (IIC_ESTATUS); /* protocol error, bus already started */ if (!(error = IICBUS_START(device_get_parent(bus), slave, timeout))) sc->started = slave; @@ -229,7 +229,7 @@ iicbus_repeated_start(device_t bus, u_ch int error = 0; if (!sc->started) - return (EINVAL); /* bus should have been already started */ + return (IIC_ESTATUS); /* protocol error, bus not started */ if (!(error = IICBUS_REPEATED_START(device_get_parent(bus), slave, timeout))) sc->started = slave; @@ -251,7 +251,7 @@ iicbus_stop(device_t bus) int error = 0; if (!sc->started) - return (EINVAL); /* bus not started */ + return (IIC_ESTATUS); /* protocol error, bus not started */ error = IICBUS_STOP(device_get_parent(bus)); @@ -274,7 +274,7 @@ iicbus_write(device_t bus, const char *b /* a slave must have been started for writing */ if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) != 0)) - return (EINVAL); + return (IIC_ESTATUS); return (IICBUS_WRITE(device_get_parent(bus), buf, len, sent, timeout)); } @@ -292,7 +292,7 @@ iicbus_read(device_t bus, char *buf, int /* a slave must have been started for reading */ if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) == 0)) - return (EINVAL); + return (IIC_ESTATUS); return (IICBUS_READ(device_get_parent(bus), buf, len, read, last, delay)); } @@ -305,9 +305,14 @@ iicbus_read(device_t bus, char *buf, int int iicbus_write_byte(device_t bus, char byte, int timeout) { + struct iicbus_softc *sc = device_get_softc(bus); char data = byte; int sent; + /* a slave must have been started for writing */ + if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) != 0)) + return (IIC_ESTATUS); + return (iicbus_write(bus, &data, 1, &sent, timeout)); } @@ -319,8 +324,13 @@ iicbus_write_byte(device_t bus, char byt int iicbus_read_byte(device_t bus, char *byte, int timeout) { + struct iicbus_softc *sc = device_get_softc(bus); int read; + /* a slave must have been started for reading */ + if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) == 0)) + return (IIC_ESTATUS); + return (iicbus_read(bus, byte, 1, &read, IIC_LAST_READ, timeout)); } @@ -381,6 +391,7 @@ iicbus_block_read(device_t bus, u_char s int iicbus_transfer(device_t bus, struct iic_msg *msgs, uint32_t nmsgs) { + return (IICBUS_TRANSFER(device_get_parent(bus), msgs, nmsgs)); } @@ -397,10 +408,10 @@ iicbus_transfer_gen(device_t dev, struct bool nostop; if ((error = device_get_children(dev, &children, &nkid)) != 0) - return (error); + return (IIC_ERESOURCE); if (nkid != 1) { free(children, M_TEMP); - return (EIO); + return (IIC_ENOTSUPP); } bus = children[0]; rpstart = 0; Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Fri Oct 9 23:57:07 2015 (r289096) +++ head/sys/dev/iicbus/iiconf.h Fri Oct 9 23:58:19 2015 (r289097) @@ -93,6 +93,10 @@ #define IIC_ENOADDR 0x9 /* no address assigned to the interface */ #define IIC_ERESOURCE 0xa /* resources (memory, whatever) unavailable */ +/* + * Note that all iicbus functions return IIC_Exxxxx status values, + * except iic2errno() (obviously) and iicbus_started() (returns bool). + */ extern int iic2errno(int); extern int iicbus_request_bus(device_t, device_t, int); extern int iicbus_release_bus(device_t, device_t); From owner-svn-src-all@freebsd.org Sat Oct 10 00:12:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ACFE9D1984; Sat, 10 Oct 2015 00:12:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAEEF307; Sat, 10 Oct 2015 00:12:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A0C3li063320; Sat, 10 Oct 2015 00:12:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A0C3an063319; Sat, 10 Oct 2015 00:12:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510100012.t9A0C3an063319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 10 Oct 2015 00:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289098 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 00:12:05 -0000 Author: ian Date: Sat Oct 10 00:12:03 2015 New Revision: 289098 URL: https://svnweb.freebsd.org/changeset/base/289098 Log: Fix more cases of iicbus-layer functions that must return IIC_Exxxx values. Modified: head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Fri Oct 9 23:58:19 2015 (r289097) +++ head/sys/dev/iicbus/iiconf.c Sat Oct 10 00:12:03 2015 (r289098) @@ -92,7 +92,7 @@ iicbus_poll(struct iicbus_softc *sc, int break; default: - return (EWOULDBLOCK); + return (IIC_EBUSBSY); } return (error); @@ -157,7 +157,7 @@ iicbus_release_bus(device_t bus, device_ if (sc->owner != dev) { IICBUS_UNLOCK(sc); - return (EACCES); + return (IIC_EBUSBSY); } /* From owner-svn-src-all@freebsd.org Sat Oct 10 00:13:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028019D1A6B; Sat, 10 Oct 2015 00:13:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F0C76A2; Sat, 10 Oct 2015 00:13:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A0DjuV063413; Sat, 10 Oct 2015 00:13:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A0DjIb063411; Sat, 10 Oct 2015 00:13:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510100013.t9A0DjIb063411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 10 Oct 2015 00:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289099 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 00:13:47 -0000 Author: adrian Date: Sat Oct 10 00:13:45 2015 New Revision: 289099 URL: https://svnweb.freebsd.org/changeset/base/289099 Log: Flip on fast frames support for AR5416 and AR9300 series NICs. This was off because the net80211 aggregation code was using the same state pointers for both fast frames and ampdu tx support which led to some pretty unfortunate panic-y behaviour. Now that net80211 doesn't panic, let's flip this back on. It doesn't (yet) do the horrific sounding thing of A-MPDU aggregates of fast frames; that'll come next. It's a pre-requisite to supporting AMSDU + AMPDU anyway, which actually speeds things up quite considerably (think packing lots of little ACK frames into a single AMSDU.) Tested: * QCA955x SoC, AP mode * AR5416, STA mode * AR9170, STA mode (with local fast frame patches) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Oct 10 00:12:03 2015 (r289098) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Oct 10 00:13:45 2015 (r289099) @@ -2671,7 +2671,7 @@ ar9300_fill_capability_info(struct ath_h p_cap->halBurstSupport = AH_TRUE; p_cap->halChapTuningSupport = AH_TRUE; p_cap->halTurboPrimeSupport = AH_TRUE; - p_cap->halFastFramesSupport = AH_FALSE; + p_cap->halFastFramesSupport = AH_TRUE; p_cap->halTurboGSupport = p_cap->halWirelessModes & HAL_MODE_108G; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Oct 10 00:12:03 2015 (r289098) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Oct 10 00:13:45 2015 (r289099) @@ -937,13 +937,7 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halCompressSupport = AH_FALSE; pCap->halBurstSupport = AH_TRUE; - /* - * This is disabled for now; the net80211 layer needs to be - * taught when it is and isn't appropriate to enable FF processing - * with 802.11n NICs (it tries to enable both A-MPDU and - * fast frames, with very tragic crash-y results.) - */ - pCap->halFastFramesSupport = AH_FALSE; + pCap->halFastFramesSupport = AH_TRUE; pCap->halChapTuningSupport = AH_TRUE; pCap->halTurboPrimeSupport = AH_TRUE; From owner-svn-src-all@freebsd.org Sat Oct 10 00:17:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 001239D1DC5; Sat, 10 Oct 2015 00:17:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF02B91A; Sat, 10 Oct 2015 00:17:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A0Hqwm063602; Sat, 10 Oct 2015 00:17:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A0HptN063593; Sat, 10 Oct 2015 00:17:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510100017.t9A0HptN063593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 10 Oct 2015 00:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289100 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 00:17:53 -0000 Author: delphij Date: Sat Oct 10 00:17:51 2015 New Revision: 289100 URL: https://svnweb.freebsd.org/changeset/base/289100 Log: MFC r288204: MFV r288063: make dataset property de-registration operation O(1) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Sat Oct 10 00:17:51 2015 (r289100) @@ -680,40 +680,8 @@ dmu_objset_evict(objset_t *os) for (int t = 0; t < TXG_SIZE; t++) ASSERT(!dmu_objset_is_dirty(os, t)); - if (ds) { - if (!ds->ds_is_snapshot) { - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_CHECKSUM), - checksum_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_COMPRESSION), - compression_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_COPIES), - copies_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_DEDUP), - dedup_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_LOGBIAS), - logbias_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_SYNC), - sync_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_REDUNDANT_METADATA), - redundant_metadata_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - recordsize_changed_cb, os)); - } - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_PRIMARYCACHE), - primary_cache_changed_cb, os)); - VERIFY0(dsl_prop_unregister(ds, - zfs_prop_to_name(ZFS_PROP_SECONDARYCACHE), - secondary_cache_changed_cb, os)); - } + if (ds) + dsl_prop_unregister_all(ds, os); if (os->os_sa) sa_tear_down(os); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Oct 10 00:17:51 2015 (r289100) @@ -288,6 +288,7 @@ dsl_dataset_evict(void *dbu) ASSERT(!list_link_active(&ds->ds_synced_link)); + list_destroy(&ds->ds_prop_cbs); if (mutex_owned(&ds->ds_lock)) mutex_exit(&ds->ds_lock); mutex_destroy(&ds->ds_lock); @@ -434,6 +435,9 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin list_create(&ds->ds_sendstreams, sizeof (dmu_sendarg_t), offsetof(dmu_sendarg_t, dsa_link)); + list_create(&ds->ds_prop_cbs, sizeof (dsl_prop_cb_record_t), + offsetof(dsl_prop_cb_record_t, cbr_ds_node)); + if (doi.doi_type == DMU_OTN_ZAP_METADATA) { for (spa_feature_t f = 0; f < SPA_FEATURES; f++) { if (!(spa_feature_table[f].fi_flags & Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Sat Oct 10 00:17:51 2015 (r289100) @@ -152,11 +152,7 @@ dsl_dir_evict(void *dbu) spa_async_close(dd->dd_pool->dp_spa, dd); - /* - * The props callback list should have been cleaned up by - * objset_evict(). - */ - list_destroy(&dd->dd_prop_cbs); + dsl_prop_fini(dd); mutex_destroy(&dd->dd_lock); kmem_free(dd, sizeof (dsl_dir_t)); } @@ -191,9 +187,7 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_ dd->dd_dbuf = dbuf; dd->dd_pool = dp; mutex_init(&dd->dd_lock, NULL, MUTEX_DEFAULT, NULL); - - list_create(&dd->dd_prop_cbs, sizeof (dsl_prop_cb_record_t), - offsetof(dsl_prop_cb_record_t, cbr_node)); + dsl_prop_init(dd); dsl_dir_snap_cmtime_update(dd); @@ -251,6 +245,7 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_ if (winner != NULL) { if (dd->dd_parent) dsl_dir_rele(dd->dd_parent, dd); + dsl_prop_fini(dd); mutex_destroy(&dd->dd_lock); kmem_free(dd, sizeof (dsl_dir_t)); dd = winner; @@ -278,6 +273,7 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_ errout: if (dd->dd_parent) dsl_dir_rele(dd->dd_parent, dd); + dsl_prop_fini(dd); mutex_destroy(&dd->dd_lock); kmem_free(dd, sizeof (dsl_dir_t)); dmu_buf_rele(dbuf, tag); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Sat Oct 10 00:17:51 2015 (r289100) @@ -215,6 +215,58 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const intsz, numints, buf, setpoint, ds->ds_is_snapshot)); } +static dsl_prop_record_t * +dsl_prop_record_find(dsl_dir_t *dd, const char *propname) +{ + dsl_prop_record_t *pr = NULL; + + ASSERT(MUTEX_HELD(&dd->dd_lock)); + + for (pr = list_head(&dd->dd_props); + pr != NULL; pr = list_next(&dd->dd_props, pr)) { + if (strcmp(pr->pr_propname, propname) == 0) + break; + } + + return (pr); +} + +static dsl_prop_record_t * +dsl_prop_record_create(dsl_dir_t *dd, const char *propname) +{ + dsl_prop_record_t *pr; + + ASSERT(MUTEX_HELD(&dd->dd_lock)); + + pr = kmem_alloc(sizeof (dsl_prop_record_t), KM_SLEEP); + pr->pr_propname = spa_strdup(propname); + list_create(&pr->pr_cbs, sizeof (dsl_prop_cb_record_t), + offsetof(dsl_prop_cb_record_t, cbr_pr_node)); + list_insert_head(&dd->dd_props, pr); + + return (pr); +} + +void +dsl_prop_init(dsl_dir_t *dd) +{ + list_create(&dd->dd_props, sizeof (dsl_prop_record_t), + offsetof(dsl_prop_record_t, pr_node)); +} + +void +dsl_prop_fini(dsl_dir_t *dd) +{ + dsl_prop_record_t *pr; + + while ((pr = list_remove_head(&dd->dd_props)) != NULL) { + list_destroy(&pr->pr_cbs); + strfree((char *)pr->pr_propname); + kmem_free(pr, sizeof (dsl_prop_record_t)); + } + list_destroy(&dd->dd_props); +} + /* * Register interest in the named property. We'll call the callback * once to notify it of the current property value, and again each time @@ -229,6 +281,7 @@ dsl_prop_register(dsl_dataset_t *ds, con dsl_dir_t *dd = ds->ds_dir; dsl_pool_t *dp = dd->dd_pool; uint64_t value; + dsl_prop_record_t *pr; dsl_prop_cb_record_t *cbr; int err; @@ -240,12 +293,16 @@ dsl_prop_register(dsl_dataset_t *ds, con cbr = kmem_alloc(sizeof (dsl_prop_cb_record_t), KM_SLEEP); cbr->cbr_ds = ds; - cbr->cbr_propname = kmem_alloc(strlen(propname)+1, KM_SLEEP); - (void) strcpy((char *)cbr->cbr_propname, propname); cbr->cbr_func = callback; cbr->cbr_arg = cbarg; + mutex_enter(&dd->dd_lock); - list_insert_head(&dd->dd_prop_cbs, cbr); + pr = dsl_prop_record_find(dd, propname); + if (pr == NULL) + pr = dsl_prop_record_create(dd, propname); + cbr->cbr_pr = pr; + list_insert_head(&pr->pr_cbs, cbr); + list_insert_head(&ds->ds_prop_cbs, cbr); mutex_exit(&dd->dd_lock); cbr->cbr_func(cbr->cbr_arg, value); @@ -376,56 +433,34 @@ dsl_prop_predict(dsl_dir_t *dd, const ch } /* - * Unregister this callback. Return 0 on success, ENOENT if ddname is - * invalid, or ENOMSG if no matching callback registered. + * Unregister all callbacks that are registered with the + * given callback argument. */ -int -dsl_prop_unregister(dsl_dataset_t *ds, const char *propname, - dsl_prop_changed_cb_t *callback, void *cbarg) +void +dsl_prop_unregister_all(dsl_dataset_t *ds, void *cbarg) { + dsl_prop_cb_record_t *cbr, *next_cbr; + dsl_dir_t *dd = ds->ds_dir; - dsl_prop_cb_record_t *cbr; mutex_enter(&dd->dd_lock); - for (cbr = list_head(&dd->dd_prop_cbs); - cbr; cbr = list_next(&dd->dd_prop_cbs, cbr)) { - if (cbr->cbr_ds == ds && - cbr->cbr_func == callback && - cbr->cbr_arg == cbarg && - strcmp(cbr->cbr_propname, propname) == 0) - break; - } - - if (cbr == NULL) { - mutex_exit(&dd->dd_lock); - return (SET_ERROR(ENOMSG)); + next_cbr = list_head(&ds->ds_prop_cbs); + while (next_cbr != NULL) { + cbr = next_cbr; + next_cbr = list_next(&ds->ds_prop_cbs, cbr); + if (cbr->cbr_arg == cbarg) { + list_remove(&ds->ds_prop_cbs, cbr); + list_remove(&cbr->cbr_pr->pr_cbs, cbr); + kmem_free(cbr, sizeof (dsl_prop_cb_record_t)); + } } - - list_remove(&dd->dd_prop_cbs, cbr); mutex_exit(&dd->dd_lock); - kmem_free((void*)cbr->cbr_propname, strlen(cbr->cbr_propname)+1); - kmem_free(cbr, sizeof (dsl_prop_cb_record_t)); - - return (0); } boolean_t dsl_prop_hascb(dsl_dataset_t *ds) { - dsl_dir_t *dd = ds->ds_dir; - boolean_t rv = B_FALSE; - dsl_prop_cb_record_t *cbr; - - mutex_enter(&dd->dd_lock); - for (cbr = list_head(&dd->dd_prop_cbs); cbr; - cbr = list_next(&dd->dd_prop_cbs, cbr)) { - if (cbr->cbr_ds == ds) { - rv = B_TRUE; - break; - } - } - mutex_exit(&dd->dd_lock); - return (rv); + return (!list_is_empty(&ds->ds_prop_cbs)); } /* ARGSUSED */ @@ -433,38 +468,50 @@ static int dsl_prop_notify_all_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg) { dsl_dir_t *dd = ds->ds_dir; + dsl_prop_record_t *pr; dsl_prop_cb_record_t *cbr; mutex_enter(&dd->dd_lock); - for (cbr = list_head(&dd->dd_prop_cbs); cbr; - cbr = list_next(&dd->dd_prop_cbs, cbr)) { - uint64_t value; + for (pr = list_head(&dd->dd_props); + pr; pr = list_next(&dd->dd_props, pr)) { + for (cbr = list_head(&pr->pr_cbs); cbr; + cbr = list_next(&pr->pr_cbs, cbr)) { + uint64_t value; - /* - * Callback entries do not have holds on their datasets - * so that datasets with registered callbacks are still - * eligible for eviction. Unlike operations on callbacks - * for a single dataset, we are performing a recursive - * descent of related datasets and the calling context - * for this iteration only has a dataset hold on the root. - * Without a hold, the callback's pointer to the dataset - * could be invalidated by eviction at any time. - * - * Use dsl_dataset_try_add_ref() to verify that the - * dataset has not begun eviction processing and to - * prevent eviction from occurring for the duration - * of the callback. If the hold attempt fails, this - * object is already being evicted and the callback can - * be safely ignored. - */ - if (!dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) - continue; + /* + * Callback entries do not have holds on their + * datasets so that datasets with registered + * callbacks are still eligible for eviction. + * Unlike operations to update properties on a + * single dataset, we are performing a recursive + * descent of related head datasets. The caller + * of this function only has a dataset hold on + * the passed in head dataset, not the snapshots + * associated with this dataset. Without a hold, + * the dataset pointer within callback records + * for snapshots can be invalidated by eviction + * at any time. + * + * Use dsl_dataset_try_add_ref() to verify + * that the dataset for a snapshot has not + * begun eviction processing and to prevent + * eviction from occurring for the duration of + * the callback. If the hold attempt fails, + * this object is already being evicted and the + * callback can be safely ignored. + */ + if (ds != cbr->cbr_ds && + !dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) + continue; - if (dsl_prop_get_ds(cbr->cbr_ds, cbr->cbr_propname, - sizeof (value), 1, &value, NULL) == 0) - cbr->cbr_func(cbr->cbr_arg, value); + if (dsl_prop_get_ds(cbr->cbr_ds, + cbr->cbr_pr->pr_propname, sizeof (value), 1, + &value, NULL) == 0) + cbr->cbr_func(cbr->cbr_arg, value); - dsl_dataset_rele(cbr->cbr_ds, FTAG); + if (ds != cbr->cbr_ds) + dsl_dataset_rele(cbr->cbr_ds, FTAG); + } } mutex_exit(&dd->dd_lock); @@ -489,6 +536,7 @@ dsl_prop_changed_notify(dsl_pool_t *dp, const char *propname, uint64_t value, int first) { dsl_dir_t *dd; + dsl_prop_record_t *pr; dsl_prop_cb_record_t *cbr; objset_t *mos = dp->dp_meta_objset; zap_cursor_t zc; @@ -515,30 +563,33 @@ dsl_prop_changed_notify(dsl_pool_t *dp, } mutex_enter(&dd->dd_lock); - for (cbr = list_head(&dd->dd_prop_cbs); cbr; - cbr = list_next(&dd->dd_prop_cbs, cbr)) { - uint64_t propobj; + pr = dsl_prop_record_find(dd, propname); + if (pr != NULL) { + for (cbr = list_head(&pr->pr_cbs); cbr; + cbr = list_next(&pr->pr_cbs, cbr)) { + uint64_t propobj; - /* - * cbr->cbf_ds may be invalidated due to eviction, - * requiring the use of dsl_dataset_try_add_ref(). - * See comment block in dsl_prop_notify_all_cb() - * for details. - */ - if (strcmp(cbr->cbr_propname, propname) != 0 || - !dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) - continue; + /* + * cbr->cbr_ds may be invalidated due to eviction, + * requiring the use of dsl_dataset_try_add_ref(). + * See comment block in dsl_prop_notify_all_cb() + * for details. + */ + if (!dsl_dataset_try_add_ref(dp, cbr->cbr_ds, FTAG)) + continue; - propobj = dsl_dataset_phys(cbr->cbr_ds)->ds_props_obj; + propobj = dsl_dataset_phys(cbr->cbr_ds)->ds_props_obj; - /* - * If the property is not set on this ds, then it is - * inherited here; call the callback. - */ - if (propobj == 0 || zap_contains(mos, propobj, propname) != 0) - cbr->cbr_func(cbr->cbr_arg, value); + /* + * If the property is not set on this ds, then it is + * inherited here; call the callback. + */ + if (propobj == 0 || + zap_contains(mos, propobj, propname) != 0) + cbr->cbr_func(cbr->cbr_arg, value); - dsl_dataset_rele(cbr->cbr_ds, FTAG); + dsl_dataset_rele(cbr->cbr_ds, FTAG); + } } mutex_exit(&dd->dd_lock); @@ -678,10 +729,10 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds * ds here. */ mutex_enter(&ds->ds_dir->dd_lock); - for (cbr = list_head(&ds->ds_dir->dd_prop_cbs); cbr; - cbr = list_next(&ds->ds_dir->dd_prop_cbs, cbr)) { - if (cbr->cbr_ds == ds && - strcmp(cbr->cbr_propname, propname) == 0) + for (cbr = list_head(&ds->ds_prop_cbs); cbr; + cbr = list_next(&ds->ds_prop_cbs, cbr)) { + if (strcmp(cbr->cbr_pr->pr_propname, + propname) == 0) cbr->cbr_func(cbr->cbr_arg, intval); } mutex_exit(&ds->ds_dir->dd_lock); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Sat Oct 10 00:17:51 2015 (r289100) @@ -184,6 +184,9 @@ typedef struct dsl_dataset { kmutex_t ds_sendstream_lock; list_t ds_sendstreams; + /* Protected by our dsl_dir's dd_lock */ + list_t ds_prop_cbs; + /* * For ZFEATURE_FLAG_PER_DATASET features, set if this dataset * uses this feature. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Sat Oct 10 00:17:51 2015 (r289100) @@ -102,7 +102,7 @@ struct dsl_dir { /* Protected by dd_lock */ kmutex_t dd_lock; - list_t dd_prop_cbs; /* list of dsl_prop_cb_record_t's */ + list_t dd_props; /* list of dsl_prop_record_t's */ timestruc_t dd_snap_cmtime; /* last time snapshot namespace changed */ uint64_t dd_origin_txg; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h Sat Oct 10 00:17:51 2015 (r289100) @@ -41,10 +41,17 @@ struct dsl_dir; /* The callback func may not call into the DMU or DSL! */ typedef void (dsl_prop_changed_cb_t)(void *arg, uint64_t newval); +typedef struct dsl_prop_record { + list_node_t pr_node; /* link on dd_props */ + const char *pr_propname; + list_t pr_cbs; +} dsl_prop_record_t; + typedef struct dsl_prop_cb_record { - list_node_t cbr_node; /* link on dd_prop_cbs */ + list_node_t cbr_pr_node; /* link on pr_cbs */ + list_node_t cbr_ds_node; /* link on ds_prop_cbs */ + dsl_prop_record_t *cbr_pr; struct dsl_dataset *cbr_ds; - const char *cbr_propname; dsl_prop_changed_cb_t *cbr_func; void *cbr_arg; } dsl_prop_cb_record_t; @@ -54,10 +61,11 @@ typedef struct dsl_props_arg { zprop_source_t pa_source; } dsl_props_arg_t; +void dsl_prop_init(dsl_dir_t *dd); +void dsl_prop_fini(dsl_dir_t *dd); int dsl_prop_register(struct dsl_dataset *ds, const char *propname, dsl_prop_changed_cb_t *callback, void *cbarg); -int dsl_prop_unregister(struct dsl_dataset *ds, const char *propname, - dsl_prop_changed_cb_t *callback, void *cbarg); +void dsl_prop_unregister_all(struct dsl_dataset *ds, void *cbarg); void dsl_prop_notify_all(struct dsl_dir *dd); boolean_t dsl_prop_hascb(struct dsl_dataset *ds); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 10 00:13:45 2015 (r289099) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 10 00:17:51 2015 (r289100) @@ -549,35 +549,7 @@ zfs_register_callbacks(vfs_t *vfsp) return (0); unregister: - /* - * We may attempt to unregister some callbacks that are not - * registered, but this is OK; it will simply return ENOMSG, - * which we will ignore. - */ - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ATIME), - atime_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_XATTR), - xattr_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - blksz_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_READONLY), - readonly_changed_cb, zfsvfs); -#ifdef illumos - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_DEVICES), - devices_changed_cb, zfsvfs); -#endif - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_SETUID), - setuid_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_EXEC), - exec_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_SNAPDIR), - snapdir_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ACLMODE), - acl_mode_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ACLINHERIT), - acl_inherit_changed_cb, zfsvfs); - (void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_VSCAN), - vscan_changed_cb, zfsvfs); + dsl_prop_unregister_all(ds, zfsvfs); return (error); } @@ -1246,43 +1218,9 @@ void zfs_unregister_callbacks(zfsvfs_t *zfsvfs) { objset_t *os = zfsvfs->z_os; - struct dsl_dataset *ds; - - /* - * Unregister properties. - */ - if (!dmu_objset_is_snapshot(os)) { - ds = dmu_objset_ds(os); - VERIFY(dsl_prop_unregister(ds, "atime", atime_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "xattr", xattr_changed_cb, - zfsvfs) == 0); - VERIFY(dsl_prop_unregister(ds, "recordsize", blksz_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "readonly", readonly_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "setuid", setuid_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "exec", exec_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "snapdir", snapdir_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "aclmode", acl_mode_changed_cb, - zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "aclinherit", - acl_inherit_changed_cb, zfsvfs) == 0); - - VERIFY(dsl_prop_unregister(ds, "vscan", - vscan_changed_cb, zfsvfs) == 0); - } + if (!dmu_objset_is_snapshot(os)) + dsl_prop_unregister_all(dmu_objset_ds(os), zfsvfs); } #ifdef SECLABEL From owner-svn-src-all@freebsd.org Sat Oct 10 01:31:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 624E49D336C; Sat, 10 Oct 2015 01:31: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 115216D; Sat, 10 Oct 2015 01:31: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 t9A1Ve3q086864; Sat, 10 Oct 2015 01:31:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A1VeRw086863; Sat, 10 Oct 2015 01:31:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510100131.t9A1VeRw086863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 10 Oct 2015 01:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289102 - head/bin/ls/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 01:31:41 -0000 Author: ngie Date: Sat Oct 10 01:31:39 2015 New Revision: 289102 URL: https://svnweb.freebsd.org/changeset/base/289102 Log: Remove all of the syncs They're unnecessary as shown by further testing on my VM Requested by: jhb Modified: head/bin/ls/tests/ls_tests.sh Directory Properties: head/ (props changed) Modified: head/bin/ls/tests/ls_tests.sh ============================================================================== --- head/bin/ls/tests/ls_tests.sh Sat Oct 10 01:29:50 2015 (r289101) +++ head/bin/ls/tests/ls_tests.sh Sat Oct 10 01:31:39 2015 (r289102) @@ -72,8 +72,6 @@ create_test_inputs() atf_check -e empty -s exit:0 touch 0b00001101 atf_check -e empty -s exit:0 touch 0b00001110 atf_check -e empty -s exit:0 touch 0b00001111 - - atf_check -e empty -s exit:0 sync } KB=1024 @@ -100,8 +98,6 @@ create_test_inputs2() count=1 oseek=$(( $filesize / $MB )) conv=sparse files="${files} ${filesize}.file" done - - atf_check -e empty -s exit:0 sync } atf_test_case A_flag @@ -815,16 +811,12 @@ t_flag_body() atf_check -e empty -o empty -s exit:0 touch a.file atf_check -e empty -o empty -s exit:0 touch b.file - atf_check -e empty -s exit:0 sync - atf_check -e empty -o match:'a\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' atf_check -e empty -o match:'b\.file.*a\.file' -s exit:0 ls -Ct atf_check -e empty -o empty -s exit:0 rm a.file atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' - atf_check -e empty -s exit:0 sync - atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lt | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Ct } @@ -841,14 +833,12 @@ u_flag_body() atf_check -e empty -o empty -s exit:0 touch a.file atf_check -e empty -o empty -s exit:0 touch b.file - atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu atf_check -e empty -o empty -s exit:0 sh -c 'echo "i am a" > a.file' atf_check -e empty -o match:'i am a' -s exit:0 cat a.file - atf_check -e empty -s exit:0 sync atf_check -e empty -o match:'b\.file' -s exit:0 sh -c 'ls -lu | tail -n 1' atf_check -e empty -o match:'a\.file.*b\.file' -s exit:0 ls -Cu From owner-svn-src-all@freebsd.org Sat Oct 10 01:41:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C71489D3A4A; Sat, 10 Oct 2015 01:41:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FE0066A; Sat, 10 Oct 2015 01:41:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A1f7ds089749; Sat, 10 Oct 2015 01:41:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A1f76X089748; Sat, 10 Oct 2015 01:41:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201510100141.t9A1f76X089748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 10 Oct 2015 01:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289103 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 01:41:09 -0000 Author: np Date: Sat Oct 10 01:41:07 2015 New Revision: 289103 URL: https://svnweb.freebsd.org/changeset/base/289103 Log: iw_cxgbe: fix for page fault in cm_close_handler(). This is roughly the iw_cxgbe equivalent of https://github.com/torvalds/linux/commit/be13b2dff8c4e41846477b22cc5c164ea5a6ac2e ----------------- RDMA/cxgb4: Connect_request_upcall fixes When processing an MPA Start Request, if the listening endpoint is DEAD, then abort the connection. If the IWCM returns an error, then we must abort the connection and release resources. Also abort_connection() should not post a CLOSE event, so clean that up too. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier ----------------- Submitted by: Krishnamraju Eraparaju at chelsio dot com. Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Sat Oct 10 01:31:39 2015 (r289102) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Sat Oct 10 01:41:07 2015 (r289103) @@ -99,7 +99,7 @@ static int abort_connection(struct c4iw_ static void peer_close_upcall(struct c4iw_ep *ep); static void peer_abort_upcall(struct c4iw_ep *ep); static void connect_reply_upcall(struct c4iw_ep *ep, int status); -static void connect_request_upcall(struct c4iw_ep *ep); +static int connect_request_upcall(struct c4iw_ep *ep); static void established_upcall(struct c4iw_ep *ep); static void process_mpa_reply(struct c4iw_ep *ep); static void process_mpa_request(struct c4iw_ep *ep); @@ -1216,7 +1216,6 @@ static int abort_connection(struct c4iw_ int err; CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep); - close_complete_upcall(ep, -ECONNRESET); state_set(&ep->com, ABORTING); abort_socket(ep); err = close_socket(&ep->com, 0); @@ -1319,9 +1318,10 @@ static void connect_reply_upcall(struct CTR2(KTR_IW_CXGBE, "%s:cruE %p", __func__, ep); } -static void connect_request_upcall(struct c4iw_ep *ep) +static int connect_request_upcall(struct c4iw_ep *ep) { struct iw_cm_event event; + int ret; CTR3(KTR_IW_CXGBE, "%s: ep %p, mpa_v1 %d", __func__, ep, ep->tried_with_mpa_v1); @@ -1355,10 +1355,14 @@ static void connect_request_upcall(struc } c4iw_get_ep(&ep->com); - ep->parent_ep->com.cm_id->event_handler(ep->parent_ep->com.cm_id, + ret = ep->parent_ep->com.cm_id->event_handler(ep->parent_ep->com.cm_id, &event); + if(ret) + c4iw_put_ep(&ep->com); + set_bit(CONNREQ_UPCALL, &ep->com.history); c4iw_put_ep(&ep->parent_ep->com); + return ret; } static void established_upcall(struct c4iw_ep *ep) @@ -1835,9 +1839,11 @@ abort: /* drive upcall */ mutex_lock(&ep->parent_ep->com.mutex); - if (ep->parent_ep->com.state != DEAD) - connect_request_upcall(ep); - else + if (ep->parent_ep->com.state != DEAD) { + if(connect_request_upcall(ep)) { + abort_connection(ep); + } + }else abort_connection(ep); mutex_unlock(&ep->parent_ep->com.mutex); } @@ -2213,7 +2219,7 @@ int c4iw_ep_disconnect(struct c4iw_ep *e CTR2(KTR_IW_CXGBE, "%s:ced1 %p", __func__, ep); fatal = 1; - close_complete_upcall(ep, -EIO); + close_complete_upcall(ep, -ECONNRESET); ep->com.state = DEAD; } CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep, From owner-svn-src-all@freebsd.org Sat Oct 10 02:06:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B5949D2C46; Sat, 10 Oct 2015 02:06:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1617D1614; Sat, 10 Oct 2015 02:06:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A268jW095879; Sat, 10 Oct 2015 02:06:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A2681n095878; Sat, 10 Oct 2015 02:06:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510100206.t9A2681n095878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 10 Oct 2015 02:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289104 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 02:06:09 -0000 Author: ian Date: Sat Oct 10 02:06:07 2015 New Revision: 289104 URL: https://svnweb.freebsd.org/changeset/base/289104 Log: Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT). Modified: head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Sat Oct 10 01:41:07 2015 (r289103) +++ head/sys/dev/iicbus/iiconf.h Sat Oct 10 02:06:07 2015 (r289104) @@ -43,6 +43,7 @@ #define IIC_NOINTR 0 #define IIC_WAIT 0x1 #define IIC_INTR 0x2 +#define IIC_INTRWAIT (IIC_INTR | IIC_WAIT) /* * i2c modes From owner-svn-src-all@freebsd.org Sat Oct 10 02:29:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA4B89D3DDF; Sat, 10 Oct 2015 02:29:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 833C3181; Sat, 10 Oct 2015 02:29:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A2T2I0002048; Sat, 10 Oct 2015 02:29:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A2T2rB002047; Sat, 10 Oct 2015 02:29:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510100229.t9A2T2rB002047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 10 Oct 2015 02:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289105 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 02:29:03 -0000 Author: ian Date: Sat Oct 10 02:29:02 2015 New Revision: 289105 URL: https://svnweb.freebsd.org/changeset/base/289105 Log: Translate iic hardware layer status values to errno return values. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Sat Oct 10 02:06:07 2015 (r289104) +++ head/sys/dev/iicbus/icee.c Sat Oct 10 02:29:02 2015 (r289105) @@ -180,8 +180,10 @@ icee_read(struct cdev *dev, struct uio * for (i = 0; i < 2; i++) msgs[i].slave = slave; error = iicbus_transfer(sc->sc_dev, msgs, 2); - if (error) + if (error) { + error = iic2errno(error); break; + } error = uiomove(data, len, uio); if (error) break; @@ -239,16 +241,20 @@ icee_write(struct cdev *dev, struct uio if (error) break; error = iicbus_transfer(sc->sc_dev, wr, 1); - if (error) + if (error) { + error = iic2errno(error); break; + } /* Read after write to wait for write-done. */ waitlimit = 10000; rd[0].slave = slave; do { error = iicbus_transfer(sc->sc_dev, rd, 1); } while (waitlimit-- > 0 && error != 0); - if (error) + if (error) { + error = iic2errno(error); break; + } } ICEE_UNLOCK(sc); return error; From owner-svn-src-all@freebsd.org Sat Oct 10 03:15:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 605A2A08059; Sat, 10 Oct 2015 03:15:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1943E62; Sat, 10 Oct 2015 03:15:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbkq10 with SMTP id kq10so47049186igb.0; Fri, 09 Oct 2015 20:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=56YmeNRgWLwREXezIuwAWHMUJusvMQ7U8Nm45xiG2I0=; b=sE+IX3cAEfLmT6zJXlk+0B1BYZoRplexKnAb4Fbo4G33Anke+R31OorQwZxO28Pyod 3TfFd/ynWLInbCepAZ2fWjBDMj3uYL3lXMTAX4TJgR0oZUdV2qPJdhjH7THyhhfsgdE/ Ra2sTAGYNdRe65D4JjfWaNG9ZVdjiKS4iCEZRgsv2eTxIEm1n4q95nvUsvY5OB0etcQY QHQ2/reJCt0x9S1KnMkF8u0jGxBg9aW/EHM3mM8adGTLErskvJFH3UGkp35/7YA3xaCc v8+3kzo9KxxSVriyicXQwesyHVL9urVkx5O15D8S8G/0npxx5Wq0vigeDPzgSHPQDR/a wwog== MIME-Version: 1.0 X-Received: by 10.50.61.137 with SMTP id p9mr2616924igr.37.1444446957082; Fri, 09 Oct 2015 20:15:57 -0700 (PDT) Received: by 10.36.2.10 with HTTP; Fri, 9 Oct 2015 20:15:57 -0700 (PDT) In-Reply-To: <201510092209.t99M9iPx025401@repo.freebsd.org> References: <201510092209.t99M9iPx025401@repo.freebsd.org> Date: Fri, 9 Oct 2015 20:15:57 -0700 Message-ID: Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma From: Adrian Chadd To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 03:15:58 -0000 I think this broke being able to do installworld as non-root 21:03 <@adrian> ===> libexec/dma/dmagent (installconfig) 21:03 <@adrian> install: /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma/dma.conf: chown/chgrp: Operation not permitted 21:03 <@adrian> *** Error code 71 -a On 9 October 2015 at 15:09, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Oct 9 22:09:44 2015 > New Revision: 289087 > URL: https://svnweb.freebsd.org/changeset/base/289087 > > Log: > Move all the dma(8) components into one single directory > > Simplifying maintainance and options (only one place to deal with MK_DMAGENT) > > This also makes packaging base less intrusive by getting a single point where > to add tags. > > Added: > head/libexec/dma/Makefile.inc (contents, props changed) > head/libexec/dma/dma/ > head/libexec/dma/dma-mbox-create/ > - copied from r289057, head/libexec/dma-mbox-create/ > head/libexec/dma/dma/Makefile > - copied, changed from r289057, head/libexec/dma/Makefile > head/libexec/dma/dma/dma.conf > - copied unchanged from r289057, head/etc/dma/dma.conf > head/libexec/dma/dma/mailer.conf > - copied unchanged from r289057, head/share/examples/dma/mailer.conf > Deleted: > head/etc/dma/ > head/libexec/dma-mbox-create/ > head/libexec/dma/Makefile > head/share/examples/dma/ > Modified: > head/etc/Makefile > head/libexec/Makefile > head/libexec/dma/dma-mbox-create/Makefile > head/share/examples/Makefile > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Fri Oct 9 22:05:31 2015 (r289086) > +++ head/etc/Makefile Fri Oct 9 22:09:44 2015 (r289087) > @@ -239,9 +239,6 @@ distribution: > .endif > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > -.if ${MK_DMAGENT} != "no" > - ${_+_}cd ${.CURDIR}/dma; ${MAKE} install > -.endif > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > .if ${MK_PKGBOOTSTRAP} != "no" > > Modified: head/libexec/Makefile > ============================================================================== > --- head/libexec/Makefile Fri Oct 9 22:05:31 2015 (r289086) > +++ head/libexec/Makefile Fri Oct 9 22:09:44 2015 (r289087) > @@ -8,7 +8,6 @@ SUBDIR= ${_atf} \ > ${_casper} \ > ${_comsat} \ > ${_dma} \ > - ${_dma-mbox-create} \ > getty \ > ${_mail.local} \ > ${_mknetid} \ > @@ -56,7 +55,6 @@ _comsat= comsat > > .if ${MK_DMAGENT} != "no" > _dma= dma > -_dma-mbox-create= dma-mbox-create > .endif > > .if ${MK_NIS} != "no" > > Added: head/libexec/dma/Makefile.inc > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/libexec/dma/Makefile.inc Fri Oct 9 22:09:44 2015 (r289087) > @@ -0,0 +1,13 @@ > +# $FreeBSD$ > + > +.sinclude "${.CURDIR}/../../Makefile.inc" > +DMA_SOURCES= ${.CURDIR}/../../../contrib/dma > +.PATH: ${DMA_SOURCES} > + > +CFLAGS= -I${DMA_SOURCES} \ > + -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ > + -DCONF_PATH='"/etc/dma"' \ > + -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ > + -DDMA_ROOT_USER='"mailnull"' \ > + -DDMA_GROUP='"mail"' > +BINGRP= mail > > Modified: head/libexec/dma/dma-mbox-create/Makefile > ============================================================================== > --- head/libexec/dma-mbox-create/Makefile Thu Oct 8 21:52:20 2015 (r289057) > +++ head/libexec/dma/dma-mbox-create/Makefile Fri Oct 9 22:09:44 2015 (r289087) > @@ -1,18 +1,10 @@ > # $FreeBSD$ > > -.PATH: ${.CURDIR}/../../contrib/dma > - > -CFLAGS= -I${.CURDIR}/../../contrib/dma \ > - -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ > - -DCONF_PATH='"/etc/dma"' \ > - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' > - > MAN= > > WARNS= 2 > > PROG= dma-mbox-create > -BINGRP= mail > BINMODE= 4554 > > .include > > Copied and modified: head/libexec/dma/dma/Makefile (from r289057, head/libexec/dma/Makefile) > ============================================================================== > --- head/libexec/dma/Makefile Thu Oct 8 21:52:20 2015 (r289057, copy source) > +++ head/libexec/dma/dma/Makefile Fri Oct 9 22:09:44 2015 (r289087) > @@ -1,13 +1,5 @@ > # $FreeBSD$ > > -.PATH: ${.CURDIR}/../../contrib/dma > - > -CFLAGS= -I${.CURDIR}/../../contrib/dma \ > - -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ > - -DCONF_PATH='"/etc/dma"' \ > - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ > - -DDMA_ROOT_USER='"mailnull"' \ > - -DDMA_GROUP='"mail"' > LIBADD= ssl crypto > > PROG= dma > @@ -24,10 +16,13 @@ SRCS= aliases_parse.y \ > spool.c \ > util.c > MAN8= dma.8 > +CONFS= dma.conf > +CONFSDIR= ${ETCDIR}/dma > YFLAGS+= -i > CLEANFILES= aliases_parse.i > +FILES= mailer.conf > +FILESDIR= ${SHAREDIR}/examples/dma > > -BINGRP= mail > BINMODE= 2555 > > .include > > Copied: head/libexec/dma/dma/dma.conf (from r289057, head/etc/dma/dma.conf) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/libexec/dma/dma/dma.conf Fri Oct 9 22:09:44 2015 (r289087, copy of r289057, head/etc/dma/dma.conf) > @@ -0,0 +1,64 @@ > +# $FreeBSD$ > +# > +# Your smarthost (also called relayhost). Leave blank if you don't want > +# smarthost support. > +#SMARTHOST > + > +# Use this SMTP port. Most users will be fine with the default (25) > +#PORT 25 > + > +# Path to your alias file. Just stay with the default. > +#ALIASES /etc/aliases > + > +# Path to your spooldir. Just stay with the default. > +#SPOOLDIR /var/spool/dma > + > +# SMTP authentication > +#AUTHPATH /etc/dma/auth.conf > + > +# Uncomment if yout want TLS/SSL support > +#SECURETRANSFER > + > +# Uncomment if you want STARTTLS support (only used in combination with > +# SECURETRANSFER) > +#STARTTLS > + > +# Uncomment if you have specified STARTTLS above and it should be allowed > +# to fail ("opportunistic TLS", use an encrypted connection when available > +# but allow an unencrypted one to servers that do not support it) > +#OPPORTUNISTIC_TLS > + > +# Path to your local SSL certificate > +#CERTFILE > + > +# If you want to use plain text SMTP login without using encryption, change > +# the SECURE entry below to INSECURE. Otherwise plain login will only work > +# over a secure connection. Use this option with caution. > +#SECURE > + > +# Uncomment if you want to defer your mails. This is useful if you are > +# behind a dialup line. You have to submit your mails manually with dma -q > +#DEFER > + > +# Uncomment if you want the bounce message to include the complete original > +# message, not just the headers. > +#FULLBOUNCE > + > +# The internet hostname dma uses to identify the host. > +# If not set or empty, the result of gethostname(2) is used. > +# If MAILNAME is an absolute path to a file, the first line of this file > +# will be used as the hostname. > +#MAILNAME mail.example.net > + > +# Masquerade envelope from addresses with this address/hostname. > +# Use this if mails are not accepted by destination mail servers because > +# your sender domain is invalid. > +# By default, MASQUERADE is not set. > +# Format: MASQUERADE [user@][host] > +# Examples: > +# MASQUERADE john@ on host "hamlet" will send all mails as john@hamlet > +# MASQUERADE percolator will send mails as $username@percolator, e.g. fish@percolator > +# MASQUERADE herb@ert will send all mails as herb@ert > + > +# Directly forward the mail to the SMARTHOST bypassing aliases and local delivery > +#NULLCLIENT > > Copied: head/libexec/dma/dma/mailer.conf (from r289057, head/share/examples/dma/mailer.conf) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/libexec/dma/dma/mailer.conf Fri Oct 9 22:09:44 2015 (r289087, copy of r289057, head/share/examples/dma/mailer.conf) > @@ -0,0 +1,5 @@ > +# $FreeBSD$ > + > +sendmail /usr/libexec/dma > +send-mail /usr/libexec/dma > +mailq /usr/libexec/dma > > Modified: head/share/examples/Makefile > ============================================================================== > --- head/share/examples/Makefile Fri Oct 9 22:05:31 2015 (r289086) > +++ head/share/examples/Makefile Fri Oct 9 22:09:44 2015 (r289087) > @@ -255,9 +255,6 @@ SUBDIR+=ipfilter > .if ${MK_PF} != "no" > SUBDIR+=pf > .endif > -.if ${MK_DMAGENT} != "no" > -SUBDIR+=dma > -.endif > .endif > > .if ${MK_TESTS} != "no" > From owner-svn-src-all@freebsd.org Sat Oct 10 05:00:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E5619D18B2; Sat, 10 Oct 2015 05:00:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FC1A191F; Sat, 10 Oct 2015 05:00:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A50I98050805; Sat, 10 Oct 2015 05:00:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A50ISi050804; Sat, 10 Oct 2015 05:00:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510100500.t9A50ISi050804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 10 Oct 2015 05:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289106 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 05:00:19 -0000 Author: adrian Date: Sat Oct 10 05:00:18 2015 New Revision: 289106 URL: https://svnweb.freebsd.org/changeset/base/289106 Log: Update the AP135 reference design flash layout to be more useful. * Shuffle the kernel to be at the beginning * Give the kernel 2mb, the rootfs 6mb, and 'mib0' the rest * put the cfg parition just before the ART calibration data for the wifi part in the SoC * .. and make sure ART points to the right 64k region. I've updated the freebsd-wifi-build wiki the instructions on using this. If someone has an AP135 with 8MB SPI flash then this won't work; everything minus the big mib0 partition is just a bit over 8MB. Come see me if this ever happens (you'll likely just have to shrink the rootfs and the kernel a little in order to make it fit.) Tested: * AP135 reference board. Modified: head/sys/mips/conf/AP135.hints Modified: head/sys/mips/conf/AP135.hints ============================================================================== --- head/sys/mips/conf/AP135.hints Sat Oct 10 02:29:02 2015 (r289105) +++ head/sys/mips/conf/AP135.hints Sat Oct 10 05:00:18 2015 (r289106) @@ -127,6 +127,17 @@ hint.ath.0.eepromsize=16384 # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART) +# The default flash layout isn't enough to fit a freebsd kernel +# now, so the layout has been shuffled around. +# +# By default it's set to: +# 256KB uboot, 64KB uboot-env, 6336KB rootfs, 1344KB kernel, 64KB cfg, 8256MB mib0, 64KB ART +# With 'bootcmd=bootm 0x9f680000' in the environment. +# +# Instead, now let's make it: +# 256KB uboot, 64KB uboot-env, 2048MB kernel, 6144MB rootfs, 7644KB mib0, 64KB cfg, 64KB ART +# .. and then you change the boot env to be: +# 'bootcmd=bootm 0x9f050000' # 256KiB u-boot hint.map.0.at="flash/spi0" @@ -142,37 +153,37 @@ hint.map.1.end=0x00050000 # 64k u-boot-e hint.map.1.name="u-boot-env" hint.map.1.readonly=1 -# 6336KiB rootfs +# 2048KiB kernel hint.map.2.at="flash/spi0" hint.map.2.start=0x00050000 -hint.map.2.end=0x00680000 # 6336k rootfs -hint.map.2.name="rootfs" +hint.map.2.end=0x00250000 # 2048k rootfs +hint.map.2.name="kernel" hint.map.2.readonly=1 -# 1344KiB uImage +# 6144KiB rootfs hint.map.3.at="flash/spi0" -hint.map.3.start=0x00680000 -hint.map.3.end=0x007d0000 # 1408k uImage, 64k off the end.. -hint.map.3.name="uImage" +hint.map.3.start=0x00250000 +hint.map.3.end=0x00850000 +hint.map.3.name="rootfs" hint.map.3.readonly=1 -# 64KiB cfg +# 7644KiB mib0 hint.map.4.at="flash/spi0" -hint.map.4.start=0x007d0000 -hint.map.4.end=0x007e0000 -hint.map.4.name="cfg" +hint.map.4.start=0x00850000 +hint.map.4.end=0x00fe0000 +hint.map.4.name="mib0" hint.map.4.readonly=0 -# 8256 KiB mib0 +# 64KiB cfg hint.map.5.at="flash/spi0" -hint.map.5.start=0x007e0000 -hint.map.5.end=0x00ff0000 # 64k mib0 -hint.map.5.name="mib0" -hint.map.5.readonly=1 +hint.map.5.start=0x00fe0000 +hint.map.5.end=0x00ff0000 +hint.map.5.name="cfg" +hint.map.5.readonly=0 # 64KiB ART hint.map.6.at="flash/spi0" -hint.map.6.start=0x007f0000 +hint.map.6.start=0x00ff0000 hint.map.6.end=0x01000000 # 64k ART hint.map.6.name="ART" hint.map.6.readonly=1 From owner-svn-src-all@freebsd.org Sat Oct 10 05:50:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D08D9D211A; Sat, 10 Oct 2015 05:50: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 5941174; Sat, 10 Oct 2015 05:50: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 t9A5ogWU067052; Sat, 10 Oct 2015 05:50:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A5ogBG067051; Sat, 10 Oct 2015 05:50:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510100550.t9A5ogBG067051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Oct 2015 05:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289107 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 05:50:43 -0000 Author: kib Date: Sat Oct 10 05:50:42 2015 New Revision: 289107 URL: https://svnweb.freebsd.org/changeset/base/289107 Log: MFC r288258: Make the __bitcount*() functions unconditionally available. Modified: stable/10/sys/sys/types.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/types.h ============================================================================== --- stable/10/sys/sys/types.h Sat Oct 10 05:00:18 2015 (r289106) +++ stable/10/sys/sys/types.h Sat Oct 10 05:50:42 2015 (r289107) @@ -285,9 +285,6 @@ typedef _Bool bool; * The following are all things that really shouldn't exist in this header, * since its purpose is to provide typedefs, not miscellaneous doodads. */ -#if __BSD_VISIBLE - -#include #ifdef __POPCNT__ #define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) @@ -351,6 +348,10 @@ __bitcount64(__uint64_t _x) #define __bitcount(x) __bitcount32((unsigned int)(x)) #endif +#if __BSD_VISIBLE + +#include + /* * minor() gives a cookie instead of an index since we don't want to * change the meanings of bits 0-15 or waste time and space shifting From owner-svn-src-all@freebsd.org Sat Oct 10 06:08:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28A8B9D2E29; Sat, 10 Oct 2015 06:08:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFC0AC7B; Sat, 10 Oct 2015 06:08:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9A68kwX085710 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 10 Oct 2015 09:08:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9A68kwX085710 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9A68kCl085709; Sat, 10 Oct 2015 09:08:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Oct 2015 09:08:46 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize Message-ID: <20151010060846.GA2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510091821.t99ILjHI054211@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 06:08:54 -0000 On Fri, Oct 09, 2015 at 06:21:45PM +0000, Dimitry Andric wrote: > Author: dim > Date: Fri Oct 9 18:21:45 2015 > New Revision: 289072 > URL: https://svnweb.freebsd.org/changeset/base/289072 > > Log: > Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): > > [SLP] Vectorize for all-constant entries. > > This should fix libc++'s iostream initialization SIGBUSing on amd64, > whenever the global cout symbol is not aligned to 16 bytes. > > Some further explanation: libc++'s iostream.cpp contains the definitions > of std::cout, std::cerr and so on. These global objects are effectively > declared with an alignment of 8 bytes. When an executable is linked > against libc++.so, it can sometimes get a copy of the global object, > which is then at the same alignment. > > However, with clang 3.7.0, the initialization of these global objects > will incorrectly use SSE instructions (e.g. movdqa), whenever the > optimization level is high enough, and SSE is enabled, such as on amd64. > When any of these objects is not aligned to 16 bytes, this will result > in a SIGBUS during iostream initialization. In contrast, clang 3.6.x > and earlier took the 8 byte alignment into consideration, and avoided > SSE for those particular operations. > > After bisecting of upstream changes, I found that the above revision > caused the change of this behavior, so I am reverting it now as a > workaround, while a discussion and test case is being prepared for > upstream. This might be indeed a clang bug, but probably not in the revision which you reverted. Or it might be a libc++ bug. The story, from what I understand from the discussion at some other place, is that the fault occurs on access to the common unaligned symbol. Apparently, ELF does allow to specify alignment of the common symbols, and static linker, when finally allocating .bss space for the object, must obey the requirement. The symbol value for the common symbol must be interpreted as the desired alignment. Could you look up the symbol reference in the .o files (again) and see which alignment is requested ? I think that it is probably clang which should set it to be at least 16 bytes to generate ABI-compliant code. From owner-svn-src-all@freebsd.org Sat Oct 10 07:12:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78B799D2CF9; Sat, 10 Oct 2015 07:12:18 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46B5B12A6; Sat, 10 Oct 2015 07:12:18 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by igbkq10 with SMTP id kq10so48692693igb.0; Sat, 10 Oct 2015 00:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=aJXJO7IyFT0VEns/+FpZjG4YzvJA7xV535TJIcnWai0=; b=ngA/uxmJBtHp8+YRJZ/Cw6Vf9JnNZRsHIVrL6YvmLNCAdB+tMXPD+G0qHdWglvdT43 X7iMDMC67edqmdt8P1mpEeyQQNcsMMF2cQzlOVr7bK7urt27ibrEtafswdMiyM55QaRl zY/6RllS8XZXrABDKIjkGhYJU9Z1sjYG9sqPzg4xv/DAMS0VsWVflqfceB7e9b1qQQ3a GtwzJuTH+mZL42XHp6sW83ipZq7E7Gol3LjjjGWY6OU8KQmRSg7mm1bFjma/NUlANSNX l9MJYItAEet651yO8h6YgbktkXZ203gqQmaU48RXSpjBH7Ej8n4P6wDGHwpW5TlRrTVK guKg== MIME-Version: 1.0 X-Received: by 10.50.27.5 with SMTP id p5mr3122054igg.66.1444461137734; Sat, 10 Oct 2015 00:12:17 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.46.21 with HTTP; Sat, 10 Oct 2015 00:12:17 -0700 (PDT) In-Reply-To: <201510092157.t99Lvgfu022041@repo.freebsd.org> References: <201510092157.t99Lvgfu022041@repo.freebsd.org> Date: Sat, 10 Oct 2015 07:12:17 +0000 X-Google-Sender-Auth: zcofzD_T2OxGAhi88TxDK3NWXgM Message-ID: Subject: Re: svn commit: r289085 - head/share/mk From: Antoine Brodin To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 07:12:18 -0000 On Fri, Oct 9, 2015 at 9:57 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Oct 9 21:57:42 2015 > New Revision: 289085 > URL: https://svnweb.freebsd.org/changeset/base/289085 > > Log: > Add a new bsd.confs.mk similar to bsd.files.mk or bsd.incs.mk > > It defines a CONFS variable for all files supposed to be installed as a > configuration file and handle as such Hi, This breaks lots of ports: - bsd.confs.mk used but not installed - ETCDIR defined to /etc in bsd.own.mk Cheers, Antoine (with hat: portmgr) From owner-svn-src-all@freebsd.org Sat Oct 10 07:43:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C745E9D255B; Sat, 10 Oct 2015 07:43:03 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 925E37AB; Sat, 10 Oct 2015 07:43:03 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A7h26n000545; Sat, 10 Oct 2015 07:43:02 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A7h2OI000544; Sat, 10 Oct 2015 07:43:02 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201510100743.t9A7h2OI000544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sat, 10 Oct 2015 07:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289109 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 07:43:03 -0000 Author: dumbbell Date: Sat Oct 10 07:43:02 2015 New Revision: 289109 URL: https://svnweb.freebsd.org/changeset/base/289109 Log: drm/i915: Remove "Attempting to unbind pinned buffer" message This error message is removed in later versions of Linux and currently, it spams users. PR: 200712 MFC after: 1 week Modified: head/sys/dev/drm2/i915/i915_gem.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Sat Oct 10 06:43:44 2015 (r289108) +++ head/sys/dev/drm2/i915/i915_gem.c Sat Oct 10 07:43:02 2015 (r289109) @@ -2527,10 +2527,8 @@ i915_gem_object_unbind(struct drm_i915_g if (obj->gtt_space == NULL) return 0; - if (obj->pin_count) { - DRM_ERROR("Attempting to unbind pinned buffer\n"); + if (obj->pin_count) return -EINVAL; - } ret = i915_gem_object_finish_gpu(obj); if (ret == -ERESTARTSYS || ret == -EINTR) From owner-svn-src-all@freebsd.org Sat Oct 10 09:03:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8424DA0F028; Sat, 10 Oct 2015 09:03:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58EDDD64; Sat, 10 Oct 2015 09:03:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A93Wh6024202; Sat, 10 Oct 2015 09:03:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A93WA0024199; Sat, 10 Oct 2015 09:03:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510100903.t9A93WA0024199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Oct 2015 09:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289110 - in head: sbin/geom/class/nop sys/geom/nop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 09:03:33 -0000 Author: trasz Date: Sat Oct 10 09:03:31 2015 New Revision: 289110 URL: https://svnweb.freebsd.org/changeset/base/289110 Log: Make geom_nop(4) collect statistics on all types of BIOs, not just reads and writes. PR: kern/198405 Submitted by: Matthew D. Fuller MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3679 Modified: head/sbin/geom/class/nop/gnop.8 head/sys/geom/nop/g_nop.c head/sys/geom/nop/g_nop.h Modified: head/sbin/geom/class/nop/gnop.8 ============================================================================== --- head/sbin/geom/class/nop/gnop.8 Sat Oct 10 07:43:02 2015 (r289109) +++ head/sbin/geom/class/nop/gnop.8 Sat Oct 10 09:03:31 2015 (r289110) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2015 +.Dd October 10, 2015 .Dt GNOP 8 .Os .Sh NAME @@ -72,9 +72,10 @@ The utility is used for setting up transparent providers on existing ones. Its main purpose is testing other GEOM classes, as it allows forced provider removal and I/O error simulation with a given probability. -It also gathers the following statistics: number of read requests, number of -write requests, number of bytes read and number of bytes written. -In addition, it can be used as a good starting point for implementing new GEOM +It also gathers statistics on the number of read, write, delete, +getattr, flush, and other requests, and the number of bytes read and written. +.Nm +can also be used as a good starting point for implementing new GEOM classes. .Pp The first argument to Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Sat Oct 10 07:43:02 2015 (r289109) +++ head/sys/geom/nop/g_nop.c Sat Oct 10 09:03:31 2015 (r289110) @@ -119,6 +119,24 @@ g_nop_start(struct bio *bp) sc->sc_wrotebytes += bp->bio_length; failprob = sc->sc_wfailprob; break; + case BIO_DELETE: + sc->sc_deletes++; + break; + case BIO_GETATTR: + sc->sc_getattrs++; + break; + case BIO_FLUSH: + sc->sc_flushes++; + break; + case BIO_CMD0: + sc->sc_cmd0s++; + break; + case BIO_CMD1: + sc->sc_cmd1s++; + break; + case BIO_CMD2: + sc->sc_cmd2s++; + break; } mtx_unlock(&sc->sc_lock); if (failprob > 0) { @@ -238,6 +256,12 @@ g_nop_create(struct gctl_req *req, struc sc->sc_wfailprob = wfailprob; sc->sc_reads = 0; sc->sc_writes = 0; + sc->sc_deletes = 0; + sc->sc_getattrs = 0; + sc->sc_flushes = 0; + sc->sc_cmd0s = 0; + sc->sc_cmd1s = 0; + sc->sc_cmd2s = 0; sc->sc_readbytes = 0; sc->sc_wrotebytes = 0; mtx_init(&sc->sc_lock, "gnop lock", NULL, MTX_DEF); @@ -602,6 +626,12 @@ g_nop_ctl_reset(struct gctl_req *req, st sc = pp->geom->softc; sc->sc_reads = 0; sc->sc_writes = 0; + sc->sc_deletes = 0; + sc->sc_getattrs = 0; + sc->sc_flushes = 0; + sc->sc_cmd0s = 0; + sc->sc_cmd1s = 0; + sc->sc_cmd2s = 0; sc->sc_readbytes = 0; sc->sc_wrotebytes = 0; } @@ -659,6 +689,12 @@ g_nop_dumpconf(struct sbuf *sb, const ch sbuf_printf(sb, "%s%d\n", indent, sc->sc_error); sbuf_printf(sb, "%s%ju\n", indent, sc->sc_reads); sbuf_printf(sb, "%s%ju\n", indent, sc->sc_writes); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_deletes); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_getattrs); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_flushes); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd0s); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd1s); + sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd2s); sbuf_printf(sb, "%s%ju\n", indent, sc->sc_readbytes); sbuf_printf(sb, "%s%ju\n", indent, Modified: head/sys/geom/nop/g_nop.h ============================================================================== --- head/sys/geom/nop/g_nop.h Sat Oct 10 07:43:02 2015 (r289109) +++ head/sys/geom/nop/g_nop.h Sat Oct 10 09:03:31 2015 (r289110) @@ -65,6 +65,12 @@ struct g_nop_softc { u_int sc_wfailprob; uintmax_t sc_reads; uintmax_t sc_writes; + uintmax_t sc_deletes; + uintmax_t sc_getattrs; + uintmax_t sc_flushes; + uintmax_t sc_cmd0s; + uintmax_t sc_cmd1s; + uintmax_t sc_cmd2s; uintmax_t sc_readbytes; uintmax_t sc_wrotebytes; struct mtx sc_lock; From owner-svn-src-all@freebsd.org Sat Oct 10 09:21:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51607A0FDE5; Sat, 10 Oct 2015 09:21:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184E8AE8; Sat, 10 Oct 2015 09:21:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A9LuQP029947; Sat, 10 Oct 2015 09:21:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A9LucG029946; Sat, 10 Oct 2015 09:21:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510100921.t9A9LucG029946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Oct 2015 09:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289111 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 09:21:57 -0000 Author: trasz Date: Sat Oct 10 09:21:55 2015 New Revision: 289111 URL: https://svnweb.freebsd.org/changeset/base/289111 Log: Provide better debug message on kernel module name clash. Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_module.c Modified: head/sys/kern/kern_module.c ============================================================================== --- head/sys/kern/kern_module.c Sat Oct 10 09:03:31 2015 (r289110) +++ head/sys/kern/kern_module.c Sat Oct 10 09:21:55 2015 (r289111) @@ -158,16 +158,12 @@ module_register(const moduledata_t *data newmod = module_lookupbyname(data->name); if (newmod != NULL) { MOD_XUNLOCK; - printf("module_register: module %s already exists!\n", - data->name); + printf("%s: cannot register %s from %s; already loaded from %s\n", + __func__, data->name, container->filename, newmod->file->filename); return (EEXIST); } namelen = strlen(data->name) + 1; newmod = malloc(sizeof(struct module) + namelen, M_MODULE, M_WAITOK); - if (newmod == NULL) { - MOD_XUNLOCK; - return (ENOMEM); - } newmod->refs = 1; newmod->id = nextid++; newmod->name = (char *)(newmod + 1); From owner-svn-src-all@freebsd.org Sat Oct 10 09:29:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C169D2207; Sat, 10 Oct 2015 09:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 394FFEE0; Sat, 10 Oct 2015 09:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A9TlQJ030246; Sat, 10 Oct 2015 09:29:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A9TlEv030244; Sat, 10 Oct 2015 09:29:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510100929.t9A9TlEv030244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Oct 2015 09:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289112 - in head: lib/libc/sys sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 09:29:48 -0000 Author: trasz Date: Sat Oct 10 09:29:47 2015 New Revision: 289112 URL: https://svnweb.freebsd.org/changeset/base/289112 Log: Change the default setting of kern.ipc.shm_allow_removed from 0 to 1. This removes the need for manually changing this flag for Google Chrome users. It also improves compatibility with Linux applications running under Linuxulator compatibility layer, and possibly also helps in porting software from Linux. Generally speaking, the flag allows applications to create the shared memory segment, attach it, remove it, and then continue to use it and to reattach it later. This means that the kernel will automatically "clean up" after the application exits. It could be argued that it's against POSIX. However, SUSv3 says this about IPC_RMID: "Remove the shared memory identifier specified by shmid from the system and destroy the shared memory segment and shmid_ds data structure associated with it." From my reading, we break it in any case by deferring removal of the segment until it's detached; we won't break it any more by also deferring removal of the identifier. This is the behaviour exhibited by Linux since... probably always, and also by OpenBSD since the following commit: revision 1.54 date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8; Allow segments to be used even after they were marked for deletion with the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3603 Modified: head/lib/libc/sys/shmctl.2 head/sys/kern/sysv_shm.c Modified: head/lib/libc/sys/shmctl.2 ============================================================================== --- head/lib/libc/sys/shmctl.2 Sat Oct 10 09:21:55 2015 (r289111) +++ head/lib/libc/sys/shmctl.2 Sat Oct 10 09:29:47 2015 (r289112) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 17, 1995 +.Dd October 10, 2015 .Dt SHMCTL 2 .Os .Sh NAME @@ -72,15 +72,18 @@ or it must have superuser privileges. .It Dv IPC_RMID Removes the segment from the system. The removal will not take -effect until all processes having attached the segment have exited; -however, once the IPC_RMID operation has taken place, no further -processes will be allowed to attach the segment. +effect until all processes having attached the segment have exited. For the operation to succeed, the calling process's effective uid must match .Fa shm_perm.uid or .Fa shm_perm.cuid , or the process must have superuser privileges. +If the +.Va kern.ipc.shm_allow_removed +.Xr sysctl 3 +variable is set to 0, once the IPC_RMID operation has taken place, +no further processes will be allowed to attach the segment. .\" .It Dv SHM_LOCK .\" Locks the segment in memory. The calling process must have .\" superuser privileges. Not implemented in FreeBSD. Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sat Oct 10 09:21:55 2015 (r289111) +++ head/sys/kern/sysv_shm.c Sat Oct 10 09:29:47 2015 (r289112) @@ -162,7 +162,7 @@ struct shminfo shminfo = { }; static int shm_use_phys; -static int shm_allow_removed; +static int shm_allow_removed = 1; SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RWTUN, &shminfo.shmmax, 0, "Maximum shared memory segment size"); From owner-svn-src-all@freebsd.org Sat Oct 10 09:35:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35E839D2705; Sat, 10 Oct 2015 09:35:13 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E799C14AF; Sat, 10 Oct 2015 09:35:12 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZkqYR-000Axn-VM; Sat, 10 Oct 2015 12:35:03 +0300 Date: Sat, 10 Oct 2015 12:35:03 +0300 From: Slawa Olhovchenkov To: =?koi8-r?Q?Jean-S'ebastien_P'edron?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 Message-ID: <20151010093503.GA42243@zxy.spb.ru> References: <201510100743.t9A7h2OI000544@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201510100743.t9A7h2OI000544@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 09:35:13 -0000 On Sat, Oct 10, 2015 at 07:43:02AM +0000, Jean-S'ebastien P'edron wrote: > Author: dumbbell > Date: Sat Oct 10 07:43:02 2015 > New Revision: 289109 > URL: https://svnweb.freebsd.org/changeset/base/289109 > > Log: > drm/i915: Remove "Attempting to unbind pinned buffer" message > > This error message is removed in later versions of Linux and currently, > it spams users. > > PR: 200712 > MFC after: 1 week What about don't worked video playback? https://lists.freebsd.org/pipermail/freebsd-current/2015-August/057326.html From owner-svn-src-all@freebsd.org Sat Oct 10 09:37:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A0ED9D2900; Sat, 10 Oct 2015 09:37:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E17DF1873; Sat, 10 Oct 2015 09:37:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9A9bVrt033407; Sat, 10 Oct 2015 09:37:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9A9bVvO033405; Sat, 10 Oct 2015 09:37:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510100937.t9A9bVvO033405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Oct 2015 09:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289113 - head/sbin/mdconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 09:37:33 -0000 Author: trasz Date: Sat Oct 10 09:37:31 2015 New Revision: 289113 URL: https://svnweb.freebsd.org/changeset/base/289113 Log: Add 'p' postfix to mdconfig(8). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat Oct 10 09:29:47 2015 (r289112) +++ head/sbin/mdconfig/mdconfig.8 Sat Oct 10 09:37:31 2015 (r289113) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd October 10, 2015 .Dt MDCONFIG 8 .Os .Sh NAME @@ -159,11 +159,11 @@ prefix. Size of the memory disk. .Ar Size is the number of 512 byte sectors unless suffixed with a -.Cm b , k , m , g , +.Cm b , k , m , g , t , or -.Cm t +.Cm p which -denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. +denotes byte, kilobyte, megabyte, gigabyte, terabyte and petabyte respectively. When used without the .Fl r option, the Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Sat Oct 10 09:29:47 2015 (r289112) +++ head/sbin/mdconfig/mdconfig.c Sat Oct 10 09:37:31 2015 (r289113) @@ -88,8 +88,8 @@ usage(void) fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n"); fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n"); fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n"); - fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB) or\n"); - fprintf(stderr, "\t\t %%dt (TB)\n"); + fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB), \n"); + fprintf(stderr, "\t\t %%dt (TB), or %%dp (PB)\n"); exit(1); } @@ -217,6 +217,9 @@ main(int argc, char **argv) else if (*p == 't' || *p == 'T') { mdio.md_mediasize <<= 30; mdio.md_mediasize <<= 10; + } else if (*p == 'p' || *p == 'P') { + mdio.md_mediasize <<= 30; + mdio.md_mediasize <<= 20; } else errx(1, "unknown suffix on -s argument"); break; From owner-svn-src-all@freebsd.org Sat Oct 10 10:15:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1FF3A101B9; Sat, 10 Oct 2015 10:15:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A25711FE; Sat, 10 Oct 2015 10:15:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZkrB3-000HSe-W9; Sat, 10 Oct 2015 12:14:58 +0200 Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 To: Slawa Olhovchenkov References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Message-ID: <5618E51A.7030300@FreeBSD.org> Date: Sat, 10 Oct 2015 12:14:50 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151010093503.GA42243@zxy.spb.ru> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="m26whPkjHlRBpJKjTlHbpDl0DWwtuWA4X" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 10:15:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --m26whPkjHlRBpJKjTlHbpDl0DWwtuWA4X Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10.10.2015 11:35, Slawa Olhovchenkov wrote: > On Sat, Oct 10, 2015 at 07:43:02AM +0000, Jean-S'ebastien P'edron wrote= : > What about don't worked video playback? > https://lists.freebsd.org/pipermail/freebsd-current/2015-August/057326.= html Hi! Hopefully it will be fixed by the coming i915 update. Please see the following wiki article for status update and instructions if you want to test it: https://wiki.freebsd.org/Graphics/Update%20i915%20GPU%20driver%20to%20Lin= ux%203.8 --=20 Jean-S=C3=A9bastien P=C3=A9dron --m26whPkjHlRBpJKjTlHbpDl0DWwtuWA4X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWGOUhXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMCGAP/R/VanYpf3k9h/dPTXpS5ZSc T5UPY34AF2VhZ8cv0J/+9OULopo9oY20I9hscP5fgCR7M+fR9J5ruH7iyD04Egf0 4Gzu7rsuBYuGUWkn6DSIFdjQTVDR4TPqTvMAYpZjogtCNHS7/xazh9CVfBrjOeRs Hz16CtcoO5dcFgSMrwrBKYkanWKWaK89hlJB5fU+CIw0obZjq4lOX3tQWzZc0Ih8 EsgYQE1rvE+JV7BKnf1UPYbTq4mAeUURbnm0R2gMG0ZVj5+Qj6zyNuA7HNCAArPF bdhUzlM4mQutVxOpzx2dffSdJXjOF5Vbe24XyQD8DOr2maKcmPSCNMT+HWlhg73Z tbXm7U2ONoEdXt4skUpiz6vmABfzkvLYlVQDU117UkbUEys+UKp6j/pCtUdgAcQg j2wyMMx3jrdrAiT3nH6m5X1W7CjMIotlDKaEJpNJ9u0IIxTbxI7bmQvcd9Og4VUi nm7rohsmEnY1LGOHxUmtEUdOHbjro6uffWmN6+W6gEUKw69o0ctpBgxGtSrkXys7 cXA45QqRnkwTZTCSWOc1Dyc4+LQ/n5wiixZbwRKQU80bEBvryB0U+Vv+PFyLtsnZ IyhVrUan5RATgRc8QPCUuo5LwlMcCCsnMGZCZNDm0pYph1AcwKJrTkERnozlPIyn FMj3Ei8KQE5bGFgwwzuT =IU/B -----END PGP SIGNATURE----- --m26whPkjHlRBpJKjTlHbpDl0DWwtuWA4X-- From owner-svn-src-all@freebsd.org Sat Oct 10 10:22:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD80CA106EB; Sat, 10 Oct 2015 10:22:35 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A3B1821; Sat, 10 Oct 2015 10:22:35 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZkrIP-000BnO-3y; Sat, 10 Oct 2015 13:22:33 +0300 Date: Sat, 10 Oct 2015 13:22:33 +0300 From: Slawa Olhovchenkov To: =?koi8-r?Q?Jean-S'ebastien_P'edron?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 Message-ID: <20151010102233.GJ6469@zxy.spb.ru> References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <5618E51A.7030300@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 10:22:35 -0000 On Sat, Oct 10, 2015 at 12:14:50PM +0200, Jean-S'ebastien P'edron wrote: > On 10.10.2015 11:35, Slawa Olhovchenkov wrote: > > On Sat, Oct 10, 2015 at 07:43:02AM +0000, Jean-S'ebastien P'edron wrote: > > What about don't worked video playback? > > https://lists.freebsd.org/pipermail/freebsd-current/2015-August/057326.html > > Hi! > > Hopefully it will be fixed by the coming i915 update. Please see the > following wiki article for status update and instructions if you want to > test it: > https://wiki.freebsd.org/Graphics/Update%20i915%20GPU%20driver%20to%20Linux%203.8 Can I try this on 10.2 system? w/o recompile base and X11? From owner-svn-src-all@freebsd.org Sat Oct 10 10:48:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C4EA9D16F1; Sat, 10 Oct 2015 10:48:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DA7A863; Sat, 10 Oct 2015 10:48:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9AAmAHO054465; Sat, 10 Oct 2015 10:48:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9AAm9UN054460; Sat, 10 Oct 2015 10:48:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510101048.t9AAm9UN054460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Oct 2015 10:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 10:48:11 -0000 Author: bapt Date: Sat Oct 10 10:48:09 2015 New Revision: 289114 URL: https://svnweb.freebsd.org/changeset/base/289114 Log: Install bsd.confs.mk Rename ETCDIR into CONFIGDIR to avoid conflicts with the ports tree Modified: head/libexec/dma/dmagent/Makefile head/share/mk/Makefile head/share/mk/bsd.confs.mk head/share/mk/bsd.own.mk head/usr.sbin/ppp/Makefile Modified: head/libexec/dma/dmagent/Makefile ============================================================================== --- head/libexec/dma/dmagent/Makefile Sat Oct 10 09:37:31 2015 (r289113) +++ head/libexec/dma/dmagent/Makefile Sat Oct 10 10:48:09 2015 (r289114) @@ -17,7 +17,7 @@ SRCS= aliases_parse.y \ util.c MAN8= dma.8 CONFS= dma.conf -CONFSDIR= ${ETCDIR}/dma +CONFSDIR= ${CONFIGDIR}/dma YFLAGS+= -i CLEANFILES= aliases_parse.i FILES= mailer.conf Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Sat Oct 10 09:37:31 2015 (r289113) +++ head/share/mk/Makefile Sat Oct 10 10:48:09 2015 (r289114) @@ -13,6 +13,7 @@ FILES= \ bsd.README \ bsd.arch.inc.mk \ bsd.compiler.mk \ + bsd.confs.mk \ bsd.cpu.mk \ bsd.crunchgen.mk \ bsd.dep.mk \ Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Sat Oct 10 09:37:31 2015 (r289113) +++ head/share/mk/bsd.confs.mk Sat Oct 10 10:48:09 2015 (r289114) @@ -22,7 +22,7 @@ all: buildconfig ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${CONFMODE} -${group}DIR?= ${ETCDIR}/ +${group}DIR?= ${CONFIGDIR}/ STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Oct 10 09:37:31 2015 (r289113) +++ head/share/mk/bsd.own.mk Sat Oct 10 10:48:09 2015 (r289114) @@ -213,7 +213,7 @@ NLSGRP?= ${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include -ETCDIR?= /etc +CONFIGDIR?= /etc # # install(1) parameters. Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Sat Oct 10 09:37:31 2015 (r289113) +++ head/usr.sbin/ppp/Makefile Sat Oct 10 10:48:09 2015 (r289114) @@ -22,7 +22,7 @@ PPP_NO_RADIUS= PPP_NO_SUID= .endif CONFS= ppp.conf -CONFSDIR= ${ETCDIR}/ppp +CONFSDIR= ${CONFIGDIR}/ppp CONFSMODE= 600 .if ${MK_ATM} == "no" From owner-svn-src-all@freebsd.org Sat Oct 10 11:37:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57DED9D2AFD; Sat, 10 Oct 2015 11:37:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23CBA1470; Sat, 10 Oct 2015 11:37:46 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbni9 with SMTP id ni9so17484242igb.1; Sat, 10 Oct 2015 04:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HbyikW+X326hDCgrq1ihrQeik0KFoftrMm85g+gStDs=; b=dIoFWDLorEYygCDmtBuGmdyTMKNcwywUJ87ce4XgfKJrWgDDgsIMB70k8ftIDjcmzo 1QHsYxoTKB9G8m3rSRj8StFmsrj+GAT1Hw5lqtLfVltcnh3YUNNMWh/EGJ2l4dZsESXu 0+npVNQjXBUZzirBZYb8DxqJZilXWS6jc0nKmlsMxlccuhZJKxiuipVxRwTUkYBbhcvc 7OzYzqyRGGDrUFez/BIkmCA5AhUmCfoPGIuS6cCbV8FsMcyYguCFz6kUnVT6sZ4Bb5R7 KJTiqVgzHYrvN2GFPN81fgTqEWDwrDmk3oOx7nHO31dxksF05mPicflq09p6boxTbaWn j8RQ== X-Received: by 10.50.134.168 with SMTP id pl8mr3601380igb.33.1444477065464; Sat, 10 Oct 2015 04:37:45 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Sat, 10 Oct 2015 04:37:26 -0700 (PDT) In-Reply-To: <20151010060846.GA2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> <20151010060846.GA2257@kib.kiev.ua> From: Ed Maste Date: Sat, 10 Oct 2015 11:37:26 +0000 X-Google-Sender-Auth: 78xZ9tH_VvVnTGk7MLvy6vB-wFY Message-ID: Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize To: Konstantin Belousov Cc: Dimitry Andric , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 11:37:46 -0000 On 10 October 2015 at 06:08, Konstantin Belousov wrote: > On Fri, Oct 09, 2015 at 06:21:45PM +0000, Dimitry Andric wrote: >> Author: dim >> Date: Fri Oct 9 18:21:45 2015 >> New Revision: 289072 >> URL: https://svnweb.freebsd.org/changeset/base/289072 >> >> Log: >> Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): > > This might be indeed a clang bug, but probably not in the revision which > you reverted. Or it might be a libc++ bug. Yes, the bug is almost certainly not r240144; reverting it is a short-term workaround until the underlying issue is fixed. > The story, from what I understand from the discussion at some other > place, is that the fault occurs on access to the common unaligned > symbol. Apparently, ELF does allow to specify alignment of the common > symbols, and static linker, when finally allocating .bss space for the > object, must obey the requirement. The symbol value for the common > symbol must be interpreted as the desired alignment. > > Could you look up the symbol reference in the .o files (again) and see > which alignment is requested ? I think that it is probably clang which > should set it to be at least 16 bytes to generate ABI-compliant code. The declaration is extern ostream cout; which correctly has 8 byte alignment. In the implementation (contrib/libc++/src/iostream.cpp) it is defined as a char array which is where the 16-byte ABI alignment would arise, but explicitly specifies 8-byte alignment: _ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]; Compiling with -emit-llvm --save-temps shows the desired 8-byte alignment for cout in the LLVM IR but 16-byte in the assembly file. From owner-svn-src-all@freebsd.org Sat Oct 10 12:03:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBCE1A10D6C; Sat, 10 Oct 2015 12:03:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81A1E8CD; Sat, 10 Oct 2015 12:03:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9AC3BCp076310 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 10 Oct 2015 15:03:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9AC3BCp076310 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9AC3B3t076309; Sat, 10 Oct 2015 15:03:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Oct 2015 15:03:11 +0300 From: Konstantin Belousov To: Ed Maste Cc: Dimitry Andric , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize Message-ID: <20151010120311.GE2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> <20151010060846.GA2257@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 12:03:19 -0000 On Sat, Oct 10, 2015 at 11:37:26AM +0000, Ed Maste wrote: > On 10 October 2015 at 06:08, Konstantin Belousov wrote: > > On Fri, Oct 09, 2015 at 06:21:45PM +0000, Dimitry Andric wrote: > >> Author: dim > >> Date: Fri Oct 9 18:21:45 2015 > >> New Revision: 289072 > >> URL: https://svnweb.freebsd.org/changeset/base/289072 > >> > >> Log: > >> Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): > > > > This might be indeed a clang bug, but probably not in the revision which > > you reverted. Or it might be a libc++ bug. > > Yes, the bug is almost certainly not r240144; reverting it is a > short-term workaround until the underlying issue is fixed. > > > The story, from what I understand from the discussion at some other > > place, is that the fault occurs on access to the common unaligned > > symbol. Apparently, ELF does allow to specify alignment of the common > > symbols, and static linker, when finally allocating .bss space for the > > object, must obey the requirement. The symbol value for the common > > symbol must be interpreted as the desired alignment. > > > > Could you look up the symbol reference in the .o files (again) and see > > which alignment is requested ? I think that it is probably clang which > > should set it to be at least 16 bytes to generate ABI-compliant code. > > The declaration is extern ostream cout; which correctly has 8 byte alignment. The alignment of the declaration does not matter, most likely. I am not sure what you mean by saying that 8 byte alignment is desirable, while compiler generates accesses (movdqa) which assume 16-byte alignment. > > In the implementation (contrib/libc++/src/iostream.cpp) it is defined > as a char array which is where the 16-byte ABI alignment would arise, > but explicitly specifies 8-byte alignment: > _ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]; > > Compiling with -emit-llvm --save-temps shows the desired 8-byte > alignment for cout in the LLVM IR but 16-byte in the assembly file. Could somebody show the readelf -s iostream.So and readelf -s libc++.so.X output lines for the symbol, please ? From owner-svn-src-all@freebsd.org Sat Oct 10 12:12:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69AE39D144D; Sat, 10 Oct 2015 12:12:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 313A9D6B; Sat, 10 Oct 2015 12:12:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Zkt12-000IQr-9O; Sat, 10 Oct 2015 14:12:44 +0200 Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 To: Slawa Olhovchenkov References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> <20151010102233.GJ6469@zxy.spb.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Message-ID: <561900B6.5000306@FreeBSD.org> Date: Sat, 10 Oct 2015 14:12:38 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151010102233.GJ6469@zxy.spb.ru> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uioQprRE1Sx5ei6gJx8ulq1CTt4vvaS81" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 12:12:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uioQprRE1Sx5ei6gJx8ulq1CTt4vvaS81 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10.10.2015 12:22, Slawa Olhovchenkov wrote: > On Sat, Oct 10, 2015 at 12:14:50PM +0200, Jean-S'ebastien P'edron wrote= : >> Hopefully it will be fixed by the coming i915 update. Please see the >> following wiki article for status update and instructions if you want = to >> test it: >> https://wiki.freebsd.org/Graphics/Update%20i915%20GPU%20driver%20to%20= Linux%203.8 >=20 > Can I try this on 10.2 system? > w/o recompile base and X11? Yes, you can (and should) only build the kernel from that branch, no need to rebuild anything else. That said, I'm not sure a kernel from HEAD will work nicely with userland from 10.2. That's worth a try. --=20 Jean-S=C3=A9bastien P=C3=A9dron --uioQprRE1Sx5ei6gJx8ulq1CTt4vvaS81 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWGQC3XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTM21oQALWOJQcsV6sXid1ExDU5YLph Y6NpymzlARGDnk44/6fxke+OhYo1GD0KB0Z6WI+H33gDeds7vOxU2NzyyYS9JLNy 8v3340LhGj2m0sXqHjNWwxOXeOvMtsxWEbOCYGno2zCWElSfyeNgdjsaxLv++hRH vHx6SZ1rwEPC+JvObKI9chlqrDB1JxxaPd6c+Q9Wcd3UlmG8lFryIGHdYJqL6XtO FkneGSyhPzwx0wK62+vP2PhqDnMjqRr3DAfUCQ4gZTVfSbCpI7RKpJqCt9ONJ4T/ sdQuB2p5eblRIdB2aEmyEfPO6mOq86390YEXFhVW/zGbWgqvXUK8jZGpkLytfXKg k/nSMzsUuYmsSDuTMTB0m9luvDRXQdI4aW9yYy46VeHCnvbNQ9czOko2wjRClqur X6ud+WGsSRQGrd+wiUX6ZtuH5yE86VpP9KtD6QU8kwm2Ygj/5YVHP1pRRzrbhgdC Wt+2PSiPpkcpNhdLxgjZDkn85KWtlMv/bNvI7xQ8zDwrk9NPkaNJwyIflQVLxBWD qrhZ9CRhLzgR47cCOE5YLtcmuj1gK1032ed6s++TLzfKtQwT+ZlCfh9EHEiOeuMh xYwW57RtpRPYuW+ejLGOoKJ6YrQ6ZsEGt6j54LvuMPvnLxn2qnVQ4TP8Igb+Ccgo Vr3b9QG2K2HXwjpTiebc =thqR -----END PGP SIGNATURE----- --uioQprRE1Sx5ei6gJx8ulq1CTt4vvaS81-- From owner-svn-src-all@freebsd.org Sat Oct 10 12:24:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 612A39D2120; Sat, 10 Oct 2015 12:24:54 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E75BC15D4; Sat, 10 Oct 2015 12:24:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbkq10 with SMTP id kq10so51198849igb.0; Sat, 10 Oct 2015 05:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=nVzB+GpRVdxyO/SSo8BtaTOQuMFtgzoDxCESmbdSEr0=; b=EFceXzjsaQ+olp3eV9gjLAjlPF5iQdwyNTLCA46Qb7rQzCXmDdN1Oe1p1lQ7iWpB08 LyOs6+Z0dZh1jyTZb1z7500HydshxFBtqFsm3j2npRAYT3kV82MPA8NVcs8cvhLNmQQ4 0t1j7NmBZs+9CY0eFTFgny0lpWH0o2VTvsxwBRB/Ujn4idMWcTHapl1xCrS0UyAwsyr8 XZOIhlMlaexD3PcXCLSnagKITRypkW0b4xnF0whvHL9lKffEYT2vm3rxAt+GWI14HWMd YlPG0eyY7EotoqY5gbkSxmXgb/4DbYAPNZF/5y8QDRda2BvhsK0IB/OpR3v0IbxHZJ65 lwJw== X-Received: by 10.50.92.38 with SMTP id cj6mr4105054igb.58.1444479892874; Sat, 10 Oct 2015 05:24:52 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Sat, 10 Oct 2015 05:24:33 -0700 (PDT) In-Reply-To: <20151010120311.GE2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> <20151010060846.GA2257@kib.kiev.ua> <20151010120311.GE2257@kib.kiev.ua> From: Ed Maste Date: Sat, 10 Oct 2015 12:24:33 +0000 X-Google-Sender-Auth: WxuI2LU6CxtUAA3eS0cPcIFXMuw Message-ID: Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize To: Konstantin Belousov Cc: Dimitry Andric , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 12:24:54 -0000 On 10 October 2015 at 12:03, Konstantin Belousov wrote: >> The declaration is extern ostream cout; which correctly has 8 byte alignment. > The alignment of the declaration does not matter, most likely. > I am not sure what you mean by saying that 8 byte alignment is desirable, > while compiler generates accesses (movdqa) which assume 16-byte alignment. I mean that this object is naturally expected to have 8-byte alignment. In previous versions of libc++.so shipped with FreeBSD it did, and can't be changed now (cout comes from the binary itself, via a copy relocation). >> In the implementation (contrib/libc++/src/iostream.cpp) it is defined >> as a char array which is where the 16-byte ABI alignment would arise, >> but explicitly specifies 8-byte alignment: >> _ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]; >> >> Compiling with -emit-llvm --save-temps shows the desired 8-byte >> alignment for cout in the LLVM IR but 16-byte in the assembly file. > Could somebody show the readelf -s iostream.So and readelf -s libc++.so.X > output lines for the symbol, please ? readelf -s iostream.So: 120: 0000000000000150 160 OBJECT GLOBAL DEFAULT 5 _ZNSt3__14coutE libc++.so.1.full 1280: 00000000002bb4a0 160 OBJECT GLOBAL DEFAULT 25 _ZNSt3__14coutE From owner-svn-src-all@freebsd.org Sat Oct 10 12:53:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A213A103BE; Sat, 10 Oct 2015 12:53:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2899855; Sat, 10 Oct 2015 12:53:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9ACrmhV088128 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 10 Oct 2015 15:53:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9ACrmhV088128 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9ACrmSE088127; Sat, 10 Oct 2015 15:53:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Oct 2015 15:53:48 +0300 From: Konstantin Belousov To: Ed Maste Cc: Dimitry Andric , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize Message-ID: <20151010125348.GF2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> <20151010060846.GA2257@kib.kiev.ua> <20151010120311.GE2257@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 12:53:54 -0000 On Sat, Oct 10, 2015 at 12:24:33PM +0000, Ed Maste wrote: > On 10 October 2015 at 12:03, Konstantin Belousov wrote: > >> The declaration is extern ostream cout; which correctly has 8 byte alignment. > > The alignment of the declaration does not matter, most likely. > > I am not sure what you mean by saying that 8 byte alignment is desirable, > > while compiler generates accesses (movdqa) which assume 16-byte alignment. > > I mean that this object is naturally expected to have 8-byte > alignment. In previous versions of libc++.so shipped with FreeBSD it > did, and can't be changed now (cout comes from the binary itself, via > a copy relocation). No, the natural alignment for char[] is 1, while ABI requires an array longer than 15 bytes to have 16-bytes alignment. > > >> In the implementation (contrib/libc++/src/iostream.cpp) it is defined > >> as a char array which is where the 16-byte ABI alignment would arise, > >> but explicitly specifies 8-byte alignment: > >> _ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]; > >> > >> Compiling with -emit-llvm --save-temps shows the desired 8-byte > >> alignment for cout in the LLVM IR but 16-byte in the assembly file. > > Could somebody show the readelf -s iostream.So and readelf -s libc++.so.X > > output lines for the symbol, please ? > > readelf -s iostream.So: > 120: 0000000000000150 160 OBJECT GLOBAL DEFAULT 5 _ZNSt3__14coutE > > libc++.so.1.full > 1280: 00000000002bb4a0 160 OBJECT GLOBAL DEFAULT 25 _ZNSt3__14coutE And there the object has right alignment. From owner-svn-src-all@freebsd.org Sat Oct 10 13:42:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D263A105C0; Sat, 10 Oct 2015 13:42:00 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 178971AB6; Sat, 10 Oct 2015 13:42:00 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZkuPM-000FCf-Aj; Sat, 10 Oct 2015 16:41:56 +0300 Date: Sat, 10 Oct 2015 16:41:56 +0300 From: Slawa Olhovchenkov To: Dmitry Morozovsky Cc: =?koi8-r?Q?Jean-S'ebastien_P'edron?= , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 Message-ID: <20151010134156.GK6469@zxy.spb.ru> References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> <20151010102233.GJ6469@zxy.spb.ru> <561900B6.5000306@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 13:42:00 -0000 On Sat, Oct 10, 2015 at 04:37:43PM +0300, Dmitry Morozovsky wrote: > On Sat, 10 Oct 2015, Jean-S?bastien P?dron wrote: > > > That said, I'm not sure a kernel from HEAD will work nicely with > > userland from 10.2. That's worth a try. > > well, it should -- otherwise stable/10 jails would not work under -current. smartctl from 8.x don't work under 10.2. > Not the other way os course. More interesting about X11. From owner-svn-src-all@freebsd.org Sat Oct 10 13:44:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF35FA10760; Sat, 10 Oct 2015 13:44:10 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (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 485E01CA3; Sat, 10 Oct 2015 13:44:09 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t9ADbhXL082705; Sat, 10 Oct 2015 16:37:43 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sat, 10 Oct 2015 16:37:43 +0300 (MSK) From: Dmitry Morozovsky To: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= cc: Slawa Olhovchenkov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 In-Reply-To: <561900B6.5000306@FreeBSD.org> Message-ID: References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> <20151010102233.GJ6469@zxy.spb.ru> <561900B6.5000306@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sat, 10 Oct 2015 16:37:45 +0300 (MSK) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 13:44:11 -0000 On Sat, 10 Oct 2015, Jean-S?bastien P?dron wrote: > That said, I'm not sure a kernel from HEAD will work nicely with > userland from 10.2. That's worth a try. well, it should -- otherwise stable/10 jails would not work under -current. Not the other way os course. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@freebsd.org Sat Oct 10 14:29:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F26CA10302; Sat, 10 Oct 2015 14:29:10 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 552CB14B8; Sat, 10 Oct 2015 14:29:10 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Zkv92-000JZN-LB; Sat, 10 Oct 2015 16:29:08 +0200 Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 To: Dmitry Morozovsky References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> <20151010102233.GJ6469@zxy.spb.ru> <561900B6.5000306@FreeBSD.org> Cc: Slawa Olhovchenkov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Message-ID: <561920B0.3000201@FreeBSD.org> Date: Sat, 10 Oct 2015 16:29:04 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HSbEr0v1TeBNiwg0OOr8LCA1a9S1wP2gi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 14:29:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HSbEr0v1TeBNiwg0OOr8LCA1a9S1wP2gi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10.10.2015 15:37, Dmitry Morozovsky wrote: > On Sat, 10 Oct 2015, Jean-S?bastien P?dron wrote: >> That said, I'm not sure a kernel from HEAD will work nicely with >> userland from 10.2. That's worth a try. >=20 > well, it should -- otherwise stable/10 jails would not work under -curr= ent. I was thinking about changes affecting rc.d, such as the disappearance of the wifi device (other than wlan0) in ifconfig (ie. there is only wlan0 in HEAD, not wlan0+iwn0). Perhaps there is no problem with that, I just don't know. --=20 Jean-S=E9bastien P=E9dron --HSbEr0v1TeBNiwg0OOr8LCA1a9S1wP2gi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWGSCwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMSDEQAIdO1ooDaxPNpz824Nd2wu3+ 2amR1ZLXnM797YUPGp8FBrIsgDWa4O5/f1KFd66gStmmR1yPe9HIMyXAFJFmHdV4 TeURxC4pwdrKBs/wIq5n3UTbsSu3jwX1LSOf0idzteh6SNTZbQa84cBHUp8GDDQ+ 7SnrIz6NGmJACEw72cLhOKfZ4eQEacvbY71lEvJ2jQ4oIe1+HDbSdBciYgbye1Tn 4BZrOFP7iea+rjgI9lvsBnqKBgItExMOcUTzslThLQAMh/M32xW9D0aJFcIyOwlp w2MryquVWOB1Tu9IvBsmddFfwQP1TCze9OTvWGOkKxy/9gbsfVz/V1a6necYvnh3 BIttaSiseCIhfbU2izSkskN5b7BIPRhfXHdhavkirV7ADOThgaJgNfDk3TB82CaV ogtkPawuq6qwJOox+iNGlQl6SsrWsvg6enuinIW4o84Rtq1ScB+x0iW/TQGU2vSO NS6FR/eDIdheyKXo2jHLsoDEOiuuVLAtABni4+NSEBaYocFIEX67oWc7iwxIITFK 6xoSrSqPdQ88wC5TfQizCLskkcWV1O0FHMmE9i4DovVo2H6C8kbAbEZj2fz+fpuf 3CzDYqle4J34DAo4j0WCFhwaghiIeIoO+8WLaJWf+i/3MQbV1L6XLwiY+/p5HcsJ 1RUXHwRuyZKpUbmwlOj5 =wzAR -----END PGP SIGNATURE----- --HSbEr0v1TeBNiwg0OOr8LCA1a9S1wP2gi-- From owner-svn-src-all@freebsd.org Sat Oct 10 14:37:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C34B0A108B6; Sat, 10 Oct 2015 14:37:43 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA221D3F; Sat, 10 Oct 2015 14:37:43 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZkvHG-000GKN-Db; Sat, 10 Oct 2015 17:37:38 +0300 Date: Sat, 10 Oct 2015 17:37:38 +0300 From: Slawa Olhovchenkov To: =?koi8-r?Q?Jean-S'ebastien_P'edron?= Cc: Dmitry Morozovsky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289109 - head/sys/dev/drm2/i915 Message-ID: <20151010143738.GB42243@zxy.spb.ru> References: <201510100743.t9A7h2OI000544@repo.freebsd.org> <20151010093503.GA42243@zxy.spb.ru> <5618E51A.7030300@FreeBSD.org> <20151010102233.GJ6469@zxy.spb.ru> <561900B6.5000306@FreeBSD.org> <561920B0.3000201@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <561920B0.3000201@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 14:37:43 -0000 On Sat, Oct 10, 2015 at 04:29:04PM +0200, Jean-S'ebastien P'edron wrote: > On 10.10.2015 15:37, Dmitry Morozovsky wrote: > > On Sat, 10 Oct 2015, Jean-S?bastien P?dron wrote: > >> That said, I'm not sure a kernel from HEAD will work nicely with > >> userland from 10.2. That's worth a try. > > > > well, it should -- otherwise stable/10 jails would not work under -current. > > I was thinking about changes affecting rc.d, such as the disappearance > of the wifi device (other than wlan0) in ifconfig (ie. there is only > wlan0 in HEAD, not wlan0+iwn0). Perhaps there is no problem with that, I > just don't know. OK, I am need wired connection for notebook. From owner-svn-src-all@freebsd.org Sat Oct 10 14:43:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5761AA10D14; Sat, 10 Oct 2015 14:43:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F441A9; Sat, 10 Oct 2015 14:43:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9AEhkcB025535; Sat, 10 Oct 2015 14:43:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9AEhkSu025534; Sat, 10 Oct 2015 14:43:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510101443.t9AEhkSu025534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Oct 2015 14:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289115 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 14:43:47 -0000 Author: bapt Date: Sat Oct 10 14:43:46 2015 New Revision: 289115 URL: https://svnweb.freebsd.org/changeset/base/289115 Log: Fix installing config files as non root Reported by: adrian Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 10 10:48:09 2015 (r289114) +++ head/Makefile.inc1 Sat Oct 10 14:43:46 2015 (r289115) @@ -1003,7 +1003,9 @@ distrib-dirs: .MAKE distribution: .MAKE cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} - ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 installconfig + ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ + ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ + METALOG=${METALOG} installconfig # # buildkernel and installkernel From owner-svn-src-all@freebsd.org Sat Oct 10 14:44:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C208DA10DE9; Sat, 10 Oct 2015 14:44:28 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6861D331; Sat, 10 Oct 2015 14:44:28 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so100457774wic.1; Sat, 10 Oct 2015 07:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6STU0qpBq8flI0XGaw82TNG5LoQ4DMNQ6hklJUXoht8=; b=cXfi40uuRjGkcvVaVvOdam0virq23NojlDKonz0Ktl8NFcPNGm/G/BJGZEla4aYSuU 3c/7Iho/Z0n5FYhb+jAjNQeUep0yTkscM4KNCOFKScpRnnUP5bahjIF5H4qz/VLVBbko NJAuiVKKRudnATqKh0ni817tRfq4tEDCTjljfAagKGPx+U3E8NTNwYXKqid3RwfDiiUB p0ZQbNGSCUP9iJvWj/8v5d5DjZNYa4+nS7UmdGCEaMsstBhMhJLDI3akpcVnbWxJHmiK F96dS5a4smtaF0F/txA9R7MXZyHAHperSlAGN3TBvNaV8vIl8E/Iplw5d3bKT+a2EDGY dTRg== X-Received: by 10.180.8.36 with SMTP id o4mr5360322wia.82.1444488266144; Sat, 10 Oct 2015 07:44:26 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id it4sm8441358wjb.0.2015.10.10.07.44.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Oct 2015 07:44:25 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 10 Oct 2015 16:44:23 +0200 From: Baptiste Daroussin To: Adrian Chadd Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Message-ID: <20151010144422.GN91729@ivaldir.etoilebsd.net> References: <201510092209.t99M9iPx025401@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1R6ZDISWaA1muLP0" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 14:44:28 -0000 --1R6ZDISWaA1muLP0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > I think this broke being able to do installworld as non-root >=20 > 21:03 <@adrian> =3D=3D=3D> libexec/dma/dmagent (installconfig) > 21:03 <@adrian> install: > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma/dma.c= onf: > chown/chgrp: Operation not permitted > 21:03 <@adrian> *** Error code 71 >=20 Fixed in r289115 Bapt --1R6ZDISWaA1muLP0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYZJEYACgkQ8kTtMUmk6EyJtwCgl/A/mB10xDFkL8Ca5H/c+EbJ k2AAmwTPC1DzNGpYEPszRZI5JgcbFN6T =oSwa -----END PGP SIGNATURE----- --1R6ZDISWaA1muLP0-- From owner-svn-src-all@freebsd.org Sat Oct 10 15:14:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD8CA10166; Sat, 10 Oct 2015 15:14:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0821935; Sat, 10 Oct 2015 15:14:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by iow1 with SMTP id 1so118192921iow.1; Sat, 10 Oct 2015 08:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xc1jSdpeIWl7EC8A/yZJ18KPBXqfBP9tiZwJVE0tsso=; b=D76+GPzC8AH8k4c/BLcPbknM6kwKCj17Vf+McWjbc4slauz+SIY0H0LNCTOCEogEhn mQjSZnr06fQm5lSBsUktAQc6+NAgWCu0XXZyhn98PmEdn1MRiWm9M9KEUXCmP7wGSGbC aDmmx3LvmabGw3dzOeFI5FE28pl3e4aFRJaHvyNNPof5vI9AeKVTDW/K735T5p0X4vYK N4KPdnD6Ofz4GI8OWEjnJHfi8oANpmOfqxTPHzC1WXgwZefAb9bt1p510rDEyeX3zMrG iU3kCkbpiicMR04/P8NKlqCm8nFQ+D3IMTQkpZhKUXYCrbhdwv6W9SHm7y6/2FMEKE86 VdKw== MIME-Version: 1.0 X-Received: by 10.107.130.149 with SMTP id m21mr20474585ioi.180.1444490080482; Sat, 10 Oct 2015 08:14:40 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Sat, 10 Oct 2015 08:14:40 -0700 (PDT) Received: by 10.107.158.75 with HTTP; Sat, 10 Oct 2015 08:14:40 -0700 (PDT) In-Reply-To: <20151010125348.GF2257@kib.kiev.ua> References: <201510091821.t99ILjHI054211@repo.freebsd.org> <20151010060846.GA2257@kib.kiev.ua> <20151010120311.GE2257@kib.kiev.ua> <20151010125348.GF2257@kib.kiev.ua> Date: Sat, 10 Oct 2015 15:14:40 +0000 X-Google-Sender-Auth: bKudNBfZTZrr8d_e0n-goEukJrA Message-ID: Subject: Re: svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize From: Ed Maste To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Dimitry Andric , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 15:14:41 -0000 On Oct 10, 2015 8:53 AM, "Konstantin Belousov" wrote: > > On Sat, Oct 10, 2015 at 12:24:33PM +0000, Ed Maste wrote: > > On 10 October 2015 at 12:03, Konstantin Belousov wrote: > > >> The declaration is extern ostream cout; which correctly has 8 byte alignment. > > > The alignment of the declaration does not matter, most likely. > > > I am not sure what you mean by saying that 8 byte alignment is desirable, > > > while compiler generates accesses (movdqa) which assume 16-byte alignment. > > > > I mean that this object is naturally expected to have 8-byte > > alignment. In previous versions of libc++.so shipped with FreeBSD it > > did, and can't be changed now (cout comes from the binary itself, via > > a copy relocation). > No, the natural alignment for char[] is 1, while ABI requires an array > longer than 15 bytes to have 16-bytes alignment. Right, but the proper alignment for ostream is 8; it's only because of the slightly bizarre definition as a char array that we end up with this 16 byte ABI alignment. From owner-svn-src-all@freebsd.org Sat Oct 10 17:32:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D699D2A72; Sat, 10 Oct 2015 17:32:08 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E552DC1F; Sat, 10 Oct 2015 17:32:07 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9AHW7xq076536; Sat, 10 Oct 2015 17:32:07 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9AHW7Uh076535; Sat, 10 Oct 2015 17:32:07 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201510101732.t9AHW7Uh076535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Sat, 10 Oct 2015 17:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289116 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 17:32:08 -0000 Author: phk Date: Sat Oct 10 17:32:06 2015 New Revision: 289116 URL: https://svnweb.freebsd.org/changeset/base/289116 Log: Remove a double "as well as" Modified: head/share/man/man4/vtnet.4 Modified: head/share/man/man4/vtnet.4 ============================================================================== --- head/share/man/man4/vtnet.4 Sat Oct 10 14:43:46 2015 (r289115) +++ head/share/man/man4/vtnet.4 Sat Oct 10 17:32:06 2015 (r289116) @@ -52,9 +52,9 @@ device driver provides support for VirtI If the hypervisor advertises the appreciate features, the .Nm driver supports TCP/UDP checksum offload for both transmit and receive, -TCP segmentation offload (TSO), TCP large receive offload (LRO), and -hardware VLAN tag stripping/insertion features, as well as a multicast -hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be +TCP segmentation offload (TSO), TCP large receive offload (LRO), +hardware VLAN tag stripping/insertion features, a multicast hash filter, +as well as Jumbo Frames (up to 9216 bytes), which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 From owner-svn-src-all@freebsd.org Sat Oct 10 19:08:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAD739D2580; Sat, 10 Oct 2015 19:08:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 732C31773; Sat, 10 Oct 2015 19:08:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9AJ8Y4x004091; Sat, 10 Oct 2015 19:08:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9AJ8YE7004090; Sat, 10 Oct 2015 19:08:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510101908.t9AJ8YE7004090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sat, 10 Oct 2015 19:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289117 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 19:08:35 -0000 Author: sbruno Date: Sat Oct 10 19:08:34 2015 New Revision: 289117 URL: https://svnweb.freebsd.org/changeset/base/289117 Log: There's no way a fbsd install + kernel will fit into 4MB of flash. Assume and enforce the fact that this will always boot a rootfs from usb. Modified: head/sys/mips/conf/TP-MR3020 Modified: head/sys/mips/conf/TP-MR3020 ============================================================================== --- head/sys/mips/conf/TP-MR3020 Sat Oct 10 17:32:06 2015 (r289116) +++ head/sys/mips/conf/TP-MR3020 Sat Oct 10 19:08:34 2015 (r289117) @@ -50,16 +50,6 @@ device geom_uncompress # Used for the static uboot partition map device geom_map -# Boot off of the rootfs, as defined in the geom_map setup. -# Probably, this should be a USB device as the memory available -# compressed rootfs is simply too small for FreeBSD -#options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" - -# Boot off of a uboot tftp ramdisk kernel image. Because the flash -# on this unit is so small, this is the only way to do dev work. -# For full deployment, you will *have* to use a usb storage device -# as a rootfs and use the flash to hold the kernel only. -options MD_ROOT # md device usable as a potential root device -options MD_ROOT_SIZE=10240 -#makeoptions MFS_IMAGE=/tftpboot/mfsroot-tl-mr3020.img.ulzma -options ROOTDEVNAME=\"ufs:md0.uncompress\" +# With only 4MB of flash, we are stuck using USB +# for the rootfs. +options ROOTDEVNAME=\"ufs:da0\" From owner-svn-src-all@freebsd.org Sat Oct 10 19:51:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9ABA10A99; Sat, 10 Oct 2015 19:51:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC825213; Sat, 10 Oct 2015 19:51:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9AJp0Yf015946; Sat, 10 Oct 2015 19:51:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9AJp05d015945; Sat, 10 Oct 2015 19:51:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510101951.t9AJp05d015945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 10 Oct 2015 19:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289118 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 19:51:02 -0000 Author: ian Date: Sat Oct 10 19:51:00 2015 New Revision: 289118 URL: https://svnweb.freebsd.org/changeset/base/289118 Log: Replace a local sx lock that allowed only one client at a time to access an eeprom device with iicbus_request/release_bus(), which achieves the same effect and also keeps other i2c slave drivers from clashing on the bus. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Sat Oct 10 19:08:34 2015 (r289117) +++ head/sys/dev/iicbus/icee.c Sat Oct 10 19:51:00 2015 (r289118) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); struct icee_softc { device_t sc_dev; /* Myself */ - struct sx sc_lock; /* basically a perimeter lock */ + device_t sc_busdev; /* Parent bus */ struct cdev *cdev; /* user interface */ int addr; int size; /* How big am I? */ @@ -57,12 +57,6 @@ struct icee_softc { int wr_sz; /* What's the write page size */ }; -#define ICEE_LOCK(_sc) sx_xlock(&(_sc)->sc_lock) -#define ICEE_UNLOCK(_sc) sx_xunlock(&(_sc)->sc_lock) -#define ICEE_LOCK_INIT(_sc) sx_init(&_sc->sc_lock, "icee") -#define ICEE_LOCK_DESTROY(_sc) sx_destroy(&_sc->sc_lock); -#define ICEE_ASSERT_LOCKED(_sc) sx_assert(&_sc->sc_lock, SA_XLOCKED); -#define ICEE_ASSERT_UNLOCKED(_sc) sx_assert(&_sc->sc_lock, SA_UNLOCKED); #define CDEV2SOFTC(dev) ((dev)->si_drv1) /* cdev routines */ @@ -97,6 +91,7 @@ icee_attach(device_t dev) int dunit, err; sc->sc_dev = dev; + sc->sc_busdev = device_get_parent(sc->sc_dev); sc->addr = iicbus_get_addr(dev); err = 0; dname = device_get_name(dev); @@ -117,7 +112,6 @@ icee_attach(device_t dev) goto out; } sc->cdev->si_drv1 = sc; - ICEE_LOCK_INIT(sc); out: return (err); } @@ -155,7 +149,9 @@ icee_read(struct cdev *dev, struct uio * return (EIO); if (sc->type != 8 && sc->type != 16) return (EINVAL); - ICEE_LOCK(sc); + error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); + if (error!= 0) + return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) @@ -188,7 +184,7 @@ icee_read(struct cdev *dev, struct uio * if (error) break; } - ICEE_UNLOCK(sc); + iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return (error); } @@ -216,7 +212,10 @@ icee_write(struct cdev *dev, struct uio return (EIO); if (sc->type != 8 && sc->type != 16) return (EINVAL); - ICEE_LOCK(sc); + + error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); + if (error!= 0) + return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) @@ -256,7 +255,7 @@ icee_write(struct cdev *dev, struct uio break; } } - ICEE_UNLOCK(sc); + iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return error; } From owner-svn-src-all@freebsd.org Sat Oct 10 21:32:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9994E9D2D35; Sat, 10 Oct 2015 21:32:40 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv157.fwdcdn.com (frv157.fwdcdn.com [212.42.77.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E0221FDA; Sat, 10 Oct 2015 21:32:39 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=UMSScRKJOoW1FaSlQQ8WFcwKAHiRLPqRtEiNkJDhC1w=; b=sLwbaXEIl/oeRyPyT0CgmFfxB2RUGHM4x/GaP6MDluTKU3BlCRNi2126f8mUp71dQGFfGrJLgALBzZzq6fRpUIFby27qtu3rGn7rlM82sE4u9G8vEbp3d1Q3Q9KGy+8sS45sT+i7eYhUU5bdykakicl0lK/XOqU9B6kPZl5XmK4=; Received: from [178.137.225.202] (helo=nonamehost.local) by frv157.fwdcdn.com with esmtpsa ID 1Zl1kk-000Caa-WA ; Sun, 11 Oct 2015 00:32:31 +0300 Date: Sun, 11 Oct 2015 00:32:22 +0300 From: Ivan Klymenko To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeDy... Message-ID: <20151011003222.0944214d@nonamehost.local> In-Reply-To: <201505251343.t4PDh3wR037780@svn.freebsd.org> References: <201505251343.t4PDh3wR037780@svn.freebsd.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=178.137.225.202; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 21:32:40 -0000 On Mon, 25 May 2015 13:43:03 +0000 (UTC) Dimitry Andric wrote: > Author: dim > Date: Mon May 25 13:43:03 2015 > New Revision: 283526 > URL: https://svnweb.freebsd.org/changeset/base/283526 > > Log: > Upgrade our copy of clang and llvm to 3.6.1 release. > Hello. After update i have next building problem: IF i use CPUTYPE?=native flag in /etc/make.conf - compilation fails: ... --- crypto.o --- /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sysroot=/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin -O2 -pipe -march=native -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/subversion/subversion/include -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/subversion/subversion -I/usr/src/usr.bin/svn/lib/libsvn_subr/../.. -I/usr/src/usr.bin/svn/lib/libsvn_subr/../libapr -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/apr/include/arch/unix -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/apr/include -I/usr/src/usr.bin/svn/lib/libsvn_subr/../libapr_util -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/apr-util/include/private -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/apr-util/include -I/usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/sqlite3 -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -W no-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c /usr/src/usr.bin/svn/lib/libsvn_subr/../../../../contrib/subversion/subversion/libsvn_subr/crypto.c -o crypto.o --- usr.sbin.all__D --- --- ieee802_11_common.o --- distcc[67017] ERROR: compile (null) on localhost failed with exit code 254 Cannot emit physreg copy instruction UNREACHABLE executed at /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3935! cc: error: unable to execute command: Abort trap cc: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) 20150906 Target: x86_64-unknown-freebsd11.0 Thread model: posix cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. cc: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.c cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.sh cc: note: diagnostic msg: ******************** *** [ieee802_11_common.o] Error code 254 make[5]: stopped in /usr/src/usr.sbin/wpa/wpa_supplicant 1 error make[5]: stopped in /usr/src/usr.sbin/wpa/wpa_supplicant *** [all_subdir_wpa_supplicant] Error code 2 make[4]: stopped in /usr/src/usr.sbin/wpa 1 error make[4]: stopped in /usr/src/usr.sbin/wpa *** [all_subdir_wpa] Error code 2 make[3]: stopped in /usr/src/usr.sbin 1 error make[3]: stopped in /usr/src/usr.sbin *** [usr.sbin.all__D] Error code 2 make[2]: stopped in /usr/src --- usr.bin.all__D --- A failure has been detected in another branch of the parallel make make[6]: stopped in /usr/src/usr.bin/svn/lib/libsvn_subr *** [_sub.all] Error code 2 make[5]: stopped in /usr/src/usr.bin/svn/lib 1 error make[5]: stopped in /usr/src/usr.bin/svn/lib *** [all_subdir_lib] Error code 2 make[4]: stopped in /usr/src/usr.bin/svn 1 error make[4]: stopped in /usr/src/usr.bin/svn *** [all_subdir_svn] Error code 2 make[3]: stopped in /usr/src/usr.bin 1 error make[3]: stopped in /usr/src/usr.bin *** [usr.bin.all__D] Error code 2 make[2]: stopped in /usr/src 2 errors make[2]: stopped in /usr/src *** [everything] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildworld] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src If remove CPUTYPE?=native - compilation is successful. I have sandybridge CPU. Thanks. From owner-svn-src-all@freebsd.org Sat Oct 10 23:22:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F1869D26BF; Sat, 10 Oct 2015 23:22:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11598C63; Sat, 10 Oct 2015 23:22:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ANM7g0086197; Sat, 10 Oct 2015 23:22:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ANM5C3086179; Sat, 10 Oct 2015 23:22:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510102322.t9ANM5C3086179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Oct 2015 23:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289121 - in vendor/dma/dist: . debian X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 23:22:08 -0000 Author: bapt Date: Sat Oct 10 23:22:05 2015 New Revision: 289121 URL: https://svnweb.freebsd.org/changeset/base/289121 Log: Import dma 0.10 Deleted: vendor/dma/dist/BSDmakefile vendor/dma/dist/debian/ Modified: vendor/dma/dist/LICENSE vendor/dma/dist/README.markdown vendor/dma/dist/TODO vendor/dma/dist/VERSION vendor/dma/dist/aliases_parse.y vendor/dma/dist/aliases_scan.l vendor/dma/dist/conf.c vendor/dma/dist/dma-mbox-create.c vendor/dma/dist/dma.8 vendor/dma/dist/dma.c vendor/dma/dist/dma.h vendor/dma/dist/dns.c vendor/dma/dist/get-version.sh vendor/dma/dist/local.c vendor/dma/dist/mail.c vendor/dma/dist/net.c vendor/dma/dist/spool.c vendor/dma/dist/util.c Modified: vendor/dma/dist/LICENSE ============================================================================== --- vendor/dma/dist/LICENSE Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/LICENSE Sat Oct 10 23:22:05 2015 (r289121) @@ -1,5 +1,5 @@ +Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. Copyright (c) 2008 The DragonFly Project. -Copyright (c) 2008-2011, Simon Schubert <2@0x2c.org>. All rights reserved. This code is derived from software contributed to The DragonFly Project @@ -37,7 +37,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADV SUCH DAMAGE. -Copyright (c) 1995-2001 Kungliga Tekniska Högskolan +Copyright (c) 1995-2001 Kungliga Tekniska Högskolan (Royal Institute of Technology, Stockholm, Sweden). All rights reserved. Modified: vendor/dma/dist/README.markdown ============================================================================== --- vendor/dma/dist/README.markdown Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/README.markdown Sat Oct 10 23:22:05 2015 (r289121) @@ -15,8 +15,13 @@ incoming connections. Building -------- +In Linux: + make +In BSD: + + cd bsd && make Installation ------------ Modified: vendor/dma/dist/TODO ============================================================================== --- vendor/dma/dist/TODO Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/TODO Sat Oct 10 23:22:05 2015 (r289121) @@ -1,5 +1,4 @@ - unquote/handle quoted local recipients -- use proper sysexit codes - handle/use ESMTP extensions - .forward support - suggest way to run a queue flush on boot Modified: vendor/dma/dist/VERSION ============================================================================== --- vendor/dma/dist/VERSION Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/VERSION Sat Oct 10 23:22:05 2015 (r289121) @@ -1 +1 @@ -v0.9 +v0.10 Modified: vendor/dma/dist/aliases_parse.y ============================================================================== --- vendor/dma/dist/aliases_parse.y Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/aliases_parse.y Sat Oct 10 23:22:05 2015 (r289121) @@ -7,8 +7,6 @@ extern int yylineno; static void yyerror(const char *); -int yywrap(void); -int yylex(void); static void yyerror(const char *msg) Modified: vendor/dma/dist/aliases_scan.l ============================================================================== --- vendor/dma/dist/aliases_scan.l Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/aliases_scan.l Sat Oct 10 23:22:05 2015 (r289121) @@ -1,11 +1,11 @@ %{ #include +#include "dma.h" #include "aliases_parse.h" #define YY_NO_INPUT -int yylex(void); %} %option yylineno Modified: vendor/dma/dist/conf.c ============================================================================== --- vendor/dma/dist/conf.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/conf.c Sat Oct 10 23:22:05 2015 (r289121) @@ -64,7 +64,7 @@ trim_line(char *line) if (line[0] == '.') { if ((linelen + 2) > 1000) { syslog(LOG_CRIT, "Cannot escape leading dot. Buffer overflow"); - exit(1); + exit(EX_DATAERR); } memmove((line + 1), line, (linelen + 1)); line[0] = '.'; @@ -101,7 +101,7 @@ parse_authfile(const char *path) a = fopen(path, "r"); if (a == NULL) { - errlog(1, "can not open auth file `%s'", path); + errlog(EX_NOINPUT, "can not open auth file `%s'", path); /* NOTREACHED */ } @@ -121,7 +121,7 @@ parse_authfile(const char *path) au = calloc(1, sizeof(*au)); if (au == NULL) - errlog(1, NULL); + errlog(EX_OSERR, NULL); data = strdup(line); au->login = strsep(&data, "|"); @@ -131,8 +131,7 @@ parse_authfile(const char *path) if (au->login == NULL || au->host == NULL || au->password == NULL) { - errlogx(1, "syntax error in authfile %s:%d", - path, lineno); + errlogx(EX_CONFIG, "syntax error in authfile %s:%d", path, lineno); /* NOTREACHED */ } @@ -160,7 +159,7 @@ parse_conf(const char *config_path) /* Don't treat a non-existing config file as error */ if (errno == ENOENT) return; - errlog(1, "can not open config `%s'", config_path); + errlog(EX_NOINPUT, "can not open config `%s'", config_path); /* NOTREACHED */ } @@ -211,7 +210,7 @@ parse_conf(const char *config_path) } else { host = data; } - if (host && *host == 0) + if (host && *host == 0) host = NULL; if (user && *user == 0) user = NULL; @@ -232,13 +231,13 @@ parse_conf(const char *config_path) else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL) config.features |= NULLCLIENT; else { - errlogx(1, "syntax error in %s:%d", config_path, lineno); + errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno); /* NOTREACHED */ } } if ((config.features & NULLCLIENT) && config.smarthost == NULL) { - errlogx(1, "%s: NULLCLIENT requires SMARTHOST", config_path); + errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path); /* NOTREACHED */ } Modified: vendor/dma/dist/dma-mbox-create.c ============================================================================== --- vendor/dma/dist/dma-mbox-create.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/dma-mbox-create.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,9 +1,9 @@ /* - * Copyright (c) 2010 Simon Schubert <2@0x2c.org> + * Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -54,7 +54,7 @@ static void -logfail(const char *fmt, ...) +logfail(int exitcode, const char *fmt, ...) { int oerrno = errno; va_list ap; @@ -73,7 +73,7 @@ logfail(const char *fmt, ...) else syslog(LOG_ERR, errno ? "%m" : "unknown error"); - exit(1); + exit(exitcode); } /* @@ -98,21 +98,21 @@ main(int argc, char **argv) errno = 0; gr = getgrnam(DMA_GROUP); if (!gr) - logfail("cannot find dma group `%s'", DMA_GROUP); + logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP); mail_gid = gr->gr_gid; if (setgid(mail_gid) != 0) - logfail("cannot set gid to %d (%s)", mail_gid, DMA_GROUP); + logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP); if (getegid() != mail_gid) - logfail("cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); + logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); /* * We take exactly one argument: the username. */ if (argc != 2) { errno = 0; - logfail("no arguments"); + logfail(EX_USAGE, "no arguments"); } user = argv[1]; @@ -121,7 +121,7 @@ main(int argc, char **argv) /* the username may not contain a pathname separator */ if (strchr(user, '/')) { errno = 0; - logfail("path separator in username `%s'", user); + logfail(EX_DATAERR, "path separator in username `%s'", user); exit(1); } @@ -129,7 +129,7 @@ main(int argc, char **argv) errno = 0; pw = getpwnam(user); if (!pw) - logfail("cannot find user `%s'", user); + logfail(EX_NOUSER, "cannot find user `%s'", user); user_uid = pw->pw_uid; @@ -137,20 +137,20 @@ main(int argc, char **argv) if (error < 0 || (size_t)error >= sizeof(fn)) { if (error >= 0) { errno = 0; - logfail("mbox path too long"); + logfail(EX_USAGE, "mbox path too long"); } - logfail("cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); + logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); } f = open(fn, O_RDONLY|O_CREAT, 0600); if (f < 0) - logfail("cannot open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); if (fchown(f, user_uid, mail_gid)) - logfail("cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); if (fchmod(f, 0620)) - logfail("cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); /* file should be present with the right owner and permissions */ Modified: vendor/dma/dist/dma.8 ============================================================================== --- vendor/dma/dist/dma.8 Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/dma.8 Sat Oct 10 23:22:05 2015 (r289121) @@ -1,4 +1,5 @@ .\" +.\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. .\" Copyright (c) 2008 .\" The DragonFly Project. All rights reserved. .\" Modified: vendor/dma/dist/dma.c ============================================================================== --- vendor/dma/dist/dma.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/dma.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -247,7 +248,7 @@ go_background(struct queue *queue) if (daemonize && daemon(0, 0) != 0) { syslog(LOG_ERR, "can not daemonize: %m"); - exit(1); + exit(EX_OSERR); } daemonize = 0; @@ -264,7 +265,7 @@ go_background(struct queue *queue) switch (pid) { case -1: syslog(LOG_ERR, "can not fork: %m"); - exit(1); + exit(EX_OSERR); break; case 0: @@ -286,11 +287,11 @@ retit: break; case 1: if (doqueue) - exit(0); + exit(EX_OK); syslog(LOG_WARNING, "could not lock queue file"); - exit(1); + exit(EX_SOFTWARE); default: - exit(1); + exit(EX_SOFTWARE); } dropspool(queue, it); return (it); @@ -306,7 +307,7 @@ retit: } syslog(LOG_CRIT, "reached dead code"); - exit(1); + exit(EX_SOFTWARE); } static void @@ -331,12 +332,12 @@ retry: case 0: delqueue(it); syslog(LOG_INFO, "delivery successful"); - exit(0); + exit(EX_OK); case 1: if (stat(it->queuefn, &st) != 0) { syslog(LOG_ERR, "lost queue file `%s'", it->queuefn); - exit(1); + exit(EX_SOFTWARE); } if (gettimeofday(&now, NULL) == 0 && (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) { @@ -438,16 +439,16 @@ main(int argc, char **argv) pw = getpwnam(DMA_ROOT_USER); if (pw == NULL) { if (errno == 0) - errx(1, "user '%s' not found", DMA_ROOT_USER); + errx(EX_CONFIG, "user '%s' not found", DMA_ROOT_USER); else - err(1, "cannot drop root privileges"); + err(EX_OSERR, "cannot drop root privileges"); } if (setuid(pw->pw_uid) != 0) - err(1, "cannot drop root privileges"); + err(EX_OSERR, "cannot drop root privileges"); if (geteuid() == 0 || getuid() == 0) - errx(1, "cannot drop root privileges"); + errx(EX_OSERR, "cannot drop root privileges"); } atexit(deltmp); @@ -460,15 +461,15 @@ main(int argc, char **argv) argv++; argc--; showq = 1; if (argc != 0) - errx(1, "invalid arguments"); + errx(EX_USAGE, "invalid arguments"); goto skipopts; } else if (strcmp(argv[0], "newaliases") == 0) { logident_base = "dma"; setlogident(NULL); if (read_aliases() != 0) - errx(1, "could not parse aliases file `%s'", config.aliases); - exit(0); + errx(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); + exit(EX_OK); } opterr = 0; @@ -547,7 +548,7 @@ main(int argc, char **argv) default: fprintf(stderr, "invalid argument: `-%c'\n", optopt); - exit(1); + exit(EX_USAGE); } } argc -= optind; @@ -555,10 +556,10 @@ main(int argc, char **argv) opterr = 1; if (argc != 0 && (showq || doqueue)) - errx(1, "sending mail and queue operations are mutually exclusive"); + errx(EX_USAGE, "sending mail and queue operations are mutually exclusive"); if (showq + doqueue > 1) - errx(1, "conflicting queue operations"); + errx(EX_USAGE, "conflicting queue operations"); skipopts: if (logident_base == NULL) @@ -578,7 +579,7 @@ skipopts: if (showq) { if (load_queue(&queue) < 0) - errlog(1, "can not load queue"); + errlog(EX_NOINPUT, "can not load queue"); show_queue(&queue); return (0); } @@ -586,38 +587,38 @@ skipopts: if (doqueue) { flushqueue_signal(); if (load_queue(&queue) < 0) - errlog(1, "can not load queue"); + errlog(EX_NOINPUT, "can not load queue"); run_queue(&queue); return (0); } if (read_aliases() != 0) - errlog(1, "could not parse aliases file `%s'", config.aliases); + errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); if ((sender = set_from(&queue, sender)) == NULL) - errlog(1, NULL); + errlog(EX_SOFTWARE, NULL); if (newspoolf(&queue) != 0) - errlog(1, "can not create temp file in `%s'", config.spooldir); + errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); setlogident("%s", queue.id); for (i = 0; i < argc; i++) { if (add_recp(&queue, argv[i], EXPAND_WILDCARD) != 0) - errlogx(1, "invalid recipient `%s'", argv[i]); + errlogx(EX_DATAERR, "invalid recipient `%s'", argv[i]); } if (LIST_EMPTY(&queue.queue) && !recp_from_header) - errlogx(1, "no recipients"); + errlogx(EX_NOINPUT, "no recipients"); if (readmail(&queue, nodot, recp_from_header) != 0) - errlog(1, "can not read mail"); + errlog(EX_NOINPUT, "can not read mail"); if (LIST_EMPTY(&queue.queue)) - errlogx(1, "no recipients"); + errlogx(EX_NOINPUT, "no recipients"); if (linkspool(&queue) != 0) - errlog(1, "can not create spools"); + errlog(EX_CANTCREAT, "can not create spools"); /* From here on the mail is safe. */ Modified: vendor/dma/dist/dma.h ============================================================================== --- vendor/dma/dist/dma.h Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/dma.h Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert and + * by Simon Schubert <2@0x2c.org> and * Matthias Schmidt . * * Redistribution and use in source and binary forms, with or without @@ -43,6 +44,7 @@ #include #include #include +#include #define VERSION "DragonFly Mail Agent " DMA_VERSION @@ -173,6 +175,8 @@ extern char errmsg[ERRMSG_SIZE]; /* aliases_parse.y */ int yyparse(void); +int yywrap(void); +int yylex(void); extern FILE *yyin; /* conf.c */ Modified: vendor/dma/dist/dns.c ============================================================================== --- vendor/dma/dist/dns.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/dns.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,7 +68,6 @@ add_host(int pref, const char *host, int char servname[10]; struct mx_hostentry *p; const int count_inc = 10; - int err; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; @@ -75,9 +75,26 @@ add_host(int pref, const char *host, int hints.ai_protocol = IPPROTO_TCP; snprintf(servname, sizeof(servname), "%d", port); - err = getaddrinfo(host, servname, &hints, &res0); - if (err) - return (err == EAI_AGAIN ? 1 : -1); + switch (getaddrinfo(host, servname, &hints, &res0)) { + case 0: + break; + case EAI_AGAIN: + case EAI_NONAME: + /* + * EAI_NONAME gets returned for: + * SMARTHOST set but DNS server not reachable -> defer + * SMARTHOST set but DNS server returns "host does not exist" + * -> buggy configuration + * -> either defer or bounce would be ok -> defer + * MX entry was returned by DNS server but name doesn't resolve + * -> hopefully transient situation -> defer + * all other DNS problems should have been caught earlier + * in dns_get_mx_list(). + */ + goto out; + default: + return(-1); + } for (res = res0; res != NULL; res = res->ai_next) { if (*ps + 1 >= roundup(*ps, count_inc)) { Modified: vendor/dma/dist/get-version.sh ============================================================================== --- vendor/dma/dist/get-version.sh Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/get-version.sh Sat Oct 10 23:22:05 2015 (r289121) @@ -1,7 +1,9 @@ #!/bin/sh +tmp=$1 +file=${tmp:=VERSION} gitver=$(git describe 2>/dev/null | tr - .) -filever=$(cat VERSION) +filever=$(cat ${file} 2>/dev/null) version=${gitver} : ${version:=$filever} Modified: vendor/dma/dist/local.c ============================================================================== --- vendor/dma/dist/local.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/local.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -81,7 +82,7 @@ create_mbox(const char *name) execl(LIBEXEC_PATH "/dma-mbox-create", "dma-mbox-create", name, NULL); syslog(LOG_ERR, "cannot execute "LIBEXEC_PATH"/dma-mbox-create: %m"); - exit(1); + exit(EX_SOFTWARE); default: /* parent */ Modified: vendor/dma/dist/mail.c ============================================================================== --- vendor/dma/dist/mail.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/mail.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -51,7 +52,7 @@ bounce(struct qitem *it, const char *rea /* Don't bounce bounced mails */ if (it->sender[0] == 0) { syslog(LOG_INFO, "can not bounce a bounce message, discarding"); - exit(1); + exit(EX_SOFTWARE); } bzero(&bounceq, sizeof(bounceq)); @@ -132,7 +133,7 @@ bounce(struct qitem *it, const char *rea fail: syslog(LOG_CRIT, "error creating bounce: %m"); delqueue(it); - exit(1); + exit(EX_IOERR); } struct parse_state { @@ -332,10 +333,10 @@ newaddr: ps->pos = 0; addr = strdup(ps->addr); if (addr == NULL) - errlog(1, NULL); + errlog(EX_SOFTWARE, NULL); if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) - errlogx(1, "invalid recipient `%s'", addr); + errlogx(EX_DATAERR, "invalid recipient `%s'", addr); goto again; } @@ -374,7 +375,9 @@ readmail(struct queue *queue, int nodot, if (fgets(line, sizeof(line) - 1, stdin) == NULL) break; if (had_last_line) - errlogx(1, "bad mail input format"); + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); linelen = strlen(line); if (linelen == 0 || line[linelen - 1] != '\n') { /* @@ -405,7 +408,7 @@ readmail(struct queue *queue, int nodot, if (parse_state.state != NONE) { if (parse_addrs(&parse_state, line, queue) < 0) { - errlogx(1, "invalid address in header\n"); + errlogx(EX_DATAERR, "invalid address in header\n"); /* NOTREACHED */ } } @@ -416,7 +419,7 @@ readmail(struct queue *queue, int nodot, strprefixcmp(line, "Bcc:") == 0)) { parse_state.state = START; if (parse_addrs(&parse_state, line, queue) < 0) { - errlogx(1, "invalid address in header\n"); + errlogx(EX_DATAERR, "invalid address in header\n"); /* NOTREACHED */ } } Modified: vendor/dma/dist/net.c ============================================================================== --- vendor/dma/dist/net.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/net.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project Modified: vendor/dma/dist/spool.c ============================================================================== --- vendor/dma/dist/spool.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/spool.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -289,7 +290,7 @@ load_queue(struct queue *queue) spooldir = opendir(config.spooldir); if (spooldir == NULL) - err(1, "reading queue"); + err(EX_NOINPUT, "reading queue"); while ((de = readdir(spooldir)) != NULL) { queuefn = NULL; Modified: vendor/dma/dist/util.c ============================================================================== --- vendor/dma/dist/util.c Sat Oct 10 23:16:40 2015 (r289120) +++ vendor/dma/dist/util.c Sat Oct 10 23:22:05 2015 (r289121) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-all@freebsd.org Sat Oct 10 23:22:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B5F09D270B; Sat, 10 Oct 2015 23:22:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61C98DA3; Sat, 10 Oct 2015 23:22:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ANMug6086274; Sat, 10 Oct 2015 23:22:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ANMta6086264; Sat, 10 Oct 2015 23:22:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510102322.t9ANMta6086264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Oct 2015 23:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289122 - in vendor/dma/0.10: . debian X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 23:22:57 -0000 Author: bapt Date: Sat Oct 10 23:22:55 2015 New Revision: 289122 URL: https://svnweb.freebsd.org/changeset/base/289122 Log: Tag import of dma 0.10 Added: vendor/dma/0.10/ - copied from r286801, vendor/dma/dist/ Replaced: vendor/dma/0.10/LICENSE - copied unchanged from r289121, vendor/dma/dist/LICENSE vendor/dma/0.10/README.markdown - copied unchanged from r289121, vendor/dma/dist/README.markdown vendor/dma/0.10/TODO - copied unchanged from r289121, vendor/dma/dist/TODO vendor/dma/0.10/VERSION - copied unchanged from r289121, vendor/dma/dist/VERSION vendor/dma/0.10/aliases_parse.y - copied unchanged from r289121, vendor/dma/dist/aliases_parse.y vendor/dma/0.10/aliases_scan.l - copied unchanged from r289121, vendor/dma/dist/aliases_scan.l vendor/dma/0.10/conf.c - copied unchanged from r289121, vendor/dma/dist/conf.c vendor/dma/0.10/dma-mbox-create.c - copied unchanged from r289121, vendor/dma/dist/dma-mbox-create.c vendor/dma/0.10/dma.8 - copied unchanged from r289121, vendor/dma/dist/dma.8 vendor/dma/0.10/dma.c - copied unchanged from r289121, vendor/dma/dist/dma.c vendor/dma/0.10/dma.h - copied unchanged from r289121, vendor/dma/dist/dma.h vendor/dma/0.10/dns.c - copied unchanged from r289121, vendor/dma/dist/dns.c vendor/dma/0.10/get-version.sh - copied unchanged from r289121, vendor/dma/dist/get-version.sh vendor/dma/0.10/local.c - copied unchanged from r289121, vendor/dma/dist/local.c vendor/dma/0.10/mail.c - copied unchanged from r289121, vendor/dma/dist/mail.c vendor/dma/0.10/net.c - copied unchanged from r289121, vendor/dma/dist/net.c vendor/dma/0.10/spool.c - copied unchanged from r289121, vendor/dma/dist/spool.c vendor/dma/0.10/util.c - copied unchanged from r289121, vendor/dma/dist/util.c Deleted: vendor/dma/0.10/BSDmakefile vendor/dma/0.10/debian/ Copied: vendor/dma/0.10/LICENSE (from r289121, vendor/dma/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/LICENSE Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/LICENSE) @@ -0,0 +1,109 @@ +Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. +Copyright (c) 2008 The DragonFly Project. +All rights reserved. + +This code is derived from software contributed to The DragonFly Project +by Simon Schubert <2@0x2c.org>. + +This code is derived from software contributed to The DragonFly Project +by Matthias Schmidt , University of Marburg, +Germany. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. +3. Neither the name of The DragonFly Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific, prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +Copyright (c) 1995-2001 Kungliga Tekniska Högskolan +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +Copyright (c) 1998 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright (c) 1998, M. Warner Losh +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Copied: vendor/dma/0.10/README.markdown (from r289121, vendor/dma/dist/README.markdown) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/README.markdown Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/README.markdown) @@ -0,0 +1,37 @@ +dma -- DragonFly Mail Agent +=========================== + +dma is a small Mail Transport Agent (MTA), designed for home and +office use. It accepts mails from locally installed Mail User Agents (MUA) +and delivers the mails either locally or to a remote destination. +Remote delivery includes several features like TLS/SSL support and +SMTP authentication. + +dma is not intended as a replacement for real, big MTAs like sendmail(8) +or postfix(1). Consequently, dma does not listen on port 25 for +incoming connections. + + +Building +-------- + +In Linux: + + make + +In BSD: + + cd bsd && make + +Installation +------------ + + make install sendmail-link mailq-link install-spool-dirs install-etc + +See INSTALL for requirements and configuration options. + + +Contact +------- + +Simon Schubert <2@0x2c.org> Copied: vendor/dma/0.10/TODO (from r289121, vendor/dma/dist/TODO) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/TODO Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/TODO) @@ -0,0 +1,4 @@ +- unquote/handle quoted local recipients +- handle/use ESMTP extensions +- .forward support +- suggest way to run a queue flush on boot Copied: vendor/dma/0.10/VERSION (from r289121, vendor/dma/dist/VERSION) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/VERSION Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/VERSION) @@ -0,0 +1 @@ +v0.10 Copied: vendor/dma/0.10/aliases_parse.y (from r289121, vendor/dma/dist/aliases_parse.y) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/aliases_parse.y Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/aliases_parse.y) @@ -0,0 +1,110 @@ +%{ + +#include +#include +#include +#include "dma.h" + +extern int yylineno; +static void yyerror(const char *); + +static void +yyerror(const char *msg) +{ + /** + * Because we do error '\n' below, we need to report the error + * one line above of what yylineno points to. + */ + syslog(LOG_CRIT, "aliases line %d: %s", yylineno - 1, msg); + fprintf(stderr, "aliases line %d: %s\n", yylineno - 1, msg); +} + +int +yywrap(void) +{ + return (1); +} + +%} + +%union { + char *ident; + struct stritem *strit; + struct alias *alias; +} + +%token T_IDENT +%token T_ERROR +%token T_EOF 0 + +%type dests +%type alias aliases + +%% + +start : aliases T_EOF + { + LIST_FIRST(&aliases) = $1; + } + +aliases : /* EMPTY */ + { + $$ = NULL; + } + | alias aliases + { + if ($2 != NULL && $1 != NULL) + LIST_INSERT_AFTER($2, $1, next); + else if ($2 == NULL) + $2 = $1; + $$ = $2; + } + ; + +alias : T_IDENT ':' dests '\n' + { + struct alias *al; + + if ($1 == NULL) + YYABORT; + al = calloc(1, sizeof(*al)); + if (al == NULL) + YYABORT; + al->alias = $1; + SLIST_FIRST(&al->dests) = $3; + $$ = al; + } + | error '\n' + { + YYABORT; + } + ; + +dests : T_IDENT + { + struct stritem *it; + + if ($1 == NULL) + YYABORT; + it = calloc(1, sizeof(*it)); + if (it == NULL) + YYABORT; + it->str = $1; + $$ = it; + } + | T_IDENT ',' dests + { + struct stritem *it; + + if ($1 == NULL) + YYABORT; + it = calloc(1, sizeof(*it)); + if (it == NULL) + YYABORT; + it->str = $1; + SLIST_NEXT(it, next) = $3; + $$ = it; + } + ; + +%% Copied: vendor/dma/0.10/aliases_scan.l (from r289121, vendor/dma/dist/aliases_scan.l) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/aliases_scan.l Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/aliases_scan.l) @@ -0,0 +1,24 @@ +%{ + +#include +#include "dma.h" +#include "aliases_parse.h" + +#define YY_NO_INPUT + +%} + +%option yylineno +%option nounput + +%% + +[^:,#[:space:][:cntrl:]]+ {yylval.ident = strdup(yytext); return T_IDENT;} +^([[:blank:]]*(#.*)?\n)+ ;/* ignore empty lines */ +[:,\n] return yytext[0]; +(\n?[[:blank:]]+|#.*)+ ;/* ignore whitespace and continuation */ +\\\n ;/* ignore continuation. not allowed in comments */ +. return T_ERROR; +<> return T_EOF; + +%% Copied: vendor/dma/0.10/conf.c (from r289121, vendor/dma/dist/conf.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/conf.c Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/conf.c) @@ -0,0 +1,245 @@ +/* + * Copyright (c) 2008 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Matthias Schmidt , University of Marburg, + * Germany. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "dma.h" + +#define DP ": \t" +#define EQS " \t" + + +/* + * Remove trailing \n's + */ +void +trim_line(char *line) +{ + size_t linelen; + char *p; + + if ((p = strchr(line, '\n'))) + *p = (char)0; + + /* Escape leading dot in every case */ + linelen = strlen(line); + if (line[0] == '.') { + if ((linelen + 2) > 1000) { + syslog(LOG_CRIT, "Cannot escape leading dot. Buffer overflow"); + exit(EX_DATAERR); + } + memmove((line + 1), line, (linelen + 1)); + line[0] = '.'; + } +} + +static void +chomp(char *str) +{ + size_t len = strlen(str); + + if (len == 0) + return; + if (str[len - 1] == '\n') + str[len - 1] = 0; +} + +/* + * Read the SMTP authentication config file + * + * file format is: + * user|host:password + * + * A line starting with # is treated as comment and ignored. + */ +void +parse_authfile(const char *path) +{ + char line[2048]; + struct authuser *au; + FILE *a; + char *data; + int lineno = 0; + + a = fopen(path, "r"); + if (a == NULL) { + errlog(EX_NOINPUT, "can not open auth file `%s'", path); + /* NOTREACHED */ + } + + while (!feof(a)) { + if (fgets(line, sizeof(line), a) == NULL) + break; + lineno++; + + chomp(line); + + /* We hit a comment */ + if (*line == '#') + continue; + /* Ignore empty lines */ + if (*line == 0) + continue; + + au = calloc(1, sizeof(*au)); + if (au == NULL) + errlog(EX_OSERR, NULL); + + data = strdup(line); + au->login = strsep(&data, "|"); + au->host = strsep(&data, DP); + au->password = data; + + if (au->login == NULL || + au->host == NULL || + au->password == NULL) { + errlogx(EX_CONFIG, "syntax error in authfile %s:%d", path, lineno); + /* NOTREACHED */ + } + + SLIST_INSERT_HEAD(&authusers, au, next); + } + + fclose(a); +} + +/* + * XXX TODO + * Check for bad things[TM] + */ +void +parse_conf(const char *config_path) +{ + char *word; + char *data; + FILE *conf; + char line[2048]; + int lineno = 0; + + conf = fopen(config_path, "r"); + if (conf == NULL) { + /* Don't treat a non-existing config file as error */ + if (errno == ENOENT) + return; + errlog(EX_NOINPUT, "can not open config `%s'", config_path); + /* NOTREACHED */ + } + + while (!feof(conf)) { + if (fgets(line, sizeof(line), conf) == NULL) + break; + lineno++; + + chomp(line); + + /* We hit a comment */ + if (strchr(line, '#')) + *strchr(line, '#') = 0; + + data = line; + word = strsep(&data, EQS); + + /* Ignore empty lines */ + if (word == NULL || *word == 0) + continue; + + if (data != NULL && *data != 0) + data = strdup(data); + else + data = NULL; + + if (strcmp(word, "SMARTHOST") == 0 && data != NULL) + config.smarthost = data; + else if (strcmp(word, "PORT") == 0 && data != NULL) + config.port = atoi(data); + else if (strcmp(word, "ALIASES") == 0 && data != NULL) + config.aliases = data; + else if (strcmp(word, "SPOOLDIR") == 0 && data != NULL) + config.spooldir = data; + else if (strcmp(word, "AUTHPATH") == 0 && data != NULL) + config.authpath= data; + else if (strcmp(word, "CERTFILE") == 0 && data != NULL) + config.certfile = data; + else if (strcmp(word, "MAILNAME") == 0 && data != NULL) + config.mailname = data; + else if (strcmp(word, "MASQUERADE") == 0 && data != NULL) { + char *user = NULL, *host = NULL; + if (strrchr(data, '@')) { + host = strrchr(data, '@'); + *host = 0; + host++; + user = data; + } else { + host = data; + } + if (host && *host == 0) + host = NULL; + if (user && *user == 0) + user = NULL; + config.masquerade_host = host; + config.masquerade_user = user; + } else if (strcmp(word, "STARTTLS") == 0 && data == NULL) + config.features |= STARTTLS; + else if (strcmp(word, "OPPORTUNISTIC_TLS") == 0 && data == NULL) + config.features |= TLS_OPP; + else if (strcmp(word, "SECURETRANSFER") == 0 && data == NULL) + config.features |= SECURETRANS; + else if (strcmp(word, "DEFER") == 0 && data == NULL) + config.features |= DEFER; + else if (strcmp(word, "INSECURE") == 0 && data == NULL) + config.features |= INSECURE; + else if (strcmp(word, "FULLBOUNCE") == 0 && data == NULL) + config.features |= FULLBOUNCE; + else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL) + config.features |= NULLCLIENT; + else { + errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno); + /* NOTREACHED */ + } + } + + if ((config.features & NULLCLIENT) && config.smarthost == NULL) { + errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path); + /* NOTREACHED */ + } + + fclose(conf); +} Copied: vendor/dma/0.10/dma-mbox-create.c (from r289121, vendor/dma/dist/dma-mbox-create.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/dma-mbox-create.c Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/dma-mbox-create.c) @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>. + * Copyright (c) 2008 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Simon Schubert <2@0x2c.org>. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This binary is setuid root. Use extreme caution when touching + * user-supplied information. Keep the root window as small as possible. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dma.h" + + +static void +logfail(int exitcode, const char *fmt, ...) +{ + int oerrno = errno; + va_list ap; + char outs[1024]; + + outs[0] = 0; + if (fmt != NULL) { + va_start(ap, fmt); + vsnprintf(outs, sizeof(outs), fmt, ap); + va_end(ap); + } + + errno = oerrno; + if (*outs != 0) + syslog(LOG_ERR, errno ? "%s: %m" : "%s", outs); + else + syslog(LOG_ERR, errno ? "%m" : "unknown error"); + + exit(exitcode); +} + +/* + * Create a mbox in /var/mail for a given user, or make sure + * the permissions are correct for dma. + */ + +int +main(int argc, char **argv) +{ + const char *user; + struct passwd *pw; + struct group *gr; + uid_t user_uid; + gid_t mail_gid; + int error; + char fn[PATH_MAX+1]; + int f; + + openlog("dma-mbox-create", 0, LOG_MAIL); + + errno = 0; + gr = getgrnam(DMA_GROUP); + if (!gr) + logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP); + + mail_gid = gr->gr_gid; + + if (setgid(mail_gid) != 0) + logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP); + if (getegid() != mail_gid) + logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); + + /* + * We take exactly one argument: the username. + */ + if (argc != 2) { + errno = 0; + logfail(EX_USAGE, "no arguments"); + } + user = argv[1]; + + syslog(LOG_NOTICE, "creating mbox for `%s'", user); + + /* the username may not contain a pathname separator */ + if (strchr(user, '/')) { + errno = 0; + logfail(EX_DATAERR, "path separator in username `%s'", user); + exit(1); + } + + /* verify the user exists */ + errno = 0; + pw = getpwnam(user); + if (!pw) + logfail(EX_NOUSER, "cannot find user `%s'", user); + + user_uid = pw->pw_uid; + + error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user); + if (error < 0 || (size_t)error >= sizeof(fn)) { + if (error >= 0) { + errno = 0; + logfail(EX_USAGE, "mbox path too long"); + } + logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); + } + + f = open(fn, O_RDONLY|O_CREAT, 0600); + if (f < 0) + logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); + + if (fchown(f, user_uid, mail_gid)) + logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); + + if (fchmod(f, 0620)) + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); + + /* file should be present with the right owner and permissions */ + + syslog(LOG_NOTICE, "successfully created mbox for `%s'", user); + + return (0); +} Copied: vendor/dma/0.10/dma.8 (from r289121, vendor/dma/dist/dma.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/0.10/dma.8 Sat Oct 10 23:22:55 2015 (r289122, copy of r289121, vendor/dma/dist/dma.8) @@ -0,0 +1,364 @@ +.\" +.\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. +.\" Copyright (c) 2008 +.\" The DragonFly Project. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd February 13, 2014 +.Dt DMA 8 +.Os +.Sh NAME +.Nm dma +.Nd DragonFly Mail Agent +.Sh SYNOPSIS +.Nm +.Op Fl DiOt +.Op Fl A Ns Ar mode +.Op Fl b Ns Ar mode +.Op Fl f Ar sender +.Op Fl L Ar tag +.Op Fl o Ns Ar option +.Op Fl r Ar sender +.Op Fl q Ns Op Ar arg +.Op Ar recipient ... +.Sh DESCRIPTION +.Nm +is a small Mail Transport Agent (MTA), designed for home and office use. +It accepts mails from locally installed Mail User Agents (MUA) and +delivers the mails either locally or to a remote destination. +Remote delivery includes several features like TLS/SSL support and SMTP +authentication. +.Pp +.Nm +is not intended as a replacement for real, big MTAs like +.Xr sendmail 8 +or +.Xr postfix 1 . +Consequently, +.Nm +does not listen on port 25 for incoming connections. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl A Ns Ar mode +.Fl \&Ac +acts as a compatibility option for sendmail. +.It Fl b Ns Ar mode +.Bl -tag -width indent +.It Fl bp +List all mails currently stored in the mail queue. +.It Fl bq +Queue the mail, but don't attempt to deliver it. +See also the +.Sq DEFER +config file setting below. +.El +.Pp +All other +.Ar mode Ns +s are are ignored. +.It Fl D +Don't run in the background. +Useful for debugging. +.It Fl f Ar sender +Set sender address (envelope-from) to +.Ar sender . +This overrides the value of the environment variable +.Ev EMAIL . +.It Fl i +Ignore dots alone on lines by themselves in incoming messages. +This should be set if you are reading data from a file. +.It Fl L Ar tag +Set the identifier used in syslog messages to the supplied +.Ar tag . +This is a compatibility option for sendmail. +.It Fl O +This is a compatibility option for sendmail. +.It Fl o Ns Ar option +Specifying +.Fl oi +is synonymous to +.Fl i . +All other options are ignored. +.It Fl q Ns Op Ar arg +Process saved messages in the queue. +The argument is optional and ignored. +.It Fl r Ar sender +Same as +.Fl f . +.It Fl t +Obtain recipient addresses from the message header. +.Nm +will parse the +.Li To: , +.Li Cc: , +and +.Li Bcc: +headers. +The +.Li Bcc: +header will be removed independent of whether +.Fl t +is specified or not. +.El +.Sh CONFIGURATION +.Nm +can be configured with two config files: +.Pp +.Bl -bullet -compact +.It +auth.conf +.It +dma.conf +.El +.Pp +These two files are stored per default in +.Pa /etc/dma . +.Sh FILE FORMAT +Every file contains parameters of the form +.Sq name value . +Lines containing boolean values are set to +.Sq NO +if the line is commented and to +.Sq YES +if the line is uncommented. +Empty lines or lines beginning with a +.Sq # +are ignored. +Parameter names and their values are case sensitive. +.Sh PARAMETERS +.Ss auth.conf +SMTP authentication can be configured in +.Pa auth.conf . +Each line has the format +.Dq Li user|smarthost:password . +.Ss dma.conf +Most of the behaviour of +.Nm +can be configured in +.Pa dma.conf . +.Bl -tag -width 4n +.It Ic SMARTHOST Xo +(string, default=empty) +.Xc +If you want to send outgoing mails via a smarthost, set this variable to +your smarthosts address. +.It Ic PORT Xo +(numeric, default=25) +.Xc +Use this port to deliver remote emails. +Only useful together with the +.Sq SMARTHOST +option, because +.Nm +will deliver all mails to this port, regardless of whether a smarthost is set +or not. +.It Ic ALIASES Xo +(string, default=/etc/aliases) +.Xc +Path to the local aliases file. +Just stick with the default. +The aliases file is of the format +.Dl nam: dest1 dest2 ... +In this case, mails to +.Li nam +will instead be delivered to +.Li dest1 +and +.Li dest2 , +which in turn could be entries in +.Pa /etc/aliases . +The special name +.Ql * +can be used to create a catch-all alias, which gets used if no other +matching alias is found. +Use the catch-all alias only if you don't want any local mail to be +delivered. +.It Ic SPOOLDIR Xo +(string, default=/var/spool/dma) +.Xc +Path to +.Nm Ap s +spool directory. +Just stick with the default. +.It Ic AUTHPATH Xo +(string, default=not set) +.Xc +Path to the +.Sq auth.conf +file. +.It Ic SECURETRANS Xo +(boolean, default=commented) +.Xc +Uncomment if you want TLS/SSL secured transfer. +.It Ic STARTTLS Xo +(boolean, default=commented) +.Xc +Uncomment if you want to use STARTTLS. +Only useful together with +.Sq SECURETRANS . +.It Ic OPPORTUNISTIC_TLS Xo +(boolean, default=commented) +.Xc +Uncomment if you want to allow the STARTTLS negotiation to fail. +Most useful when +.Nm +is used without a smarthost, delivering remote messages directly to +the outside mail exchangers; in opportunistic TLS mode, the connection will +be encrypted if the remote server supports STARTTLS, but an unencrypted +delivery will still be made if the negotiation fails. +Only useful together with +.Sq SECURETRANS +and +.Sq STARTTLS . +.It Ic CERTFILE Xo +(string, default=empty) +.Xc +Path to your SSL certificate file. +.It Ic SECURE Xo +(boolean, default=commented) +.Xc +Uncomment this entry and change it to +.Sq INSECURE +to use plain text SMTP login over an insecure connection. +You have to rename this variable manually to prevent that you send your +password accidentally over an insecure connection. +.It Ic DEFER Xo +(boolean, default=commented) +.Xc +Uncomment if you want that +.Nm +defers your mail. +You have to flush your mail queue manually with the +.Fl q +option. +This option is handy if you are behind a dialup line. +.It Ic FULLBOUNCE Xo +(boolean, default=commented) +.Xc +Uncomment if you want the bounce message to include the complete original +message, not just the headers. +.It Ic MAILNAME Xo +(string, default=empty) +.Xc +The internet hostname +.Nm +uses to identify the host. +If not set or empty, the result of +.Xr gethostname 3 +is used. +If +.Sq MAILNAME +is an absolute path to a file, the first line of this file will be used +as the hostname. +.It Ic MASQUERADE Xo +(string, default=empty) +.Xc +Masquerade the envelope-from addresses with this address/hostname. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 10 23:31:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA22B9D28B5; Sat, 10 Oct 2015 23:31:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DD612A3; Sat, 10 Oct 2015 23:31:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ANVni0089158; Sat, 10 Oct 2015 23:31:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ANVlkY089138; Sat, 10 Oct 2015 23:31:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510102331.t9ANVlkY089138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Oct 2015 23:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289123 - in head: contrib/dma contrib/dma/debian libexec/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 23:31:50 -0000 Author: bapt Date: Sat Oct 10 23:31:47 2015 New Revision: 289123 URL: https://svnweb.freebsd.org/changeset/base/289123 Log: Update Dragonfly Mail Agent to v0.10 Deleted: head/contrib/dma/BSDmakefile head/contrib/dma/debian/ Modified: head/contrib/dma/LICENSE head/contrib/dma/README.markdown head/contrib/dma/TODO head/contrib/dma/VERSION head/contrib/dma/aliases_parse.y head/contrib/dma/aliases_scan.l head/contrib/dma/conf.c head/contrib/dma/dma-mbox-create.c head/contrib/dma/dma.8 head/contrib/dma/dma.c head/contrib/dma/dma.h head/contrib/dma/dns.c head/contrib/dma/get-version.sh head/contrib/dma/local.c head/contrib/dma/mail.c head/contrib/dma/net.c head/contrib/dma/spool.c head/contrib/dma/util.c head/libexec/dma/Makefile.inc Directory Properties: head/contrib/dma/ (props changed) Modified: head/contrib/dma/LICENSE ============================================================================== --- head/contrib/dma/LICENSE Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/LICENSE Sat Oct 10 23:31:47 2015 (r289123) @@ -1,5 +1,5 @@ +Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. Copyright (c) 2008 The DragonFly Project. -Copyright (c) 2008-2011, Simon Schubert <2@0x2c.org>. All rights reserved. This code is derived from software contributed to The DragonFly Project @@ -37,7 +37,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADV SUCH DAMAGE. -Copyright (c) 1995-2001 Kungliga Tekniska Högskolan +Copyright (c) 1995-2001 Kungliga Tekniska Högskolan (Royal Institute of Technology, Stockholm, Sweden). All rights reserved. Modified: head/contrib/dma/README.markdown ============================================================================== --- head/contrib/dma/README.markdown Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/README.markdown Sat Oct 10 23:31:47 2015 (r289123) @@ -15,8 +15,13 @@ incoming connections. Building -------- +In Linux: + make +In BSD: + + cd bsd && make Installation ------------ Modified: head/contrib/dma/TODO ============================================================================== --- head/contrib/dma/TODO Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/TODO Sat Oct 10 23:31:47 2015 (r289123) @@ -1,5 +1,4 @@ - unquote/handle quoted local recipients -- use proper sysexit codes - handle/use ESMTP extensions - .forward support - suggest way to run a queue flush on boot Modified: head/contrib/dma/VERSION ============================================================================== --- head/contrib/dma/VERSION Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/VERSION Sat Oct 10 23:31:47 2015 (r289123) @@ -1 +1 @@ -v0.9 +v0.10 Modified: head/contrib/dma/aliases_parse.y ============================================================================== --- head/contrib/dma/aliases_parse.y Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/aliases_parse.y Sat Oct 10 23:31:47 2015 (r289123) @@ -7,8 +7,6 @@ extern int yylineno; static void yyerror(const char *); -int yywrap(void); -int yylex(void); static void yyerror(const char *msg) Modified: head/contrib/dma/aliases_scan.l ============================================================================== --- head/contrib/dma/aliases_scan.l Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/aliases_scan.l Sat Oct 10 23:31:47 2015 (r289123) @@ -1,11 +1,11 @@ %{ #include +#include "dma.h" #include "aliases_parse.h" #define YY_NO_INPUT -int yylex(void); %} %option yylineno Modified: head/contrib/dma/conf.c ============================================================================== --- head/contrib/dma/conf.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/conf.c Sat Oct 10 23:31:47 2015 (r289123) @@ -64,7 +64,7 @@ trim_line(char *line) if (line[0] == '.') { if ((linelen + 2) > 1000) { syslog(LOG_CRIT, "Cannot escape leading dot. Buffer overflow"); - exit(1); + exit(EX_DATAERR); } memmove((line + 1), line, (linelen + 1)); line[0] = '.'; @@ -101,7 +101,7 @@ parse_authfile(const char *path) a = fopen(path, "r"); if (a == NULL) { - errlog(1, "can not open auth file `%s'", path); + errlog(EX_NOINPUT, "can not open auth file `%s'", path); /* NOTREACHED */ } @@ -121,7 +121,7 @@ parse_authfile(const char *path) au = calloc(1, sizeof(*au)); if (au == NULL) - errlog(1, "calloc failed"); + errlog(EX_OSERR, NULL); data = strdup(line); au->login = strsep(&data, "|"); @@ -131,8 +131,7 @@ parse_authfile(const char *path) if (au->login == NULL || au->host == NULL || au->password == NULL) { - errlogx(1, "syntax error in authfile %s:%d", - path, lineno); + errlogx(EX_CONFIG, "syntax error in authfile %s:%d", path, lineno); /* NOTREACHED */ } @@ -160,7 +159,7 @@ parse_conf(const char *config_path) /* Don't treat a non-existing config file as error */ if (errno == ENOENT) return; - errlog(1, "can not open config `%s'", config_path); + errlog(EX_NOINPUT, "can not open config `%s'", config_path); /* NOTREACHED */ } @@ -211,7 +210,7 @@ parse_conf(const char *config_path) } else { host = data; } - if (host && *host == 0) + if (host && *host == 0) host = NULL; if (user && *user == 0) user = NULL; @@ -232,13 +231,13 @@ parse_conf(const char *config_path) else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL) config.features |= NULLCLIENT; else { - errlogx(1, "syntax error in %s:%d", config_path, lineno); + errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno); /* NOTREACHED */ } } if ((config.features & NULLCLIENT) && config.smarthost == NULL) { - errlogx(1, "%s: NULLCLIENT requires SMARTHOST", config_path); + errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path); /* NOTREACHED */ } Modified: head/contrib/dma/dma-mbox-create.c ============================================================================== --- head/contrib/dma/dma-mbox-create.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/dma-mbox-create.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,9 +1,9 @@ /* - * Copyright (c) 2010 Simon Schubert <2@0x2c.org> + * Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -54,7 +54,7 @@ static void -logfail(const char *fmt, ...) +logfail(int exitcode, const char *fmt, ...) { int oerrno = errno; va_list ap; @@ -73,7 +73,7 @@ logfail(const char *fmt, ...) else syslog(LOG_ERR, errno ? "%m" : "unknown error"); - exit(1); + exit(exitcode); } /* @@ -98,21 +98,21 @@ main(int argc, char **argv) errno = 0; gr = getgrnam(DMA_GROUP); if (!gr) - logfail("cannot find dma group `%s'", DMA_GROUP); + logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP); mail_gid = gr->gr_gid; if (setgid(mail_gid) != 0) - logfail("cannot set gid to %d (%s)", mail_gid, DMA_GROUP); + logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP); if (getegid() != mail_gid) - logfail("cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); + logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); /* * We take exactly one argument: the username. */ if (argc != 2) { errno = 0; - logfail("no arguments"); + logfail(EX_USAGE, "no arguments"); } user = argv[1]; @@ -121,7 +121,7 @@ main(int argc, char **argv) /* the username may not contain a pathname separator */ if (strchr(user, '/')) { errno = 0; - logfail("path separator in username `%s'", user); + logfail(EX_DATAERR, "path separator in username `%s'", user); exit(1); } @@ -129,7 +129,7 @@ main(int argc, char **argv) errno = 0; pw = getpwnam(user); if (!pw) - logfail("cannot find user `%s'", user); + logfail(EX_NOUSER, "cannot find user `%s'", user); user_uid = pw->pw_uid; @@ -137,20 +137,20 @@ main(int argc, char **argv) if (error < 0 || (size_t)error >= sizeof(fn)) { if (error >= 0) { errno = 0; - logfail("mbox path too long"); + logfail(EX_USAGE, "mbox path too long"); } - logfail("cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); + logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); } f = open(fn, O_RDONLY|O_CREAT, 0600); if (f < 0) - logfail("cannot open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); if (fchown(f, user_uid, mail_gid)) - logfail("cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); if (fchmod(f, 0620)) - logfail("cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); /* file should be present with the right owner and permissions */ Modified: head/contrib/dma/dma.8 ============================================================================== --- head/contrib/dma/dma.8 Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/dma.8 Sat Oct 10 23:31:47 2015 (r289123) @@ -1,4 +1,5 @@ .\" +.\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. .\" Copyright (c) 2008 .\" The DragonFly Project. All rights reserved. .\" Modified: head/contrib/dma/dma.c ============================================================================== --- head/contrib/dma/dma.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/dma.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -247,7 +248,7 @@ go_background(struct queue *queue) if (daemonize && daemon(0, 0) != 0) { syslog(LOG_ERR, "can not daemonize: %m"); - exit(1); + exit(EX_OSERR); } daemonize = 0; @@ -264,7 +265,7 @@ go_background(struct queue *queue) switch (pid) { case -1: syslog(LOG_ERR, "can not fork: %m"); - exit(1); + exit(EX_OSERR); break; case 0: @@ -286,11 +287,11 @@ retit: break; case 1: if (doqueue) - exit(0); + exit(EX_OK); syslog(LOG_WARNING, "could not lock queue file"); - exit(1); + exit(EX_SOFTWARE); default: - exit(1); + exit(EX_SOFTWARE); } dropspool(queue, it); return (it); @@ -306,7 +307,7 @@ retit: } syslog(LOG_CRIT, "reached dead code"); - exit(1); + exit(EX_SOFTWARE); } static void @@ -331,12 +332,12 @@ retry: case 0: delqueue(it); syslog(LOG_INFO, "delivery successful"); - exit(0); + exit(EX_OK); case 1: if (stat(it->queuefn, &st) != 0) { syslog(LOG_ERR, "lost queue file `%s'", it->queuefn); - exit(1); + exit(EX_SOFTWARE); } if (gettimeofday(&now, NULL) == 0 && (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) { @@ -438,16 +439,16 @@ main(int argc, char **argv) pw = getpwnam(DMA_ROOT_USER); if (pw == NULL) { if (errno == 0) - errx(1, "user '%s' not found", DMA_ROOT_USER); + errx(EX_CONFIG, "user '%s' not found", DMA_ROOT_USER); else - err(1, "cannot drop root privileges"); + err(EX_OSERR, "cannot drop root privileges"); } if (setuid(pw->pw_uid) != 0) - err(1, "cannot drop root privileges"); + err(EX_OSERR, "cannot drop root privileges"); if (geteuid() == 0 || getuid() == 0) - errx(1, "cannot drop root privileges"); + errx(EX_OSERR, "cannot drop root privileges"); } atexit(deltmp); @@ -460,15 +461,15 @@ main(int argc, char **argv) argv++; argc--; showq = 1; if (argc != 0) - errx(1, "invalid arguments"); + errx(EX_USAGE, "invalid arguments"); goto skipopts; } else if (strcmp(argv[0], "newaliases") == 0) { logident_base = "dma"; setlogident("%s", logident_base); if (read_aliases() != 0) - errx(1, "could not parse aliases file `%s'", config.aliases); - exit(0); + errx(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); + exit(EX_OK); } opterr = 0; @@ -547,7 +548,7 @@ main(int argc, char **argv) default: fprintf(stderr, "invalid argument: `-%c'\n", optopt); - exit(1); + exit(EX_USAGE); } } argc -= optind; @@ -555,10 +556,10 @@ main(int argc, char **argv) opterr = 1; if (argc != 0 && (showq || doqueue)) - errx(1, "sending mail and queue operations are mutually exclusive"); + errx(EX_USAGE, "sending mail and queue operations are mutually exclusive"); if (showq + doqueue > 1) - errx(1, "conflicting queue operations"); + errx(EX_USAGE, "conflicting queue operations"); skipopts: if (logident_base == NULL) @@ -578,7 +579,7 @@ skipopts: if (showq) { if (load_queue(&queue) < 0) - errlog(1, "can not load queue"); + errlog(EX_NOINPUT, "can not load queue"); show_queue(&queue); return (0); } @@ -586,38 +587,38 @@ skipopts: if (doqueue) { flushqueue_signal(); if (load_queue(&queue) < 0) - errlog(1, "can not load queue"); + errlog(EX_NOINPUT, "can not load queue"); run_queue(&queue); return (0); } if (read_aliases() != 0) - errlog(1, "could not parse aliases file `%s'", config.aliases); + errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); if ((sender = set_from(&queue, sender)) == NULL) - errlog(1, "set_from failed"); + errlog(EX_SOFTWARE, NULL); if (newspoolf(&queue) != 0) - errlog(1, "can not create temp file in `%s'", config.spooldir); + errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); setlogident("%s", queue.id); for (i = 0; i < argc; i++) { if (add_recp(&queue, argv[i], EXPAND_WILDCARD) != 0) - errlogx(1, "invalid recipient `%s'", argv[i]); + errlogx(EX_DATAERR, "invalid recipient `%s'", argv[i]); } if (LIST_EMPTY(&queue.queue) && !recp_from_header) - errlogx(1, "no recipients"); + errlogx(EX_NOINPUT, "no recipients"); if (readmail(&queue, nodot, recp_from_header) != 0) - errlog(1, "can not read mail"); + errlog(EX_NOINPUT, "can not read mail"); if (LIST_EMPTY(&queue.queue)) - errlogx(1, "no recipients"); + errlogx(EX_NOINPUT, "no recipients"); if (linkspool(&queue) != 0) - errlog(1, "can not create spools"); + errlog(EX_CANTCREAT, "can not create spools"); /* From here on the mail is safe. */ Modified: head/contrib/dma/dma.h ============================================================================== --- head/contrib/dma/dma.h Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/dma.h Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert and + * by Simon Schubert <2@0x2c.org> and * Matthias Schmidt . * * Redistribution and use in source and binary forms, with or without @@ -43,6 +44,7 @@ #include #include #include +#include #define VERSION "DragonFly Mail Agent " DMA_VERSION @@ -173,6 +175,8 @@ extern char errmsg[ERRMSG_SIZE]; /* aliases_parse.y */ int yyparse(void); +int yywrap(void); +int yylex(void); extern FILE *yyin; /* conf.c */ Modified: head/contrib/dma/dns.c ============================================================================== --- head/contrib/dma/dns.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/dns.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,7 +68,6 @@ add_host(int pref, const char *host, int char servname[10]; struct mx_hostentry *p; const int count_inc = 10; - int err; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; @@ -75,9 +75,26 @@ add_host(int pref, const char *host, int hints.ai_protocol = IPPROTO_TCP; snprintf(servname, sizeof(servname), "%d", port); - err = getaddrinfo(host, servname, &hints, &res0); - if (err) - return (err == EAI_AGAIN ? 1 : -1); + switch (getaddrinfo(host, servname, &hints, &res0)) { + case 0: + break; + case EAI_AGAIN: + case EAI_NONAME: + /* + * EAI_NONAME gets returned for: + * SMARTHOST set but DNS server not reachable -> defer + * SMARTHOST set but DNS server returns "host does not exist" + * -> buggy configuration + * -> either defer or bounce would be ok -> defer + * MX entry was returned by DNS server but name doesn't resolve + * -> hopefully transient situation -> defer + * all other DNS problems should have been caught earlier + * in dns_get_mx_list(). + */ + goto out; + default: + return(-1); + } for (res = res0; res != NULL; res = res->ai_next) { if (*ps + 1 >= roundup(*ps, count_inc)) { Modified: head/contrib/dma/get-version.sh ============================================================================== --- head/contrib/dma/get-version.sh Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/get-version.sh Sat Oct 10 23:31:47 2015 (r289123) @@ -1,7 +1,9 @@ #!/bin/sh +tmp=$1 +file=${tmp:=VERSION} gitver=$(git describe 2>/dev/null | tr - .) -filever=$(cat VERSION) +filever=$(cat ${file} 2>/dev/null) version=${gitver} : ${version:=$filever} Modified: head/contrib/dma/local.c ============================================================================== --- head/contrib/dma/local.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/local.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -81,7 +82,7 @@ create_mbox(const char *name) execl(LIBEXEC_PATH "/dma-mbox-create", "dma-mbox-create", name, NULL); syslog(LOG_ERR, "cannot execute "LIBEXEC_PATH"/dma-mbox-create: %m"); - exit(1); + exit(EX_SOFTWARE); default: /* parent */ Modified: head/contrib/dma/mail.c ============================================================================== --- head/contrib/dma/mail.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/mail.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -51,7 +52,7 @@ bounce(struct qitem *it, const char *rea /* Don't bounce bounced mails */ if (it->sender[0] == 0) { syslog(LOG_INFO, "can not bounce a bounce message, discarding"); - exit(1); + exit(EX_SOFTWARE); } bzero(&bounceq, sizeof(bounceq)); @@ -132,7 +133,7 @@ bounce(struct qitem *it, const char *rea fail: syslog(LOG_CRIT, "error creating bounce: %m"); delqueue(it); - exit(1); + exit(EX_IOERR); } struct parse_state { @@ -332,10 +333,10 @@ newaddr: ps->pos = 0; addr = strdup(ps->addr); if (addr == NULL) - errlog(1, "strdup failed"); + errlog(EX_SOFTWARE, NULL); if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) - errlogx(1, "invalid recipient `%s'", addr); + errlogx(EX_DATAERR, "invalid recipient `%s'", addr); goto again; } @@ -374,7 +375,9 @@ readmail(struct queue *queue, int nodot, if (fgets(line, sizeof(line) - 1, stdin) == NULL) break; if (had_last_line) - errlogx(1, "bad mail input format"); + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); linelen = strlen(line); if (linelen == 0 || line[linelen - 1] != '\n') { /* @@ -405,7 +408,7 @@ readmail(struct queue *queue, int nodot, if (parse_state.state != NONE) { if (parse_addrs(&parse_state, line, queue) < 0) { - errlogx(1, "invalid address in header\n"); + errlogx(EX_DATAERR, "invalid address in header\n"); /* NOTREACHED */ } } @@ -416,7 +419,7 @@ readmail(struct queue *queue, int nodot, strprefixcmp(line, "Bcc:") == 0)) { parse_state.state = START; if (parse_addrs(&parse_state, line, queue) < 0) { - errlogx(1, "invalid address in header\n"); + errlogx(EX_DATAERR, "invalid address in header\n"); /* NOTREACHED */ } } Modified: head/contrib/dma/net.c ============================================================================== --- head/contrib/dma/net.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/net.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project Modified: head/contrib/dma/spool.c ============================================================================== --- head/contrib/dma/spool.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/spool.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -289,7 +290,7 @@ load_queue(struct queue *queue) spooldir = opendir(config.spooldir); if (spooldir == NULL) - err(1, "reading queue"); + err(EX_NOINPUT, "reading queue"); while ((de = readdir(spooldir)) != NULL) { queuefn = NULL; Modified: head/contrib/dma/util.c ============================================================================== --- head/contrib/dma/util.c Sat Oct 10 23:22:55 2015 (r289122) +++ head/contrib/dma/util.c Sat Oct 10 23:31:47 2015 (r289123) @@ -1,8 +1,9 @@ /* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. * Copyright (c) 2008 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project - * by Simon 'corecode' Schubert . + * by Simon Schubert <2@0x2c.org>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/libexec/dma/Makefile.inc ============================================================================== --- head/libexec/dma/Makefile.inc Sat Oct 10 23:22:55 2015 (r289122) +++ head/libexec/dma/Makefile.inc Sat Oct 10 23:31:47 2015 (r289123) @@ -7,7 +7,7 @@ DMA_SOURCES= ${.CURDIR}/../../../contrib CFLAGS= -I${DMA_SOURCES} \ -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME \ -DCONF_PATH='"/etc/dma"' \ - -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"' \ + -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.10"' \ -DDMA_ROOT_USER='"mailnull"' \ -DDMA_GROUP='"mail"' BINGRP= mail From owner-svn-src-all@freebsd.org Sat Oct 10 23:40:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5868D9D2B32; Sat, 10 Oct 2015 23:40:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16A8215B6; Sat, 10 Oct 2015 23:40:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::45a9:51f7:50ff:5870] (unknown [IPv6:2001:7b8:3a7:0:45a9:51f7:50ff:5870]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 46A1E3430F; Sun, 11 Oct 2015 01:40:54 +0200 (CEST) Subject: Re: svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeDy... Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Content-Type: multipart/signed; boundary="Apple-Mail=_85ACB588-4C7A-415E-9709-5909C3D82A07"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 From: Dimitry Andric In-Reply-To: <20151011003222.0944214d@nonamehost.local> Date: Sun, 11 Oct 2015 01:40:46 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <314FDE61-A3F7-4DB7-98BF-16BDCA77D307@FreeBSD.org> References: <201505251343.t4PDh3wR037780@svn.freebsd.org> <20151011003222.0944214d@nonamehost.local> To: Ivan Klymenko X-Mailer: Apple Mail (2.3094) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 23:40:58 -0000 --Apple-Mail=_85ACB588-4C7A-415E-9709-5909C3D82A07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 10 Oct 2015, at 23:32, Ivan Klymenko wrote: > On Mon, 25 May 2015 13:43:03 +0000 (UTC) > Dimitry Andric wrote: >=20 >> Author: dim >> Date: Mon May 25 13:43:03 2015 >> New Revision: 283526 >> URL: https://svnweb.freebsd.org/changeset/base/283526 >>=20 >> Log: >> Upgrade our copy of clang and llvm to 3.6.1 release. This is some time ago already, you probably meant the upgrade to 3.7.0? :-) > Cannot emit physreg copy instruction > UNREACHABLE executed at = /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/= X86InstrInfo.cpp:3935! > cc: error: unable to execute command: Abort trap > cc: error: clang frontend command failed due to signal (use -v to see = invocation) > FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) 20150906 > Target: x86_64-unknown-freebsd11.0 > Thread model: posix > cc: note: diagnostic msg: PLEASE submit a bug report to = https://bugs.freebsd.org/submit/ and include the crash backtrace, = preprocessed source, and associated run script. > cc: note: diagnostic msg: > ******************** >=20 > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.c > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.sh Yes, this error has already been reported; please see the thread starting here: = https://lists.freebsd.org/pipermail/freebsd-current/2015-October/057701.ht= ml It has been submitted as an upstream bug, and a fix is being worked on. For now, you can work around it by unsetting CPUTYPE. -Dimitry --Apple-Mail=_85ACB588-4C7A-415E-9709-5909C3D82A07 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlYZogUACgkQsF6jCi4glqNkdgCg2yjZJYyLrf3cRYbqMc9+V96+ tLkAoIqHKnFic5jna/WZoARkakxTja+4 =Uhx9 -----END PGP SIGNATURE----- --Apple-Mail=_85ACB588-4C7A-415E-9709-5909C3D82A07--