From owner-svn-src-stable-9@FreeBSD.ORG Sun May 31 22:51:17 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0CD1BDC; Sun, 31 May 2015 22:51:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEA891DCB; Sun, 31 May 2015 22:51:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMpHbe039084; Sun, 31 May 2015 22:51:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMpHjv039083; Sun, 31 May 2015 22:51:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312251.t4VMpHjv039083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:51:17 +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: r283850 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 22:51:17 -0000 Author: ae Date: Sun May 31 22:51:16 2015 New Revision: 283850 URL: https://svnweb.freebsd.org/changeset/base/283850 Log: MFC r283117: Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387 Modified: stable/9/sys/netipsec/keysock.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/keysock.c ============================================================================== --- stable/9/sys/netipsec/keysock.c Sun May 31 22:49:32 2015 (r283849) +++ stable/9/sys/netipsec/keysock.c Sun May 31 22:51:16 2015 (r283850) @@ -148,8 +148,6 @@ key_sendup0(rp, m, promisc) PFKEYSTAT_INC(in_nomem); return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ - pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); pmsg->sadb_msg_version = PF_KEY_V2; From owner-svn-src-stable-9@FreeBSD.ORG Mon Jun 1 18:08:58 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4424CBF3; Mon, 1 Jun 2015 18:08:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32BE61B49; Mon, 1 Jun 2015 18:08:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I8wVr022521; Mon, 1 Jun 2015 18:08:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I8vZG022519; Mon, 1 Jun 2015 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011808.t51I8vZG022519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:08: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: r283886 - in stable: 10/sys/dev/hwpmc 9/sys/dev/hwpmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 18:08:58 -0000 Author: jhb Date: Mon Jun 1 18:08:56 2015 New Revision: 283886 URL: https://svnweb.freebsd.org/changeset/base/283886 Log: MFC 283123: Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Sponsored by: Norse Corp, Inc. Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c stable/9/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:08:56 2015 (r283886) @@ -195,6 +195,10 @@ core_pcpu_fini(struct pmc_mdep *md, int static pmc_value_t iaf_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iaf_width - 1))) == 0) + return (0); v &= (1ULL << core_iaf_width) - 1; return (1ULL << core_iaf_width) - v; } @@ -1697,6 +1701,10 @@ static const int niap_events = sizeof(ia static pmc_value_t iap_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iap_width - 1))) == 0) + return (0); v &= (1ULL << core_iap_width) - 1; return (1ULL << core_iap_width) - v; } Modified: stable/9/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/9/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:08:56 2015 (r283886) @@ -1434,7 +1434,7 @@ pmc_process_csw_out(struct thread *td) tmp += pm->pm_sc.pm_reloadcount; mtx_pool_lock_spin(pmc_mtxpool, pm); pp->pp_pmcs[ri].pp_pmcval -= tmp; - if ((int64_t) pp->pp_pmcs[ri].pp_pmcval < 0) + if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0) pp->pp_pmcs[ri].pp_pmcval += pm->pm_sc.pm_reloadcount; mtx_pool_unlock_spin(pmc_mtxpool, pm); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jun 1 19:26:27 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CF93616; Mon, 1 Jun 2015 19:26:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE1C1FE1; Mon, 1 Jun 2015 19:26:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51JQRfF065986; Mon, 1 Jun 2015 19:26:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51JQQoZ065984; Mon, 1 Jun 2015 19:26:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506011926.t51JQQoZ065984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 1 Jun 2015 19:26: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: r283892 - in stable: 10/sys/dev/acpica 8/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 19:26:27 -0000 Author: jkim Date: Mon Jun 1 19:26:24 2015 New Revision: 283892 URL: https://svnweb.freebsd.org/changeset/base/283892 Log: MFC: r283261 Do not probe Intel PIIX4 south bridge quirks on amd64. Modified: stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/dev/acpica/acpi_throttle.c stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/10/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/9/sys/dev/acpica/acpi_cpu.c Mon Jun 1 19:26:24 2015 (r283892) @@ -171,7 +171,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(void); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1122,12 +1123,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1161,6 +1159,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1209,8 +1217,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: stable/9/sys/dev/acpica/acpi_throttle.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_throttle.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/9/sys/dev/acpica/acpi_throttle.c Mon Jun 1 19:26:24 2015 (r283892) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-stable-9@FreeBSD.ORG Tue Jun 2 15:02:30 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF80628; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D771F5B; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2UDW066924; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2U8I066923; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021502.t52F2U8I066923@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:02: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: r283912 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:02:31 -0000 Author: jhb Date: Tue Jun 2 15:02:28 2015 New Revision: 283912 URL: https://svnweb.freebsd.org/changeset/base/283912 Log: MFC 281170: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 Modified: stable/9/lib/libc/sys/vfork.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/vfork.2 stable/8/lib/libc/sys/vfork.2 Directory Properties: stable/10/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/vfork.2 ============================================================================== --- stable/9/lib/libc/sys/vfork.2 Tue Jun 2 14:55:55 2015 (r283911) +++ stable/9/lib/libc/sys/vfork.2 Tue Jun 2 15:02:28 2015 (r283912) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-stable-9@FreeBSD.ORG Tue Jun 2 15:12:35 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C704E0; Tue, 2 Jun 2015 15:12:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380371230; Tue, 2 Jun 2015 15:12:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52FCZjZ072524; Tue, 2 Jun 2015 15:12:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52FCZjf072523; Tue, 2 Jun 2015 15:12:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021512.t52FCZjf072523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:12: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: r283916 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 15:12:35 -0000 Author: jhb Date: Tue Jun 2 15:12:33 2015 New Revision: 283916 URL: https://svnweb.freebsd.org/changeset/base/283916 Log: MFC 282417: Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 Modified: stable/9/lib/libc/sys/truncate.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/truncate.2 stable/8/lib/libc/sys/truncate.2 Directory Properties: stable/10/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/truncate.2 ============================================================================== --- stable/9/lib/libc/sys/truncate.2 Tue Jun 2 15:09:33 2015 (r283915) +++ stable/9/lib/libc/sys/truncate.2 Tue Jun 2 15:12:33 2015 (r283916) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd May 4, 2015 .Dt TRUNCATE 2 .Os .Sh NAME @@ -60,9 +60,18 @@ is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. -With -.Fn ftruncate , -the file must be open for writing. +.Pp +The +.Fn ftruncate +system call causes the file or shared memory object backing the file descriptor +.Fa fd +to be truncated or extended to +.Fa length +bytes in size. +The file descriptor must be a valid file descriptor open for writing. +The file position pointer associated with the file descriptor +.Fa fd +will not be modified. .Sh RETURN VALUES .Rv -std If the file to be modified is not a directory or @@ -129,7 +138,7 @@ is not a valid descriptor. The .Fa fd argument -references a socket, not a file. +references a file descriptor that is not a regular file or shared memory object. .It Bq Er EINVAL The .Fa fd @@ -138,11 +147,14 @@ is not open for writing. .El .Sh SEE ALSO .Xr chflags 2 , -.Xr open 2 +.Xr open 2 , +.Xr shm_open 2 .Sh HISTORY The .Fn truncate -system call appeared in +and +.Fn ftruncate +system calls appeared in .Bx 4.2 . .Sh BUGS These calls should be generalized to allow ranges From owner-svn-src-stable-9@FreeBSD.ORG Tue Jun 2 19:21:21 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F065678C; Tue, 2 Jun 2015 19:21:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA8CC158C; Tue, 2 Jun 2015 19:21:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JLKDl099099; Tue, 2 Jun 2015 19:21:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JL83X099007; Tue, 2 Jun 2015 19:21:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021921.t52JL83X099007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:21: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: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 19:21:21 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) stable/7/sys/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/9/lib/libc/gen/_once_stub.c ============================================================================== --- stable/9/lib/libc/gen/_once_stub.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/gen/_once_stub.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/include/compat.h ============================================================================== --- stable/9/lib/libc/include/compat.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/include/compat.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/stdio/open_memstream.3 ============================================================================== --- stable/9/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/lib/libc/stdio/open_memstream.c ============================================================================== --- stable/9/lib/libc/stdio/open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/stdio/open_wmemstream.c ============================================================================== --- stable/9/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/sys/closefrom.2 ============================================================================== --- stable/9/lib/libc/sys/closefrom.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/sys/closefrom.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/lib/libc/sys/procctl.2 ============================================================================== --- stable/9/lib/libc/sys/procctl.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/sys/procctl.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- stable/9/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- stable/9/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- stable/9/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_adjust_resource.9 ============================================================================== --- stable/9/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- stable/9/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_set_pass.9 ============================================================================== --- stable/9/share/man/man9/bus_set_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_set_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/refcount.9 ============================================================================== --- stable/9/share/man/man9/refcount.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/refcount.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/sglist.9 ============================================================================== --- stable/9/share/man/man9/sglist.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/sglist.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/shm_map.9 ============================================================================== --- stable/9/share/man/man9/shm_map.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/shm_map.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/sys/amd64/include/vm.h ============================================================================== --- stable/9/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/boot/i386/common/edd.h ============================================================================== --- stable/9/sys/boot/i386/common/edd.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/boot/i386/common/edd.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/dev/pci/pci_subr.c ============================================================================== --- stable/9/sys/dev/pci/pci_subr.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/dev/pci/pci_subr.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/i386/include/vm.h ============================================================================== --- stable/9/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/sys/procctl.h ============================================================================== --- stable/9/sys/sys/procctl.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/sys/procctl.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/vm/sg_pager.c ============================================================================== --- stable/9/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/acpica/srat.c ============================================================================== --- stable/9/sys/x86/acpica/srat.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/acpica/srat.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/include/mca.h ============================================================================== --- stable/9/sys/x86/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/pci/qpi.c ============================================================================== --- stable/9/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/x86/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/file/closefrom/closefrom.c ============================================================================== --- stable/9/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/netinet/arphold/arphold.c ============================================================================== --- stable/9/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: stable/9/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/tests.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/usr.bin/perror/perror.1 ============================================================================== --- stable/9/usr.bin/perror/perror.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/perror/perror.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: stable/9/usr.bin/perror/perror.c ============================================================================== --- stable/9/usr.bin/perror/perror.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/perror/perror.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: stable/9/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/9/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/usr.bin/protect/protect.1 ============================================================================== --- stable/9/usr.bin/protect/protect.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/protect/protect.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/usr.bin/protect/protect.c ============================================================================== --- stable/9/usr.bin/protect/protect.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/protect/protect.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/9/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/9/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/usr.sbin/pciconf/err.c ============================================================================== --- stable/9/usr.sbin/pciconf/err.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/pciconf/err.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-stable-9@FreeBSD.ORG Fri Jun 5 07:34:53 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2B8593D; Fri, 5 Jun 2015 07:34:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C67561AE8; Fri, 5 Jun 2015 07:34:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557YqCf032414; Fri, 5 Jun 2015 07:34:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557Yq01032413; Fri, 5 Jun 2015 07:34:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050734.t557Yq01032413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 07:34:52 +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: r284017 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 07:34:53 -0000 Author: ae Date: Fri Jun 5 07:34:52 2015 New Revision: 284017 URL: https://svnweb.freebsd.org/changeset/base/284017 Log: Rework r281869 to not skip RTM announces for tunneling interfaces. This is direct commit to stable/9. Modified: stable/9/sys/netinet6/in6.c Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Jun 5 07:23:32 2015 (r284016) +++ stable/9/sys/netinet6/in6.c Fri Jun 5 07:34:52 2015 (r284017) @@ -154,29 +154,28 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; - if (nd6_need_cache(ifp) == 0) - return; - IF_AFDATA_LOCK(ifp); - ifa->ifa_rtrequest = nd6_rtrequest; - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | - LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, - sizeof(ln->ll_addr)); - LLE_WUNLOCK(ln); + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + if (nd6_need_cache(ifp) != 0) { + IF_AFDATA_LOCK(ifp); + ifa->ifa_rtrequest = nd6_rtrequest; + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + + gateway.sdl_alen = 6; + memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, + sizeof(ln->ll_addr)); + LLE_WUNLOCK(ln); + } } - bzero(&rt, sizeof(rt)); rt.rt_gateway = (struct sockaddr *)&gateway; memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); From owner-svn-src-stable-9@FreeBSD.ORG Fri Jun 5 16:02:08 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 913B8D9C; Fri, 5 Jun 2015 16:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E88C15BF; Fri, 5 Jun 2015 16:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55G28x7086745; Fri, 5 Jun 2015 16:02:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55G28l5086744; Fri, 5 Jun 2015 16:02:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051602.t55G28l5086744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:02: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: r284027 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 16:02:08 -0000 Author: avg Date: Fri Jun 5 16:02:07 2015 New Revision: 284027 URL: https://svnweb.freebsd.org/changeset/base/284027 Log: MFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not become too long Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 15:51:23 2015 (r284026) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:07 2015 (r284027) @@ -2088,12 +2088,14 @@ dsl_dataset_promote_check(void *arg, dmu int err; uint64_t unused; uint64_t ss_mv_cnt; + size_t max_snap_len; err = promote_hold(ddpa, dp, FTAG); if (err != 0) return (err); hds = ddpa->ddpa_clone; + max_snap_len = MAXNAMELEN - strlen(ddpa->ddpa_clonename) - 1; if (hds->ds_phys->ds_flags & DS_FLAG_NOPROMOTE) { promote_rele(ddpa, FTAG); @@ -2156,6 +2158,10 @@ dsl_dataset_promote_check(void *arg, dmu /* Check that the snapshot name does not conflict */ VERIFY0(dsl_dataset_get_snapname(ds)); + if (strlen(ds->ds_snapname) >= max_snap_len) { + err = SET_ERROR(ENAMETOOLONG); + goto out; + } err = dsl_dataset_snap_lookup(hds, ds->ds_snapname, &val); if (err == 0) { (void) strcpy(ddpa->err_ds, snap->ds->ds_snapname); From owner-svn-src-stable-9@FreeBSD.ORG Fri Jun 5 20:38:23 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B54610; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF98A1955; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55KcNKg030822; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55KcN69030821; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506052038.t55KcN69030821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 20:38: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: r284045 - in stable: 10/sys/modules/oce 9/sys/modules/oce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 20:38:23 -0000 Author: jhb Date: Fri Jun 5 20:38:22 2015 New Revision: 284045 URL: https://svnweb.freebsd.org/changeset/base/284045 Log: MFC 281932: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 Modified: stable/9/sys/modules/oce/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/modules/oce/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/modules/oce/Makefile ============================================================================== --- stable/9/sys/modules/oce/Makefile Fri Jun 5 20:30:36 2015 (r284044) +++ stable/9/sys/modules/oce/Makefile Fri Jun 5 20:38:22 2015 (r284045) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-stable-9@FreeBSD.ORG Sat Jun 6 20:37:46 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 140A99B5; Sat, 6 Jun 2015 20:37:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E812B1F32; Sat, 6 Jun 2015 20:37:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KbjaY058595; Sat, 6 Jun 2015 20:37:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KbhP2058576; Sat, 6 Jun 2015 20:37:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506062037.t56KbhP2058576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Jun 2015 20:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r284100 - in stable: 10/sys/vm 9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 20:37:46 -0000 Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/vm/default_pager.c ============================================================================== --- stable/9/sys/vm/default_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/default_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/device_pager.c ============================================================================== --- stable/9/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -249,6 +249,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/phys_pager.c ============================================================================== --- stable/9/sys/vm/phys_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/phys_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -129,6 +129,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_LOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/sg_pager.c ============================================================================== --- stable/9/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -128,6 +128,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/swap_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -685,6 +685,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } /************************************************************************ Modified: stable/9/sys/vm/vm_meter.c ============================================================================== --- stable/9/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015 (r284100) @@ -110,14 +110,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYLOCK(object)) { - /* - * Avoid a lock-order reversal. Consequently, - * the reported number of active pages may be - * greater than the actual number. - */ - continue; - } + VM_OBJECT_LOCK(object); vm_object_clear_flag(object, OBJ_ACTIVE); VM_OBJECT_UNLOCK(object); } @@ -195,10 +188,9 @@ vmtotal(SYSCTL_HANDLER_ARGS) mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { /* - * Perform unsynchronized reads on the object to avoid - * a lock-order reversal. In this case, the lack of - * synchronization should not impair the accuracy of - * the reported statistics. + * Perform unsynchronized reads on the object. In + * this case, the lack of synchronization should not + * impair the accuracy of the reported statistics. */ if (object->type == OBJT_DEVICE || object->type == OBJT_SG) { /* Modified: stable/9/sys/vm/vm_object.c ============================================================================== --- stable/9/sys/vm/vm_object.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vm_object.c Sat Jun 6 20:37:40 2015 (r284100) @@ -164,6 +164,8 @@ vm_object_zdtor(void *mem, int size, voi vm_object_t object; object = (vm_object_t)mem; + KASSERT(object->ref_count == 0, + ("object %p ref_count = %d", object, object->ref_count)); KASSERT(TAILQ_EMPTY(&object->memq), ("object %p has resident pages", object)); @@ -184,6 +186,9 @@ vm_object_zdtor(void *mem, int size, voi KASSERT(object->shadow_count == 0, ("object %p shadow_count = %d", object, object->shadow_count)); + KASSERT(object->type == OBJT_DEAD, + ("object %p has non-dead type %d", + object, object->type)); } #endif @@ -197,9 +202,15 @@ vm_object_zinit(void *mem, int size, int VM_OBJECT_LOCK_INIT(object, "standard object"); /* These are true for any object that has been freed */ + object->type = OBJT_DEAD; + object->ref_count = 0; object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; + + mtx_lock(&vm_object_list_mtx); + TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); + mtx_unlock(&vm_object_list_mtx); return (0); } @@ -229,10 +240,6 @@ _vm_object_allocate(objtype_t type, vm_p LIST_INIT(&object->rvq); #endif object->cache = NULL; - - mtx_lock(&vm_object_list_mtx); - TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); } /* @@ -641,20 +648,9 @@ vm_object_destroy(vm_object_t object) { /* - * Remove the object from the global object list. - */ - mtx_lock(&vm_object_list_mtx); - TAILQ_REMOVE(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); - - /* * Release the allocation charge. */ if (object->cred != NULL) { - KASSERT(object->type == OBJT_DEFAULT || - object->type == OBJT_SWAP, - ("vm_object_terminate: non-swap obj %p has cred", - object)); swap_release_by_cred(object->charge, object->cred); object->charge = 0; crfree(object->cred); @@ -760,6 +756,10 @@ vm_object_terminate(vm_object_t object) if (__predict_false(object->cache != NULL)) vm_page_cache_free(object, 0, 0); + KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP, + ("%s: non-swap obj %p has cred", __func__, object)); + /* * Let the pager know object is dead. */ @@ -1749,6 +1749,8 @@ vm_object_collapse(vm_object_t object) KASSERT(backing_object->ref_count == 1, ( "backing_object %p was somehow re-referenced during collapse!", backing_object)); + backing_object->type = OBJT_DEAD; + backing_object->ref_count = 0; VM_OBJECT_UNLOCK(backing_object); vm_object_destroy(backing_object); Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vnode_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -231,6 +231,12 @@ retry: * Object has been created while we were sleeping */ VI_UNLOCK(vp); + VM_OBJECT_LOCK(object); + KASSERT(object->ref_count == 1, + ("leaked ref %p %d", object, object->ref_count)); + object->type = OBJT_DEAD; + object->ref_count = 0; + VM_OBJECT_UNLOCK(object); vm_object_destroy(object); goto retry; }